|
snoogans Novice
Joined: 28 Oct 2001 Posts: 43 Location: USA
|
Posted: Wed Jul 17, 2002 9:17 pm
help with an IF trigger |
my trigger looks like this ...
pattern:
%1 is scorched by flames!
value:
#if (%1 = @friends) {} {
ki %1
m
}
friends var is a list of people i dont want to attack ... but i attack everyone instead of just people not on the list. ANy ideas why its not working? |
|
|
|
Toetag Magician
Joined: 10 Oct 2000 Posts: 356 Location: USA
|
Posted: Wed Jul 17, 2002 9:32 pm |
if %1 = bob and
@friends = bob|john|mary
how could %1 = @friends?
might need to use the %ismember function. Check the help files.
Killing a fly on a friends forhead may not be overkill, use a hatchet to make sure the job is done. |
|
|
|
snoogans Novice
Joined: 28 Oct 2001 Posts: 43 Location: USA
|
Posted: Wed Jul 17, 2002 10:41 pm |
if @friends = bob|john|mary then @friends = bob ... @friends = john ... and @friends = mary ... i got that from the help files, i just changed %1 to %d and it worked
|
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Thu Jul 18, 2002 1:08 am |
Instead of %1 in the pattern use %w. Enclose it in parentheses so that it is captured to %1.
Pattern:
(%w) is scorched by flames!
For your value, use the %ismember function. Trying to compare %1 to the friend list with an equals sign will cause it to treat the friends list as a single string.
Value:
#IF %ismember(%1,@friends) {#NOOP} {ki %1; m}
Troubadour |
|
|
|
|
|