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 May 21, 2003 5:01 pm   

#COND pattern1 OR pattern2, how to do it?
 
Hi everyone,

I want to write a trigger that gives me a coloured line depending on whether the player managed to cast a spell on me or if he missed (if he paste the spell, colour line red, if he miss, colour line green).

I have set up two string_lists ({enemy_pasted_spell_on_me} and {enemy_missed_spell_on_me})

Zmud pattern:

has completed his casting

Now I want a trigger to kick in that checks if the next two lines match the value in ANY of the two stringlist variables (@enemy_pasted_spell_on_me OR @enemy_missed_spell_on_me).

The OR is important because this is what stops me from using an ordinary #COND trigger (I think, at least).

Any help much appreciated
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 21, 2003 7:08 pm   
 
Only one state of a multi-state trigger can be active.

Obvious solution: Use two triggers.

#TR EnemySpell1 {has completed his casting}
#COND {{@enemy_pasted_spell_on_me}} {#COL red} {Within|Param=2}
#TR EnemySpell2 {has completed his casting}
#COND {{@enemy_missed_spell_on_me}} {#COL green} {Within|Param=2}

LightBulb
Advanced Member
Reply with quote
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: Wed May 21, 2003 11:05 pm   
 
Well, I am just realizing that striving for perfectly simple makes me blind.

Thanks for removing my shades (and giving me a well-deserved nudge), Lightbulp!
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