local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = {
["Orshabaal"] = {x=132, y=148, z=7},
["Snow Spectre"] = {x=141, y=148, z=7},
["the handmaiden"] = {x=125, y=138, z=7},
["massacre"] = {x=144, y=135, z=7},
}
}
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, "inquisitionPortals")
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
end
return TRUE
end