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
Aekisu
Novice


Joined: 08 Oct 2002
Posts: 34

PostPosted: Mon Oct 27, 2003 8:52 am   

Extracting mana points
 
I receive the following prompt and want it to trigger so I can extract the hp ,mana, & etc. For some reason I can't seem to get it right so I can obtain the information I need. The prompt is:

HP [ 104/104 ] SP [ 36/111 ] EP [ 79/79 ]

I have tried a number of different combinations similar to:

HP [ %hp/%maxhp ] SP [ %mana/%manamax ] EP [ %endro/%endromax ]

Bascly, I have not a clue how I should be formatting the trigger to make it work. What do I need to do?
Reply with quote
IceChild
Magician


Joined: 11 Oct 2000
Posts: 419
Location: Post Falls, ID, USA

PostPosted: Mon Oct 27, 2003 9:12 am   
 
For your pattern, try:

HP ~[ &%nhp~/&%nmaxhp ~] SP ~[ &%nmana~/&%nmanamax ~] EP ~[ &%nendro~/&%nendromax ~]

basically, what you're saying by this is, for example with &%nhp, take a matching number (%n in pattern matching matches any numeric value), and store it into the hp variable...

Now your hp can be referenced by @hp, and your max hp can be referenced by @maxhp, etc.

Make sense?

Also, it's worthwhile to note that when using any special character (such as [ ] / . and the like) in a pattern, you need to use the ~ character directly before it, so that zmud knows to match that character, and not to parse it as part of the pattern information.
Reply with quote
Aekisu
Novice


Joined: 08 Oct 2002
Posts: 34

PostPosted: Tue Oct 28, 2003 1:09 am   
 

Thank you Ice. It worked perfectly.
Reply with quote
IceChild
Magician


Joined: 11 Oct 2000
Posts: 419
Location: Post Falls, ID, USA

PostPosted: Tue Oct 28, 2003 4:07 am   
 
Glad it worked for ya.
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