Пример #1
0
 def __init__(self):
     self.transform = TransForm()
     self.common = Common()
     self.keyboard = KeyBoard()
     self.screen = Screen()
     self.mouse = Mouse()
     self.walking = Walking()
Пример #2
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
Пример #3
0
    def task_start(self, i):
        Screen().cut_screen()
        time.sleep(1.5)
        lijing = Screen().get_location_picture(
            'D:\\dh2\\game\\tianting\\0.png')
        if lijing is not 0:
            Mouse().click_element(184, 396)
        time.sleep(1)
        Common().capation_eat_xiang()
        list = [(108, 239), (163, 240), (46, 256), (100, 255)]
        # 第一只怪
        for j in list:
            Mouse().click_element(j[0], j[1])
            time.sleep(5)
            Screen().find_ele_picture('game\\tianting\\1', 'mouse', 197, 355)
            time.sleep(2)
            for i in range(5):
                if i is 0:
                    Mouse().click_element(370, 385)
                    pyautogui.click()
                else:
                    pyautogui.click()
                    pyautogui.click()
                Common().change_teamer(times=0.5)
            time.sleep(1)
            while True:
                Screen().cut_screen()
                time.sleep(2)
                zidong = Screen().get_location_picture(
                    'D:\\dh2\\game\\tianting\\2.png')
                if zidong is 0 or zidong[0] < 100:
                    break

        Mouse().click_element(212, 350)
        Mouse().click_element(29, 268)

        time.sleep(10)
        while True:
            Screen().cut_screen()
            time.sleep(2)
            lijing = Screen().get_location_picture(
                'D:\\dh2\\game\\tianting\\0.png', 0.9)
            if lijing is not 0:
                # Mouse().click_element(184, 396)
                break
Пример #4
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()
Пример #5
0
                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()


if __name__ == '__main__':
    Common().get_focus()
    for i in range(200):
        print("第 " + str(i + 1) + " 次 ")
        XiaoGui().task_start()