|
bebamedo Novice
Joined: 02 Aug 2006 Posts: 32
|
Posted: 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. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sat Jun 25, 2011 1:24 pm |
The first one.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
bebamedo Novice
Joined: 02 Aug 2006 Posts: 32
|
Posted: 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. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: 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 |
|
|
|
|
|