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
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Wed Sep 17, 2003 8:52 pm   

Experience guage button
 
Ive been working with this script for showing my experience until next level on my status bar.

#VAR EXPTNL
#VAR Level
#VAR Exp
#VAR Tnl
#VAR QP
#VAR Complete
#TRIGGER {* You have * experience points and need (*) to advance.} {@EXPTNL = %replace( "%1", ",")}
#TRIGGER {Total Level: (%d)} {#MATH Level (%1 + 1)}
#TRIGGER {You receive (*) experience points.} {@Exp = %replace( "%1", ",");#MATH Tnl (@EXPTNL/@Exp);#MATH EXPTNL (@EXPTNL-@Exp)}
#TRIGGER {Quest Points: (*) ~((*) quests~)} {@QP = %replace( "%1", ",");@Complete = %replace( "%2", ",")}
#ST Experience needed to level @Level~: @EXPTNL I will get there in @tnl kills. @QP Quest Points


but ive decided that i have other crap i want to put on my status bar and that i could put my experience on a guage button to border the top of my screen. someone please tell me how i would go about doing this.[8D]
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Wed Sep 17, 2003 9:49 pm   
 
heh. ignore that Quest part. it is unnessecary and i should have edited it out before posting the script im using. i apologize.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Sep 17, 2003 10:22 pm   
 
A gauge is fairly easy to make, but I'm not sure what values you'd want to use.

To make a gauge, open the settings editor by clicking the Buttons button. Click New and give it a Caption. Set the Kind to Gauge. Go to the Gauge tab and fill in the Value (defaults to 0). This will control the moving bar of the gauge. Fill in the maximum value in Gauge Max (defaults to 100), and (if desired) the value to change the bar-color in Gauge Low (defaults to 0). Select a Gauge Color, anything but black (this is actually transparent), and (if desired) Low Color and Gauge Background. Save.

In your case, you can use the value from the Status Line as your caption. @EXPTNL can be the value, with Gauge Max and Gauge Low blank, and you'll get a moving bar for the last 100 exp points.

Button States Tab
Kind: Gauge
Caption: @Level: @EXPTNL

Gauge Tab
Value: @EXPTNL
Gauge Color: green
Gauge Background: grey

As a final suggestion, you could use %n to pick up the numbers.
#TRIGGER {You have %n experience points and need (%n) to advance.} {@EXPTNL = %1}
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Wed Sep 17, 2003 10:29 pm   
 
thats pretty much what ive tried so far. ive fiddled around with it and it doesnt seem to be responding to the @EXP or @EXPTNL.

@EXPTNL = how much experience i need until next level.
@EXP = my current experience

i tried setting the value @EXP (which is the moving bar part of the guage i think) and i set the guage maximum to @EXPTNL (which is the background i thought) and its not working like it should.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Sep 18, 2003 3:59 am   
 
@EXP = my current experience

This is a conflict in your above posting for the trigger

#TRIGGER {You receive (*) experience points.} {@Exp = %replace( "%1", ",");#MATH Tnl (@EXPTNL/@Exp);#MATH EXPTNL (@EXPTNL-@Exp)}

you see it says 'you recieve 12,012 experience points.
not you have.

try tking this out or re writting to something like this:

#TRIGGER {You receive (*) experience points.} {@Expnow = %replace( "%1", ",");#MATH Tnl (@EXPTNL-@Expnow)}
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Thu Sep 18, 2003 5:48 am   
 
i got it all worked out on my own eventually. thank you for all the help.
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