|
Jared242004 Beginner
Joined: 28 Jul 2004 Posts: 21 Location: Canada
|
Posted: Thu Aug 27, 2009 2:20 am
making one trigger work for 12 stones |
In the mud i play you can collect stones for a quest. I would like to set up 1 trigger to put any stone given to me into my bag.
Some stones when given to you show up with a a or an
gives you a moonstone.
gives you an opal.
I've tried this for a command
Trigger: gives you %d %d.
#IF %ismember ((@stones) {put stone in bag} {})
Not sure if i am missing anything or if this trigger can be set up different? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Aug 27, 2009 3:14 am |
1)
#trigger {gives you {a|an} (%w).} {#if (%ismember(@stones)) {put stone in bag} {whatever you want to do here}}
2)
#trigger {gives you {a|an} ({@stone}).} {put stone in bag}
#2 is probably going to be slower, since it has to test each and every element in the @stone stringlist until it finds a match. #1, however, will trigger whenever anything is given to you so even though the trigger is fast you might have it firing way too much. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: Thu Aug 27, 2009 3:38 am |
Shouldn't it be %ismember(@stone, %1)
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Aug 27, 2009 4:41 am |
By the way, the reason why your first trigger wouldn't have worked anyway is because %d is reserved for digits only. The trigger was looking for numbers, not words.
And yes, it should be %ismember(@stones, %1).
Charneus |
|
|
|
|
|