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


Joined: 15 Dec 2005
Posts: 25

PostPosted: 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. Laughing
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: 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
Reply with quote
Synzra
Beginner


Joined: 15 Dec 2005
Posts: 25

PostPosted: 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. Shocked
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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 :-)
_________________
http://www.Aardwolf.com
Reply with quote
Synzra
Beginner


Joined: 15 Dec 2005
Posts: 25

PostPosted: 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...
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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
_________________
http://www.Aardwolf.com
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