Lua腳本作遊戲外掛

第一件事固然就是搞帳號iphone

淘寶某店,一元100個網易郵箱,店鋪已打馬賽克編輯器

支付後老闆給我發了一堆帳號,粘貼word文檔看下對不對數。。函數

恰好100個,否則就差評了。。lua

若是這100個帳號都抽不到一個大天狗,那我確定是日了狗了。。。就要刪除遊戲保平安了spa

第二件事固然就是搞帳號的用戶名

網易的陰陽師提供遊客試玩帳號的,而後抽完後看看好壞再決定綁不綁定郵箱,綁定的時候須要自定義一個用戶名,自帶的隨機名字容易出現重複會下降效率,而後機智的我,在網上找到了 學英語1000個必備單詞 把中文翻譯去掉,而後在每一個名字後面加上特殊符號,這樣就萬無一失了。比起特殊騑迬流啲伩牸,我以爲用英文字母會比較好出手帳號。下面給出讀取單詞,去掉中文翻譯,再從單詞後面添加符號的代碼。.net

function initAccount(a)
    local i=1 
    local pos=1
    return function()
         while a[i] do
            local s,e=string.find(a[i],"%w+",pos) 
                if s then pos=e+1
                    return string.sub(a[i],s,e)
                else i=i+1 pos=1
                end
          end
    return nil
    end
end
function readAccount()
    filepath = "C:\\Users\\wdyna\\Desktop\\name.txt"
    local i = 0
    local a={}
    for line in io.lines(filepath) do
        i=i+1
        a[i]=line
    end
    return a
end

do
    A={}
    B={}
    local j=0
    A=readAccount()
    for i in initAccount(A) do
        j=j+1;
        B[j]=i..'~'
    end
    file = io.open("C:\\Users\\wdyna\\Desktop\\out.txt", "w");
    assert(file);
    for t,v in ipairs(B) do    file:write(v..'\n')end
    file:close();
end

獲得了帳號名稱翻譯

後面要用到的批量讀取文本的帳號密碼,就用這個改改。code

設備

越獄iphone手機一臺
能上網的電腦一臺cdn

軟件

觸動精靈手機程序
電腦編輯器_點擊就直接下載
電腦抓色器_點擊就直接下載
手機程序安裝也能夠添加源 apt.touchsprite.com教程

添加源 apt.touchsprite.com

完畢之後呢,直接搞一個開局登陸腳本

腳本是用lua寫的,要邊看lua邊作腳本,觸動精靈腳本開發-lua-簡明教程。。
這個腳本要注意帳號名是否會重複的,還有一個就是每次開始要清除鑰匙串。給個開局跑起的效果圖吧

這個是沒有用加速器,上了加速器,效率應該會高几倍


給出開局的代碼,看完了你就知道怎麼寫腳本了。。

--先開加速器而後運行這個腳本

usernameid = 1; -- 作循環帳號的記錄

function readFile(path) --獲取本地用戶名
    local file = io.open(path,"r");
    if file then
        local _list = {};
        for l in file:lines() do
            table.insert(_list,l)
        end
        file:close();
        return _list
    end
end

function readUserame()
    list = readFile(userPath().."/res/outname.txt");
    str=list[usernameid];
    return str
end

function touchCenterNilUser()
    toast("touchCenterNilUser完畢 ",1)
    color1=0x079ddb
    color2=0xffffff
    color3=0x079ddb
    color4=0xf8f7f7 
    color5=0x007aff
    color6=0xefeff1     
    color7=0xd88230 
    color8=0x2c2721 
    color9=0xf3b25e    
    color10=0x2a2a7e    
    while (true) do
    mSleep(200);
    touchDown(1,86,213); --
    mSleep(50);
    touchUp(1,86,213); --
    if color1==getColor(324,322) and color2==getColor(326,365) and color3==getColor(328,395)then
            mSleep(30);
            touchDown(1,330,362); --
            mSleep(30);
            touchUp(1,330,362); -- 點擊快速遊戲後跳出循環
        break end
    end

    while (true) do 
          if color4==getColor(693,408) and color5==getColor(689,435) and color6==getColor(689,462)then
            mSleep(30);
            touchDown(1,702,436); --
            mSleep(30);
            touchUp(1,702,436); -- 
        break end
    end


    while (true) do --設置用戶名過渡 點擊贊成協議
        --toast("進到第3個循環-點擊協議",1)
        if color10==getColor(630,520)then
        mSleep(100);
        touchDown(1,570,526); --
        mSleep(50);
        touchUp(1,570,526); --
        end

        if getColor(732,558)== 0x23b260 then
            mSleep(50);
            touchDown(1,732,558); --
            mSleep(50);
            touchUp(1,732,558); --
        end

        if color7==getColor(643,494) and color8==getColor(588,517) and color9==getColor(514,534)then
        break end

    end

    while (true) do   --這裏是已經到了輸入名字的界面
        if getColor(566,518)==0xf3b25e then    
            mSleep(50)        
            touchDown(1,581,441); --
            mSleep(30);
            touchUp(1,581,441); 
            mSleep(30);
            str = readUserame()
            if not str then
                dialog("帳號用完了",0 )
            end
            str=string.gsub(str, "^%s*(.-)%s*$", "%1")
            mSleep(50)    
            inputText("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b") 
            mSleep(50)    
            inputText(str);
            mSleep(50);
            touchDown(1,918,49); --
            mSleep(30);
            touchUp(1,918,49); 
            mSleep(1000);                    
            touchDown(1,569,515); --點擊建立角色
            mSleep(30);
            touchUp(1,569,515);
            usernameid=usernameid+1    
        end

        if getColor(566,518)==0x273497 then    
            mSleep(30);                    
            touchDown(1,569,515); --點擊建立角色
            mSleep(30);
            touchUp(1,569,515); 
            mSleep(30);
            toast("帳號已經建立成功了") 
            --dialog(usernameid, 0)
            break
            end
    end
end

function initGame()
    init("0",2)    
    clearKeyChain("com.netease.onmyoji");
    isfront = isFrontApp("com.netease.onmyoji")
    if isfront==0 then
        while true do
         flag=runApp("com.netease.onmyoji")
        if flag==0 then
                touchCenterNilUser()  --這個是要建立帳號
            break end
     end
    end
end



initGame()

由於一篇文章的字數限制,最後再說說點什麼吧

你曾經作的那個征服世界的夢,就像個玩笑深藏在你記憶之中


其實完成整個腳原本來去去就這幾個動做了。由於字數限制,這裏就只貼出開局登陸帳號的,固然後續的全部操做(升級,刷副本,刷弒魂,刷覺醒,欺負等級小的玩家)均可以寫成一個一個的函數,而後把函數放在一個table裏,識別遊戲的體力值來選擇作什麼任務,這樣就能夠刷出一堆帳號了,抽到了SSR就兩百一個帳號,若是留着符不抽的話每個都能賣5塊一個,一個帳號的成本是1分錢,刷完後就漲了500倍呢,5分鐘手機就生成出一個帳號,一天24小時,手機不爆炸的話就一直跑,掛在淘寶讓千牛幫你賣,這還不是人生巔峯嗎,其實腳本就作了兩件事,while循環和if判斷像素點跳出循環 。

最後祝願你們都能獲得SSR。完。。。


 

文/大無敵哈哈哈(簡書做者) 原文連接:http://www.jianshu.com/p/82177b5b0e59 著做權歸做者全部,轉載請聯繫做者得到受權,並標註「簡書做者」。

相關文章
相關標籤/搜索