|
danluciano Newbie
Joined: 10 Feb 2002 Posts: 1 Location: USA
|
Posted: Sun Feb 10, 2002 7:14 am
Fun with #if and %ismember |
I have a trigger for dispel magic that I am working on. If a "friend" asks my character to "dispel mob" the trigger is to check if the request is made by a friend, and then check to see if the "mob" is a valid target before firing the spell. The format is as follows:
(%w) group-says, in Common, 'dispel (%x)'
I have a friendList with a string of all friend names already.
my trigger goes as follows:
#var @petitioner %1
#var @isenemy %2
I want to use ismember to check first if the petitioner is in friendList and also to check if isenemy is NOT in the friendList. I do not want to dispel my friends. ismember does not seem to like being used more than once in an if statement. Please let me know how I can fix this.
Thanks for your help!
Dan |
|
|
|
HariKari Wanderer
Joined: 16 Feb 2001 Posts: 57
|
Posted: Sun Feb 10, 2002 8:38 am |
If you have @petitioner as a list ie HariKari|danluciano|etc and the same for isenemy..
{@petitioner} group-says, in Common, 'dispel ({@isenemy})
c dispel %1 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Feb 10, 2002 2:08 pm |
I seem to have no such problem:
#TRIGGER {(%w) group-says, in Common, 'dispel (%x)'} {#IF ((%ismember( %1, @friendlist)) and (!%ismember( %2, @friendlist))) {c dispel %2}}
works just like what you described.
Kjata |
|
|
|
|
|