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


Joined: 30 Jul 2002
Posts: 7
Location: Sweden

PostPosted: Thu Aug 01, 2002 1:09 am   

Need help updating static variables
 
Ok, let me first state how i finnaly set up my stat bar..

Trigger i use to update first set of variables (@hp, @m, @mv, @xp)
#TRIGGER {<(%d)hp (%d)m (%d)mv (%d)xp>} {#VA HP %1; #VA M %2; #VA MV %3; #VA XP %4;} Stats

Variables:
@hp, @maxhp, @m, @maxm, @mv, @maxmv, @xp

Stat bar customization string:
Hitpoints: %ansi(high, blue)@hp / @maxhp %ansi(black) Mana: %ansi(high, blue)@m / @maxm %ansi(black) Move: %ansi(high, blue)@mv / @maxmv %ansi(black) Total of %ansi(high, blue)@xp %ansi(black)exp to next lvl.

In the end it all look sorta like this right after i lvl, or change my gear
Hitpoints: 384/367 Mana: 255/236 Move: 331/320 Total of 1160 exp to next lvl.
(all numeralls are in a easy to se high blue on the grey status bar, with black txt)

So what i need help with is a sure fire way to autoupdate my second set of variables when i lvl..
(@maxhp, @maxm, @maxmv)
So that they never drop below the value of the autoupdating first set... shouldent be to hard to do, but ive been at this problem from diffrent angles to long to se the obvious so here i am asking for help :D
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Aug 01, 2002 2:17 am   
 
First off put some tildes (~) in fron ot thoes greater then (<) and less then (>) symbols. The tildes will never cause problems but the other might.

Next see if your mud supports a customizable prompt. If it does it is preferable to capture maxes in the prompt along with everything else. Else you will have to extract them from some other command. In order to do that you have to know what if anything is displayed when you level, what the commands is, and what line(s) contain the information you want. Since you have supplied none of those pieces of information the best I can do is the advice above.
Reply with quote
Imish
Newbie


Joined: 30 Jul 2002
Posts: 7
Location: Sweden

PostPosted: Thu Aug 01, 2002 2:55 am   
 
Ok, i was able to customize my prompt (dident know i could and i played this mud for 3 years or more)thanks for tip..
Now it looks like this..
384hp 384Mhp 245m 245Mm 331mv 331Mmv 688xp
but i still cant get it to work..
Reply with quote
Imish
Newbie


Joined: 30 Jul 2002
Posts: 7
Location: Sweden

PostPosted: Thu Aug 01, 2002 3:08 am   
 
Never mind...
For some reason when i added the variables of hp and stuff to the stat class they autoupdated and suddenly worked..
oh well it works, its not for me to question how ;)
Reply with quote
Imish
Newbie


Joined: 30 Jul 2002
Posts: 7
Location: Sweden

PostPosted: Thu Aug 01, 2002 3:11 am   
 
Ok this is the look of the finished output (just use it if you want, works fine for me)

#CLASS {Stats}
#VAR HP {}
#VAR MAXHP {}
#VAR M {}
#VAR MAXM {245}
#VAR MV {}
#VAR MAXMV {}
#TRIGGER {(%d)hp (%d)Mhp (%d)m (%d)Mm (%d)mv (%d)Mmv (%d)xp} {#VA HP %1;#VA MAXHP %2;#VA M %3;#VA MAXM %4;#VA MV %5;#VA MAXMV %6;#VA XP %7;}
#STAT {Hitpoints: %ansi(high, blue)@hp / @maxhp %ansi(black) Mana: %ansi(high, blue)@m / @maxm %ansi(black) Move: %ansi(high, blue)@mv / @maxmv %ansi(black) Total of %ansi(high, blue)@xp %ansi(black)exp to next lvl.}
#CLASS 0
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