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): 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 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): if not ClickNewTroopButtonForGathering.coord: ClickNewTroopButtonForGathering.coord = ImageCoordinate.is_on_screen( 'images/NewTroops') if ClickNewTroopButtonForGathering.coord: clicker.click(ClickNewTroopButtonForGathering.coord) else: ClickNewTroopButtonForGathering.coord = ImageCoordinate.is_on_screen( 'images/NewTroops') if ClickNewTroopButtonForGathering.coord: clicker.click(ClickNewTroopButtonForGathering.coord) else: clicker.click(clicker.mouse_pos()) self.next()
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.is_on_screen('images/close_window'): coord = ImageCoordinate.coords('images/close_window') clicker.move_click(coord) else: pass self.next()
def do_work(self): coord = ImageCoordinate.is_on_screen('images/new_troop_controller') if coord: pass else: pass self.next()
def do_work(self): if not ClickGatherButton.coord: ClickGatherButton.coord = ImageCoordinate.is_on_screen( 'images/gather_button') if ClickGatherButton.coord: clicker.click(ClickGatherButton.coord) 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/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(1) coord = ImageCoordinate.is_on_screen('images/present_icon') if coord: clicker.click(coord) sleep(1) clicker.click(coord) 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 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): 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): 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): 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/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): 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) while ImageCoordinate.is_on_screen('images/walking'): print('Troops are walking. Timestamp: ' + str(time.time())) sleep(0.5) else: pass self.next()
def do_work(self): sleep(0.5) print('looking for'+ self.path) coord = ImageCoordinate.is_on_screen('images/'+self.path) if coord: return True else: return False
def do_work(self): sleep(0.5) print('clicking '+self.path) coord = ImageCoordinate.is_on_screen('images/'+self.path) if coord: clicker.click(coord) 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 not ClickOnHealMenuButton.coord: ClickOnHealMenuButton.coord = ImageCoordinate.is_on_screen( 'images/red_cross_hospital') if ClickOnHealMenuButton.coord: clicker.click(ClickOnHealMenuButton.coord) else: print('I do not see any red cross, it means that troops are ok for now.') self.next()
def do_work(self): pass_ap=False if not ClickMarchButton.coord: ClickMarchButton.coord = ImageCoordinate.is_on_screen( 'images/btnMarch') if ClickMarchButton.coord: clicker.click(ClickMarchButton.coord) else: ClickMarchButton.coord = ImageCoordinate.is_on_screen( 'images/btnMarch') if ClickMarchButton.coord: clicker.click(ClickMarchButton.coord) SimpleClick('close_window').do_work() pass_ap = True if CheckActionPoint() and not pass_ap: clicker.click(ClickMarchButton.coord) 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): today = datetime.datetime.now() while ImageCoordinate.is_on_screen('images/verify_button'): sys.exit( 'You missed to solve antibot, so exiting game. Exit time: ' + today.strftime("%H:%M:%S")) else: print('Game is safe, no verify button.') self.next()
def do_work(self): if not self.force: coords = ImageCoordinate.is_on_screen('images/btnSearch') if coords: if not ImageCoordinate.is_on_screen('images/hammer'): print('this is not hammer') else: print('this is hammer') GoOutside().do_work() clicker.click(coords) ClickSearchTargetButton.coord = coords print('Now, you are at clicked') else: raise FailSafeException else: clicker.click(ClickSearchTargetButton.coord) print('found button') self.next()
def do_work(self): if not ClickBarbarianButton.coord: ClickBarbarianButton.coord = ImageCoordinate.is_on_screen( 'images/btnBarb') if ClickBarbarianButton.coord: clicker.click(ClickBarbarianButton.coord) else: pass self.next()