If you have GoD expansion, just zone into Natimbi wayfarer camp and turn it on, if you don't have a fishing pole in hand you'll see the problem occur immediatley as it begins running one step and trying to fish over and over.
It seems to me like it's simple skipping the /goto commands and is immediatley returning to Main after it tries one location.
Code: Select all
| - angler.mac -
| Created by Feonix762, lots of bits and pieces and ideas taken from other people. Thanks!
#turbo
#include routines.mac
#event BrokenPole "You can't fish without a pole, go buy one."
#event NoBait "You can't fish without fishing bait, go buy some."
#event NoRoom "There was no place to put that! The item has dropped to the ground!"
Sub Main
/declare GokkLocX global
/declare GokkLocY global
/declare NearGokkLocX global
/declare NearGokkLocY global
/declare NearFishLocX global
/declare NearFishLocY global
/declare FishLocX global
/declare FishLocY global
/varset GokkLocX -820
/varset GokkLocY -1601
/varset NearGokkLocX -910
/varset NearGokkLocY -1560
/varset NearFishLocX -1173
/varset NearFishLocY -1581
/varset FishLocX -1262
/varset FishLocY -1657
/varset SellSaltWater 50
/varset BuyBait 8
| Check for Fishing Pole and start fishing.
:Fish
/if $invpanel==TRUE /press i
/call CheckPole
/if $return==1 /return
/doability Fishing
/delay 65
/if "$cursor(name)"=="Tattered Cloth Sandal" /destroy
/if "$cursor(name)"=="Rusty Dagger" /destroy
/if "$cursor(name)"=="Fish Scales" /destroy
/if "$cursor(name)"=="Fresh Fish" /destroy
/if "$cursor(name)"=="Crawdad" /destroy
/if "$cursor(name)"=="Waterleaf Scale" /destroy
/if "$cursor(name)"~~"Saltwater" /autoinventory
/autoinv
/if n $char(hp,pct)<75 /call Gate
/goto :Fish
/return
| Make sure Fishing Pole is equiped, or else call GokkRun, buy pole, then equip and run back.
Sub CheckPole
/if $invpanel==TRUE /press i
/if "$equip(primary,name)"=="Fishing Pole" /return 0
/call GokkRun
/delay 1s
/target Gokk
/delay 5
/click right target
/delay 5
/mouseto merchant 2
/delay 5
/click left
/delay 5
/mouseto merchant buy
/delay 5
/click left
/delay 5
/mouseto merchant done
/delay 5
/click left
/delay 5
/if $invpanel==FALSE /press i
/finditem "Fishing Pole"
/delay 5
/finditem "Fishing Pole"
/if $invpanel==TRUE /press i
/autoinv
/call FishRun
/return 0
| Run to first location, then second, then in front of Gokk and go back to buying/selling.
Sub GokkRun
:NearFish
/face loc NearFishLocX, NearFishLocY
/sendkey down up
/if n ($char(x)<> NearFishLocX) and n ($char(y)<> NearFishLocY) then /goto NearFish
/sendkey up up
:NearGokk
/face loc NearGokkLocX, NearGokkLocY
/sendkey down up
/if n ($char(x)<> NearGokkLocX) and n ($char(y)<> NearGokkLocY) then /goto :NearGokk
/sendkey up up
:Gokk
/face loc GokkLocX, GokkLocY
/sendkey down up
/if n ($char(x)<> GokkLocX) and n ($char(y)<> GokkLocY) then /goto :Gokk
/sendkey up up
/return
| Run from Gokk back to the fishing spot and start fishing again.
Sub FishRun
:NearGokk
/face loc NearGokkLocX, NearGokkLocY
/sendkey down up
/if n ($char(x)<> NearGokkLocX) and n ($char(y)<> NearGokkLocY) then /goto :NearGokk
/sendkey up up
:NearFish
/face loc NearFishLocX, NearFishLocY
/sendkey down up
/if n ($char(x)<> NearFishLocX) and n ($char(y)<> NearFishLocY) then /goto :NearFish
/sendkey up up
:Fish
/face loc FishLocX, FishLocY
/sendkey down up
/if n ($char(x)<> FishLocX) and n ($char(y)<> FishLocY) then /goto :NearFish
/sendkey up up
/face loc -1336, -1614
/return
| If we run out of bait go buy some from Gokk.
Sub NoBait
/if $invpanel==TRUE /press i
/call GokkRun
/target Gokk
/delay 5
/click right target
/delay 5
:BuyBait
/if n @BuyBait<=0 /goto :Done
/varsub @BuyBait 1
/mouseto merchant 3
/delay 5
/click left
/delay 5
/mouseto merchant buy
/delay 5
/click left
/delay 5
/press enter
/delay 5
/goto :BuyBait
:Done
/mouseto merchant done
/delay 5
/click left
/delay 5
/cleanup
/call FishRun
/return
| If we run out of room, go sell to Gokk.
Sub SellItems
/if $invpanel==TRUE /press i
/call GokkRun
/target Gokk
/delay 5
/click right target
/delay 5
:SellSalt
/if n @SellSaltWater<=0 /goto :Done
/varsub @SellSaltWater 1
/finditem similar "saltwater"
/delay 5
/mouseto merchant sell
/delay 5
/click left
/delay 5
/goto :SellSalt
:Done
/mouseto merchant done
/delay 5
/click left
/delay 5
/if $invpanel==TRUE /press i
/autoinv
/cleanup
/call FishRun
/return
Sub Event_BrokenPole
/call CheckPole
/return
Sub Event_NoBait
/call NoBait
/return
Sub Event_NoRoom
/call SellItems
/return
| Emergency
Sub Gate
/cast 6
/delay 1s
/cast 6
/delay 1s
/cast 6
/delay 1s
/cast 6
/delay 1s
/cast 6
/delay 1s
/cast 6
/delay 1s
/cast 6
/delay 1s
/cast 6
/delay 1s
/camp desktop

