Hello, could someone tell me how to make this check if the creature is summon or not, because this scripts removes all the monsters in the specific area, but if they are not found it gives alot of errors inside the console...
the error
Code:
for x = from.x, to.x do
for y = from.y, to.y do
for z = from.z, to.z do
local v = getTopCreature({x=x, y=y, z=z}).uid
if isPlayer(v) then
selfSay("Someone is already killing boss, please wait until he's done!", cid)
return
elseif isMonster(v) then
table.insert(monsters, v)
end
end
end
end
for i = 1, #monsters do
doRemoveCreature(monsters[i])
end
the error
Code:
[20:10:04.100] [Error - NpcScript Interface]
[20:10:04.101] data/npc/scripts/killinginthenameof.lua:onCreatureSay
[20:10:04.101] Description:
[20:10:04.101] (luaDoRemoveCreature) Creature not found