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
TiamKrynn
Newbie


Joined: 10 Aug 2003
Posts: 4
Location: USA

PostPosted: Sun Aug 10, 2003 6:45 pm   

Achaea Trigger help in spacing
 
I need some help with spacing on triggers, more specifically, how to space out a trigger to pick up info from the Elixlist skill and put proper vials into the proper places. Right now I am unsure of how to set the trigger so that it handles the spacing that the mud sends in the list of vials when you use the skill. If I use:
#trigger {(%w) vial(%d) (%*) (%d) (%d)} {} and the mud sends the line:
Birchwood vial34656 an epidermal salve 45 88
It doesn't trigger due to the spaces in between the different pieces of information. If I test the trigger with the line:
Birchwood vial34656 an epidermal salve 45 88
%1 = Birchwood
%2 = 134656
%3 = an epidermal salve
%4 = 45
%5 = 88
What keeps the (%*) from returning <an epidermal salve 45 88> since the "*" designates any character?

Hope someone can answer my questions. You can message Tiam, Darhvon, or Solvanis in Achaea if you wish to help me.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Aug 10, 2003 10:11 pm   
 
The (%*) doesn't match 45 and 88 because they are required to match the two (%d)'s that follow it.

I'd recommend using (*) instead of (%*). You don't appear to have any need for more matching than * will provide.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Mon Aug 11, 2003 8:23 pm   
 
To take care of the variable number of spaces, use %s in your trigger.

#tr {(%w) vial(%d)%s(*)%s(%d)%s(%d)} {process parameters...}

Should take care of your problem, I think.

Larkin
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