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
➜ Help with a timer
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Vorcet
(5 posts) Bio
|
| Date
| Tue 16 Apr 2013 01:07 AM (UTC) |
| Message
| What I am trying to do and I am unsure how to accomplish it is to create a timer that when it fires sends one of 5 outputs to the mud. Ive looked through the forums and cannot find a solution that was simple enough for my simple self :P
Any help would be greatly apreciated.
thanks in advance
V | | Top |
|
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Reply #1 on Tue 16 Apr 2013 01:39 AM (UTC) Amended on Tue 16 Apr 2013 01:40 AM (UTC) by Fiendish
|
| Message
| In Lua...
function send_a_random_thing()
local outputs = {"first","second","third","fourth","fifth"}
Send(outputs[math.random(#outputs)])
end
Then make your timer call that function. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Vorcet
(5 posts) Bio
|
| Date
| Reply #2 on Tue 16 Apr 2013 02:09 AM (UTC) |
| Message
| | Thanks Fiend, helped loads. I see what I was doing wrong now. | | 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.
12,478 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top