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
selch
Beginner


Joined: 19 Dec 2003
Posts: 15
Location: USA

PostPosted: Fri Jan 02, 2004 11:42 am   

Help capturing Prompt info correctly
 
Here is what my prompt looks like:
H:141 V:135 T:12505 E:299,822 N:102,554 >

I'm having problems capturing my Experience (E:) and my Need to level (N:). I'm using the Mud Prompt settings in preferences. The special charactre is set to H:. I've set variables Hits, Moves, Talens, Exp and Need. zMud captures all the variables ok however for Exp and Need it only captures the first 3 numbers of E: and takes the last 3 (after the comma) and sets them to Need.

How do I make zMud set the variable taking all 6 numbers with the comma in it?

Thanks, selch[?]
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jan 02, 2004 5:02 pm   
 
You'll need to use the #TRIGGER command for the last two numbers. On the Mud Prompt setting, set the variables to Hits, Moves, and Talens only.

On the command line, make this trigger. In the editor, the first section will be the pattern, the second section will be the value, and the final section sets the Prompt option.
#TR {H:%d V:%d T:%d E:(%n) N:(%n)} {#VA Exp %1;#VA Need %2} {} {prompt}

It's possible to get all the variables from the trigger, and not use the Mud Prompt setting, by simply putting parentheses around each of the wildcards and adding a #VARIABLE command for each one. That would change the numbers of course, so that Exp would be %4, and Need would be %5.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Fri Jan 02, 2004 5:14 pm   
 
If you're wanting to keep the commas, make this your trigger pattern:
H~:&Hits V~:&Moves T~:&Talens E~:&Exp N~:&Need ~>

If you're wanting the numbers only:
H~:&%n{Hits} V~:&%n{Moves} T~:&%n{Talens} E~:&%n{Exp} N~:&%n{Need} ~>

Check the help on pattern matching for more help.
Then set your variables like:
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