Hello, everyone
i have event boss Enter everyday, but boss enter after 3 miunts and close, if player get dead can`t enter becouse telport is off,
some one can help to upated code, like open 3 min and boss enter, after boss dead telport closed.
forgotten 0.4
Thanks for all
i have event boss Enter everyday, but boss enter after 3 miunts and close, if player get dead can`t enter becouse telport is off,
some one can help to upated code, like open 3 min and boss enter, after boss dead telport closed.
forgotten 0.4
Thanks for all
Lua:
function onTime(interval)
local config = {
pos = {x=1001, y=1010, z=7}, -- Posiçمo aonde sera criado o teleport
topos = {x=1005, y=1012, z=7}, -- Posiçمo pra onde o teleport ira levar o player
tpid = 1387, -- id do teleport
time = 3 -- tempo que o teleport ira sumir em minutos
}
function sendEffect()
if (getGlobalStorageValue(16505) > 0) then
doSendAnimatedText({x=1000, y=1011, z=6}, "BOSS", math.random(180))
addEvent(sendEffect, 750)
end
end
function DelTp()
local t = getTileItemById(config.pos, config.tpid)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(config.pos, CONST_ME_POFF)
end
end
doCreateTeleport(config.tpid, config.topos, config.pos)
doBroadcastMessage("O Event Boss foi aberto no templo e serل fechado em 3 minutos")
setGlobalStorageValue(16505, 1)
addEvent(doCreateMonster, config.time*60*1000, "The BOSS STRIKER", {x=999, y=1013, z=7})
addEvent(DelTp, config.time*60*1000)
addEvent(setGlobalStorageValue, config.time*60*1000, 16505, -1)
return true
end