<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"
version="1.0" author="None" contact=".com" enabled="yes">
<event type="login" name="inquisitionRegister" event="script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "Inquisition")
return true
end]]></event>
<event type="kill" name="Inquisition" event="script"><![CDATA[
local config = {
message = "You have 3 minutes to enter the teleporter after that it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Ushuriel"] = { { x=1176, y=1140, z=12 }, { x=1105, y=1214, z=12, stackpos=1 } },
["Annihilon"] = { { x=1248, y=1297, z=12 }, { x=1187, y=1206, z=12, stackpos=1 } },
["Hellgorak"] = { { x=1064, y=1308, z=13 }, { x=1192, y=1248, z=12, stackpos=1 } },
["Madareth"] = { { x=1044, y=1203, z=13 }, { x=1112, y=1248, z=12, stackpos=1 } },
["Zugurosh"] = { { x=1128, y=1151, z=12 }, { x=1138, y=1213, z=12, stackpos=1 } },
["Latrivan"] = { { x=1154, y=1195, z=13 }, { x=1147, y=1249, z=12, stackpos=1 } }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onKill(cid, target, lastHit)
if lastHit == true then
local position = getCreaturePosition(target)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(target) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
doSendMagicEffect(pos[2], 10)
end
end
end
return TRUE
end]]></event>
</mod>