From 3318d309fc28876c781c4febd1fa65204a86d9fe Mon Sep 17 00:00:00 2001 From: Thaloria Date: Sun, 1 May 2022 20:33:53 +0200 Subject: [PATCH] refactor dig --- digging_main.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/digging_main.py b/digging_main.py index 0f83577..0805f15 100644 --- a/digging_main.py +++ b/digging_main.py @@ -18,6 +18,9 @@ def run(): # PLOT_TO_USE = "business" PLOT_TO_USE = "main_plot" + GRID_SIZE_WIDTH = 30 + GRID_SIZE_DEPTH = 24 + DIG_TIME = 150 # initialize the StunWindowCapture class try: @@ -125,12 +128,12 @@ def run(): # start 167, end 167 - (47 * 3), step -47 start_left = point[0] - (size * left) start_up = point[1] - (size * down) - for f in range(start_up, start_up + (size * 24), size): - for i in range(start_left, start_left + (size * 30), size): + for f in range(start_up, start_up + (size * GRID_SIZE_DEPTH), size): + for i in range(start_left, start_left + (size * GRID_SIZE_WIDTH), size): pydirectinput.moveTo(i + offset_left, f + offset_down) pydirectinput.mouseDown() w = random.randint(1, 50) - cv.waitKey(150 + w) + cv.waitKey(DIG_TIME + w) pydirectinput.mouseUp() if keyboard.is_pressed('p') == True or pause == True: pause = True @@ -147,8 +150,8 @@ def run(): for pointi in pointis: pydirectinput.moveTo(pointi[0] + offset_left, pointi[1] + offset_down) pydirectinput.mouseDown() - w = random.randint(1, 100) - cv.waitKey(150 + w) + w = random.randint(1, 50) + cv.waitKey(DIG_TIME + w) pydirectinput.mouseUp() if keyboard.is_pressed('p') == True or pause == True: