def do_work(self): if ImageCoordinate.is_on_screen('images/report_selected'): pass else: coord = ImageCoordinate.coords('images/report_button') clicker.click(coord) self.next()
def do_work(self): if ImageCoordinate.coords('images/explore_mail'): coord = ImageCoordinate.coords('images/explore_mail') clicker.move_click(coord) else: pass self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/gathering_report'): coord = ImageCoordinate.coords('images/gathering_report') clicker.move_click(coord) coord = ImageCoordinate.coords('images/delete_button') clicker.move_click(coord) self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/close_window'): coord = ImageCoordinate.coords('images/close_window') clicker.move_click(coord) else: pass self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/btnSearch'): print('Clicking on to search for target') coord = ImageCoordinate.coords('images/btnSearch', shot=False) clicker.move_click(coords=coord) else: sys.exit('btnSearch is not visible.') self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/btnMarch'): print('Clicking on March button') coord = ImageCoordinate.coords('images/btnMarch', shot=False) clicker.move_click(coord) else: pass self.next()
def do_work(self): sleep(2) if ImageCoordinate.is_on_screen('images/send_scout_button'): print('Sending scout to explore the kingdom') coord = ImageCoordinate.coords('images/send_scout_button', shot=False) clicker.move_click(coord) self.next()
def do_work(self): sleep(1) if ImageCoordinate.is_on_screen('images/present_icon'): coord = ImageCoordinate.coords('images/present_icon') clicker.move_click(coord) sleep(1) clicker.click(coord) self.next()
def do_work(self): while not ImageCoordinate.is_on_screen('images/mail_button'): coord = ImageCoordinate.coords('images/close_window') clicker.click(coord) else: coord = ImageCoordinate.coords('images/mail_button') clicker.move_click(coord) self.next()
def do_work(self): print('Clicking on barbarian') if ImageCoordinate.is_on_screen('images/btnBarb'): coord = ImageCoordinate.coords('images/btnBarb', shot=False) clicker.move_click(coords=coord) else: pass self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/btnMarch'): print('Going to gather that resource') coord = ImageCoordinate.coords('images/btnMarch') clicker.move_click(coord) else: pass self.next()
def do_work(self): while ImageCoordinate.is_on_screen('images/apci'): coord_for_war_report = ImageCoordinate.coords('images/apci') clicker.click(coord_for_war_report) sleep(0.75) coord = ImageCoordinate.coords('images/delete_button') clicker.click(coord) self.next()
def do_work(self): while ImageCoordinate.is_on_screen('images/btnMarch') and ImageCoordinate.is_on_screen('images/unitqueue'): clicker.repeat_click(1) print('No queue available, quit attack.') print('waiting for some time...') else: pass self.next()
def do_work(self): sleep(1) while (ImageCoordinate.is_on_screen('images/fighting')) and ImageCoordinate.is_on_screen('images/unitqueue'): print('Troops are fighting now. Timestamp: ' + str(time.time())) sleep(0.5) else: pass self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/isOutside'): print('You are at outside') else: print('Going outside.') coord = ImageCoordinate.coords('images/isHome') clicker.move_click(coord) print('Now, you are at outside') self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/NewTroops'): print('Clicking on New Troops button') coord = ImageCoordinate.coords('images/newTroops', shot=False) print(coord) clicker.move_click(coord) else: clicker.click(clicker.mouse_pos()) self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/search_minus_button'): print('Resetting level to 1') coord = ImageCoordinate.coords('images/search_minus_button', shot=False) clicker.move_click(coord, clicks=25, interval=0.15) else: pass self.next()
def do_work(self): start_time = time.time() while ImageCoordinate.is_on_screen('images/present_house'): coord = ImageCoordinate.coords('images/present_house') clicker.click(coord) print('Moved mouse to present home.') else: print('I do not see any present home.') self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/NewTroops'): print('Clicking on New Troops button') coord = ImageCoordinate.coords('images/newTroops', shot=False) print(coord) clicker.move_click(coord) else: sys.exit('No queue, please wait.') self.next()
def do_work(self): sleep(1) while ImageCoordinate.is_on_screen('images/returning') and ImageCoordinate.is_on_screen('images/unitqueue'): print('Troops are returning, let\'s wait them. Timestamp: ' + str(time.time())) sleep(0.50) else: pass self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/help_others'): coord = ImageCoordinate.coords('images/help_others') clicker.move_to(coord) clicker.repeat_click(5, -20, 40) print('Helped alliance members') else: print('Alliance members do not need any help') self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/heal_button'): print('Clicking to heal button to heal troops.') coord = ImageCoordinate.coords('images/heal_button', shot=False) clicker.click(coord) else: print('Troops are healthy... No need to heal.') pass self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/isHome'): print('You are at home') coord = ImageCoordinate.coords('images/isHome', shot=False) clicker.move_to(coord) else: coord = ImageCoordinate.coords('images/isOutside') clicker.move_click(coord) print('Going to home. Now, you are at home.') self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/search_plus_button'): print('Setting level to ' + str(self.get_level())) coord = ImageCoordinate.coords('images/search_plus_button') clicker.move_click(coord, clicks=self.get_level() - 1, interval=0.15) else: sys.exit('search_plus_button not found. Time: ' + str(time.time())) self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/search'): print('Clicking search button to search for the target') coord = ImageCoordinate.coords('images/search', shot=False) clicker.move_click(coord) clicker.move(500, -160) clicker.click(clicker.mouse_pos()) else: pass self.next()
def do_work(self): sleep(2) if ImageCoordinate.is_on_screen('images/ask_help_button'): coord = ImageCoordinate.coords('images/ask_help_button') clicker.move_to(coord) clicker.repeat_click(5, -20, 40) print('Clicked on help request') else: print('Help is not required') self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/red_cross_hospital'): print('Clicking on red cross over the hospital') coord = ImageCoordinate.coords('images/red_cross_hospital') clicker.click(coord) else: print( 'I do not see any red cross, it means that troops are ok for now.' ) self.next()
def do_work(self): if not ClickMarch.coord: ClickMarch.coord = ImageCoordinate.is_on_screen('images/btnMarch') if ClickMarch.coord: clicker.click(ClickMarch.coord) else: ClickMarch.coord = ImageCoordinate.is_on_screen('images/btnMarch') if ClickMarch.coord: clicker.click(ClickMarch.coord) sleep(1) self.next()
def do_work(self): if ImageCoordinate.is_on_screen('images/is_antibot_active'): winsound.Beep(2500, 1500) print('Antibot! Antibot! Antibot!') else: print('Bot test is not active, continue playing game.') if ImageCoordinate.is_on_screen('images/verify_button'): winsound.Beep(2500, 1500) print('Verify the bot test please') else: print('Verification is not required. Continue...') self.next()
def do_work(self): while not ImageCoordinate.is_on_screen('images/mail_button'): print('looking for mail') coord = ImageCoordinate.coords('images/close_window') clicker.click(coord) else: coord = ImageCoordinate.coords('images/mail_button') print('will click mail') if coord: clicker.click(coord) print('clicked mail') print('process done') self.next()