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): 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): 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): 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()
def do_work(self): print('Clicking search button to search for the target') coord = ImageCoordinate.coords('images/search') clicker.click(coord) while ImageCoordinate.is_on_screen('images/search'): sleep(2) DecreaseLevel().do_work() sleep(2) coord = ImageCoordinate.coords('images/search', shot=True) clicker.move_click(coord) else: clicker.move(0, -127) 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.coords('images/isOutside') if coord: clicker.click(coord) print('Going to home. Now, you are at home.') else: print(' you are at home.') 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) 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): coord = ImageCoordinate.coords('images/systemmail') if coord: clicker.click(coord) else: coord = ImageCoordinate.coords('images/systemmailblue') print('clicking system blue') if coord: pass else: coord = ImageCoordinate.coords('images/systemmail') if coord: clicker.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): 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): 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): 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/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: sys.exit('No queue, please wait.') 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): 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: clicker.click(clicker.mouse_pos()) 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): 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): 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): start_time = time.time() while not ImageCoordinate.is_on_screen('images/present_icon'): # if time.time() - start_time > 10: # print('Restarting...') # break print('No present this time') else: coord = ImageCoordinate.coords('images/present_icon', shot=False) clicker.click(coord) clicker.repeat_click(3, interval=0.55) print('Received present') self.next()
def do_work(self): coord = ImageCoordinate.is_on_screen('images/isOutside') if coord: homecoord = ImageCoordinate.is_on_screen('images/isHome') if homecoord: print('You are at home') clicker.click(homecoord) else: print('you are outside') else: coord = ImageCoordinate.coords('images/isHome') if coord: print('im at home') clicker.click(coord) print('Now, you are at outside') num = random.random()*3 for count in range(int(num)): clicker.randomdrag() print('outing done') self.next()