Hey there!

Code:
local posicaox = { posx+1, posx+2, posx+3, posx+4, posx+5, posx-1, posx-2, posx-3, posx-4, posx-5, posx-6 }
local posicaoy = { posy+1, posy+2, posy+3, posy+4, posy+5, posy-1, posy-2, posy-3, posy-4, posy-5, posy-6 }


if weaponamount < 6 and isitemontile('spear', unpack(posicaox), unpack(posicaoy), posz) == true then
reachgrounditem('spear')
wait(400,500)
moveitems('spear','ground','weapon',1)
end
I'm trying to make this actions work, it's supposed to check for spers on tile around me and get it if i have less than 6 spear, its not working but there are no DEBUGS on DEBUG channel. Could someone fix it?