Fishbot v1
This commit is contained in:
@@ -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...")
|
||||
|
||||
Reference in New Issue
Block a user