 |
killer78 Beginner
Joined: 23 Mar 2005 Posts: 15
|
Posted: 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 |
|
|
 |
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: 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 |
|
|
 |
killer78 Beginner
Joined: 23 Mar 2005 Posts: 15
|
Posted: 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 |
|
|
 |
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: 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. |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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" |
|
|
 |
killer78 Beginner
Joined: 23 Mar 2005 Posts: 15
|
Posted: 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?
|
|
|
 |
killer78 Beginner
Joined: 23 Mar 2005 Posts: 15
|
Posted: 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 :)
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
 |
|
|