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


Joined: 19 Jul 2002
Posts: 1

PostPosted: Fri Jul 19, 2002 2:56 pm   

Gauge help
 
Ok, I've seen a few ask this question already, now it's my turn. I can usually pick up on scripting and learn it when someone explains what each symbol is for. How would I make a gauge for this prompt?

3655/3658|1000/1000|1080mv|

The 1000/1000 is mana.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Jul 19, 2002 3:25 pm   
 
First, make a trigger to capture your prompt data.

#TR {(%d)/(%d)~|(%d)/(%d)~|%dmv~|} {
#VAR hp %1
#VAR maxhp %2
#VAR mana %3
#VAR maxmana %4
} "prompt"

In the above pattern, zMUD will match any number of digits (0-9) for %d. They're enclosed in parentheses to indicate we wish to capture them to a parameter (%1-%4). Moves do not have parentheses because we're not interested in them. I've placed a tilde in front of the pipes (|) in order to treat them literally. Finally, the word "prompt" is added to the end to indicate that this is a prompt trigger, meaning zMUD will not wait for a carrige return to execute the action.

Now, the next step is to create your gauges:

For a hit point gauge enter the following on the command line:

#GAUGE hp "hp" @hp @maxhp (@maxhp/10) "" "blue" "red"

This is taken from the help files. The first two parameters are the gauges id and caption. Next are the variables for hp and maxhp from the prompt trigger above. Normally the gauge line will be blue, but will turn red if hp falls below one-tenth of maxhp.

For mana, it'd look like:

#GAUGE mana "mana" @mana @maxmana (@maxmana/10) "" "green" "red"

Once again, the color changes at one-tenth of maxmana.

Troubadour
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