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


Joined: 23 Mar 2005
Posts: 15

PostPosted: Wed Mar 23, 2005 12:52 pm   

Lay on hand trigger
 
Hi i could use a little bit help modifing my healing script that is as this

#CLASS {Lay on hand} {enable}
#TRIGGER {%1 is moderate hurt} {lay %1}
#TRIGGER {%1 is bleeding} {lay %1}
#TRIGGER {%1 is near death} {lay %1}
#CLASS 0

These status of my group member come up each round we are engaged in combat
This works good it heals evryone in the group if they got damaged, but if i group with anyone neutral or evil my lay wont do much good
I got a var i named evilmembers where i list up the evil/neutral ones i group with how can i put into my lay trigger to check if it is 1 of the lister in the var and dont lay if it is but do it if it is not
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Wed Mar 23, 2005 1:13 pm   
 
#CLASS {Lay on hand} {enable}
#TRIGGER {%1 is moderate hurt} {%if(%ismember(%1,@evil_list),"",lay %1)}
#TRIGGER {%1 is bleeding} {%if(%ismember(%1,@evil_list),"",lay %1)}
#TRIGGER {%1 is near death} {%if(%ismember(%1,@evil_list),"",lay %1)}
#CLASS 0

Of corse you would have to use your variable name there, instead of @evil_list
Reply with quote
killer78
Beginner


Joined: 23 Mar 2005
Posts: 15

PostPosted: Wed Mar 23, 2005 1:50 pm   
 
hmm it still try to lay the one in my list as well as the ones outside it
and also check up with a syntax error
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Wed Mar 23, 2005 9:02 pm   
 
Your variable has to be an actual list, check that, like #VAR evil_list {John|Doe|Mike}
I'm not getting any syntax error myself, so Im not sure if Its on my side only.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Mar 23, 2005 11:29 pm   
 
First I recomend reading the help files for pattern matching, and %if isn't the best choice here

#CLASS {Lay on hand} {enable}
#TRIGGER {(%x) is moderate hurt} {#IF (!%ismember(%lower("%1"),%lower(@evil_list))) {lay %1}}
#TRIGGER {(%x) is bleeding} {#IF (!%ismember(%lower("%1"),%lower(@evil_list))) {lay %1}}
#TRIGGER {(%x) is near death} {#IF (!%ismember(%lower("%1"),%lower(@evil_list))) {lay %1}}
#ALIAS isevil {#ADDITEM evil_list "%-1"}
#CLASS 0

Then to add evil people to the list just type "isevil personsname"
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
killer78
Beginner


Joined: 23 Mar 2005
Posts: 15

PostPosted: Thu Mar 24, 2005 11:56 am   
 
thanks for the help guys but it didnt work out for me so i took the hard way around and made a trigger to lay hands on the ones i know i can lay instead but just out of curiosity might it be some settings that made these triggs work as intended?
Reply with quote
killer78
Beginner


Joined: 23 Mar 2005
Posts: 15

PostPosted: Thu Mar 24, 2005 11:47 pm   
 
must been a messup in my list or some such when i tried again today it worked perfect the way nexela said :)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Mar 26, 2005 6:03 am   
 
Quote:

%if isn't the best choice here


In this case, it really doesn't matter except as a point of convention. Except for the destination of the result, both commands work exactly the same.
_________________
EDIT: I didn't like my old signature
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