Пример #1
0
 def mouse_tap(self):
     if FindPic(GlobalVal.img_mouse_right, self.screen().crop(AreaVal.mouse_tap)).isFind() \
             or FindPic(GlobalVal.img_mouse_right, self.screen().crop(AreaVal.mouse_tap)).isFind():
         for i in range(8):
             self.windows.mouse_left_click()
             self.windows.mouse_right_click()
         print("mouse tap")
         return True
     return False
Пример #2
0
 def update_after(self):
     if self.area is None:
         screen = self.screen()
         screen = screen.crop((0, 0, int(screen.width / 2), screen.height))
         fp = FindPic(screen, SmVal.ling_li_word, sim=0.92)
         if fp.isFind():
             x, y = fp.maxPoint()
             self.area = (x - 6, y, x - 6 + 306, y + 15)
             self.__logger.info("find ling li area %s" % (str(self.area)))
         else:
             self.__logger.info(
                 str({
                     "max point": fp.maxPoint(),
                     "max value": fp.maxValue()
                 }))
Пример #3
0
 def update_after(self):
     if self.__area is None:
         screen = self.screen()
         fp = FindPic(screen, self.icon())
         if fp.isFind():
             x, y = fp.maxPoint()
             self.__area = self.func(x, y)
             self.__logger.info("find %s area %s" %
                                (self.__name, str(self.__area)))
         else:
             self.__logger.info(
                 str({
                     "max point": fp.maxPoint(),
                     "max value": fp.maxValue()
                 }))
Пример #4
0
 def exist(self, img):
     return FindPic(original=self.__fu_wen, goal=img).isFind()
Пример #5
0
 def exist(self, img):
     return FindPic(original=self.screen().crop(AreaVal.dot),
                    goal=img).isFind()
Пример #6
0
 def exist_skill(self, img):
     return FindPic(original=self.screen().crop(AreaVal.skill),
                    goal=img,
                    sim=0.99).isFind()
Пример #7
0
 def exist_buffer(self, img):
     return FindPic(original=self.screen().crop(AreaVal.buff),
                    goal=img).isFind()