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 著做权归做者全部,转载请联系做者得到受权,并标注“简书做者”。

相关文章
相关标签/搜索