Hello i have some problems with INQ creaturescript script. :blink:
i do get these errors when killing the twin demons. Latrivan & Golgordan
creaturescript.lua
Please help me.
Thanks
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: