|
Arthemas Newbie
Joined: 13 Dec 2006 Posts: 3
|
Posted: Wed Dec 13, 2006 3:06 pm
Possible trigger question. |
Hi there. My apologies if this has already been asked, but I couldn't find
an easy explanation that I could understand when I search for this.
I am very new to both zMUD and MUD's in general. I am trying to separate
the chat text and the game text completely, but I don't understand how to.
I just learned how to make a trigger, but I don't know how to make it so
that the [chat]: and the other chat channels' text goes right up into my chat
window that I made, without even showing in my other frame.
Any help or linkage would be greatly appreciated!
Sincerely,
Arthemas |
|
|
|
Toshiki Beginner
Joined: 20 Nov 2004 Posts: 14
|
Posted: Wed Dec 13, 2006 4:05 pm |
#trigger {~[chat~]} {#cap chatlog}
That will capture anything with [chat] before it and put it in a new window called 'chatlog'
That window, in zmud, is above the window where the game goes on. If you don't wanna see
that chat messages in with the gamestuff anymore, just add ;#gag after the #cap chatlog |
|
|
|
Arthemas Newbie
Joined: 13 Dec 2006 Posts: 3
|
Posted: Wed Dec 13, 2006 4:49 pm |
Awesome, will try it out right away. Many thanks!
Edit: This only seems to cap one line of text.. if there's more than one
line, the other lines are showed in the original window. Any ideas on what
the syntax is to let the trigger know what I want several lines of text with? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Dec 13, 2006 10:09 pm |
The easy way is to simply extend your game's wordwrap boundary so far out that the game engine never actually wraps anything. In CMud and ZMud, if you have a line that extends beyond the window boundary it gets soft-wrapped and regular one-line triggers will still match on it.
Not all games have this capability, however, so to capture everything you're simply looking at a lot more triggers that use #T- and #T+. That requires more detail of what the text is, since I believe some games are obnoxious enough to not include guaranteed punctuation like double-quotes. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Dec 13, 2006 10:38 pm |
If you need to have the word-wrapping thinner for some reason, there's also a wordwrap option in the zMUD preferences that will soft-wrap, as MattLofton put it, and still allow your triggers to match.
The easiest way I've found to solve this problem is to use the #C+ command and the #C- command in a multistate trigger. It works something like this:
#trig {~[chat~]} {#cap WindowName;#C+ WindowName;#gag;#gagon}
#cond {~"$} {#C-;#gagoff} {within|param=5}
Or words to that effect. It's quite a complicated problem - using the wordwrap solution is much easier.
EDIT: And oh yes! You'll need to add a #gag to the trigger you were given above to delete the line from the MUD output window. The #capture command will just make a duplicate. |
|
|
|
Arthemas Newbie
Joined: 13 Dec 2006 Posts: 3
|
Posted: Thu Dec 14, 2006 12:44 am |
Ah, I will first try to find that wordwrap thing in zMUD, to see if it works.
Thanks a bunch for all the answers, I really appreciate it! |
|
|
|
|
|