essa action que eu tenho funciona perfeitamente. só preciso que ela remova o teleport depois de 5 mim. alguem poderia ajudar o amigo!
local config = {
teleportId = 27723,
days = {
["Tuesday"] = {Position(998, 996, 7), Position(1487, 308, 13)}, -- Morshabaal - monday-Segunda, tuesday-Terça, wednesday-Quarta, thursday-Quinta, friday-Sexta, saturday-Sabado and sunday-Domingo
},
bossPosition = Position(1507, 309, 14),
bossName = "Gaz'haragoth",
spawnTime = '18:43:00'
}
local Gazharagoth = GlobalEvent("Gazharagoth")
function Gazharagoth.onTime(interval)
local day = config.days[os.date("%A")]
if day then
Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_GAME_HIGHLIGHT)
Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_EVENT_ADVANCE)
local item = Game.createItem(config.teleportId, 1, day[1])
if item then
if not item:isTeleport() then
item:remove()
return false
end
item:setDestination(day[2])
end
addEvent(function()
Game.createMonster(config.bossName, config.bossPosition, false, true)
end, 5000)
end
return true
end
Gazharagoth:time(config.spawnTime)
Gazharagoth:register()