Help with a timer

Posted by Vorcet on Tue 16 Apr 2013 01:07 AM — 3 posts, 13,113 views.

#0
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
USA Global Moderator #1
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.
Amended on Tue 16 Apr 2013 01:40 AM by Fiendish
#2
Thanks Fiend, helped loads. I see what I was doing wrong now.