 |
cimares Beginner
Joined: 11 Oct 2000 Posts: 13 Location: United Kingdom
|
Posted: Sat Mar 13, 2004 10:04 pm
#Trigger problem.. |
I have a small alias called herbaway that lists the herbs in my hands and basically puts them away.
#TRIGGER {"(%w)%d":%sx(%d)*Prepared} {inp %2 %1}
herblist
#wait 4000
#UNTRIGGER {"(%w)%d":%sx(%d)*Prepared} {inp %2 %1}
When I run from the alias, for some reason the response to each entry is for %2 and %1 to be blank, as shown below..
"witan90889": x3 A witan leaf. Prepared
inp <------- this is the response from Zmud to the triggered line
You hold, in your hands, 3 batches.
1070h, 1006m ei--
Syntax: INPOUCH <herb> to place a herb or poison in a pouch.
1070h, 1006m ei-- Trigger {"(%w)%d":%sx(%d)*Prepared} removed.
The really freaky thing is if I cut and paste the #trigger line directly into the mud.. it works perfectly.. As below..
"witan65882": x3 A witan leaf. Prepared
inp 3 witan <---- this is the correct response.
You hold, in your hands, 3 batches.
1070h, 1006m ei--
Done.
Any ideas? I think I'm going to be working on this one into the night..  |
|
|
 |
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Sat Mar 13, 2004 10:18 pm |
Try:
#alias herbaway {#temp "herbcheck" {~"(%w)%d~"~:%sx(%d)*Prepared} {inp %2 %1};herblist;#alarm +4 {#UNTRIGGER "herbcheck"}} |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Mar 14, 2004 2:18 am |
%1 and %2 refer to the first and second parameter of the ALIAS. Since you want to refer to the first and second parameter of the TRIGGER, use %%1 and %%2.
|
|
|
 |
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Sun Mar 14, 2004 2:56 am |
Oh right, good call
|
|
|
 |
cimares Beginner
Joined: 11 Oct 2000 Posts: 13 Location: United Kingdom
|
Posted: Mon Mar 15, 2004 3:20 am |
Thanks lightbulb, the %% worked a treat without anything else needing changing.
|
|
|
 |
|
|