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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Question about time <LUA>

Question about time <LUA>

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


Posted by AquaBrother   Brazil  (19 posts)  Bio
Date Sat 30 May 2009 03:58 PM (UTC)
Message
hi folks, i'd like to make a trigger or timer that send a command to the world if i get iddle for 10 minutes or more, is that possible to be done? I tried to found a commando with theses properties but i couldnt find a properly one...

Thx for your support!

Regards
Top

Posted by RichKK   (33 posts)  Bio
Date Reply #1 on Sat 30 May 2009 05:55 PM (UTC)

Amended on Sat 30 May 2009 06:22 PM (UTC) by RichKK

Message
What do you mean 10 minutes or more?

Do you need the command every 10 minutes? So first 10 minutes idle and then again at 20 minutes if you are still idle?


It's not quite what you want but every ten minutes this timer checks if you are looking at the world window, and if you aren't looking at the window the timer sends a command.

<timers>
  <timer name="look_if_inactive" enabled="y" minute="10" second="0.00" offset_second="0.00"    send_to="12"
>
  <send>active = GetInfo(113)

if active == false then
Send("look")
end</send>

  </timer>
</timers>
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 30 May 2009 09:58 PM (UTC)
Message
See http://www.gammon.com.au/mushclient/plugins/ and look for "AFK_timer" (near the top). That is what you want.

- Nick Gammon

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

Posted by AquaBrother   Brazil  (19 posts)  Bio
Date Reply #3 on Sun 31 May 2009 12:47 AM (UTC)
Message
i want just a simple trigger that send a message to the world if i'm not looking at the window at each interval of time. Lets say that i minimized the mushclient windown, so, i want that in each interval of 10 minutes the trigger send a simple command to the world, just to unable the game to kick me off for not being "playing"... just it, i dont think that's necessary to use a whole plugin... is it?

Regards



Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 31 May 2009 03:04 AM (UTC)
Message
Well it needs to know you are not playing, and the plugin I mentioned does that by checking if you have sent anything. Every time you send something it resets a timer, so that it starts counting again. If the time is up (and you can configure the time) it sends a specified command. So to stay logged in you could send "look" or "score" or some such thing.

The plugin is quite short, and the whole idea behind plugins was to save having to explain "make a trigger, two timers and an alias" to achieve something. It is all in the one spot.

- Nick Gammon

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

Posted by AquaBrother   Brazil  (19 posts)  Bio
Date Reply #5 on Sun 31 May 2009 05:59 PM (UTC)
Message
all right, i got it, the problem now is, how do i put this plugin in my mushclient? rofl... i'm sorry i'm newbie... xD
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #6 on Sun 31 May 2009 09:27 PM (UTC)
Message
The instructions are on the plugins page I linked to above. Look for "How to install a plugin" near the bottom of the page.

- 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.


25,289 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.