I have an action but it is not working properly, I mean it is using destroy field at body but sometimes it is using df on fields where is no body.
PHP Code:
-- Credits to SIRMATE
-- [[ 
INIT START ]] -- 
    
local CONFIG = { 
        
FIRE_FIELDS_IDS = {21182119}, -- Add all field IDs here
        
BODIES = {44072702724062},
    } 
-- [[ 
INIT END ]] -- 

local DESTROYED_FIRE_FIELD false 

for POSITION_XPOSITION_YPOSITION_Z in Tile.ScreenArea() do
    if (
Tile.GetByPosition(POSITION_XPOSITION_YPOSITION_Z):isItemOn(CONFIG.BODIES)) then
            local POSITION_X1
POSITION_Y1POSITION_Z1 POSITION_XPOSITION_YPOSITION_Z
            
if toptileitem(POSITION_X1POSITION_Y1POSITION_Z1) == 2118 or toptileitem(POSITION_X1POSITION_Y1POSITION_Z1) == 2119 then
                System
.PauseWalking(3000
                
Self.UseItemOnGround("destroy field rune"POSITION_X1POSITION_Y1POSITION_Z1
                
System.Wait(Self.CoolDown(SPELL_GROUP_SUPPORT)) 
         
                
DESTROYED_FIRE_FIELD true 
            end 
        end
end 

if (DESTROYED_FIRE_FIELDthen 
    System
.PauseWalking(0
end 
Could someone fix it?