How to make in this script:
that if player kill bosses - 'Latrivan' and 'Golgordan' teleport will appear (like in script), but not if player kill one of them, but both.
LUA:
local bosses =
-- Teleport Takes Player -- Teleport Is Created -- Teleport Actionid --
{["Ushuriel"] = {x=1345, y=390, z=13}, {x=1398, y=522, z=11}, 7941,
["Zugurosh"] = {x=1345, y=390, z=13}, {x=1432, y=521, z=11}, 7942,
["Madareth"] = {x=1345, y=390, z=13}, {x=1395, y=548, z=11}, 7943,
["Latrivan"] = {x=1345, y=390, z=13}, {x=1430, y=522, z=11}, 7944,
["Annihilon"] = {x=1345, y=390, z=13}, {x=1470, y=506, z=11}, 7945,
["Hellgorak"] = {x=1310, y=560, z=12}, {x=1475, y=548, z=11}, 7946}
local time = 180 -- Seconds
function onKill(cid, target, lastHit)
for name, pos in pairs(bosses) do
if (name == getCreatureName(target):lower()) then
minutes = time:60
doCreateTeleport(5023, pos[1], pos[2])
doSendMagicEffect(pos[2], CONST_ME_MAGIC_BLUE)
doItemSetAttribute(getTileItemById(pos[2], 5023).uid, "aid", pos[3])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have '.. minutes ..' seconds until the portal will disapear.')
addEvent(doRemoveItem, tpTime * 1000, getTileItemById(pos[2], 5023).uid, 1)
end
end
return true
end
that if player kill bosses - 'Latrivan' and 'Golgordan' teleport will appear (like in script), but not if player kill one of them, but both.