I need to straighten out this action , I want to make her use items just around the character and not under me , just around (North, South , East, West and derivatives, NEVER IN THE CENTRE )
Action:
PHP Code:
PHP Code:
local ids = {0000}
local ids2 = {0000}
local weapon = "machete" -- Weapon used to break furniture
local weapon2 = "fire sword" -- Weapon used to break furniture
local breakRange = 1 -- Keep it on zero if you wish to break items on whole screen
auto(50)
if breakRange >= 1 then
for i = -breakRange, breakRange do
for j = -breakRange, breakRange do
for r = 1, #ids do
if topitem($posx + i, $posy + j, $posz).id == ids[r] then
pausewalking(20000)
useitemon(weapon, ids[r], ground($posx + i, $posy + j, $posz))
elseif topitem($posx + i, $posy + j, $posz).id == ids2[r] then
pausewalking(20000)
useitemon(weapon2, ids2[r], ground($posx + i, $posy + j, $posz))
end
end
end
end
end