Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
cimares
Beginner


Joined: 11 Oct 2000
Posts: 13
Location: United Kingdom

PostPosted: 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.. Very Happy
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: 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"}}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Sun Mar 14, 2004 2:56 am   
 
Oh right, good call
Reply with quote
cimares
Beginner


Joined: 11 Oct 2000
Posts: 13
Location: United Kingdom

PostPosted: Mon Mar 15, 2004 3:20 am   
 
Thanks lightbulb, the %% worked a treat without anything else needing changing.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net