def getMission4Process(): util.logOut(__file__,'------------右上角圣彼得港口领取任务开始-----------') x , y = const.picLoop(const.publicPath() + 'beacon/overview.jpg') time.sleep(2) util.click(x,y) const.picLoop(path + 'area_overview.jpg') time.sleep(4) util.adb('shell input swipe 650 275 50 275') time.sleep(4) if util.isFindPic(path + 'port4.jpg'): x , y = const.picLoop(path + 'port4.jpg') util.click(x,y) x , y = const.picLoop(path + 'enter_port.jpg') util.click(x,y) const.picLoop(const.publicPath() + 'beacon/overview.jpg') # 圣彼得走地图界面 util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 228 406 228 141') x , y = const.picLoop(path + 'port_inside4.jpg') util.click(x, y) x , y = const.picLoop(path + 'into_port.jpg') time.sleep(4) util.click(x, y) acceptTaskProcess() else: x , y = const.picLoop(path + 'back_home.jpg') util.click(x,y) util.logOut(__file__,'------------右上角圣彼得港口领取任务结束-----------')
def main(): time.sleep(2) util.logOut( __file__, '通常' + str(CHAPTER_NUM) + '-' + str(CHAPTER_NUM2) + ' 不打boss 开始') const.chapterProcess(CHAPTER_NUM, 'N') while True: # 进入12-4 util.logOut(__file__, '-------------一局开始------------') const.intoStageProcess(CHAPTER_X, CHAPTER_Y, 3, 6, True) # 走格子 X, Y = START_X, START_Y # 打CNT个出boss for n in range(CNT): util.logOut(__file__, '------------一把开始-----------') const.picLoop(const.publicPath() + 'bmp/withdraw.jpg') # 等待搜索雷达 time.sleep(4.000) X, Y = const.findShip(X, Y, const.getPicNum(path), path) util.click(X, Y) const.anchorProcess(redFace=True) util.logOut(__file__, '------------一把结束-----------') # boss 不打boss x, y = const.picLoop(const.publicPath() + 'bmp/withdraw.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/OK.jpg') util.click(x, y) util.logOut(__file__, '-------------一局结束------------')
def main(): time.sleep(2) util.logOut(__file__, '通常9-1 打n把 开始') const.chapterProcess(CHAPTER_NUM, 'N') while True: # 进入 util.logOut(__file__, '9-1开始') const.intoStageProcess(CHAPTER_X, CHAPTER_Y, 3, 6) # 走格子 X, Y = START_X, START_Y # 打CNT个出boss for n in range(CNT): const.picLoop(const.publicPath() + 'bmp/withdraw.jpg') #紧急委托 特殊 xx, yy = util.findPic(const.publicPath() + 'bmp/OK.jpg') if xx != -1 and yy != -1: util.click(xx, yy) # 等待搜索雷达 time.sleep(4.000) X, Y = const.findShip(X, Y, const.getPicNum(path), path) util.click(X, Y) const.anchorProcess() # boss 不打boss x, y = const.picLoop(const.publicPath() + 'bmp/withdraw.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/OK.jpg') util.click(x, y) util.logOut(__file__, '-------------------------')
def main(): time.sleep(2) util.logOut(__file__, str(CHAPTER_NUM) + '-' + str(CHAPTER_NUM2) + '脚本开始') const.chapterProcess(CHAPTER_NUM, 'N') while True: # 进入 util.logOut(__file__, str(CHAPTER_NUM) + '-' + str(CHAPTER_NUM2) + '开始') const.intoStageProcess(CHAPTER_X, CHAPTER_Y) # 走格子 X, Y = START_X, START_Y # 打CNT个出boss for n in range(CNT): const.picLoop(const.publicPath() + 'bmp/withdraw.jpg') # 等待搜索雷达 time.sleep(4.000) X, Y = const.findShip(X, Y, PIC_NUM, path) util.click(X, Y) const.anchorProcess() # boss const.picLoop(const.publicPath() + 'bmp/withdraw.jpg') # 等待搜索雷达 time.sleep(4.000) const.goBossProcess() util.logOut(__file__, '-------------------------')
def resetProcess(): x, y = const.picLoop(const.publicPath() + 'bmp/back.jpg') time.sleep(.800) util.click(x, y) # 进入每日界面 x, y = const.picLoop(const.publicPath() + 'bmp/daily task.jpg') util.click(x, y) time.sleep(2.000)
def getMission2Process(): util.logOut(__file__,'------------右下角直布罗陀港口领取任务开始-----------') x , y = const.picLoop(const.publicPath() + 'beacon/overview.jpg') time.sleep(2) util.click(x,y) x , y = const.picLoop(path + 'area_overview.jpg') util.click(x,y) time.sleep(2) util.click(448,387) # 右下角区域 time.sleep(2) if util.isFindPic(path + 'port2.jpg'): x , y = const.picLoop(path + 'port2.jpg') util.click(x,y) x , y = const.picLoop(path + 'enter_port.jpg') util.click(x,y) const.picLoop(const.publicPath() + 'beacon/overview.jpg') # 直布罗陀走地图界面 util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 228 406 637 141') x , y = const.picLoop(path + 'port_inside2.jpg') util.click(x, y) x , y = const.picLoop(path + 'into_port.jpg') time.sleep(4) util.click(x, y) acceptTaskProcess() else: x , y = const.picLoop(path + 'back_home.jpg') util.click(x,y) util.logOut(__file__,'------------右下角直布罗陀港口领取任务结束-----------')
def main(): print('记得把道中队换好') print('破交自己打不识别') time.sleep(2) util.logOut(__file__,'每日脚本开始') # 判断是否在出击界面 if not util.isFindPic(const.publicPath() + 'bmp/exercise.jpg'): # 返回主页面 const.backMainProcess() # 进入出击界面 x, y = const.picLoop(const.publicPath() + 'bmp/weigh anchor.jpg') util.click(x, y) time.sleep(.8) # 进入每日界面 x, y = const.picLoop(const.publicPath() + 'bmp/daily task.jpg') util.click(x, y) time.sleep(.8) firstIntoFlag = True indexTup = INDEXS_BY_WEEK[util.dayOfWeek() - 1] for index in indexTup: if not firstIntoFlag: resetProcess() if not isOKByIndex(index): continue # 移动 if index != 2: util.click(NAME_SIZES[index][0], NAME_SIZES[index][1]) time.sleep(.800) # 进入 util.click(NAME_SIZES[2][0], NAME_SIZES[2][1]) time.sleep(.800) # 打3把 for k in range(3): # 最上面那个子选项位置 util.click(503, 134) time.sleep(.800) const.anchorProcess() # 返回 x, y = const.picLoop(const.publicPath() + 'bmp/back.jpg') time.sleep(.800) util.click(x, y) firstIntoFlag = False time.sleep(1) const.backMainProcess() return
def missionProcess(): util.logOut(__file__,'------------任务出击开始-----------') x, y = const.picLoop(path + 'enter_sea.jpg') util.click(x, y) time.sleep(4) util.logOut(__file__,'------------判断行动力 开始-----------') if util.isFindPic(path + 'use.jpg'): util.logOut(__file__,'------------行动力不足-----------') x, y = const.picLoop(path + 'use.jpg') util.click(x, y) util.click(x, y) util.click(x, y) util.click(x, y) util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/quit.jpg') util.click(x, y) x, y = const.picLoop(path + 'enter_sea.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/zilv.jpg') time.sleep(4) util.click(x, y) def aOrB(): util.logOut(__file__,'findPicLoop 循环找图开始 '+const.publicPath() + 'bmp/OK.jpg') util.logOut(__file__,'findPicLoop 循环找图开始 '+const.publicPath() + 'bmp/leave.jpg') for i in range(600): x, y = util.findPic(const.publicPath() + 'bmp/OK.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut(__file__,'findPicLoop 循环找图结束 '+const.publicPath() + 'bmp/OK.jpg') util.click(x, y) beaconProcess() x , y = const.picLoop(const.publicPath() + 'bmp/leave.jpg') util.click(x, y) x , y = const.picLoop(const.publicPath() + 'bmp/zilv.jpg') time.sleep(4) util.click(x, y) aOrB() return x, y = util.findPic(const.publicPath() + 'bmp/leave.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut(__file__,'findPicLoop 循环找图结束 '+const.publicPath() + 'bmp/leave.jpg') util.click(x, y) return util.logOut(__file__,'picLoop没找到图 需要重启脚本!!!!!!') const.restartProcess() raise ValueError('restart') aOrB() util.logOut(__file__,'------------任务出击结束-----------')
def main(): util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 637 141 228 406') util.adb('shell input swipe 228 406 228 141') x , y = const.picLoop(path + 'port_inside4.jpg') util.click(x, y) input()
def aOrB(): util.logOut(__file__, 'findPicLoop 循环找图开始 ' + const.publicPath() + 'bmp/OK.jpg') util.logOut( __file__, 'findPicLoop 循环找图开始 ' + const.publicPath() + 'bmp/leave.jpg') for i in range(600): x, y = util.findPic(const.publicPath() + 'bmp/OK.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut( __file__, 'findPicLoop 循环找图结束 ' + const.publicPath() + 'bmp/OK.jpg') util.click(x, y) beaconProcess() x, y = const.picLoop(const.publicPath() + 'bmp/leave.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/zilv.jpg') time.sleep(4) util.click(x, y) aOrB() return x, y = util.findPic(const.publicPath() + 'bmp/leave.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut( __file__, 'findPicLoop 循环找图结束 ' + const.publicPath() + 'bmp/leave.jpg') util.click(x, y) x, y = const.picLoop(path + 'exit.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/OK.jpg') util.click(x, y) time.sleep(2) util.click(433, 462) return util.logOut(__file__, 'picLoop没找到图 需要重启脚本!!!!!!') const.restartProcess() raise ValueError('restart')
def main(): time.sleep(2) util.logOut(__file__,'演习脚本开始') # 判断是否在演习界面 if not util.isFindPic(const.publicPath() + 'bmp/is_exercise.jpg'): # 返回主页面 const.backMainProcess() # 进入演习界面 x, y = const.picLoop(const.publicPath() + 'bmp/weigh anchor.jpg') util.click(x, y) time.sleep(.500) x, y = const.picLoop(const.publicPath() + 'bmp/exercise.jpg') util.click(x, y) time.sleep(.500) while True: # 0/10退出 time.sleep(1) list = util.getNumbers((778, 91, 818, 113)) if list != [] and list[0][0] == '0': const.backMainProcess() return # 识字 选择弱的 min, minIndex = FindOKExercise() while min > myAttack: x, y = const.picLoop( const.publicPath() + 'bmp/new opponent.jpg') util.click(x, y) time.sleep(6.000) min, minIndex = FindOKExercise() util.click(EXERCISE_SIZES[minIndex] [0], EXERCISE_SIZES[minIndex][1]) time.sleep(.500) # 开始演习 x, y = const.picLoop(const.publicPath() + 'bmp/start excise.jpg') util.click(x, y) time.sleep(.500) const.anchorProcess()
def noTipAgain(): util.logOut(__file__,'findPicLoop 循环找图开始 '+const.publicPath() + 'bmp/again.jpg') util.logOut(__file__,'findPicLoop 循环找图开始 '+const.publicPath() + 'bmp/zhengli.jpg') for i in range(600): x, y = util.findPic(const.publicPath() + 'bmp/again.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut(__file__,'findPicLoop 循环找图结束 '+const.publicPath() + 'bmp/again.jpg') util.logOut(__file__,'活动图结束-------------------------') x,y = const.picLoop(const.publicPath() + 'bmp/leave.jpg') util.click(x,y) return x, y = util.findPic(const.publicPath() + 'bmp/zhengli.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut(__file__,'findPicLoop 循环找图结束 '+const.publicPath() + 'bmp/zhengli.jpg') util.logOut(__file__,'船坞已满') time.sleep(2) util.click(x,y) const.retireProcess() time.sleep(4.000) x,y = const.picLoop(const.publicPath() + 'bmp/zilv.jpg') util.click(x,y) #红脸特殊(屑) if redFace and util.isFindPic(const.publicPath() + 'bmp/OK.jpg'): util.logOut(__file__,'红脸判断 开始') list = util.getWords((237, 201 , 627, 263)) isRedFace = False if len(list) != 0: for m in list: if '低心情' in list[m]: isRedFace = True break if len(list) != 0 and isRedFace: util.logOut(__file__,'我是粪提 结束') x, y = const.picLoop(const.publicPath() + 'bmp/OK.jpg') util.click(x, y) util.logOut(__file__,'picLoop没找到图 需要重启脚本!!!!!!') const.restartProcess() raise ValueError('restart')
def chapterProcess(): #判断是否在出击章节界面 #出击界面 if not util.isFindPic(const.publicPath() + 'activity/into.jpg'): #返回主页面 const.backMainProcess() time.sleep(2.000) x,y = const.picLoop(const.publicPath() + 'activity/into.jpg') util.click(x,y) time.sleep(.500) # 判断是否为图里面 util.logOut(__file__,'判断是否为图里面 开始') time.sleep(2.000) x,y = util.findPic(const.publicPath() + 'bmp/withdraw.jpg') if x!=-1 and y!=-1: util.click(x,y) x, y = const.picLoop(const.publicPath() + 'bmp/OK.jpg') util.click(x,y) x, y = const.picLoop(const.publicPath() + 'bmp/leave.jpg') util.click(x,y) else: pass time.sleep(2.000)
def getMission1Process(): util.logOut(__file__,'------------左下NY港口领取任务开始-----------') x , y = const.picLoop(const.publicPath() + 'beacon/overview.jpg') time.sleep(2) util.click(x,y) x , y = const.picLoop(path + 'area_overview.jpg') util.click(x,y) time.sleep(2) util.click(227,345) # 左下角区域 time.sleep(4) if util.isFindPic(path + 'return_sea.jpg'): util.logOut(__file__,'------------左下NY港口领取任务失败-----------') return False elif util.isFindPic(path + 'port1.jpg'): x , y = const.picLoop(path + 'port1.jpg') util.click(x,y) x , y = const.picLoop(path + 'enter_port.jpg') util.click(x,y) const.picLoop(const.publicPath() + 'beacon/overview.jpg') # NY走地图界面 util.adb('shell input swipe 228 141 760 406') util.adb('shell input swipe 228 141 760 406') util.adb('shell input swipe 228 141 760 406') util.adb('shell input swipe 228 406 228 141') x , y = const.picLoop(path + 'port_inside1.jpg') util.click(x, y) x , y = const.picLoop(path + 'into_port.jpg') time.sleep(4) util.click(x, y) acceptTaskProcess() else: x , y = const.picLoop(path + 'back_home.jpg') util.click(x,y) util.logOut(__file__,'------------左下NY港口领取任务结束-----------') return True
def acceptTaskProcess(): util.logOut(__file__,'------------接收任务开始-----------') x , y = const.picLoop(path + 'mission.jpg') util.click(x, y) time.sleep(4) while util.isFindPic(path + 'accept_task.jpg'): x , y = const.picLoop(path + 'accept_task.jpg') util.click(x, y) x , y = const.picLoop(const.publicPath() + 'bmp/back.jpg') util.click(x, y) const.picLoop(path + 'mission.jpg') x , y = const.picLoop(const.publicPath() + 'bmp/back.jpg') util.click(x, y) util.logOut(__file__,'------------接收任务结束-----------')
def main(): time.sleep(2) util.logOut(__file__, '大世界每日 开始') #返回主页面 const.backMainProcess() #进入出击界面 x, y = const.picLoop(const.publicPath() + 'bmp/weigh anchor.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'beacon/operation.jpg') util.click(x, y) # 出击金箱子 util.logOut(__file__, '------------出击金箱子开始-----------') x, y = const.picLoop(path + 'box.jpg') util.click(x, y) const.picLoop(path + 'is_box.jpg') while util.isFindPic(path + 'golden_box.jpg'): x, y = const.picLoop(path + 'golden_box.jpg') util.click(x, y) x, y = const.picLoop(path + 'check.jpg') util.click(x, y) time.sleep(2) goldenBoxProcess() const.picLoop(const.publicPath() + 'beacon/overview.jpg') x, y = const.picLoop(path + 'box.jpg') util.click(x, y) const.picLoop(path + 'is_box.jpg') x, y = const.picLoop(const.publicPath() + 'bmp/back.jpg') util.click(x, y) const.picLoop(const.publicPath() + 'beacon/overview.jpg') util.logOut(__file__, '------------出击金箱子结束-----------') # 返回主页 const.backMainProcess()
def main(): time.sleep(2) util.logOut(__file__, '3次飞龙 开始') #返回主页面 const.backMainProcess() #进入出击界面 x, y = const.picLoop(const.publicPath() + 'bmp/weigh anchor.jpg') util.click(x, y) x, y = const.picLoop(path + 'operation.jpg') util.click(x, y) x, y = const.picLoop(path + 'overview.jpg') time.sleep(2) util.click(x, y) x, y = const.picLoop(path + 'ash.jpg') time.sleep(2) util.click(x, y) x, y = const.picLoop(path + 'beacon list.jpg') util.click(x, y) # 判断还剩几次 cnt = 3 # 默认三次 list = util.getNumbers((726, 9, 757, 39)) if list != []: cnt = int(list[0][0]) for n in range(cnt): util.logOut(__file__, '------------一把开始-----------') x, y = const.picLoop(path + 'batile start.jpg') util.click(x, y) def noTip(): util.logOut( __file__, 'findPicLoop 循环找图开始 ' + const.publicPath() + 'bmp/anchor.bmp') util.logOut( __file__, 'findPicLoop 循环找图开始 ' + const.publicPath() + 'bmp/quit.jpg') for i in range(600): x, y = util.findPic(const.publicPath() + 'bmp/anchor.bmp', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut( __file__, 'findPicLoop 循环找图结束 ' + const.publicPath() + 'bmp/anchor.bmp') return x, y = util.findPic(const.publicPath() + 'bmp/quit.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut( __file__, 'findPicLoop 循环找图结束 ' + const.publicPath() + 'bmp/quit.jpg') util.click(x, y) util.logOut(__file__, '今日不再提示') return util.logOut(__file__, 'picLoop没找到图 需要重启脚本!!!!!!') const.restartProcess() raise ValueError('restart') noTip() x, y = const.picLoop(path + 'weigh anchor.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'bmp/get_items.bmp') util.click(x, y) x, y = const.picLoop(path + 'ok.jpg') util.click(x, y) util.logOut(__file__, '------------一把结束-----------') #返回主页面 time.sleep(2) util.logOut(__file__, 'backMainProcess 返回主页面开始') if util.isFindPic(path + 'beacon_home.jpg', 0.8): x, y = util.findPic(path + 'beacon_home.jpg', 0.8) util.click(x, y) time.sleep(.500) elif util.isFindPic(const.publicPath() + 'bmp/weigh anchor.jpg'): util.logOut(__file__, 'backMainProcess 返回主页面结束') return else: util.logOut(__file__, 'backMainProcess 返回主页面结束 失败')
def main(): time.sleep(2) util.logOut(__file__,'大世界每日 开始') #返回主页面 const.backMainProcess() #进入出击界面 x , y = const.picLoop(const.publicPath() + 'bmp/weigh anchor.jpg') util.click(x,y) x , y = const.picLoop(const.publicPath() + 'beacon/operation.jpg') util.click(x,y) # 领取任务 util.logOut(__file__,'------------领取任务开始-----------') # 左下NY flag = getMission1Process() if not flag: x , y = const.picLoop(path + 'back_home.jpg') util.click(x, y) getMission2Process() getMission3Process() getMission4Process() getMission1Process() else: # 右下角直布罗陀 getMission2Process() # 右上角利物浦 getMission3Process() # 右上角圣彼得 getMission4Process() util.logOut(__file__,'------------领取任务结束-----------') # 兑换任务 util.logOut(__file__,'------------兑换任务开始-----------') x , y = const.picLoop(path + 'details.jpg') util.click(x, y) const.picLoop(path + 'is_details.jpg') while util.isFindPic(path + 'get_task.jpg'): x , y = const.picLoop(path + 'get_task.jpg') util.click(x, y) x , y = const.picLoop(const.publicPath() + 'bmp/OK.jpg') util.click(x, y) x , y = const.picLoop(const.publicPath() + 'bmp/get_items.bmp') util.click(x, y) const.picLoop(path + 'is_details.jpg') util.logOut(__file__,'------------兑换任务结束-----------') # 出击任务 util.logOut(__file__,'------------出击任务开始-----------') size = (0, 0, 0, 0) while util.isFindPic(path + 'look.jpg', size=size): x , y = const.picLoop(path + 'look.jpg') util.click(x, y) time.sleep(2) util.logOut(__file__,'------------判断是否为每日任务开始-----------') if util.isFindPic(path + 'is_map.jpg'): util.logOut(__file__,'------------不是每日任务-----------') util.click(433, 462) const.picLoop(const.publicPath() + 'beacon/overview.jpg') x , y = const.picLoop(path + 'details.jpg') util.click(x, y) const.picLoop(path + 'is_details.jpg') size = (0, y + 10, 864, 486) else: missionProcess() const.picLoop(const.publicPath() + 'beacon/overview.jpg') x , y = const.picLoop(path + 'details.jpg') util.click(x, y) const.picLoop(path + 'is_details.jpg') util.click(755, 90) # 任务界面关闭按钮 const.picLoop(const.publicPath() + 'beacon/overview.jpg') util.logOut(__file__,'------------出击任务结束-----------') # 返回主页 const.backMainProcess()
def main(): time.sleep(2) util.logOut(__file__, '大世界侵蚀6 开始') #返回主页面 const.backMainProcess() #进入出击界面 x, y = const.picLoop(const.publicPath() + 'bmp/weigh anchor.jpg') util.click(x, y) x, y = const.picLoop(const.publicPath() + 'beacon/operation.jpg') util.click(x, y) while True: # 去西北航道F图 util.logOut(__file__, '------------一把开始-----------') x, y = const.picLoop(const.publicPath() + 'beacon/overview.jpg') time.sleep(2) util.click(x, y) x, y = const.picLoop(path + 'area_overview.jpg') util.click(x, y) time.sleep(2) util.click(340, 160) # 左上角区域 time.sleep(2) util.click(70, 200) # 西北航道F x, y = const.picLoop(path + 'enter.jpg') util.click(x, y) # 自律 time.sleep(4) def other(): util.logOut(__file__, '判断skip') x, y = util.findPic(path + 'skip.jpg') if x != -1 and y != -1: util.logOut(__file__, 'skip') util.click(x, y) time.sleep(2) return util.logOut(__file__, '判断落地踩到猫') x, y = util.findPic(path + 'TB.jpg') if x != -1 and y != -1: util.logOut(__file__, '落地踩到猫') util.click(647, 197) # 派遣(指挥猫将暂时离队) time.sleep(2) return util.logOut(__file__, '判断落地踩到箱子') x, y = util.findPic(const.publicPath() + 'get_items.bmp') if x != -1 and y != -1: util.logOut(__file__, '落地踩到箱子') util.click(x, y) time.sleep(2) return other() x, y = const.picLoop(path + 'zilv.jpg') time.sleep(2) util.click(x, y) time.sleep(60) x, y = const.picLoop(path + 'leave.jpg') util.click(x, y) util.logOut(__file__, '------------一把结束-----------') # 去利物浦 util.logOut(__file__, '------------去趟利物浦开始-----------') x, y = const.picLoop(const.publicPath() + 'beacon/overview.jpg') time.sleep(2) util.click(x, y) x, y = const.picLoop(path + 'area_overview.jpg') util.click(x, y) time.sleep(2) util.click(500, 150) # 右上角区域 time.sleep(2) x, y = const.picLoop(path + 'port.jpg') util.click(x, y) x, y = const.picLoop(path + 'enter_port.jpg') util.click(x, y) util.logOut(__file__, '------------去趟利物浦结束-----------')
def beaconProcess(): util.logOut(__file__,'------------信标100/100开始-----------') x , y = const.picLoop(path + 'intelligence.jpg') util.click(x, y) x , y = const.picLoop(path + 'help.jpg') util.click(x, y) x , y = const.picLoop(path + 'help1.jpg') util.click(x, y) x , y = const.picLoop(path + 'help2.jpg') util.click(x, y) x , y = const.picLoop(path + 'help3.jpg') util.click(x, y) x , y = const.picLoop(path + 'OK_ask.jpg') util.click(x, y) while util.isFindPic(const.publicPath() + 'beacon/batile start.jpg'): x, y = const.picLoop(const.publicPath() + 'beacon/batile start.jpg') util.click(x, y) util.logOut(__file__,'今日不再提示判断 开始') def noTip(): util.logOut(__file__,'findPicLoop 循环找图开始 '+const.publicPath() + 'bmp/anchor.bmp') util.logOut(__file__,'findPicLoop 循环找图开始 '+const.publicPath() + 'bmp/quit.jpg') for i in range(600): x, y = util.findPic(const.publicPath() + 'bmp/anchor.bmp', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut(__file__,'findPicLoop 循环找图结束 '+const.publicPath() + 'bmp/anchor.bmp') util.click(x,y) return x, y = util.findPic(const.publicPath() + 'bmp/quit.jpg', threshold=0.8, size=(0, 0, 0, 0)) if x != -1 and y != -1: util.logOut(__file__,'findPicLoop 循环找图结束 '+const.publicPath() + 'bmp/quit.jpg') util.click(x,y) util.logOut(__file__,'今日不再提示') return util.logOut(__file__,'picLoop没找到图 需要重启脚本!!!!!!') const.restartProcess() raise ValueError('restart') noTip() x, y = const.picLoop(const.publicPath() + 'beacon/ok.jpg') util.click(x,y) const.picLoop(const.publicPath() + 'beacon/beacon list.jpg') x , y = const.picLoop(path + 'collect_beward.jpg') util.click(x, y) x , y = const.picLoop(const.publicPath() + 'bmp/get_items.bmp') util.click(x, y) x , y = const.picLoop(path + 'back.jpg') util.click(x, y) util.logOut(__file__,'------------信标100/100结束-----------')