def check_mail_box(): mail_button = pyautogui.locateOnScreen( FILE_PATH + 'mail.png', confidence=0.8) if mail_button: locate_button_coords(mail_button) else: time.sleep(3) mail_button = pyautogui.locateOnScreen( FILE_PATH + 'mail.png', confidence=0.8) locate_button_coords(mail_button)
def click_on_buff(): buff_tower = pyautogui.locateOnScreen(FILE_PATH + 'buffer_tower.png', confidence=0.8) if buff_tower: locate_button_coords(buff_tower) else: buff_tower = pyautogui.locateOnScreen(FILE_PATH + 'buffer_tower.png', confidence=0.8) if buff_tower: locate_button_coords(buff_tower)
def click_into_close_button(): button_x = pyautogui.locateOnScreen( FILE_PATH + 'x-button.png', confidence=0.8) if button_x: locate_button_coords(button_x) print("I'm closing ads") else: pyautogui.hotkey('f5') time.sleep(20) locate_button_coords(button_x)
def go_to_tower(): time.sleep(3) tower_sign = pyautogui.locateOnScreen(FILE_PATH + 'tower.png', confidence=0.7) if tower_sign: locate_button_coords(tower_sign) else: tower_sign = pyautogui.locateOnScreen(FILE_PATH + 'tower.png', confidence=0.8) if tower_sign: locate_button_coords(tower_sign)
def skip_battle(): time.sleep(3) skip_battle = pyautogui.locateOnScreen(FILE_PATH + 'skip.png', confidence=0.8) if skip_battle: locate_button_coords(skip_battle) else: skip_battle = pyautogui.locateOnScreen(FILE_PATH + 'to_battle.png', confidence=0.8) if skip_battle: locate_button_coords(skip_battle)
def to_battle(): time.sleep(3) to_battle_sign = pyautogui.locateOnScreen(FILE_PATH + 'to_battle.png', confidence=0.8) if to_battle_sign: locate_button_coords(to_battle_sign) else: to_battle_sign = pyautogui.locateOnScreen(FILE_PATH + 'to_battle.png', confidence=0.8) if to_battle_sign: locate_button_coords(to_battle_sign)
def open_daily_quests(): time.sleep(5) daily_quests_image = pyautogui.locateOnScreen( FILE_PATH + 'daily_quest.png', confidence=0.8) if daily_quests_image: locate_button_coords(daily_quests_image) else: daily_quests_image = pyautogui.locateOnScreen( FILE_PATH + 'daily_quest.png', confidence=0.8) locate_button_coords(daily_quests_image)
def complete_daily_quests(): time.sleep(3) complete = pyautogui.locateOnScreen( FILE_PATH + 'complete.png', confidence=0.8) if complete: locate_button_coords(complete) else: complete = pyautogui.locateOnScreen( FILE_PATH + 'complete.png', confidence=0.8) if complete: locate_button_coords(complete)
def click_into_hero_wars_logo(): time.sleep(5) hero_wars_logo = pyautogui.locateOnScreen( FILE_PATH + 'hero_wars_logo.png', confidence=0.8) if hero_wars_logo: locate_button_coords(hero_wars_logo) else: herowarslogo = pyautogui.locateOnScreen( FILE_PATH + 'hero_wars_logo.png', confidence=0.8) if herowarslogo: locate_button_coords(herowarslogo)
def collect_all_mail(): time.sleep(3) collect_all = pyautogui.locateOnScreen( FILE_PATH + 'collect_all.png', confidence=0.8) if collect_all: print('I have found collect all') locate_button_coords(collect_all) collect_all = pyautogui.locateOnScreen( FILE_PATH + 'collect_all.png', confidence=0.8) if collect_all: locate_button_coords(collect_all) else: print("I have not found collect all") time.sleep(3) collect_all = pyautogui.locateOnScreen( FILE_PATH + 'collect_all.png', confidence=0.8) if collect_all: locate_button_coords(collect_all) collect_all = pyautogui.locateOnScreen( FILE_PATH + 'collect_all.png', confidence=0.8) if collect_all: locate_button_coords(collect_all)