|
Sitral Beginner
Joined: 03 Mar 2002 Posts: 15 Location: USA
|
Posted: Sun Mar 03, 2002 11:42 pm
Trigger on colors? |
Here's the thing, my favorite mud recently changed it's channels to be dynamic. Instead of static "John says" you now have "John roars", "John states", "John asks", etc, all from the 'say' command, based on the punctuation and a bit of randomness. Players can also define these strings so that when there's a period or no punctuation, their sting is used, "John whispers into your ear", "John jumps behind you and hollars", etc. Basically, my triggers are ruined. :(
To keep from total chaos, they kept the colors static. Say is always dark blue, gossip is bright blue, etc.
So, zMUD help tells me to trigger on colors I have to check the "ANSI trigger" box, and paste in a snippet of color. This doesnt work. I logged colors to see that the ANSI value here is [34m, and zMUD help tells me that the syntax to identify colors in trigger patterns is %e[xxm (%e[34m, in this case). This doesn't work, either, it sets the trigger pattern to "abc12334m" (which looks like %a34m to me). With or without the ANSI box checked, this trigger fails. How, then, can I set triggers to go off on every occurance of dark blue ([34)? (I can filter out the riff-raff on my own)
Currently using version 6.16 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Mar 04, 2002 4:31 am |
You got the right of it. You must check the ANSI Trigger box. Copying the text into the trigger pattern is the best way, make sure to use Ctrl-V when pasting. Next best is to manually enter the correct color code. In your case that is 34, and would be entered as "%e~[34m". Note the ~. Supposedly it isn't necesary in some version, but I believe it was in 6.16.
|
|
|
|
Sitral Beginner
Joined: 03 Mar 2002 Posts: 15 Location: USA
|
Posted: Mon Mar 04, 2002 6:31 am |
Actually, I got it working, I think. The tilde isn't necessary, I think (again).
Seems togglins coloring on and off did the trick. *Shrugs*, either way, I'm capturing sucessfuly now. :) |
|
|
|
Sitral Beginner
Joined: 03 Mar 2002 Posts: 15 Location: USA
|
Posted: Sat Mar 09, 2002 5:18 am |
Bah!
Don't ANSI color triggers support wildcards? Seems not...could I get a hand with this?
Here's how our global channel normally looks: John gossips, "Hello!"
'gossips' is always blue, and I need that to use the ANSI color to identify it as a gossip ('gossip', actually, is random).
However, if he chooses to use a racial language, it looks like this: (Wyrm) John gossips, "Hello!"
The (Wyrm) section includes over a dozen languages, so I threw a wildcard in my trigger: ~(*~) %w %w, "*", plus color codes. But the language identifier is colored, and seems to be rejected by the trigger.
How, then, can I setup a trigger to capture on any color in one spot, but a certain color in another spot? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Mar 09, 2002 2:13 pm |
I believe you can't. Once you turn on the ANSI trigger option, zMUD no longer discards ANSI codes when checking for a macth. This means that when the line is matched agaisnt the pattern, they both must contain the same ANSI codes since wildcards will not match ANSI codes. However, you do not need to match the racial language if you are not going to do anything with it. That is:
%w %w, "*"
(with the ANSI codes), will match both, when the racial language is at the beggining and when it isn't, provided that you don't use the ^ character to specify that it should begin matching at the beginning of a line.
Kjata |
|
|
|
Sitral Beginner
Joined: 03 Mar 2002 Posts: 15 Location: USA
|
Posted: Sat Mar 09, 2002 5:42 pm |
Unfortunantly, I am using the start-of-line character (^). Occurs too often elsewhere not to use it.
*Shrugs*, perhaps it's just time to add some filters...Can child windows have their own triggers aliases in the newer versions (6.16)? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Mar 09, 2002 9:48 pm |
Yes, child windows have their own .mud file so you can save settings specific for those windows.
Kjata |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|