针对喵币滑动领取的改进

auto.js的改进函数如下:
[JavaScript] 纯文本查看 复制代码

function waitSwipe() {
    let swipeAppear;
    let shoppingFull;
    for (let i = 0; i < 3; i++) {
        swipeAppear = desc("滑动浏览得").findOne(1000);
        if (swipeAppear != null) break;
        shoppingFull = descContains("已达上限").findOne(1000);
        if (shoppingFull != null) return 0;
        console.log("i" + i);
    }

    sleep(1000);

    if (swipeAppear != null) {
        console.log("开始滑动");
        swipeUp();
        console.log("等待15s");
        sleep(1000 * 16);
    } else {
        console.log("slow");
        console.log("等待20s");
        sleep(1000 * 20);
    }

    let shoppingFinish = desc("任务完成").findOne(2000);
    if (shoppingFinish != null) {
        console.log("逛完,准备返回");
    } else {
        toastLog("未知逛完,返回");
    }

    return 1;
}
THE END
喜欢就支持以下吧
点赞0
分享
评论 抢沙发
  • 管埋员

    昵称

  • 取消
    昵称