Example #1
0
 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()
Example #2
0
 def do_work(self):
     if ImageCoordinate.coords('images/explore_mail'):
         coord = ImageCoordinate.coords('images/explore_mail')
         clicker.move_click(coord)
     else:
         pass
     self.next()
Example #3
0
 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()
Example #4
0
 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()
Example #5
0
 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()
Example #6
0
 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()
Example #7
0
 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()
Example #8
0
 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()
Example #9
0
 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()
Example #10
0
 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()
Example #11
0
 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()
Example #12
0
 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()
Example #13
0
    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()
Example #14
0
 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()
Example #15
0
 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()
Example #16
0
 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()
Example #17
0
 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()
Example #18
0
 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()
Example #19
0
 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()
Example #20
0
 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()
Example #21
0
 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()
Example #22
0
 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()
Example #23
0
 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()
Example #24
0
 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()
Example #25
0
 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()
Example #26
0
 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()
Example #27
0
 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()
Example #28
0
 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()
Example #29
0
 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()
Example #30
0
 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()