diff --git a/assets/fishing/Bobber.jpg b/assets/fishing/Bobber.jpg index 418db0e..df7fd4c 100644 Binary files a/assets/fishing/Bobber.jpg and b/assets/fishing/Bobber.jpg differ diff --git a/assets/fishing/Bobber.png b/assets/fishing/Bobber.png new file mode 100644 index 0000000..c4d194a Binary files /dev/null and b/assets/fishing/Bobber.png differ diff --git a/assets/screenshot.jpg b/assets/screenshot.jpg index ab64f1a..84d56dd 100644 Binary files a/assets/screenshot.jpg and b/assets/screenshot.jpg differ diff --git a/bots/fishing/FishingAgent.py b/bots/fishing/FishingAgent.py index bf47def..7cb4edd 100644 --- a/bots/fishing/FishingAgent.py +++ b/bots/fishing/FishingAgent.py @@ -42,18 +42,24 @@ class FishingAgent: time.sleep(1) self.findLure() self.lureLoc = res + time.sleep(0.2) + pyautogui.moveTo(res[0], res[1]) self.watchLure() def watchLure(self): + self.retry = 0 self.logger.log("Waiting for fish...") while True: + self.retry += 1 time.sleep(0.1) res = self.monitor.findMatch(self.fishingBobberImg) print(res) - - - def pullLine(self): - self.logger.log("Pulling line!") + if (res != -1 and abs(res[1] - self.lureLoc[1]) > 20): + pyautogui.click() + time.sleep(0.5) + self.castLure() + elif (self.retry > 200): + self.castLure() def run(self): self.logger.log("Starting fishing thread in 3 seconds...") diff --git a/core/Monitor.py b/core/Monitor.py index 31ca1a0..94b12a2 100644 --- a/core/Monitor.py +++ b/core/Monitor.py @@ -53,7 +53,7 @@ class Monitor: matchRatio = max_val * 100 self.logger.log(matchRatio) - if (matchRatio < 40): + if (matchRatio < 55): self.logger.log("Cannot find matching result...") return -1