|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Sun Mar 09, 2003 5:46 pm
How would I store total exp? |
I have no idea how I would do this, but I want to find a way to store all the exp ive ever earned. Now, I need to capture the costs of the current stats (and when i spend exp on stats, add how much I spent to the exptotal) same with the cost of the level...
OUTPUT:
Fremen Advancement Costs
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[secondary ability] Strength [ 10] : 375 experience points.
[PRIME ABILITY] Constitution [ 34] : 703,671 experience points.
[lower ability] Intelligence [ 20] : 8,734 experience points.
[secondary ability] Wisdom [ 10] : 375 experience points.
[neutral ability] Dexterity [ 33] : 653,663 experience points.
[lower ability] Charisma [ 1] : 30 experience points.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You may advance your level at any time.
You have 404,242 experience points to raise your stats with.
You may advance 2 stats at your current level.
-theres the costs of the stats, they go up a certain amount everytime i train one. I just want to store how much exp ive spent on stats and levels in my lifetime...I know how much each skills costs up to #60, so if i can make a list with all the costs til then, then add like 'list# 14' when i train a stat to 15, for example...i can do that, but i dont know how to create a list :(
-id really appreciate any help, i think this would be a great script for everyone
/ Malleus / |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Sun Mar 09, 2003 7:42 pm |
If you just wish to keep track of you total exp over your life time it would be pretty eaisy.
When you get experience points it probably says something like this:
you get 4367 experience points.
then your trigger would be:
#trig {^you get (%D) experience points.$} {#ad totalexp "%1";#echo %ansi(bright,green)THAT'S A TATOAL OF %format("&3.0n",@totalexp) EXP.!!!}
if you recieve exp any other way just copy this trigh and replace the trigger line but keep the stuff it does.
good luck!!!.
megamog75 |
|
|
|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Mon Mar 10, 2003 4:51 am |
well i appreciate the attempt...but unfortunately i play on an lpmud that doesnt report your xp...
when you type 'xp' it will tell you your total exp and how much you have to spend on stats, but theres not really a way to find out how much your earned over a period of time...except for a command that shows how much youve made all boot, but i dont know how you would only add that value to a variable once, and not every time you type it...
/ Malleus / |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Mar 10, 2003 6:11 am |
Fremen Advancement Costs
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[secondary ability] Strength [ 10] : 375 experience points.
[PRIME ABILITY] Constitution [ 34] : 703,671 experience points.
[lower ability] Intelligence [ 20] : 8,734 experience points.
[secondary ability] Wisdom [ 10] : 375 experience points.
[neutral ability] Dexterity [ 33] : 653,663 experience points.
[lower ability] Charisma [ 1] : 30 experience points.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You may advance your level at any time.
You have 404,242 experience points to raise your stats with.
You may advance 2 stats at your current level.
Ton Diening |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Mar 10, 2003 6:26 am |
Well we'd have to track how this output:
You have (%n) experience points to raise your stats with.
#VAR XPgained %1
We can track how much you spend perhaps knowing:
~[*~]%s(%w)%s~[%s(%d)~]%s~:%s(%n) experience points.
#VAR XPcost_%1 %2
What is the output when you spend points? This way we can track something like
You increase (Intelligence|Strength|.. and so on) a level.
#ADD XPspent_%1 @XPcost_%1
Ton Diening |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Mon Mar 10, 2003 6:27 am |
Unless there is a command that will output what the exp cost is to raise a stat at each level, you'll probably have to manually figure out how much exp you've earned in the past. To keep track of exp from here on out, you could use this:
#var exp ""
#addkey exp boot 0
#addkey exp total 0
#trigger {You have made (%d) exp this boot.} {
#if (%1 > @exp.boot) {
#add exp.total %eval(%1 - @exp.boot)} {
#if (%1 < @exp.boot) {
#add exp.total %1
}
}
exp.boot = %1
}
You need to replace the red pattern with the real pattern from your mud. You'll want the trigger to go off once when you connect, once before and after a reboot while your connected, and once before you quit. You could make this easier by:
- adding the "bootxp" command to the password trigger in the autologin.
- adding a trigger on reboot message to check it before and after.
- Automating the quit command with an alias like this
#alias quit {bootxp;~quit}
--edit--
Seconds too slow! rats . I didn't know that %n matched numbers with commas, good info
--edit2-
I realized i should mention why it needs to go off at those 4 specific times. The algorithm works by assuming there has been a reboot if the mud has a lower number for bootxp than we do. So, it will fail if there has been a reboot since the last time you ran it, and then you gain an amount of experience in the next boot that is greater than the last value we saw from the previous boot. This effectively tricks it into thinking there hasn't yet been a reboot, and its why you need to run it at those times i said above. I don't see any other failure cases, but you never know, so to be safe i'll ask:
If you run "bootxp" command twice, with no reboot in between them, is there any case where the second xp amount might be less than the first? For example, if you were bitten by an exp draining vampire or similar?
--------
moon.icebound.net:9000 |
|
|
|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Mon Mar 10, 2003 9:17 pm |
Okay i could do this, i just dont know how to set everything up.... the one screen that shows how much exp ive made this boot is this:
Login statistics for Maynard:
=======================================================================
Kills: 2 Combat Rounds: 39 Rounds per Kill: 19
Experience: 10672 Guild Experience: 4322
Exp per Kill: 5336 Gxp per Kill: 2161
Exp per Round: 273 Gxp per Round: 110
Best kill this login: The Letter E
Class: 6848
Last kill: The Letter J
Class: 4542
Water donated to guild: 98
=======================================================================
I could set an alias 'quit' to do the following: 'fstat'(show that screen) and 'quit'... then have a trigger to capture the number after 'Experience: ' and add it to @totalexp. The only thing i wouldnt know how to do is prevent it from keep adding the exp everytime i type 'fstat' and if i spend exp on stats, THAT exp number actually goes negative (for ex. if a stats costs 500k, and i make 100k this boot, then advance that stat, it would say -400k) i can make an alias 'adv' and have it do 'fstat', 'adv %1' to capture the screen before i advance, but then it would get all messed up if its negative when the alias for logging out is executed.....any ideas?
/ Malleus / |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Mon Mar 10, 2003 9:44 pm |
quote: Login statistics for Maynard:
=======================================================================
Kills: 2 Combat Rounds: 39 Rounds per Kill: 19
Experience: 10672 Guild Experience: 4322
Exp per Kill: 5336 Gxp per Kill: 2161
Exp per Round: 273 Gxp per Round: 110
Best kill this login: The Letter E
Class: 6848
Last kill: The Letter J
Class: 4542
Water donated to guild: 98
=======================================================================
When you said you could see exp this boot, i assumed you meant the server kept track until IT rebooted, but now i think that you might mean that keeps track over 1 login, which makes much more sense from the server perspective. If this is the case, maybe you could count how many kills you've made per session, and before you log out, multiply that number by exp per kill, then add it to exp total.
--------
moon.icebound.net:9000 |
|
|
|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Mon Mar 10, 2003 10:42 pm |
hmm thats actually a great idea....is there anyway to only capture the numbers and multiply them once when i type the alias 'quit'...so it doesnt keep adding numbers everytime i type 'fstat'?
/ Malleus / |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Mon Mar 10, 2003 11:49 pm |
Sure, you bet there is.
#var killed 0 0
#var exptotal 0
#trigger "fstat" {^Exp per Kill:%s(%d)} {#add exptotal %eval(%1 * @killed);#t- fstat} "" {disable}
#trigger {^You have killed } {#add killed 1}
#alias quit {#t+ fstat;fstat;~quit}
just change the red pattern to the true pattern for when you've killed a mob.
--------
moon.icebound.net:9000 |
|
|
|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Tue Mar 11, 2003 2:18 am |
well it didnt worked...i think theres part of the code missing, cause your telling it to deactivate class folder 'fstat' but you havnt created it in the script...
/ Malleus / |
|
|
|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Tue Mar 11, 2003 2:21 am |
ah nvrmind, its working...just dont know how to prevent it from multiplying the negative exp if i train stats (i train a really expesive stat, the exp earned this boot goes negative...) oh well, i dont think there is a perfect way to do it
/ Malleus / |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Tue Mar 11, 2003 2:23 am |
I'm using #T+ and #T- to enable/disable a single trigger by referring to it by its Id, (which is "fstat" in this case). You shouldn't get negative numbers in this case since the only number we are actually pulling from the mud is the average exp per kill. This doesn't change after you train a stat, does it?
--------
moon.icebound.net:9000 |
|
|
|
Malleus Novice
Joined: 05 Jan 2003 Posts: 45 Location: USA
|
Posted: Tue Mar 11, 2003 3:55 am |
actually it does, i hate the way its coded...ill make a suggestion to the wiz of my guild to change it somehow. All that command is really showing you is Exp earned this boot divided by the number of kills...cheap i know. IF the wiz gets off his arse to code something new, we shouldnt have anymore problems :)
-thanks alot for your help Emit :)
/ Malleus / |
|
|
|
|
|