def tap_support(num): """ 点击助战, 1/2(正数第一第二) and 8/9(倒数第二第一) :param num: :return: """ sh = cv2.imread(screenshot_path, 0) w, h = sh.shape[::-1] if num == 1: tap(w // 2, int(h * 0.4)) # choose the first one elif num == 2: tap(w // 2, int(h * 0.65)) # choose the 2 one elif num == 8: tap(w // 2, int(h * 0.5)) # choose the 2 one elif num == 9: tap(w // 2, int(h * 0.8)) # choose the 2 one return True
def INFI3(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(960, 840) time.sleep(duration)
def P4(self, duration=None): if duration is None: duration = 0.5 duration = duration * speed() tap(1340, 800) time.sleep(duration)
def INFI_BTN(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(627, 210) time.sleep(duration)
def A_STRENGTHEN(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1650, 1020) time.sleep(duration)
def A_x3(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1120, 420) time.sleep(duration)
def A_1ST_ONE(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(210, 380) time.sleep(duration)
def A_SORT(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1690, 192) time.sleep(duration)
def SKIPY(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(1240, 840) time.sleep(duration)
def SKIPS(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(1770, 60) time.sleep(duration)
def ZHIJIE9(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1049, 195) time.sleep(duration)
def SUPPREF(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1277, 193) time.sleep(duration)
def P_AP50(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(335, 1040) time.sleep(duration)
def DZHUZHAN(self, duration=None): if duration is None: duration = 3.0 duration = duration * speed() tap(240, 465) time.sleep(duration)
def DTASK(self, duration=None): if duration is None: duration = 3.0 duration = duration * speed() tap(1050, 345) time.sleep(duration)
def STRSELECT(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(650, 350) time.sleep(duration)
def A_SELECT(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1465, 192) time.sleep(duration)
def ADDAP(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(250, 1040) time.sleep(duration)
def A_JUEDING(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1730, 1010) time.sleep(duration)
def AuAPPLE(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(670, 475) time.sleep(duration)
def A_xBACK(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(660, 660) time.sleep(duration)
def CONFIRM(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(1260, 840) time.sleep(duration)
def A_xCONFIRM(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1255, 955) time.sleep(duration)
def CANCLE(self, duration=None): if duration is None: duration = 2.0 duration = duration * speed() tap(660, 840) time.sleep(duration)
def INFI_M2(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1675, 210) time.sleep(duration)
def K(self, duration=None): if duration is None: duration = 3.0 duration = duration * speed() tap(875, 865) time.sleep(duration)
def Q(self, duration=None): if duration is None: duration = 3.0 duration = duration * speed() tap(1347, 865) time.sleep(duration)
def PYPONT(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(1500, 100) time.sleep(duration)
def ZOOM(self, duration=None): if duration is None: duration = 1.0 duration = duration * speed() tap(40, 1015) time.sleep(duration)
def INFI2(self, duration=None): if duration is None: duration = 3.0 duration = duration * speed() tap(1255, 840) time.sleep(duration)