local config = {
message = "You now have 2 minutes to exit this room through the teleporter. It will bring you to the next room only during this time.",
timeToRemove = 160, -- seconds
teleportId = 1387,
-----------------------------------------------------------------------
-- Nome da criatura + Posição que o portal vai teleporta
bosses = {
["Ushuriel"] = { x = 2317, y = 1920, z = 5 }, -- Local aonde o portal vai levar o player.
["Zugurosh"] = { x = 2273, y = 1932, z = 5 },
["Madareth"] = { x = 2188, y = 1983, z = 6 },
["Latrivan"] = { x = 2296, y = 1997, z = 6 },
["Annihilon"] = { x = 2389, y = 2076, z = 5 },
["Hellgorak"] = { x = 2209, y = 2089, z = 6 }
}
-----------------------------------------------------------------------
}
-----------------------------------------------------------------------
-- Posição que vai criar o portal
local ushuriel_in_pos = {x=2256, y=1995, z=5}
local annihilon_in_pos = {x=2331, y=1980, z=5}
local hellgorak_in_pos = {x=2336, y=2023, z=5}
local madareth_in_pos = {x=2256, y=2023, z=5}
local zugurosh_in_pos = {x=2289, y=1994, z=5}
local brothers_in_pos = {x=2291, y=2027, z=5}
-----------------------------------------------------------------------
local function removal(position)
position.stackpos = 1
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "Inquisition")
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) and name == 'Ushuriel' then
local position = ushuriel_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
elseif name == getCreatureName(cid) and name == 'Annihilon' then
local position = annihilon_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
elseif name == getCreatureName(cid) and name == 'Hellgorak' then
local position = hellgorak_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
elseif name == getCreatureName(cid) and name == 'Madareth' then
local position = madareth_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
elseif name == getCreatureName(cid) and name == 'Zugurosh' then
local position = zugurosh_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
elseif name == getCreatureName(cid) and name == 'Latrivan' then
local position = brothers_in_pos
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
end
return TRUE
end