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
Drahkuna
Beginner


Joined: 15 Apr 2005
Posts: 15
Location: MO

PostPosted: Fri Apr 15, 2005 7:13 pm   

Multi-line triggers
 
In Aetolia, certain classes can conjure illusions. What they do is trick the client into healing an absent affliction. I'm trying to correct this by making triggers that include the cure message with the herb eaten. e.g "You eat a piece of kelp."
"Thank Varian, The Celestine! Your clumsiness is cured!"
I'd like the system to avoid assigning the variable clumsiness 1 when there's no cure message within the next line. Any suggestions as to what I can do?
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Fri Apr 15, 2005 9:00 pm   
 
I would probably use a multi-state trigger to make sure it actually casted the spell
#TRIGGER {You eat a piece of kelp.}
#COND {Thank Varian, The Celestine! Your clumsiness is cured!} {#VAR clumsiness 1} {within|param=1}

That should match only the next line after you receive You eat a piece of kelp.
For other options check the help files for multi state triggers.
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Sat Apr 16, 2005 12:00 am   
 
You can also do it all from the same trigger if you want.

#TRIGGER {^You eat a piece of kelp.$Thank Varian, The Celestine! Your clumsiness is cured!} {#VAR clumsiness 1}
Reply with quote
Drahkuna
Beginner


Joined: 15 Apr 2005
Posts: 15
Location: MO

PostPosted: Sat Apr 16, 2005 6:44 am   Thanks, you guys.
 
I appreciate the quick response. Many thanks.
Reply with quote
Drahkuna
Beginner


Joined: 15 Apr 2005
Posts: 15
Location: MO

PostPosted: Sat Apr 16, 2005 7:16 am   Alright. Works great so far, but I've got one more problem.
 
Eating kelp cures quite a few afflictions. How would I set a trigger to one value for all of the cures. like. "You eat a piece of kelp." "Thank Varian, your clumsiness is cured. and then "Your bronchial tubes open up and your asthma is cured." I've tried to make them seperate triggers but of course one winds up replacing the other. If there wasn't a cure message within the first line, I'd want to reset all kelp healed afflictions.
Reply with quote
Drahkuna
Beginner


Joined: 15 Apr 2005
Posts: 15
Location: MO

PostPosted: Sat Apr 16, 2005 7:45 am   
 
scratch that. found it. unless this will cause any obvious problems.. #TRIGGER {You eat a piece of kelp.}
#COND {} {kelp_reset} {within|param=1} kelp_reset being the alias to set all kelp cured afflictions to 0
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