Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: 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 Smile
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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}
Reply with quote
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: 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]
Reply with quote
Carabas
GURU


Joined: 28 Sep 2000
Posts: 434
Location: USA

PostPosted: 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"
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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"
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net