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)
Pergunta
Emooooo 0
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)
Link para o comentário
Compartilhar em outros sites
10 respostass a esta questão
Posts Recomendados