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


Joined: 12 Mar 2010
Posts: 3

PostPosted: Mon Mar 22, 2010 3:38 pm   

Going mad over simple Status capture
 
Here is the information show during combat at regular occurances, this is NOT shown at the prompt

HP [ 400/400 ] SP [100/100 ] MP [ 300/300 ]

and I just want to capture it as variables to use for things like the status bar, and outputting to a guage etc..

I have tried variations of solutions found in other threads, and in the zmud help files.. but just cant get it to work, or match the pattern.

Please can anyone assist in an appropriate TRIGGER and VAR solution (hp/maxhp sp/maxsp mp/maxhp)

Many thanks
Reply with quote
MorganUK
Newbie


Joined: 12 Mar 2010
Posts: 3

PostPosted: Mon Mar 22, 2010 3:39 pm   
 
Oh, this is a direct copy / paste form the mud.. i.e the spaces are always there in the MUD display.
Reply with quote
myddrun
Wanderer


Joined: 31 Mar 2005
Posts: 58

PostPosted: Tue Mar 23, 2010 9:38 am   
 
HP ~[ (*)/(*) ~] SP ~[ (*)/(*) ~] MP ~[ (*)/(*) ~]

Not exactly elegant but then neither am I. You could put the variable statments in the trigger but I dont like doing that. I think you can replace the * with %d I thihk too. My head isn't working this morning.

Reference each number with %1, %2, %3 and you might have to escape the slashes too with ~/

#var CurHP %1
#var MaxHP %2

etc.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Fri Apr 02, 2010 1:48 pm   
 
Also, you can do this:

#SETPROMPT "HP" hp maxhp sp maxsp mp maxmp

And Myddrun, why don't you like setting the variable in the trigger pattern? It does make things easier.
Reply with quote
myddrun
Wanderer


Joined: 31 Mar 2005
Posts: 58

PostPosted: Fri Apr 09, 2010 8:37 am   
 
Because I get confused easily. I think it comes from my old programming days of having variable setup routines at the top of the code :D
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