|
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Wed Aug 20, 2003 1:01 am
A "reparse" trigger question |
Reparse trigger is a wonderful solution but there is one issue that I really need some help with.
When an offensive spell is pasted I want to color the line differently depending if it was a friend, enemy or "someone else" that received it. To use the zmud example:
#TRIGGER {(%w) tells you} {}
#CONDITION {Zugg} {#color yellow} "reparse"
#CONDITION {Darker} {#color red} "reparse"
If the receiver was neither Zugg nor Darker it was "someone else" and then I want to color this person blue.
Question is: How do I enter a 3rd conditional trigger that colors the line blue - unless it is Zugg (color yellow) or Darker (color red)?
Any help as always appreciated |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Aug 20, 2003 1:34 am |
Expanding the example you provided...
#TRIGGER {(%w) tells you} {}
#CONDITION {Zugg} {#color yellow;#STATE 4} "reparse"
#CONDITION {Darker} {#color red;#STATE 4} "reparse"
#CONDITION {*} {#COLOR blue} "reparse"
#CONDITION {} {#NOOP Eat a line} |
|
|
|
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Wed Aug 20, 2003 5:40 pm |
I'm afraid this is not working properly as the trigger eventually colors the output blue. That is, the trigger does fire on "Darker" but it also fires on * and hence the final color will be that of * (i.e. blue).
Another problem is that the trigger always stops at #state 4. The #NOOP command never resets the trigger to state 0 (I have also tried to include #state 0 as a second command after #NOOP, but no luck).
Any suggestions[?]
(echo trigger)
Darker tells you hi
[(%w) tells you-> ]
[Darker-> #color red;#STATE 4]
[*-> #COLOR blue] |
|
|
|
Carabas GURU
Joined: 28 Sep 2000 Posts: 434 Location: USA
|
Posted: Wed Aug 20, 2003 5:54 pm |
Reposition the * condition to be the first.
#TRIGGER {(%w) tells you} {}
#COND {*} {#COLOR blue} "reparse"
#COND {Zugg} {#color yellow} "reparse"
#COND {Darker} {#color red} "reparse" |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Aug 20, 2003 6:30 pm |
Just color it blue to start with and use reparse to change the color.
#TRIGGER {(%w) tells you} {#COLOR blue}
#CONDITION {Zugg tells you} {#color yellow} "reparse"
#CONDITION {Darker tells you} {#color red} "reparse" |
|
|
|
|
|