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): 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): 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): 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): 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): 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(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): 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 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): 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/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): 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 ClickBarbarianButton.coord: ClickBarbarianButton.coord = ImageCoordinate.is_on_screen( 'images/btnBarb') if ClickBarbarianButton.coord: clicker.click(ClickBarbarianButton.coord) else: pass 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): if not ClickOnHealButton.coord: ClickOnHealButton.coord = ImageCoordinate.is_on_screen( 'images/heal_button') if ClickOnHealButton.coord: clicker.click(ClickOnHealButton.coord) else: print('Troops are healthy... No need to heal.') pass self.next()
def do_work(self): if not ClickSearchButton.coord: ClickSearchButton.coord = ImageCoordinate.is_on_screen( 'images/search') if ClickSearchButton.coord: clicker.click(ClickSearchButton.coord) clicker.centerclick() else: pass self.next()
def do_work(self): if not ClickResetLevelButton.coord: ClickResetLevelButton.coord = ImageCoordinate.is_on_screen( 'images/search_minus_button') if ClickResetLevelButton.coord: clicker.click(ClickResetLevelButton.coord, clicks=25, interval=0.15) else: pass 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): if not ClickSetLevelButton.coord: ClickSetLevelButton.coord = ImageCoordinate.is_on_screen( 'images/search_plus_button') if ClickSetLevelButton.coord: clicker.click(ClickSetLevelButton.coord, clicks=self.get_level()-1, interval=0.3) else: print('fail setlevel') raise FailSafeException self.next()
def CheckActionPoint(): #sleep(0.5) coord = ImageCoordinate.is_on_screen('images/useap') if coord: clicker.click(coord, clicks=6, interval=0.15) SimpleClick('close_window').do_work() return 1 else: print('Action Points are sufficient') return 0
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): 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): 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): 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 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): 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()
def do_work(self): sleep(3) coord = ImageCoordinate.is_on_screen( 'images/is_antibot_active') if coord: winsound.Beep(2500, 1500) print('Antibot! Antibot! Antibot!') clicker.click(coord) if ImageCoordinate.is_on_screen('images/verify_button'): print('Verify the bot test please') coord = ImageCoordinate.coords('images/verify_button') clicker.click(coord) sleep(10) usethis = ImageCoordinate.is_on_screen('images/usethis') confirmgee = ImageCoordinate.is_on_screen('images/confirmgee') print(usethis) print(confirmgee) solvegee(usethis, confirmgee) else: print('Verification is not required. Continue...') else: print('Bot test is not active, continue playing game.') 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()