local config = {
message = "Go into the teleporter in 30 seconds, else it will disappear.",
timeToRemove = 30, -- seconds
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = { { x = 1659, y = 838, z = 7 }, { x = 1413, y = 825, z = 7 } },
["Annihilon"] = { { x = 1556, y = 893, z = 7 }, { x = 1415, y = 869, z = 7 } },
["Hellgorak"] = { { x = 1447, y = 831, z = 7 }, { x = 1367, y = 835, z = 7 } },
["Madareth"] = { { x = 1455, y = 912, z = 7 }, { x = 1376, y = 870, z = 7 } },
["Zugurosh"] = { { x = 1268, y = 864, z = 7 }, { x = 1324, y = 835, z = 7 } },
["Latrivan"] = { { x = 1332, y = 917, z = 7 }, { x = 1339, y = 867, z = 7 } }
}
}
local function removal(position)
local thing = getTileItemById(position, 1387).uid
if thing > 0 then
doRemoveItem(thing)
end
return TRUE
end
function onDeath(cid, corpse, killer)
for name, pos in pairs(config.bosses) do
if name:lower() == getCreatureName(cid):lower() then
doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
end
end
return TRUE
end