-- SKIN / STAKE BODIES MACRO
-- START CONFIG
setDefaultTab('Cave')
local exhausted = 350
local maxDistance = 6
local config = {
[5908] = { -- Obsidian Knife
4286, 4272, 4173, 4011, 4025, 4047, 4052, 4057, 4062, 4112, 4212, 4321, 4324, 4327, 10352, 10356, 10360, 10364,
},
[5942] = { -- blessed wooden stake
4097, 4137, 8738, 18958,
},
[3483] = { -- fishing
9582
}
}
-- END CONFIG
-- Original made by Vithrax (i guess)
-- vBot scripting services: F.Almeida#8019
-- ATTENTION:
-- Don't edit below this line unless you know what you're doing.
-- ATENÇÃO:
-- Não mexa em nada daqui para baixo, a não ser que saiba o que está fazendo.
-- ATENCIÓN:
-- No cambies nada desde aquí, solamente si sabes lo que estás haciendo.
local function lookAround()
local maxLook = (TargetBot and TargetBot.isActive()) and 1 or maxDistance
for x = -maxLook,maxLook do
for y = -maxLook,maxLook do
if x ~= 0 or y ~= 0 then
local p = pos()
p.x, p.y = p.x + x, p.y + y
local path = findPath(pos(),p,maxDistance)
if path then
local tile = g_map.getTile(p)
if tile then
local top = tile:getTopUseThing()
if top and top:isContainer() then
for stake, items in pairs(config) do
local findStake = findItem(stake)
if findStake then
if table.find(items,top:getId()) then
local wait = #path * exhausted
CaveBot.delay(wait + exhausted)
return tile, findStake, wait
end
end
end
end
end
end
end
end
end
return false
end
macro(exhausted,"Skin Bodies",function()
if not CaveBot or not CaveBot.isOn() then return end
local tile, stake, wait = lookAround()
if tile then
local top = tile:getTopUseThing()
if top and top:isContainer() then
useWith(stake, top)
delay(wait)
return
end
end
end)