data/creaturescripts/scripts/inquisition.lua
data/creaturescripts/scripts/login.lua
data/creaturescripts/creaturescripts.xml
monsterfile.xml(Ex: Zugurosh.xml)
After "</flags"> add:
NOT TESTED!
Lua:
local monsters =
{
["Ushuriel"] = {teleportPos = {x = 100, y = 100, z = 7, stackpos = 1}, toPos = {x = 100, y = 100, z = 100}},
["Annihilon"] = {teleportPos = {x = 100, y = 100, z = 7, stackpos = 1}, toPos = {x = 100, y = 100, z = 100}},
["Hellgorak"] = {teleportPos = {x = 100, y = 100, z = 7, stackpos = 1}, toPos = {x = 100, y = 100, z = 100}},
["Madareth"] = {teleportPos = {x = 100, y = 100, z = 7, stackpos = 1}, toPos = {x = 100, y = 100, z = 100}},
["Zugurosh"] = {teleportPos = {x = 100, y = 100, z = 7, stackpos = 1}, toPos = {x = 100, y = 100, z = 100}}
}
local brothers =
{
["Golgordan"] = {teleportPos = {x = 100, y = 100, z = 7}, toPos = {x = 100, y = 100, z = 100}, brother = "Latrivan"},
["Latrivan"] = {teleportPos = {x = 100, y = 100, z = 7}, toPos = {x = 100, y = 100, z = 100}, brother = "Golgordan"},
brothersArea =
{
fromPos = {x = 500, y = 500, z = 7},
toPos = {x = 550, y = 550, z = 7}
}
}
local time = 180 --seconds(3 minutes)
function onKill(cid, target, lastHit)
if(monsters[getCreatureName(target)]) then
local t = monsters[getCreatureName(target)]
doCreateTeleport(1387, t.toPos, t.teleportPos)
doSendMagicEffect(t.teleportPos, CONST_ME_POFF)
doCreatureSay(cid, "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", TALKTYPE_MONSTER, getCreaturePosition(target))
addEvent(doRemoveTeleport, time * 1000, t.teleportPos)
elseif(brothers[getCreatureName(target)]) then
t = brothers[getCreatureName(target)]
local brother = getCreatureByName(t.brother)
if(isMonster(brother) == true) then
if(isInRange(getCreaturePosition(brother), brothers.brothersArea.fromPos, brothers.brothersArea.toPos) == true) then
return true
else
doCreateTeleport(1387, t.toPos, t.teleportPos)
doSendMagicEffect(t.teleportPos, CONST_ME_POFF)
doCreatureSay(cid, "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", TALKTYPE_MONSTER, getCreaturePosition(target))
addEvent(doRemoveTeleport, time * 1000, t.teleportPos)
end
end
end
return true
end
function doRemoveTeleport(position)
if(getTileThingByPos(position).itemid > 0) then
doRemoveItem(getTileThingByPos(position).uid)
doSendMagicEffect(position, CONST_ME_POFF)
end
end
data/creaturescripts/scripts/login.lua
Lua:
registerCreatureEvent("Inquisition")
data/creaturescripts/creaturescripts.xml
PHP:
<event type="kill" name="Inquisition" script="inquisition.lua"/>
monsterfile.xml(Ex: Zugurosh.xml)
After "</flags"> add:
PHP:
<script>
<event name="Inquisition"/>
</script>
NOT TESTED!
Last edited: