View Single Post
Thread: [REL]Never AFK
[REL]Never AFK
it was requested(http://forum.toribash.com/showthread.php?p=2339251#post2339251). now i post.
u must be operator of a server.
idk why but he wanted them never be afk.
here i will post the script =D
--[[
Anti-Afk Server.
make ppl never be afk
]]
spamcount= 0
 
function entframe()
spamcount= 0
local spec= get_spectators()
  for i=0, table.getn(spec) do
    if spamcount < 3 then
      run_cmd("fenter " .. spec[i])
      spamcount= spamcount + 1
    else
      echo("Spam Reached, wait till next freeze")
    end
  end
end
 
function start()
  echo("Anti-Afk Server Started.")
end
start()
add_hook("enter_frame", "ef", entframe)
Tabbed out your code for legibility ~Eleeleth