Code:
local bosses = { -- Teleport Takes Player -- Teleport Is Created --
["Dipthrah"] = {{ x=1212, y=1415, z=7 }, { x=1167, y=1420, z=7 }},
["Vashresamun"] = {{ x=1227, y=1415, z=7 }, { x=1167, y=1447, z=7 }},
["Thalas"] = {{ x=1244, y=1415, z=7 }, { x=1167, y=1474, z=7 }},
["Omruc"] = {{ x=1260, y=1415, z=7 }, { x=1191, y=1420, z=7 }},
["Mahrdis"] = {{ x=1277, y=1415, z=7}, { x=1191, y=1447, z=7 }},
["Rahemos"] = {{ x=1295, y=1415, z=7 }, { x=1191, y=1474, z=7 }},
["Ashmunrah"] = {{ x=1313, y=1415, z=7 }, { x=1215, y=1447, z=7 }}
}
local time = 30 -- Seconds
function doRemoveTeleport(pos, id)
return doRemoveItem(getTileItemById(pos, id).uid, 1)
end
function onKill(cid, target, lastHit)
for name, pos in pairs(bosses) do
if (name:lower() == getCreatureName(target):lower()) then
doCreateTeleport(1387, pos[1], pos[2])
doCreatureSay(cid, "You have ".. time .." seconds until the portal will disapear.", TALKTYPE_ORANGE_1)
addEvent(doRemoveTeleport, time * 1000, pos[2], 1387)
end
end
return true
end
to
TFS 1.0?