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
kkriehn@wi.rr.com
Newbie


Joined: 05 Oct 2006
Posts: 5

PostPosted: Fri Nov 03, 2006 9:57 pm   

help me please
 
anyone know how to make a script that can scan in xp needed to level, and keep track of xp gained, and then tell you when you get to a pre determined amount away from leveling?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Nov 04, 2006 2:05 am   
 
Without a sample of output from your mud, there's not much that can be done for you. However this is a common topic and you should try searching the forum for ideas and examples. You can try this one. http://forums.zuggsoft.com/phpbb/viewtopic.php?t=13096&highlight=experience+tracking+script
_________________
Asati di tempari!
Reply with quote
kkriehn@wi.rr.com
Newbie


Joined: 05 Oct 2006
Posts: 5

PostPosted: Sat Nov 04, 2006 2:13 am   sample
 
here is a sample f the lines that tell me xp.
Level - Experience Required - Title
64 - 166284320
65 - 172902080
66 - 179718368
You - 181571447
67 - 186739136
68 - 193970528
69 - 201418864
70 - 209090656
You need 5167689 experience points to gain a level.
You receive 137108 experience points.
You hear A gypsy child's death cry.
You get everything from corpse of A gypsy child.
The Gods gives you 1 gold coins for corpse of A gypsy child.
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Sat Nov 04, 2006 7:12 am   
 
#tr {You need &tnl experience points to gain a level.}
#tr {You receive &xpreceived experience points.} {#var tnl %eval(@tnl-@xpreceived);#loop %numitems(@lvllist) {#if (@tnl > %item(@lvllist,%i)) {#var clvl %item(@lvllist,%i);#abort;#var xptogo %eval(@clvl-@tnl);#show @xptogo exp needed until level %item(@lvllist,%i)}}}

to work this you have to set up a variable, lvllist(level list)

this trigger will autopopulate this variable, however first you want to type #var lvllist {} to create it

#tr {&nn~ ~-~ &lvlxp} {#additem lvllist %2}
#tr {You ~- &lvlxp} {#additem lvllist %2}

then do the level screen from lvl 1-You and
Reply with quote
kkriehn@wi.rr.com
Newbie


Joined: 05 Oct 2006
Posts: 5

PostPosted: Sat Nov 04, 2006 10:50 am   
 
ok I see how this tracks it...but how do I get it so one of my chars tells the other when I am within 500k xp of leveling?
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Sun Nov 05, 2006 1:13 am   
 
#if (@xptogo < 500000) {tell blah you are within 500k of level}, add that where want to tell him, perhaps on death trigger.
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