分享一个手游脚本源码
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                分享一个手游脚本源码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                目的
給大家接觸手游模擬腳本的一個樣板,支持多分辨率適配
 腳本功能為批量送體力給好友,功能簡單
源碼 lua
--版本 --[[此腳本功能日期制作 --]]function IniScript()VERSION="1.2" end function ReadUI()local isNomal = falsesetmetatable(_G, {__index = function (_, n)error("attempt to read undeclared variable "..n, 2)end,}) endfunction ScriptMain() if (math.abs( screenX/screenY - 9/16) < 0.01) then送體力480854()elseif ( math.abs( screenX/screenY - 3/5) < 0.01) then送體力480800() end endfunction 送體力480854()WriteLog(" 送體力開始",1)while true doKeepCapture() local intX,intY = FindMultiColBGR(82,357,370,359,"06BB37","0|1|06BB37,0|2|06BB37,0|3|06BB37,0|19|11BE42,-5|15|29CE3B,9|15|0EFCB5",4,0.9)--體力上限查找if intX > -1 and intY > -1 then RndTap(intX, intY) for i=1,10 doKeepCapture() local Tmp_ret,intX,intY = FindColBGR(329,430,358,500,"FFFFFF",0,0.9)if intX > -1 and intY > -1 then WriteLog("體力已上限",1)return trueelseif CmpColBGR("112|298|2C8F00,114|547|2A7CBE,369|361|332312,390|363|614006", 0.9)==1 thenbreakendDelay(300)endelseif CmpColBGR("112|298|2C8F00,114|547|2A7CBE,369|361|332312,390|363|614006", 0.9)==1 then RndTap(123, 273) WriteLog("下次吧")elseif CmpColBGR("225|109|944210,272|111|EBB13D,256|120|FFFBEB,219|108|9E4412", 0.9)==1 then RndTap(253,119) WriteLog("首頁")Delay(1300)elseSwipe(99,248,337,248,1500)endDelay(200)end endfunction 送體力480800()--WriteLog(" 送體力開始",1)while true doKeepCapture() local intX,intY = FindMultiColBGR(82,357,370,359,"06BB37","0|1|06BB37,0|2|06BB37,0|3|06BB37,0|19|11BE42,-5|15|29CE3B,9|15|0EFCB5",4,0.9)if intX > -1 and intY > -1 then RndTap(intX, intY) for i=1,10 doKeepCapture() local Tmp_ret,intX,intY = FindColBGR(329,446,358,513,"FFFFFF",0,0.9)if intX > -1 and intY > -1 then WriteLog("體力已上限",1)return trueelseif CmpColBGR("114|246|2F9200,111|285|2C8F00,116|471|2B7DBF,114|546|2A7CBE", 0.9) == 1 thenRndTap(123, 246) breakendDelay(500)endelseif CmpColBGR("114|246|2F9200,111|285|2C8F00,116|471|2B7DBF,114|546|2A7CBE", 0.9) == 1 then RndTap(123, 246) WriteLog("下次吧")elseif CmpColBGR("225|109|944210,272|111|EBB13D,256|120|FFFBEB,219|108|9E4412", 0.9) == 1 then RndTap(253,119) WriteLog("首頁")Delay(1300)elseSwipe(99,248,337,248,1500)endDelay(200)end endMoveWindow(0,0) IniScript() ReadUI() ScriptMain() ExitEx()總結
以上是生活随笔為你收集整理的分享一个手游脚本源码的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: Java异常处理教程
 - 下一篇: Linux管道和重定向 ---多命令协作