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
➜ General
➜ Setting a timer to input a command every <#here> minutes
Setting a timer to input a command every <#here> minutes
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Silverwood
(12 posts) Bio
|
Date
| Sun 09 Aug 2009 09:13 PM (UTC) |
Message
| The one thing I really need to get out of MUSHclient is this: repeating a text command to a server every, say, 5 minutes.
Could someone please provide an example as to how I can do this? I'm new to the program, so I would truly appreciate a detailed explanation.
Of course, if this question has already been answered, then a link to the topic would be good. If you can spare some time though, a direct response would be great!
Thanks to everyone for participating,
Silverwood | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 09 Aug 2009 09:43 PM (UTC) |
Message
| You mean like this?
<timers>
<timer enabled="y" minute="5" >
<send>sigh</send>
</timer>
</timers>
See: http://mushclient.com/pasting for how to copy that example into the client. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Silverwood
(12 posts) Bio
|
Date
| Reply #2 on Sun 09 Aug 2009 11:37 PM (UTC) |
Message
| Thanks! This code looks really intuitive ... hope I can get the hang of it soon.
One last question - it's a beginner's, but I can't seem to figure out how to solve it: how would I activate/deactivate the said timer? | Top |
|
Posted by
| Blainer
(191 posts) Bio
|
Date
| Reply #3 on Mon 10 Aug 2009 12:21 AM (UTC) Amended on Mon 10 Aug 2009 12:22 AM (UTC) by Blainer
|
Message
|
<timers>
<timer name="New_Timer" enabled="y" minute="5" second="0.00" offset_second="0.00" >
<send>Sign</send>
</timer>
</timers>
<aliases>
<alias
match="StartTimer"
enabled="y"
send_to="12"
sequence="100"
>
<send>EnableTimer ("New_Timer", true)</send>
</alias>
</aliases>
The timer now has a name="New_Timer".
The alias is set to Send_To="12" for script and uses the function EnableTimer.
StartTimer from the command line will enable the timer. | Top |
|
Posted by
| Silverwood
(12 posts) Bio
|
Date
| Reply #4 on Mon 10 Aug 2009 07:41 PM (UTC) Amended on Mon 10 Aug 2009 07:49 PM (UTC) by Silverwood
|
Message
| Wow! I didn't expect anyone to give me the tags straight off - thanks!
I assume that the timer stops working and will need to be activated again after I turn off & turn on the client? (Which leads to another question as well: would I need to load this timer every time I turn on the client?) | Top |
|
Posted by
| Mm1mark
(24 posts) Bio
|
Date
| Reply #5 on Mon 10 Aug 2009 08:48 PM (UTC) |
Message
| I assume that the timer stops working and will need to be activated again after I turn off & turn on the client? (Which leads to another question as well: would I need to load this timer every time I turn on the client?)
no, if you save your world settings you won't need to redo anything. if you leave the timer enabled it will still be enabled the next time you connect. and so long as you save the world stuff it will automatically have your scripts, variables, triggers and timers each and everytime.
the only time you have to worry about the triggers and timers is if your adjusting them. either from enabled to disabled or adjusting what each does, so instead of sigh you want it to do who. otherwise if it does what you want leave it. | Top |
|
Posted by
| Silverwood
(12 posts) Bio
|
Date
| Reply #6 on Mon 10 Aug 2009 10:01 PM (UTC) |
Message
| Right - how would I disable the timer then? Thanks for bearing with me in the meantime. =) | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #7 on Mon 10 Aug 2009 10:40 PM (UTC) |
Message
| Do you mean with an alias, or just if you happen to want to? There is a GUI interface you know. Press Alt+Enter and then look at the Timers list. If you edit your timer there is an Enabled checkbox. Just click that. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Silverwood
(12 posts) Bio
|
Date
| Reply #8 on Tue 11 Aug 2009 12:56 AM (UTC) Amended on Tue 11 Aug 2009 01:35 AM (UTC) by Silverwood
|
Message
| OK, I see. As you can observe, my knowledge of this software is close to 0, so I appreciate everyone bearing with me in the meantime.
Thanks to everyone who helped. =) | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #9 on Tue 11 Aug 2009 01:41 AM (UTC) |
Message
| |
Posted by
| Blainer
(191 posts) Bio
|
Date
| Reply #10 on Tue 11 Aug 2009 02:55 AM (UTC) |
Message
|
<aliases>
<alias
match="ToggleTimer"
enabled="y"
send_to="12"
sequence="100"
>
<send>if GetTimerInfo ("New_Timer", 6) then
EnableTimer ("New_Timer", false)
Note ("New_Timer timer disabled.")
else
EnableTimer ("New_Timer", true)
Note ("New_Timer timer enabled.")
end
</send>
</alias>
</aliases>
This will toggle New_Timer on and off when ToggleTimer is entered at the command line.
Quote:
The one thing I really need to get out of MUSHclient is this: repeating a text command to a server every, say, 5 minutes.
If you read "Edit Timer" from Help -> Contents menu you can see all the options for the Game -> Configure -> Timers dialog.
If you set the time to the time desired and leave the Send To to the default "World" you can put a list of commands in the Send box
that will be sent to the MUD every time the the timer fires. | 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.
35,332 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top