Dudu :P Posted April 22 Report Share Posted April 22 Salve galera, alguém sabe se tem função de pesca ou script pro atual otcliente do server? Lembro que a versão antiga tinha, mas não encontrei nesse atual 1 Quote Link to comment Share on other sites More sharing options...
MagmaVtr Posted April 23 Report Share Posted April 23 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) 3 Quote Link to comment Share on other sites More sharing options...
Dudu :P Posted April 23 Author Report Share Posted April 23 Funcionou perfeitamente, obrigado man 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.