O servidor não possui onTimer, o que você pode fazer é substituir pela função: onThink(interval, lastExecution) ficando assim seu codigo:
local config = { day = "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday", pos = {x=290, y=24, z=7}, topos = {x=821, y=459, z=7}, time = 3, -- tempo que o teleport ira sumir em minutos msg_open = "The Portal will open in 3 minutes, go to the temple.", msg_close = "The Portal closed." } local function DelTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end function onThink(interval, lastExecution) if (os.date("%A") == config.day) then doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage(config.msg_open) addEvent(DelTp, config.time*60*1000) addEvent(doBroadcastMessage, config.time*60*1000, config.msg_close) end return true end
A tag do xml fica assim:
<globalevent name="Nome" interval="60" event="script" value="nomedoarquivo.lua"/>






info
Grupo: Artesão
Registrado: 01/07/18
Posts: 118
Reputação: +1
Gênero: Masculino
script >>>
local config =
{
day = "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday",
pos = {x=290, y=24, z=7},
topos = {x=821, y=459, z=7},
time = 3, -- tempo que o teleport ira sumir em minutos
msg_open = "The Portal will open in 3 minutes, go to the temple.",
msg_close = "The Portal closed."
}
local function DelTp()
local t = getTileItemById(config.pos, 1387)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(config.pos, CONST_ME_POFF)
end
end
function onTimer()
if (os.date("%A") == config.day) then
doCreateTeleport(1387, config.topos, config.pos)
doBroadcastMessage(config.msg_open)
addEvent(DelTp, config.time*60*1000)
addEvent(doBroadcastMessage, config.time*60*1000, config.msg_close)
end
return true
end
erro
[31/8/2018 12:10:18] [Error - Event::checkScript] Event onTime not found (data/globalevents/scripts/tp1.lua)