Thorn
Spriting since 2013
hiii, i have this mod
but im only using the part where you kill a boss and a teleport appears, well is only working with the first boss and the last boss :S and no errors in console, plzz help me guys
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"
version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><![CDATA[
config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
MonStor = 48000,
bosses = { -- Monster Name, Teleport To Position, Teleport Position, UID
["God of the Forest"] = { ptp={ x=857, y=552, z=6}, pp={ x=865, y=568, z=7, stackpos=1 }, uid=49100 },
["God of the Desert"] = { ptp={ x=856, y=554, z=5 }, pp={ x=862, y=567, z=6, stackpos=1 }, uid=49200 },
["God of Poison"] = { ptp={ x=857, y=554, z=4 }, pp={ x=868, y=569, z=5, stackpos=1 }, uid=49300 },
["God of Ice"] = { ptp={ x=897, y=599, z=3}, pp={ x=867, y=570, z=4, stackpos=1 }, uid=49400 },
["Supreme God"] = { ptp={ x=452, y=164, z=6 }, pp={ x=452, y=162, z=6, stackpos=1 }, uid=49500 },
}
}
function removal(position)
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end]]></config>
<event type="login" name="inquisitionRegister" event="script"><![CDATA[
domodlib('inqusitionFunctions')
function onLogin(cid)
registerCreatureEvent(cid, "Inquisition")
return true
end]]></event>
<event type="kill" name="Inquisition" event="script"><![CDATA[
function onKill(cid, target, lastHit)
if(config.bosses[getCreatureName(target)]) then
local t = config.bosses[getCreatureName(target)]
local teleport = doCreateTeleport(config.teleportId, t.ptp, t.pp)
local position = t.pp
doItemSetAttribute(teleport, "uid", t.uid)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
return TRUE
end]]></event>
<action fromuid="1301" touid="1311" event="script"><![CDATA[
domodlib('inqusitionFunctions')
local storage = 50301
local inquisitionRewards = {
[9988] = 8890, --a robe of the underworld
[9989] = 8918, --a spellbook of dark mysteries
[9990] = 8881, --a fireborn giant armor
[9991] = 8888, --a master archer's armor
[9992] = 8851, --a royal crossbow
[9993] = 7435, --an executioner
[9994] = 8929, --the stomper
[9995] = 7417, --a runed sword
[9996] = 8854, --a warsinger bow
[9997] = 8903, --a spellbook of lost souls
[9998] = 2508, --a mystical armor
[9999] = 8905 --a rainbow shield
}
if inquisitionRewards[item.uid] then
if getPlayerStorageValue(cid, storage) < 1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(inquisitionRewards[item.uid]) .. " " .. getItemNameById(inquisitionRewards[item.uid]) .. ".")
doPlayerAddItem(cid, inquisitionRewards[item.uid], 1)
setPlayerStorageValue(cid, storage, 1)
addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
end
return true
]]></action>
</mod>
but im only using the part where you kill a boss and a teleport appears, well is only working with the first boss and the last boss :S and no errors in console, plzz help me guys
Last edited: