-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoreKeeperFishingBot.py
52 lines (44 loc) · 1.44 KB
/
CoreKeeperFishingBot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from pyautogui import *
import pyautogui
import time
import keyboard
import win32api, win32con
#Libs
#By @LePoulet12 :)
print("Simple Auto-Fishing for CoreKeeper by @LePoulet12")
#Click
def click(x, y):
win32api.SetCursorPos((x, y))
win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTDOWN, 0, 0)
time.sleep(1.0)
win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTUP, 0, 0)
#Variables
forcedClick = 0
numberOfReels = 0
#Scalling important variables
screen_width, screen_height = pyautogui.size()
reference_width = 1920
reference_height = 1080
fish_x = int(968 * screen_width / reference_width)
fish_y = int(370 * screen_height / reference_height)
click_x = int(947 * screen_width / reference_width)
click_y = int(435 * screen_height / reference_height)
while not keyboard.is_pressed('z'):
if forcedClick >= 24:
#force click if no fish or bugged
print("Forced Click")
click(click_x, click_y)
numberOfReels += 1
print("Reel #"+str(numberOfReels))
forcedClick = 0
if pyautogui.pixel(fish_x,fish_y)[0] == 224 and pyautogui.pixel(fish_x,fish_y)[1] == 224 and pyautogui.pixel(fish_x,fish_y)[2] == 234:
#catching a fish
print("found fish")
click(click_x, click_y)
numberOfReels += 1
print("Reel #"+str(numberOfReels))
forcedClick = 0
else:
#No fish
forcedClick += 1
time.sleep(0.30)