Speed up pathing, read resources

This commit is contained in:
2020-11-09 22:32:46 +01:00
parent 7f731cb9fd
commit 07a61008ad
4 changed files with 81 additions and 8 deletions

View File

@@ -41,11 +41,13 @@ def build_houses():
pyautogui.press('q')
time.sleep(WAIT4CLICK)
pyautogui.click(650, 90)
aoe_commands.follow_points([(800, 500)])
time.sleep(WAIT4CLICK)
pyautogui.press('3')
time.sleep(WAIT4CLICK)
pyautogui.rightClick(650, 90)
aoe_commands.follow_points([(800, 500)])
time.sleep(WAIT4CLICK)
pyautogui.press('4')
@@ -56,14 +58,16 @@ def build_houses():
pyautogui.press('q')
time.sleep(WAIT4CLICK)
pyautogui.click(300, 200)
aoe_commands.follow_points([(800, 500)])
time.sleep(WAIT4CLICK)
def run_start_routine():
aoe_commands.order_peasants(4)
aoe_commands.order_peasants(int(aoe_recognition.read_resources()['food'] / 50)) # each villager costs 50 gold
assign_hotkeys()
build_houses()
xxa = aoe_recognition.initial_scout_trace()
pyautogui.press('1')
pyautogui.press('1')
aoe_commands.follow_points(xxa)
pyautogui.move(-500, -500) # reset mouse
pyautogui.press('h')