Hello i have problem with remove teleport
When i kill boss, all woking fine, there is teleport etc. but witin 180 sec after kill boses i have bug:
INQ script:
Any idea?
When i kill boss, all woking fine, there is teleport etc. but witin 180 sec after kill boses i have bug:
Code:
[20:27:40.023] [Error - CreatureScript Interface]
[20:27:40.023] In a timer event called from:
[20:27:40.023] data/creaturescripts/scripts/test.lua:onKill
[20:27:40.023] Description:
[20:27:40.023] (luaDoRemoveItem) Item not found
INQ script:
Lua:
local t = {
message = "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!",
bosses = {
["Ushuriel"] = {ttp={x=1173, y=1333, z=12}, tp={x=1279, y=1279, z=10, stackpos=1}},
["Zugurosh"] = {ttp={x=1182, y=1228, z=11}, tp={x=1247, y=1243, z=10, stackpos=1}},
["Madareth"] = {ttp={x=1257, y=1333, z=11}, tp={x=1301, y=1305, z=10, stackpos=1}},
["Golgordan"] = {ttp={x=1142, y=1304, z=14}, tp={x=1336, y=1273, z=10, stackpos=1}, bro = "Latrivan"},
["Latrivan"] = {ttp={x=1142, y=1304, z=14}, tp={x=1336, y=1273, z=10, stackpos=1}, bro = "Golgordan"},
["Annihilon"] = {ttp={x=1303, y=1237, z=11}, tp={x=1301, y=1239, z=10, stackpos=1}},
["Hellgorak"] = {ttp={x=1214, y=1233, z=11}, tp={x=1208, y=1277, z=10, stackpos=1}}
}
}
function onKill(cid, target, lastHit)
local k = t.bosses[getCreatureName(target)]
if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then
if(k.bro) then
local bro = getCreatureByName(k.bro)
if isMonster(bro) and getDistanceBetween(getThingPosition(cid), getThingPosition(bro)) < 12 then return true end
end
doCreateTeleport(1387, k.ttp, k.tp)
doCreatureSay(cid, t.message, TALKTYPE_ORANGE_1)
addEvent(doRemoveThing, 180 * 1000, getTileItemById(k.tp, 1387).uid, 1)
end
return true
end
Any idea?