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
Jazzles
Beginner


Joined: 22 Jul 2005
Posts: 17
Location: UK

PostPosted: Mon Feb 13, 2006 9:48 pm   

extracting kill xp
 
I think I'm going about this the wrong way..
> monster is DEAD! is the start of my trigger..
from here I'm setting up a new prompt where i can get the amount of xp required to level..
>prompt You need ~x XP to level..I'm using this as a new trigger to set up a #va newtnl %1 (~x is the command needed to get tnl xp and returns a numeric value - %1)
I now want to have a #va killxp which calculates oldtnl-newtnl and issues a new prompt command line
>prompt You gained @killxp from that kill...which now triggers setting up my normal prompt line and sets oldtnl to the newtnl

All this seems overly complicated..any help?
Reply with quote
Dodgester
Wanderer


Joined: 17 Nov 2005
Posts: 65

PostPosted: Tue Feb 14, 2006 5:20 am   
 
Why not setup a global variable such as TNL, then use something like the following

Trigger Pattern:

You have gained @(XPGained).

Code:

#If (@TNL < @XPGained Then) {#MATH TNL @TNL+@XPPerLvl-@XPGained} {#MATH TNL @TNL-@XPGained}

Of course, the XPPerLvl idea will only work if it's on a site that has a fixed XP per level with XP being reduced (until eventually reaching 0) for the same mobs as you level. On the other hand, other sites use the other method of XP, which then you just have to make an adjustment for this.

Sincerely,

Dodgester
Reply with quote
Jazzles
Beginner


Joined: 22 Jul 2005
Posts: 17
Location: UK

PostPosted: Tue Feb 14, 2006 5:56 pm   
 
xp varies per mob and also diminshes the more time you kill the same mob.
I've got the method shown in my original post to work but was wondering if there was a better way thats all.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Feb 15, 2006 12:25 am   
 
probably would help if you gave us the full Line to trigger off of. It seems really simple thing to do.

you've gained %d exp from that kill

#tr {you've gained %d exp from that kill}

variable for oldexp and newxp
-gained from old, show old Wich ofcoarse is what you have left to go.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
Dodgester
Wanderer


Joined: 17 Nov 2005
Posts: 65

PostPosted: Wed Feb 15, 2006 3:29 am   
 
Yes, a copy of the mud's output when you get the kill would help as it would be relatively easy to do, but also, you don't want to just simply take the TNL variable down by the XP gained every time as this will lead to negative numbers eventually as you gain the next level. With that said, it becomes important to know how much you need for each level, what level you are at (if xp/lvl isn't fixed), how much xp you lose for fleeing vs how much xp you lose for dying.

Sincerely,

Dodgester
Reply with quote
Jazzles
Beginner


Joined: 22 Jul 2005
Posts: 17
Location: UK

PostPosted: Wed Feb 15, 2006 8:56 pm   
 
The echo from a kill is
Monster is DEAD! [monster changers from mob to mob either one or 2 words]
thanks for all your 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