• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Inquisition error

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
Hello i have some problems with INQ creaturescript script. :blink:

i do get these errors when killing the twin demons. Latrivan & Golgordan

Code:
[16:4:50.123] [Error - CreatureScript Interface]
[16:4:50.125] data/creaturescripts/scripts/inquisition/Inquisition.lua:onKill
[16:4:50.128] Description:
[16:4:50.129] (LuaInterface::luaDoItemSetAttribute) Item not found

[16:4:50.131] [Error - CreatureScript Interface]
[16:4:50.133] data/creaturescripts/scripts/inquisition/Inquisition.lua:onKill
[16:4:50.136] Description:
[16:4:50.137] (LuaInterface::luaAddEvent) Callback parameter should be a function

creaturescript.lua
LUA:
local config = {
        timeToRemove = 60, -- seconds
		message = "Go into the teleport in 60 seconds, else it will disappear.",
        teleportId = 1387,
        bosses = { -- Monster Name,  Teleport Position
                ["Ushuriel"] = {  pos={ x=552, y=925, z=12, stackpos=2 }, aid=1001 },
				["Zugurosh"] = {  pos={ x=551, y=867, z=12, stackpos=2 }, aid=1002},
				["Madareth"] = {  pos={ x=597, y=933, z=12, stackpos=2 }, aid=1003},
                ["Annihilon"] = {  pos={ x=594, y=877, z=12, stackpos=2 }, aid=1005},
                ["Hellgorak"] = {  pos={ x=561, y=905, z=12, stackpos=2 }, aid=1006}
				},
		brothers ={
        ["Golgordan"] = {pos={ x=597, y=903, z=12, stackpos=1 },aid=1004, brother = "Latrivan"},
        ["Latrivan"] = {pos={ x=597, y=903, z=12, stackpos=1 },aid=1004, brother = "Golgordan"},
        brothersArea ={
                fromPos = {x = 589, y = 891, z = 12},
                toPos = {x = 605, y = 903, z = 12}	}	}
}
local function change(position)
	doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 3000)
    return TRUE
end

function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
		local t = config.bosses[getCreatureName(target)]
		local position = t.pos
		doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		addEvent(change, config.timeToRemove * 1000, position)
	elseif(config.brothers[getCreatureName(target)]) then
		local t = config.brothers[getCreatureName(target)]
        local brother = getCreatureByName(t.brother)
		if(isMonster(brother) == true) then
            if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                return TRUE
			end
        else
			local position = t.pos
			doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)
			doItemSetAttribute(teleport, "aid", t.aid)
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, position)
		end
	end
	return TRUE
end

Please help me.

Thanks
 
Last edited:
Try to use globalstorage(onKill) with addEvent instead
put actionId in floor(onStepIn, checking if boss is killed from globalstorage, storage should expire after x minutes) and then put id 1387(teleport) on it without setting destination(set it in lua)

@down
I don't have time
I'll try to write it when I get some free time.
 
Last edited:
Try to use globalstorage(onKill) with addEvent instead
put actionId in floor(onStepIn, checking if boss is killed from globalstorage, storage should expire after x minutes) and then put id 1387(teleport) on it without setting destination(set it in lua)

Can you write the lines XML and LUA how it should look, cuz i didint understand that properly.
 
Back
Top