|
akkappap Newbie
Joined: 04 Feb 2006 Posts: 5
|
Posted: Sat Sep 13, 2008 8:19 pm
#IF working off a variable list. |
Hi!
I need some help with a rather simple #IF function but I just can't wrap my head around it.
Example:
Brunte pokes Ivar in the ribs.
(%w) pokes (%w) in the ribs.
Now, I want to have a variable list of names that it should trigger on and only executer it on those names.
So something like this:
#IF {%1 (exist in variable} {tell %1 stop poking %2!} {}
^---- here is the problem, I can't get this part to work.
I'm pretty sure there's a simple solution to this.. I just can't get it :D
Many thanks for any quick answers!
Hope anyone can make some sense out of it, if not please ask me to elaborate on it. |
|
Last edited by akkappap on Sat Sep 13, 2008 8:21 pm; edited 1 time in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sat Sep 13, 2008 8:21 pm |
#IF (%ismember(%1, @listVar)) {tell %1 stop poking %2!}
you could also use the varList in your trigger
#TR {({@varList}) pokes (%w)} {tell %1 stop poking %2!} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
akkappap Newbie
Joined: 04 Feb 2006 Posts: 5
|
Posted: Sat Sep 13, 2008 8:25 pm |
Haha, you're the man Shalimar!
Fastest response ever, so fast I didn't even have time to edit this post right after I posted it. :D
Many thanks! works like a charm! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Sep 14, 2008 12:58 am |
I think we've got a new forums record. 2-second response time? You deserve a temporary custom posting title of "Ninja" for that one. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sun Sep 14, 2008 1:00 am |
Thats 2 minute, but i will gladly take the title if its made :)
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|