コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()
コード例 #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()