- Joined
- Aug 19, 2007
- Messages
- 4,941
- Solutions
- 11
- Reaction score
- 352
This idea comes from darkhaos I suppose.
This can be used for different events, not only inquisition quest, you can simply edit it to your needs.
data/creaturescripts/inquisition.lua:
data/creaturescripts/creaturescripts.xml:
To make it work you have to add in every monster that will use this script those lines (suggested after </flags>):
and also register an event for player, by NPC, action, onLogin script or whatever:
If you dont have those monsters, here is a pack for you:
Manx's Monster Pack, You can rep him >here<.
bye.
This can be used for different events, not only inquisition quest, you can simply edit it to your needs.
data/creaturescripts/inquisition.lua:
Code:
local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["ushuriel"] = { { x = 222, y = 564, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 } },
["annihilion"] = { { x = 276, y = 1045, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 } },
["hellgorak"] = { { x = 169, y = 1047, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 } },
["madareth"] = { { x = 416, y = 1017, z = 6 }, { x = 218, y = 564, z = 6, stackpos = 1 } },
["zugurosh"] = { { x = 424, y = 1119, z = 7 }, { x = 218, y = 564, z = 6, stackpos = 1 } },
["latrivan"] = { { x = 46, y = 1109, z = 7 }, { x = 218, y = 564, z = 6, stackpos = 1 } }
}
}
local function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
end
end
return TRUE
end
data/creaturescripts/creaturescripts.xml:
Code:
<event type="death" name="Inquisition" script="marcino/inquisition.lua"/>
To make it work you have to add in every monster that will use this script those lines (suggested after </flags>):
Code:
<script>
<event name="Inquisition"/>
</script>
and also register an event for player, by NPC, action, onLogin script or whatever:
Code:
registerCreatureEvent(cid, "Inquisition")
If you dont have those monsters, here is a pack for you:
Manx's Monster Pack, You can rep him >here<.
bye.
Last edited: