 |
Synzra Beginner
Joined: 15 Dec 2005 Posts: 25
|
Posted: Wed Jan 11, 2006 11:23 pm
Xp/tick |
Ok, what I want is an xp saying how much xp Im getting per hour.
this is what my mud out out is:
Fairgoer is DEAD!!
You Receive 728996 Experience Points.
Ive read all the xp forum in here and none doesnt seem to add up. Any help would be much appriecated.
Thank you for your time reading this.  |
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Thu Jan 12, 2006 12:57 am |
I use this little piece of code at the beginning of my main bot logic.
| Code: |
BFlyTimeDiff=%if(%eval(%ctime-@BFlyStartTime)=0,1,%eval(%ctime-@BFlyStartTime))
BFlyPerH=%eval(@BFlyCatch*3600/@BFlyTimeDiff) |
It works simply enough and provides a small amount of granularity to the updates so that the processor is not eaten up. BFlyCatch is equivalent to the sum of exp received.
Since it never deals with larger numbers it doesn't run into problems that result for that type of math. You will likely have to add a number of logic steps or use %float and %format or other big number tactics for your system. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Synzra Beginner
Joined: 15 Dec 2005 Posts: 25
|
Posted: Thu Jan 12, 2006 1:34 am |
Actually what I wanted was something where it take what I gained from xp and put it to group tell. Basically like this :
command for group tell it this ( ; )
; You got (amount of xp)/hr
I dunno if this makes sense or not.  |
|
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 12, 2006 5:18 pm |
So, for every kill add it to a var, and send it to group?
When the hour is up start from 0 all over again?
Also, on the hour give a report?
#ALIAS exph {gt So far this hour: @expperhourXP from @mobkilledhour mobs} "Char Status"
#ALIAS exphour {#SEND {gt Last hour: ~@w@expperhour~@RXP from @mobkilledhour mobs};expperhour="0";mobkilledhour="0"} "Char Status"
#TRIGGER {^You receive (*) experience points.} {#ADD expperhour %eval( %1);exph;#add mobkilledhour 1} "Char Status"
#ALARM "Alarm0" {*:00:00} {#IF ((@expperhour > 0) or (@mobkilledhour > 0)) {exphour} {}} "Char Status"
#var mobkilledhour {0} {0} "Char Status"
#var expperhour {0} {0} "Char Status"
if either expperhour or mobkilledhour more than 0 it will report, if both are 0 then it won't. Did that incase you idle for an hour and never got a kill :-) |
|
|
|
 |
Synzra Beginner
Joined: 15 Dec 2005 Posts: 25
|
Posted: Thu Jan 12, 2006 8:48 pm |
Ok that is kinda what Im looking for but the thing is that the xp is not showing up on my screen but the mob kills are...
|
|
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 12, 2006 8:51 pm |
sorry, i left color codes from my mud in there as well as forgot to space @expperhour XP
#ALIAS exphour {#SEND {gt Last hour: @expperhour XP from @mobkilledhour mobs};expperhour="0";mobkilledhour="0"} "Char Status"
try that |
|
|
|
 |
|
|
|