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


Joined: 17 Sep 2010
Posts: 1

PostPosted: Fri Sep 17, 2010 3:54 am   

help making Stat bar
 
I'm having trouble figuring out how to make a stat bar for Cities of M'hdoria.

Here's an example of the info given in the prompt:

<71hp 204mn 136mv>

I can't seem to figure out how to make this into a status bar!

Help!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Sep 17, 2010 3:28 pm   
 
Check out the #STATUS command. A status object is essentially a higher-powered %format() function letting you specify how to display regular text and variable text. There's no capturing of data involved, so if you want to use variable text you will also need some sort of #TRIGGER/#ONINPUT/etc to populate your variables.

Triggers allow you to specify Pattern Matching wildcards to match variable data--%d for numbers, () to capture the data--and from there you can assign it to the permanent variables used in the status object (varname = %1...%99). You can also combine these steps in the trigger pattern by using the &varname option (&%dvarname, for example, would both match on numbers and assign the match to the permanent variable varname).
_________________
EDIT: I didn't like my old signature
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