Adaptei o primeiro dps faço os outros :
local frases = {"AUSENTE!", "VOLTO JA!", "JA VOLTO!"} -- Auto-Mensagens.
local tempo = 1 -- Intervalo de Tempo em segundos.
local say = {}
function Player.autoMe(self, pid, pos)
player = Player(self)
npos = player:getTile()
if npos == pos and say[pid] ~= nil then
player:say(frases[math.random(#frases)], TALKTYPE_MONSTER_SAY)
addEvent(function()
player:autoMe(pid, pos)
end, tempo*1000)
else
say[pid] = nil
player:sendCancelMessage("Você já está com o Ausente ativado, saia do piso onde ativou e aguarde desativar.")
end
end
function onSay(player, words, param)
local player = Player(player)
local pid = player:getGuid()
local pos = player:getTile()
if say[pid] == nil then
table.insert(say, pid, pid)
player:autoMe(pid, pos)
else
say[pid] = nil
player:sendCancelMessage("Ausente desativado.")
end
return false
end