Tracking Time?

Posted by TheExile on Wed 09 Nov 2011 02:52 PM — 6 posts, 24,894 views.

#0
I haven't been able to find anything on this, maybe I'm not looking hard enough.

I'm wanting to track the time between a trigger activating and turning off and the only way I know how to do it is to use variables to track the lines in between it activating and disabling but I don't think that would be very accurate.

So I was wondering if there is a script function maybe that will accurately keep track of time.

USA Global Moderator #1
http://mushclient.com/scripts/doc.php?lua=utils.timer
Amended on Wed 09 Nov 2011 07:25 PM by Fiendish
#2
Damn, that's exactly what I want but the way I'm doing this I can't use it.

Hmm... I'll play around with it a little maybe I can change something.

Thanks!
USA Global Moderator #3
Quote:
but the way I'm doing this I can't use it.

Why?
#4
Trying to make a dps tracker of sorts.

When I initially made this post I was doing it completely differently, because of a problem I encountered (it was tracking MOB damage) the only way I could solve it was to make 7+ triggers to activate (basically every time I did damage) the the one I wanted to time (the one that recorded damage) then I had to make it so that trigger deactivated immediately after it recorded damage.

Because of that I don't know how I can track time anymore but that might just be because of my inexperience.
Australia Forum Administrator #5
The time you get can be stored in a global (Lua) variable. This can be consulted later on by a different trigger. Then by subtracting one from the other you know how much time elapsed.