Beispiel #1
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__, '-------------------------')
Beispiel #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__, '-------------一局结束------------')
Beispiel #3
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
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__, '-------------------------')
Beispiel #5
0
def main():
    PIC_NUM = const.getPicNum(path)
    time.sleep(2)
    util.logOut(__file__,'activity脚本开始')
    chapterProcess()
    while True:
        # 进入
        time.sleep(2)
        const.intoStageProcess(CHAPTER_X, CHAPTER_Y)
        util.logOut(__file__,'活动图开始-------------------------')
        time.sleep(60.000)

        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')

        noTipAgain()