Multiple windows for MUSclient

by Ixchilgal

Back to Mechanic's Corner.

Ixchilgal2005-03-10 07:42:33
Does anyone know how to send text to a different window with MUSHclient? I figured out how to copy my entire Lusternia window, so I can look at everything twice...yay! Not helpful. I want a nice, blank, empty window, which I can send specific lines of text to...and maybe set to have its own series of triggers and such, to highlight important things.
Eldanien2005-03-10 08:15:59
Send your trigger wildcard to a script.

In the script, pull the information from the wildcard array into a variable.

Call AppendToNotepad, passing the text and a notepad window name.

If you need more specific instructions, I'll need to know what script language you're using.
Ethelon2005-03-10 14:33:07
For VBscript you can use this.

This is the Trigger, you can change the "(Celest)" part to whatever channel you wish to capture, or whatever..even says, tells..

CODE

    enabled="y"
  group="*Chat"
  lines_to_match="10"
  match="^\\(Celest\\): (.*?) "(+)"\\Z"
  multi_line="y"
  name="chats"
  regexp="y"
  script="OnChat"
  sequence="100"
 >
 


Now, put this in your script:

CODE
Sub OnChat (name, line, wildcards)
Dim msg

 msg = Split (wildcards (10), chr (10))

 For Each m In msg
   AppendToNotepad "Channels", m & vbCrLf
 Next

end Sub
Ixchilgal2005-03-10 23:02:57
Looks like it's time to learn some basic scripting.
Unknown2005-03-10 23:05:40
Heres a simple way to do it:

enabled="y"
match="* tells you, "*""
send_to="5"
sequence="100"
>
%1: %2




That should work and it's fairly simple to make and change
Ixchilgal2005-03-10 23:33:44
Alright, I got it showing up in the second window properly. That's great, fine, dandy. But I can't set up triggers for -that- window. I want to be able to have that window with its own series of triggers, so I can do things like highlight names that are important.

For example, if someone I have in an "allies" variable does something that appears in that window, I want to colour their name green in the window, so it's easy to pick out.

I also want to insert a time stamp before all the text that appears in the window. So, I know what time someone said blah.

MUSHclient doesn't seem to let me to have that window with its own series of triggers.
Eldanien2005-03-10 23:35:50
alt-w, n

Is that what you mean?

You'll have to do some heavy script work to gag everything you don't want for a particular window, I think. Dunno, I've never tried this.
Ixchilgal2005-03-10 23:55:29
I found that before, isn't quite what I wanted.

The NotePad window, like you suggested for the Aetherwaves, is what I have working now. I wanted to add colours to that, and insert a time stamp before everything that goes to it.

So, I get something that looks like this in it:

QUOTE
(Geomancers): Crylia says, "No, don't think so."
(Geomancers): Sethvir says, "Bah."


Only, with certain names highlighted in green, or red.

I could do without the colours (It'd be a pain, but I could), but being able to insert text into the line (Such as the noted time stamp) would be -really- useful.
Eldanien2005-03-11 00:04:55
Adding a timestamp is easy. Messing with colors, not very easy at all.

If you use Ethelon's example above, change your script so it reads as so:

CODE

Sub OnChat (name, line, wildcards)
Dim msg

msg = Split (wildcards (10), chr (10))

For Each m In msg
  strTextAppended = ": " & m & vbCrLf
  AppendToNotepad "Channels", strTextAppended
Next

end Sub


Apologies in advance if the code doesn't work as planned, but that's the gist of it. VBScript gives me the willies, so I avoid it. Everyone else and their brother uses it to script with, though.
Ixchilgal2005-03-11 00:51:58
And one last thing I've been fiddling with...sorry to be a pain, but I'm a programming idiot.

I want to insert text based on the name of the person.

I have it set up so that it sends the "X enters your demesne." and "X leaves your demesne." lines into a separate Notepad window, and it timestamps that.

Now, I want it to look at the name of the person who enters, and if that name is in a variable, it adds text to the end of the line.

For example, we'll say Munsia enters my Demesne, and she's in my "CityEnemies" variable, I'd get something that looks like the following:

QUOTE
Munsia enters your demesne. (City)


If she were in two variables, say, my CityEnemies and OrderEnemies variables, it'd get:

QUOTE
Munsia enters your demesne. (City) (Order)


In zMUD this was fairly easy to accomplish, but I'm not much of a script writer, and I've used MUSHclient all of five days. Anyways, the idea is that I can meld up a village, turn on Demesne watch, and glance at the Notepad window whenever someone enters my Demesne, to easily see if I need to worry about them or not.

I have to update my variables list on a somewhat regular basis (At least once a month), but that's really not difficult, just inconvenient.
Unknown2005-03-11 06:49:52
Copy, paste into an empty text file, save as DemesneEcho.xml in your default plugins folder, then install it in your world (under File->Plugins).

CODE









  name="DemesneEcho"
  author="Avator"
  id="26f359e8dc976a453b2ac573"
  language="VBscript"
  purpose="Displaying demesne messages"
  save_state="y"
  date_written="2005-03-11 16:08:48"
  requires="3.65"
  version="1.0"
  >




    match="enemy+ * *"
  enabled="y"
  send_to="12"
  sequence="100"
 >
 AddName lcase("%1") & "Enemy", "%2"
 
    match="enemy- * *"
  enabled="y"
  send_to="12"
  sequence="100"
 >
 RemoveName lcase("%1") & "Enemy", "%2"
 



    enabled="y"
  match="^(+) enters your demesne\\.$"
  regexp="y"
  script="OnDemesneEcho"
  sequence="100"
 >
 










And vbscript sucks horrendously, heh.