def do_work(self): clicker.move(368 * 2 + 150, -127 * 2 - 100) # sys.exit('Adjust hospital') clicker.click(clicker.mouse_pos()) clicker.repeat_click(3) print('Clicked on hospital') 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): 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): 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 not HelpOthers.coord: HelpOthers.coord = ImageCoordinate.is_on_screen( 'images/help_others') if HelpOthers.coord: clicker.move(HelpOthers.coord[0],HelpOthers.coord[1]) 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 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): clicker.centerclick() clicker.click(clicker.mouse_pos()) clicker.repeat_click(1) print('Clicked on hospital') self.next()
def click(): clicker.repeat_click(3)