|
alaric Novice
Joined: 13 Aug 2005 Posts: 32 Location: Cherry Point, NC
|
Posted: Sun Nov 20, 2005 1:50 am
Advanced exp bar script |
I have a basic exp bar, that catches my worth command. However, I am trying to piece together a script that will attempt to guess how much exp I am gaining after I hit a full exp bar for a level.
What I am trying to use is basically to get an average of how many npcs I kill to get one tick. We have ten ticks per level, so basically 10 points each. Then, after you reach one levels worth of exp, I want to have a #MATH command, to subtract 1 point off the avg exp each mob gives. So, for example:
Quote: |
2 mobs give 1 tick. Therefore, each mob is worth 5 exp. Now, after 20 mobs, you have a level. Which adds 1 to a variable that will be subtracted from the mobs avg exp. So instead of 5 points per mob, you get 4. Now that will add up, until you get another level, and now it will subtract 2. So you get 3 exp per mob. |
I have tried throwing all this together with #IF commands and all that. But I am feeling I am missing something or just don't know well enough what I'm doing. Can somebody help me out? I am triggering the commands off the death of a mob, which then enters my worth command to get my current exp. Any help is appreciated. Thank you. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Nov 20, 2005 12:49 pm |
Whether or not your formula's right we can't tell unless we play the mud, so we'll just assume it is. Why don't you post the code that you have, and we can help you debug it. It will also be great if you can post some sample output of the worth command.
|
|
_________________ Asati di tempari! |
|
|
|
alaric Novice
Joined: 13 Aug 2005 Posts: 32 Location: Cherry Point, NC
|
Posted: Sun Nov 20, 2005 5:38 pm |
Code: |
#ADD expkillrate 1
lastexp = @currexp
worth
#IF (@currexp < 100) {
#IF (@currexp > @lastexp) {
expkillavg = @expkillrate
expkillrate = 0
#MATH npcexprate 10/@expkillavg
} {}
} {
#IF (@expguess < 100) {#IF (@lvlguess > 0) {
#MATH npcexpavg @npcexprate - @lvlguess
#ADD expguess @npcexpavg
} {#ADD expguess @npcexprate}} {
expguess = 0
#ADD lvlguess 1
#MATH npcexpavg @npcexprate - @lvlguess
#ADD expguess @npcexpavg
}
} |
All that is in a trigger with the pattern of "is DEAD!!"
My worth command shows one of these.
You have just begun your journey to the next level.
You still have a long way to go before the next level.
You are over one-third of the way to the next level.
You are very close to half-way to the next level.
You are at the half-way point of your journey to the next level.
You have just begun your second-half journey to the next level.
You are over two-thirds of the way to the next level.
You are over three-fourths of the way to the next level.
You are almost eligible for a level advancement.
You may advance to the next level. |
|
|
|
|
|
|
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
|
|