FabianoBN
l|¬¬"|l
Would be the right way to use to check if the area has some monster?
Lua:
local from = {x=1234, y=1234, z=3}
local to = {x=1234, y=1234, z=3}
for x = from.x, to.x do
for y = from.y, to.y do
local v = getTopCreature({x=x, y=y, z=from.z}).uid
if isMonster(v) then
return doCreatureSay(cid, 'There is already a monstter in the area.', TALKTYPE_ORANGE_1, false, cid)
else
doSetItemActionId(doCreateItem(1945,1,pos1), 1234)
doSetItemActionId(doCreateItem(1945,1,pos2), 1234)
doSetItemActionId(doCreateItem(1945,1,pos3), 1234)
doSetItemActionId(doCreateItem(1945,1,pos4), 1234)
doSetItemActionId(doCreateItem(1945,1,pos5), 1234)
end
end
end
Last edited: