Proper classes
This commit is contained in:
11
test.py
11
test.py
@@ -7,7 +7,7 @@ import win32api, win32con
|
||||
import time
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
WAIT4CLICK = 0.04
|
||||
|
||||
# see https://github.com/KianBrose/Image-Recognition-Botting-Tutorial/blob/master/README.txt
|
||||
|
||||
#def click(x,y):
|
||||
@@ -62,6 +62,7 @@ def wait_for_start():
|
||||
|
||||
|
||||
def zoomout():
|
||||
"Tut nicht"
|
||||
time.sleep(0.5)
|
||||
print("Zooming out")
|
||||
pyautogui.click(x=500, y=500)
|
||||
@@ -81,13 +82,7 @@ def find_peasants():
|
||||
print(f"Für Bild {img_path} wurden {len(matches)} matches gefunden: {matches}")
|
||||
return all_matches
|
||||
|
||||
def order_peasants(number):
|
||||
print(f"Trying to order {number} peasants.")
|
||||
pyautogui.press('h')
|
||||
time.sleep(WAIT4CLICK)
|
||||
for i in range(number):
|
||||
pyautogui.press('q')
|
||||
time.sleep(WAIT4CLICK)
|
||||
|
||||
|
||||
def assign_hotkeys():
|
||||
pyautogui.press(',')
|
||||
|
||||
Reference in New Issue
Block a user