local t = {
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = {ttp={x=172, y=559, z=13}, tp={x=246, y=351, z=12, stackpos=1}, aid=4071},
["Zugurosh"] = {ttp={x=314, y=474, z=13}, tp={x=390, y=525, z=13, stackpos=1}, aid=4072},
["Madareth"] = {ttp={x=287, y=365, z=13}, tp={x=340, y=460, z=13, stackpos=1}, aid=4073},
["Golgordan"] = {ttp={x=408, y=413, z=13}, tp={x=505, y=345, z=13, stackpos=1}, aid=4074, bro = "Latrivan"},
["Latrivan"] = {ttp={x=408, y=413, z=13}, tp={x=505, y=345, z=13, stackpos=1}, aid=4074, bro = "Golgordan"},
["Annihilon"] = {ttp={x=294, y=681, z=13}, tp={x=637, y=472, z=13, stackpos=1}, aid=4075},
["Hellgorak"] = {ttp={x=255, y=467, z=13}, tp={x=335, y=581, z=10, stackpos=1}}
}
}
function onKill(cid, target, lastHit)
local k = t.bosses[getCreatureName(target)]
if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then -- player nie ofiara/cid=gracz/mob na liscie/jesli summon
if(k.bro) then
local bro = getCreatureByName(k.bro)
if isMonster(bro) and getDistanceBetween(getThingPosition(cid), getThingPosition(bro)) < 12 then return true end
end
doItemSetActionId(doCreateTeleport(1387, k.ttp, k.tp), k.aid)
doCreatureSay(cid, t.message, TALKTYPE_MONSTER)
addEvent(doRemoveThing, 180 * 1000, getTileItemById(k.tp, 1387).uid, 1)
end
return true
end