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
bebamedo
Novice


Joined: 02 Aug 2006
Posts: 32

PostPosted: Sat Jun 25, 2011 11:29 am   

clarification of multiline trigger
 
What I want to do:

if I receive pattern1, I want my ZMUD look if the next line is pattern2. If it is execute alias command, otherwise no. Now help on net says

#TRIGGER {Pattern1} {}
#COND {Pattern2} {command} {Within|Param=1}

What I want to clear is if I upload from NOTEPAD do I do it like stated above, or do I need to do

#TRIGGER {Pattern1} {#COND {Pattern2} {command} {Within|Param=1}} ?

I want that condition to fire only on pattern1 and nothing else. I worked with #cond before, but always put it in seperate folder with its triiger, putting that folder on/off. And if something went wrong I always had to relaoad whole sys. I would like to avoid testing like that.

Thanks for the help.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Jun 25, 2011 1:24 pm   
 
The first one.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jun 25, 2011 6:29 pm   
 
#CONDITION is like #TRIGGER, with the basic difference being that you cannot ever have a standalone #CONDITION.
_________________
EDIT: I didn't like my old signature
Reply with quote
bebamedo
Novice


Joined: 02 Aug 2006
Posts: 32

PostPosted: Sat Jun 25, 2011 6:30 pm   step up
 
Ok, I successfully importet text below:

#CLASS {Combat/Enemy/afflictions/triggers/anorexia}
#ALIAS anorexiaon {eanorexia=1}
#ALIAS anorexiaoff {eanorexia=0}
#ALIAS eatingafflicionchecker {#IF (@eatingtype = "maidenhair") {#echo doing maidenhair}}
#ALIAS drinkafflicionchecker {#echo rihtat eating healing}
#TRIGGER {@tar quickly eats (*)} {#VAR eatingtype %1;anorexiaoff}
#COND {H:} {eatingafflicionchecker} {Within|Param=1}
#ECHO {vsako herb pod svoj alias v okviru eating aliasa}
#TRIGGER {@tar takes a drink from (*)} {#VAR drinkingtype %1;anorexiaoff;drinkafflicionchecker}
#ECHO {vsako drink pod svoj alias v okviru eating aliasa}
#VAR tar {test} {test}
#VAR eanorexia {0} {0}
#VAR eatingtype {nic} {nic}
#CLASS 0


1- Now, when I import it as new text, triggers do not work at all.
2- I checked state of trigger and it is 0
3- If I than go into triggers and again manually within ZMUD chose state 0 for the trigger, triggers start working normaly . !?!

Any chance I set this right on import already?
I would like to avoid doing this like every time I upload or log on.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Wed Jul 06, 2011 2:29 pm   
 
You can give the trigger an id to easily manipulate it as such:
;code
#TRIGGER "triggereating" {@tar quickly eats (*)} {#VAR eatingtype %1;anorexiaoff}
;more code
#STATE triggereating 0

Also look in the help files at #SET and %state.
_________________
.geniusclown
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