Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Tracking Time?

Tracking Time?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by TheExile   (12 posts)  Bio
Date Wed 09 Nov 2011 02:52 PM (UTC)
Message
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.

Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #1 on Wed 09 Nov 2011 07:23 PM (UTC)

Amended on Wed 09 Nov 2011 07:25 PM (UTC) by Fiendish

Message
http://mushclient.com/scripts/doc.php?lua=utils.timer

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by TheExile   (12 posts)  Bio
Date Reply #2 on Sat 12 Nov 2011 03:34 PM (UTC)
Message
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!
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #3 on Sat 12 Nov 2011 03:36 PM (UTC)
Message
Quote:
but the way I'm doing this I can't use it.

Why?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by TheExile   (12 posts)  Bio
Date Reply #4 on Sat 12 Nov 2011 07:39 PM (UTC)
Message
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.
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 12 Nov 2011 09:58 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,125 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.