Feita com carinho, coloque no Ingame script editor:
-------Macro de Pescaria-------------------------------
local waterIds = {4597} -- IDs de onde você deseja pescar
local rodId = 3483 -- ID da vara de pescar
local useDistance = 3 -- Distância que você deseja lançar a vara
local moveDist = 3 -- Quão longe você está disposto a se mover
local function magmaVtr(positions)
local closestWaterTile
local closestWaterTileDistance = 99999
for _, position in ipairs(positions) do
local tileDist = getDistanceBetween(pos(), position)
if tileDist < closestWaterTileDistance then
closestWaterTile = position
closestWaterTileDistance = tileDist
end
end
if closestWaterTile then
return closestWaterTile
end
end
-- Declare fishingOn como global
fishingOn = macro(1000, "Fishing", function()
local possibleFishingSpots = {}
local foundFishingSpot = 0
for i, tile in ipairs(g_map.getTiles(posz())) do
if tile:getTopUseThing() ~= nil then
local topID = tile:getTopUseThing():getId()
local fishable = table.contains(waterIds, topID)
if fishable then
local distance = getDistanceBetween(pos(), tile:getPosition())
if (distance <= useDistance) then
return usewith(rodId, tile:getTopUseThing())
elseif distance > useDistance and distance <= moveDist then
if findPath(pos(), tile:getPosition(), moveDist, {ignoreNonPathable=true, precision=1}) then
table.insert(possibleFishingSpots, tile:getPosition())
foundFishingSpot = foundFishingSpot + 1
end
end
end
end
end
if foundFishingSpot >= 1 then
CaveBot.delay(2000)
TargetBot.delay(2000)
return autoWalk(magmaVtr(possibleFishingSpots), moveDist, {ignoreNonPathable=true, precision=1})
end
end)