2020天貓雙十一自動獲取喵幣指令碼

2020-10-22 11:00:40

下載安裝 auto.js。匯入auto1111.js指令碼。

使用步驟:1、開啟無障礙服務

                  2、開啟懸浮窗

                  3、開啟喵幣主頁

                  4、點選autojs懸浮窗執行auto1111.js指令碼

 

感謝 auto.js;開源地址:https://github.com/hyb1996/Auto.js

 

auto.js下載連結:https://pan.baidu.com/s/1sqM2zPJ8ZXBy4p-psNvj0w 提取碼: gpyy 

或者:https://download.csdn.net/download/u014424954/12996062

auto1111.js 下載地址:https://download.csdn.net/download/u014424954/12995990

程式碼如下:

auto.waitFor();
var height = device.height;
var width = device.width;
toast("開啟1111")
setScreenMetrics(width, height);

start1111();

function start1111()
{
    gotoMiaoBi();
    miaoBiCenter();
    toast("finished")
}

function gotoMiaoBi()
{
    if(className("android.widget.Button").text("賺喵幣").exists()){
        className("android.widget.Button").text("賺喵幣").click();
        toast("賺喵幣")
        sleep(4000);
    }
}

function miaoBiCenter()
{
    var count = 3;
    while(count-- > 0)
    {
        browseJobs("去瀏覽");
        browseJobs("去逛逛");
        browseJobs("去搜尋");
        doFinishJob();
        getRewards();
        sleep(3000);
    }

}

function getRewards()
{
    while(text("領取獎勵").exists())
    {
        text("領取獎勵").findOne().click();
        sleep(2000);
    }
}

function browseJobs(target)
{
    while(text(target).exists())
    {
        text(target).findOne().click();
        sleep(3000)
        var count = 0;
        while(count ++ < 7)
        {
            swipe(width / 2, height/2, width / 2, height/10, 500); 
            sleep(3000);
        }

        back();
        sleep(3000)
    }
}

function doFinishJob()
{
    if(text("去完成").exists())
    {
        var finishedList = text("去完成").find();
        for(let i=0;i<finishedList.size();i++)
        {
            var finished = finishedList.get(i);
            var title = finished.parent().child(0).child(0).text();
            if(title.indexOf("邀請好友") != -1 || title.indexOf("淘寶人生") != -1)
            {
                toast(title);
                sleep(2000);
            }else {
                finished.click();
                sleep(3000);
                var count = 0;
                while(count ++ < 7)
                {
                    swipe(width / 2, height/2, width / 2, height/10, 500); 
                    sleep(3000);
                }
        
                back();
                sleep(3000)
            }
        }
    }
}