Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Cronos
Novice


Joined: 06 Sep 2004
Posts: 30

PostPosted: Wed Jul 05, 2023 6:44 pm   

Gauges
 
Could someone assist with an HP gauge when the command prompt looks something like this?

<1000h(1272H) 434v(434V)> <-1000A 0h><=------------------*>

Would like to feed in 1000 as the @hp and 1272 as @maxhp for the trigger variables


Last edited by Cronos on Fri Jul 07, 2023 9:14 pm; edited 1 time in total
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Wed Jul 05, 2023 8:22 pm   
 
Same as any other trigger really, capture the bits you need, don't worry about the rest:

#TR {<(%d)h~((%d)H~) (%d)v~((%d)V~)>} {hp=%1;maxHp=%2} {} {prompt}

That last bit is important so it checks the prompt instead of newlines.
Would still fire on newline, mind you, but your information will always be lagging behind the current values.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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