Beispiel #1
0
 def task_start(self):
     time.sleep(2)
     KeyBoard().press_shortcut_key('alt', '1')
     time.sleep(1)
     Mouse().click_element(337, 295)
     time.sleep(3)
     Mouse().click_element(262, 269)
     time.sleep(0.5)
     KeyBoard().press_shortcut_key('alt', '1')
     time.sleep(3)
     KeyBoard().press_shortcut_key('alt', '5')
     time.sleep(1.5)
     Screen().cut_screen()
     time.sleep(1.5)
     zhongkui = Screen().get_location_picture(
         'D:\\dh2\\game\\xiaogui\\0.png')
     if zhongkui is not 0:
         Mouse().click_element(zhongkui[0] - 5, zhongkui[1] - 30)
     Mouse().click_element(237, 399)
     time.sleep(0.5)
     Mouse().click_element(237, 399)
     Mouse().click_element(27, 256)
     time.sleep(1)
     if Common().iswalking() is False:
         Mouse().click_element(zhongkui[0] - 5, zhongkui[1] - 30)
         Mouse().click_element(237, 399)
         time.sleep(0.5)
         Mouse().click_element(237, 399)
         Mouse().click_element(27, 256)
         if Common().iswalking() is False:
             Mouse().click_element(zhongkui[0] - 5, zhongkui[1] - 30)
             Mouse().click_element(237, 399)
             time.sleep(0.5)
             Mouse().click_element(237, 399)
             Mouse().click_element(27, 256)
     Common().capation_eat_xiang()
     time.sleep(15)
     Screen().find_ele_picture('game\\xiaogui\\1', 'mouse', 207, 355)
     for i in range(5):
         time.sleep(2)
         KeyBoard().press_shortcut_key('alt', '8')
         Common().change_teamer()
         Mouse().click_element(412, 429)
         if i is 4:
             pass
         else:
             Common().score_for_shifu()
     Screen().find_ele_picture('game\\xiaogui\\2', 'mouse', 780, 537)
     time.sleep(1)
     Screen().cut_screen()
     box_result = Screen().get_location_picture(
         'D:\\dh2\\game\\xiaogui\\3.png', 0.8)
     if box_result is not 0:
         Mouse().click_element(327, 535)
     Common().score_for_shifu()
Beispiel #2
0
 def __init__(self):
     self.transform = TransForm()
     self.common = Common()
     self.keyboard = KeyBoard()
     self.screen = Screen()
     self.mouse = Mouse()
     self.walking = Walking()
Beispiel #3
0
 def __init__(self):
     self.transform = TransForm()
     self.common = Common()
     self.keyboard = KeyBoard()
     self.screen = Screen()
     self.mouse = Mouse()
     self.yao = ''
     self.offset = 17 + 15
Beispiel #4
0
 def capation_eat_xiang(self):
     KeyBoard().press_shortcut_key('alt', 'e')
     Mouse().click_element(344, 397)
     Mouse().click_element(44, 454, right=True)
     KeyBoard().press_shortcut_key('alt', 'e')
Beispiel #5
0
 def __init__(self):
     self.personList = [75, 250, 400, 545, 700]
     self.mouse = Mouse()
     self.keyboard = KeyBoard()
     self.screen = Screen()
     self.transform = TransForm()
Beispiel #6
0
 def __init__(self):
     self.keyboard = KeyBoard()
     self.mouse = Mouse()