There are probably several different solutions to the problem that you present.. one that comes to mind would be to set a timer with some sort of interval (say 5 minutes), which would enable an xp tracking trigger, then fire off a command which checks your stats (ie "score"). Then the xp trigger will grab your current xp from the mud, disable itself, and then compare itself to the xp value that was grabbed the time before it. Take the difference, then factor in your time ratio for an hour, and there you go.. ie if you gained 10,000 xp in 5 minutes, then multiply that by 12 to see that you're earning roughly 120k xp/hr.
Either that or maybe just set up the trigger w/o the timer, which grabs your xp whenever it sees it, and compares it to the last time you grabbed it, do some math on the amount of time which has passed, and there you go. |