Hello, I have problem with my event in npc script;
this is part of this one:
First problem: Even if monster is in this cave(144, 155 corners x / 816, 826 corners y) script working as the creature is not in this cave.
Second problem:
this is error from my server when script try to do function doRemoveCreature(monster)
I really need help
.
this is part of this one:
function cleancave(param)
for cavex = 144, 155 do
for cavey = 816, 826 do
cavepos = {x=cavex, y=cavey, z=8, stackpos=253}
monster = getCreatureByName('Death')
if (getCreaturePosition(monster) == cavepos) then
doRemoveCreature(monster)
grave = {x=149, y=818, z=8, stackpos=2}
doRemoveItem(getThingfromPos(grave).uid, 1)
doItemSetAttribute(doCreateItem(4392, 1, grave), "aid", 8782)
end
end
end
end
First problem: Even if monster is in this cave(144, 155 corners x / 816, 826 corners y) script working as the creature is not in this cave.
Second problem:
this is error from my server when script try to do function doRemoveCreature(monster)
And this error is repeated 131 times and then stop. I think I know why - the tiles in this cave are 131. (the creature is in this room)[05/02/2010 12:32:56] [Error - Npc interface]
[05/02/2010 12:32:56] In a timer event called from:
[05/02/2010 12:32:56] data/npc/scripts/banshee queen.luanCreatureSay
[05/02/2010 12:32:57] Description:
[05/02/2010 12:32:57] (luaGetThingPosition) Thing not found
[05/02/2010 12:32:57] [Error - Npc interface]
[05/02/2010 12:32:57] In a timer event called from:
[05/02/2010 12:32:57] data/npc/scripts/banshee queen.luanCreatureSay
[05/02/2010 12:32:57] Description:
[05/02/2010 12:32:57] (luaDoRemoveCreature) Creature not found
I really need help