Exemplo n.º 1
0
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__,'------------右上角圣彼得港口领取任务结束-----------')
Exemplo n.º 2
0
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__, '-------------一局结束------------')
Exemplo n.º 3
0
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__, '-------------------------')
Exemplo n.º 4
0
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__,'------------右下角直布罗陀港口领取任务结束-----------')
Exemplo n.º 5
0
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__, '-------------------------')
Exemplo n.º 6
0
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)
Exemplo n.º 7
0
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结束-----------')
Exemplo n.º 8
0
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
Exemplo n.º 9
0
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__,'------------任务出击结束-----------')
Exemplo n.º 10
0
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__,'------------接收任务结束-----------')
Exemplo n.º 11
0
def main():
    time.sleep(2)
    util.logOut(__file__,'困难'+str(CHAPTER_NUM)+'-'+str(CHAPTER_NUM2)+'脚本开始')

    # 进入困难第CHAPTER_NUM章界面
    const.chapterProcess(CHAPTER_NUM, 'H')

    # 判断每日几次
    cnt = 3 # 默认三次
    list = util.getNumbers((60, 407, 93, 429))
    if list != []:
        cnt = int(list[0][0])
        
    # 每日困难cnt次
    for i in range(cnt):
        const.intoStageProcess(CHAPTER_X, CHAPTER_Y)
        time.sleep(3)

        # 阵容锁定判断
        x, y = util.findPic(const.publicPath() + 'bmp/lock.jpg', 0.95)
        if x != -1 and y != -1:
            util.logOut(__file__,'阵容锁定解锁')
            util.click(x, y)

        const.goBossProcess()
    const.backMainProcess()
    return
Exemplo n.º 12
0
 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')
Exemplo n.º 13
0
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()
Exemplo n.º 14
0
        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')
Exemplo n.º 15
0
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)
Exemplo n.º 16
0
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()
Exemplo n.º 17
0
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
Exemplo n.º 18
0
 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')
Exemplo n.º 19
0
 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
Exemplo n.º 20
0
from util import *
from const import const

CHAPTER_NUM = 1  # 几-几
CHAPTER_NUM2 = 3  # 几-几
CHAPTER_X, CHAPTER_Y = 495, 385  # 几-几的坐标
START_X, START_Y = 260, 267  # 进stage后初始位置
CNT = 2  # 几次出boss
path = const.publicPath() + 'normal1-3/'


# if __name__ == '__main__':
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, 3, 2)
        # 走格子
        X, Y = START_X, START_Y
        # 打CNT个出boss
        for n in range(CNT):
            const.picLoop(const.publicPath() + 'bmp/withdraw.jpg')
            # 等待搜索雷达
            if n == 0:
                time.sleep(4.000)
            X, Y = const.findShip(X, Y, const.getPicNum(path), path)
            util.click(X, Y)
Exemplo n.º 21
0
from util import *
from const import const

CHAPTER_NUM = 6  # 几-几
CHAPTER_NUM2 = 4  # 几-几
CHAPTER_X, CHAPTER_Y = 252, 312  # 几-几的坐标
START_X, START_Y = 680, 181  # 进stage后初始位置
CNT = 5  # 几次出boss
path = const.publicPath() + 'normal6-4/'
PIC_NUM = 21  # 多少张图


# if __name__ == '__main__':
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)
Exemplo n.º 22
0
from util import *
from const import const

CHAPTER_NUM = 9  # 几-几
CHAPTER_NUM2 = 1  # 几-几
CHAPTER_X, CHAPTER_Y = 220, 189  # 几-几的坐标
START_X, START_Y = 422, 206  # 进stage后初始位置
CNT = 2  # 几次次出boss
path = const.publicPath() + 'normal9-1/'


# if __name__ == '__main__':
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)
Exemplo n.º 23
0
from util import *
from const import const

CHAPTER_NUM, CHAPTER_NUM2 = 12, 4  # 几-几
CHAPTER_X, CHAPTER_Y = 691, 368  # 几-几的坐标
START_X, START_Y = 413, 410  # 进stage后初始位置
CNT = 2  # 道中打几次
path = const.publicPath() + 'normal' + str(CHAPTER_NUM) + '-' + str(
    CHAPTER_NUM2) + '/'


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)
Exemplo n.º 24
0
from util import *
from const import const

path = const.publicPath() + 'beacon/'


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])
Exemplo n.º 25
0
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()
Exemplo n.º 26
0
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 返回主页面结束 失败')
Exemplo n.º 27
0
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__, '------------去趟利物浦结束-----------')
Exemplo n.º 28
0
from util import *
from const import const

path = const.publicPath() + 'operation/'

# 接收任务步骤
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__,'------------接收任务结束-----------')

# 信标100/100步骤
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)
from util import *
from const import const

# 通常
# path = const.publicPath() + 'activity/'
# 问号
path = const.publicPath() + 'normal7-2/'
MUST_FIND_AREAS = [
    [1393, 473,1470, 506],
    ]
for area in MUST_FIND_AREAS:
    area[0] -= 1003
    area[1] -= 232
    area[2] -= 1003
    area[3] -= 232

# 获取识图找到的点数组
tarImg = ''

def getFindPoints():
    points = []
    templates = []
    if templates == []:
        # 通常
        # for i in range(const.getPicNum(path)):
        # 问号
        for i in range(getQuestionNum(path)):
            # 通常
            # template = cv2.imread(path + str(i)+'.jpg', 0)
            # 问号
            template = cv2.imread(path + 'question' + str(i) + '.jpg', 0)
Exemplo n.º 30
0
from util import *
from const import const

CHAPTER_X, CHAPTER_Y = 663, 198  # 几-几的坐标 D3
# CHAPTER_X, CHAPTER_Y = 407, 399  # 几-几的坐标 C2
redFace = False # 红脸是否继续刷
path = const.publicPath() + 'activity/'


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