-- main tab
UI.Label("Vithrax edited by FeeTads V1.3")

UI.Separator()

macro(1000, "Main BP Open", function()
    bpItem = getBack()
    bp = getContainer(0)

    if not bp and bpItem ~= nil then
        g_game.open(bpItem)
    end

end)

local mineableIds = {4980, 4485, 4464, 4460, 4465, 4462, 4474, 4463} -- ID dos locais
local pickId =  3456 -- ID da Pick
local useDistance = 10 

macro(100, "Mineirar",  function()
    for i, tile in ipairs(g_map.getTiles(posz())) do
        for j, item in ipairs(tile:getItems()) do
            if (item) then
                itemID = item:getId()
                minable = table.contains(mineableIds, item:getId())

                if(minable) then
                    local distance = getDistanceBetween(pos(), tile:getPosition())

                    if (distance <= useDistance) then
                        usewith(pickId,item)
                        return
                    end
                end
            end
        end
    end
end)

macro(500, "usar pontos", function()
         usewith(3040, player) 
end)



UI.Separator()
local feetads = macro(10000 *60, "ON/Off Cavebot [home]", function() end)
singlehotkey("Home", function(icon, isOn)
  if CaveBot.isOff() then
    feetads.setOn()
    CaveBot.setOn()
    TargetBot.setOn()
  else
    feetads.setOff()
    CaveBot.setOff()
    TargetBot.setOff()
  end
end)


UI.Separator()
