----------------------------------------------------- run_ver = "1.19" local web_id = "124.221.40.166" ----------------------------------------------------- function _run() appid = "jp.co.mixi.monsterstrikeTW" local dlg = dialog() dlg:config("mcfg") dlg:timeout(60) dlg:add_label("TW版本:"..run_ver) dlg:add_radio("任务选项", {"礼物盒", "任务奖励", "转蛋抽取", "整理角色", "周年任务", "临时任务", "合并存档", "登录app", "登录app删游"}, "礼物盒") dlg:add_input("房间ID", nil) dlg:add_switch("是否写日志", false) _, selects = dlg:show() _savecfg(userPath().."uicfg/mcfg.xcfg", selects["任务选项"], selects["房间ID"], selects["是否写日志"]) islog = selects["是否写日志"] if islog == false then _clearFiles(LogPath, ".log", 1000, "清理全部的log") end _settings() --手机设置 if _isFileExist(ResPath.."tessdata") == true then _delfile(ResPath.."tessdata", 200, "删除tessdate") end if _isFileExist(ResPath.."res") == false then _newfile(ResPath.."res", 5000, "创建res文件夹") _moveFiles(ResPath, ResPath.."res/", "o", ".jpg", 20, "批量移动文件") else _moveFiles(ResPath, ResPath.."res/", "o", ".jpg", 20, "批量移动文件") _clearFiles(ResPath.."res/", "-", 2000, "清理res无用图片-0") _clearFiles(ResPath.."res/", ".jpg", 2000, "清理res无用图片-1") end if selects["任务选项"] == "临时任务" then _clearFiles(LogPath, "周年记录数", 1000, "清理全部的周年记录数") _clearFiles(LogPath, "免费抽取记录数", 1000, "清理全部的免费抽取记录数") _clearFiles(LogPath, "转蛋抽取记录数", 1000, "清理全部的转蛋抽取记录数") _savecfg(userPath().."uicfg/mcfg.xcfg", "礼物盒", selects["房间ID"], selects["是否写日志"]) _restart() --重启脚本 end if selects["任务选项"] == "合并存档" then _hbcd() end if selects["任务选项"] == "登录app" or selects["任务选项"] == "登录app删游" then _dlapp() end YxPath = _appDataPath(appid) if YxPath == nil then dialog("游戏不存在,请检查...", 0) _exit() end if selects["任务选项"] == "礼物盒" then cd_sz, wj_sz = _bhhq(500000, 2, {"无数据存档"})--1.指定文件夹获取编号 2.排除的文件夹 xhcs, path_jls = 500, LuaPath.."领取记录数.txt" end if selects["任务选项"] == "任务奖励" then cd_sz, wj_sz = _bhhq(500000, 2, {"无数据存档"})--1.指定文件夹获取编号 2.排除的文件夹 xhcs, path_jls = 500, LuaPath.."奖励记录数.txt" end if selects["任务选项"] == "转蛋抽取" then cd_sz, wj_sz = _bhhq(500000, 2, {"无数据存档"})--1.指定文件夹获取编号 2.排除的文件夹 xhcs, path_jls = 500, LuaPath.."抽取记录数.txt" end ----------------------------------------生成存档宝珠↓↓ local lsbl_pdwb = true if _isFileExist(LuaPath.."存档宝珠.txt") == false then lsbl_pdwb = false _nlog("存档宝珠异常-1") else local lssz_line = _readFile(LuaPath.."存档宝珠.txt", "读取存档宝珠数组") if #lssz_line >= 1 and #lssz_line >= #cd_sz then for i = 1, #lssz_line, 1 do if string.atrim(lssz_line[i]) ~= "" then local lssz_ls = string.split(lssz_line[i], "----") if string.atrim(lssz_ls[1]) ~= string.atrim(cd_sz[i]) then lsbl_pdwb = false _nlog("存档宝珠异常-2") break end else if #lssz_line ~= i then lsbl_pdwb = false _nlog("存档宝珠异常-3") break else _nlog("存档宝珠正常") end end end else lsbl_pdwb = false _nlog("存档宝珠异常-4") end end if lsbl_pdwb == false then _delfile(LuaPath.."存档宝珠.txt", 2000, "删除存档宝珠txt") for i = 1, #cd_sz, 1 do _writeFileString(LuaPath.."存档宝珠.txt", cd_sz[i].."----0", "m", "生成存档宝珠txt") end end ----------------------------------------生成存档宝珠↑↑ ks = _readFileNubmer(path_jls) --读取文本数值 while true do _unlock(1000) _setAssistiveTouch(false) --关闭AssistiveTouch _closeAllApp(1000, "关闭所有应用") for i = ks + 1, #cd_sz, 1 do if i % 33 == 0 then local code, headers, body = http.get("http://"..web_id.."/web/gwdz_tw/version.txt") if code == 200 and body ~= nil then local ver = string.atrim(string.strip_utf8_bom(body)) if ver ~= run_ver then _toast("当前版本过低,进行脚本更新...") _msleep(3000) _restart() --重启脚本 end end end jls, name_wjj, cdbh, pd_wjm, pd_wjm_hz = i, nil, string.atrim(cd_sz[i]), nil, nil for aa = 1, #wj_sz, 1 do name_wjj = wj_sz[aa] path_cdwj = ResPath..name_wjj.."/" if _isFileExist(path_cdwj..cdbh) then pd_wjm, pd_wjm_hz = cdbh, "/data10.bin" break else if _isFileExist(path_cdwj..cdbh..".bin") then pd_wjm = cdbh..".bin" break end end end if pd_wjm ~= nil then local YxPath_ls = _appDataPath(appid) --获取数据存档新的路径 if YxPath ~= YxPath_ls then _nlog("1-"..YxPath..":2-"..YxPath_ls.."路径不一致") _restart() end _closeApp(appid, 300, "关闭游戏应用") --删10,13,16 --_delfile(YxPath.."/Documents/data10.bin", 200, "删除data10") _delfile(YxPath.."/Documents/data13.bin", 200, "删除data13") _delfile(YxPath.."/Documents/data16.bin", 200, "删除data16") if pd_wjm_hz == nil then _copyfile(path_cdwj..pd_wjm, YxPath.."/Documents/data10.bin", "o", 300, "复制-1") _nlog(path_cdwj..pd_wjm) else _copyfile(path_cdwj..pd_wjm..pd_wjm_hz, YxPath.."/Documents/data10.bin", "o", 300, "复制-2") _nlog(path_cdwj..pd_wjm..pd_wjm_hz) end --dialog(_tabletostring(_wifiaddr()), 0) rwwc, qdcs = 0, 0 --rwwc:任务完成判断 qdcs:启动次数 repeat if _wifiaddr() == 1 then--确认连接wifi成功 _unlock(3000) _start() --开始操作 if rwwc == -1 then _yxgx() end else dialog("wifi异常,需手动处理!", 2000) _restart() end until rwwc >= 1 if rwwc >= 8 then if _isFileExist(ResPath.."无数据存档") == false then _newfile(ResPath.."无数据存档", 5000, "创建无数据存档文件夹") _movefile(path_cdwj..pd_wjm, ResPath.."无数据存档/"..pd_wjm, "o", 300, "移动到无数据存档-1") else _movefile(path_cdwj..pd_wjm, ResPath.."无数据存档/"..pd_wjm, "o", 300, "移动到无数据存档-2") end end _writeFileString(path_jls, tostring(jls), "o", "保存已运行记录数!") end end if selects["任务选项"] == "礼物盒" then ks = 0 _writeFileString(path_jls, tostring(ks), "o", "保存已运行记录数!") else _delfile(path_jls, 200, "删除记录数") _savecfg(userPath().."uicfg/mcfg.xcfg", "礼物盒", selects["房间ID"], selects["是否写日志"]) if selects["任务选项"] == "绑定账号" then _nlog("绑定账号全部完成!!") break else _restart() end end end dialog(selects["任务选项"].."完成!", 0) end function _savecfg(_cfgpath, _rwxx, _fjid, _setlog) --保存配置文件 local cfglist = { {'任务选项', _rwxx}, {'房间ID', _fjid}, {'是否写日志', _setlog} } local cfgtext = '{"' for i,v in pairs(cfglist) do if i == #cfglist then cfgtext = cfgtext..v[1]..'":'..tostring(v[2])..'}' else cfgtext = cfgtext..v[1]..'":"'..v[2]..'","' end end _writeFileString(_cfgpath, cfgtext, "o", "保存配置") _msleep(1000) end function _dlapp() --登录app if selects["任务选项"] == "登录app删游" then _ipaUninstall(appid , 1000) end local appzh, appmm = _gettext("gwdz_tw/appid.txt") local lsbl_store = "com.apple.AppStore" repeat local aa_a = 0 _closeApp(lsbl_store, 1000, "关闭指定应用") _runApp(lsbl_store, 2000, "打开游戏") for i = 1, 1000, 1 do _yxty(0) if _frontAppBid() ~= lsbl_store then _nlog("前台应用不是指定应用") break else if _multiColor({{ 21, 73, 0x000000}, { 21, 99, 0xf2f2f7}, { 44, 255, 0xf2f2f7}, { 44, 275, 0xffffff}, { 44, 352, 0xffffff}, { 44, 456, 0xf2f2f7}}, 95) == true then --账号页面 local sz_zym ={ { 0x59a8ff, "-51|12|0x52a5ff,-53|10|0xa5d0ff,16|0|0x92c6ff,14|19|0x7dbbff,47|14|0x4fa3ff,39|14|0x94c7ff,-9|11|0xffffff"}, --中文:退出登录 { 0x9acaff, "-18|22|0x007aff,-80|7|0x6eb3ff,-80|8|0xffffff,34|7|0x6bb2ff,33|7|0xffffff,58|6|0x78b9ff,58|5|0xffffff"}, --日语:退出登录 { 0x2e92ff, "-8|-4|0x007aff,-13|0|0x59a8ff,1|19|0x7dbbff,41|19|0x007aff,44|19|0xffffff,29|-6|0x007aff,32|-6|0xffffff"}, --台湾:登出 }--判断退出登录 local lsbl_pdydl = 0 for i = 1, #sz_zym, 1 do local x, y = _findMultiColorInRegionFuzzy( sz_zym[i][1], sz_zym[i][2], 90, 11, 456, 333, 1333) if x > 0 and y > 0 then _tap( x, y, 2000, "退出登录") lsbl_pdydl = 1 break end _msleep(300) end if lsbl_pdydl == 0 then if _multiColor({{ 51, 258, 0xf2f2f7}, { 51, 265, 0xffffff}, { 51, 350, 0xffffff}, { 51, 437, 0xffffff}, { 51, 446, 0xf2f2f7}, { 51, 514, 0xf2f2f7}, { 51, 521, 0xffffff}}, 95) == true then --登录页面 local x, y = _findColor( 0x000000, 95, 235, 271, 491, 336) --判断账号是否输入 if x > 0 and y > 0 then local x, y = _findColor( 0x000000, 95, 595, 1288, 717, 1288) if x > 0 and y > 0 then _tap( x, y, 2000, "next") else local x, y = _findMultiColorInRegionFuzzy( 0xc4c4c6, "-13|0|0xc4c4c6,6|0|0xc4c4c6", 95, 168, 376, 289, 415) if x > 0 and y > 0 then _inputText(appmm, false, 1500, "输入appmm") else _tap( 656, 1285, 5000, "DONE") aa_a = 1 break end end else local x, y = _findMultiColorInRegionFuzzy( 0x000000, "11|-2|0xffffff,7|100|0x000000,8|93|0xffffff,114|108|0x000000", 95, 572, 1030, 732, 1200)--判断键盘 if x > 0 and y > 0 then local x, y = _findColor( 0x000000, 95, 595, 1288, 717, 1288)--判断next灰色 if x < 0 and y < 0 then _inputText(appzh, false, 1500, "输入appzh") end else _tap( 416, 307, 2000, "appid输入框") end end end end else local x, y = _findMultiColorInRegionFuzzy( 0x007aff, "0|14|0xfefefe,0|19|0x007aff,0|32|0x007aff,0|-14|0xffffff,0|-18|0xffffff,0|-24|0x007aff", 95, 673, 101, 673, 240) if x > 0 and y > 0 then _tap( x, y, 2000, "头像图标 - 进入登录页面") else _multiColTap({{ 266, 257, 0xffffff}, { 274, 257, 0x007aff}, { 45, 1167, 0xf7f7f8}, { 52, 1167, 0x007aff}, { 698, 1161, 0x007aff}, { 707, 1160, 0xf7f7f7}, { 409, 1271, 0x007aff}}, 95, 368, 1270, 200, "关闭个性广告") _multiColTap({{ 63, 1113, 0x007aff}, { 681, 1187, 0x007aff}, { 371, 1195, 0x007aff}, { 371, 1200, 0xffffff}, { 391, 1263, 0x007aff}}, 95, 391, 1263, 200, "台湾-现在不要") _multiColTap({{ 261, 315, 0x000000}, { 230, 594, 0x007aff}, { 502, 595, 0x007aff}}, 95, 238, 589, 200, "通过APPLE ID登录-取消") end end end _msleep(200) end until aa_a == 1 _savecfg(userPath().."uicfg/mcfg.xcfg", "礼物盒", selects["房间ID"], selects["是否写日志"]) _toast("登陆完成!") _exit() end function _gettext(_path) --web上获取appid账号密码 local lsbl, lsbl_cs, lsbl_zh, lsbl_mm = 0, 0, nil, nil repeat local text = _httpGet("http://"..web_id.."/web/".._path) if text == "timeout" or text == "nofile" then if lsbl_cs >= 11 then dialog("多次获取文本失败", 30) _msleep(10000) else lsbl_cs = lsbl_cs + 1 _msleep(1000) end else local lsbl_sz = string.split(text, "-") lsbl, lsbl_zh, lsbl_mm = 1, lsbl_sz[1], lsbl_sz[2] _nlog(lsbl_sz[1].."----"..lsbl_sz[2]) end until lsbl >= 1 return lsbl_zh, lsbl_mm end function _hbcd()--合并存档 local cd_sz, wj_sz = _bhhq(500000, 2, {"res", "tessdata", "任务存档"})--1.指定文件夹获取编号 2.排除的文件夹 --local cd_sz, wj_sz = _bhhq(500000, 2, {"res", "tessdata", "任务存档", "无数据存档"})--1.指定文件夹获取编号 2.排除的文件夹 if _isFileExist(ResPath.."任务存档") == false then _newfile(ResPath.."任务存档", 5000, "创建任务存档文件夹") end if #wj_sz >= 1 then for aa = 1, #cd_sz, 1 do local cdbh = string.atrim(cd_sz[aa]) for bb = 1, #wj_sz, 1 do local path_cdwj = ResPath..wj_sz[bb].."/" if _isFileExist(path_cdwj..cdbh) == true then _movefile(path_cdwj..cdbh, ResPath.."任务存档/"..cdbh, "o", 300, "移动+合并存档-1") break else if _isFileExist(path_cdwj..cdbh..".bin") == true then _movefile(path_cdwj..cdbh..".bin", ResPath.."任务存档/"..cdbh..".bin", "o", 300, "移动+合并存档-2") break end end end end _msleep(5000) for cc = 1, #wj_sz, 1 do if #_getFileList(ResPath..wj_sz[cc]) <= 0 then _delfile(ResPath..wj_sz[cc], 200, "删除合并完成文件夹") end end end _delfile(ResPath.."res", 300, "删除res文件夹") _clearFiles(LuaPath, "存档编号", 300, "批量清理文件-1") _clearFiles(LuaPath, "存档宝珠", 300, "批量清理文件-2") _clearFiles(LuaPath, "领取记录数", 300, "批量清理文件-3") _savecfg(userPath().."uicfg/mcfg.xcfg", "礼物盒", selects["房间ID"], selects["是否写日志"]) _restart() end function _yxgx()--APP更新 local gx_cs_a, gx_cs_b, gx_cs_c = 0, 0, 0 for i = 1, 1500, 1 do if _frontAppBid() == appid then local x, y = _findMultiColorInRegionFuzzy( 0xffffff, "0|-5|0xffffff,0|6|0xffffff,0|-17|0xf07500,0|21|0xe35000", 95, 350, 777, 397, 1288)--通用OK if x > 0 and y > 0 then _tap(x, y, 5000, "通用OK") end else if _multiColor({{ 105, 294, 0x691d10}, { 122, 302, 0xee7963}, { 157, 324, 0xf6d08b}, { 166, 334, 0xfbecd3}}, 95) == true then--app页面 local x, y = _findMultiColorInRegionFuzzy( 0x007aff, "0|-6|0xffffff,0|12|0x007aff,0|23|0x007aff,0|29|0xffffff,0|35|0xffffff,0|40|0x007aff,0|44|0xffffff", 95, 686, 152, 686, 615)--上指示箭头 if x > 0 and y > 0 then local x, y = _findMultiColorInRegionFuzzy( 0x007aff, "0|-7|0x007aff,0|-26|0x007aff,0|-32|0xffffff,0|10|0x007aff,0|23|0x007aff,0|29|0xffffff", 95, 335, 225, 335, 404)--更新或打开按钮 if x > 0 and y > 0 then local x, y = _findMultiColorInRegionFuzzy( 0xffffff, "-3|0|0x3897ff,0|-3|0x047cff,28|-7|0xffffff,35|-1|0x85bfff,34|1|0x69b1ff,44|2|0xffffff", 95, 345, 225, 419, 404)--更新按钮 if x > 0 and y > 0 then _tap(x, y, 5000, "更新按钮") else local x, y = _findMultiColorInRegionFuzzy( 0xc0deff, "0|-4|0xc0deff,0|-10|0xc0deff,0|6|0xc0deff,0|-25|0x007aff,0|-32|0xffffff,0|23|0x007aff,0|29|0xffffff", 95, 409, 225, 409, 404)--打开按钮 if x > 0 and y > 0 then _nlog("打开按钮-更新完成") break end end else local x, y = _findMultiColorInRegionFuzzy( 0x007aff, "0|-8|0x007aff,0|5|0x007aff,0|8|0xffffff,0|-11|0xffffff", 95, 335, 225, 335, 404)--更新中 if x > 0 and y > 0 then _msleep(3000) else if gx_cs_c >= 300 then _nlog("卡住了_c") break else gx_cs_c = gx_cs_c+1 end end end else if gx_cs_b >= 300 then _nlog("卡住了_b") break else gx_cs_b = gx_cs_b + 1 end end else if gx_cs_a >= 300 then _nlog("卡住了_a") break else gx_cs_a = gx_cs_a + 1 end end end _msleep(300) end end function _start() --开始操作 _closeApp(appid, 1000, "关闭指定应用") qdcs = qdcs + 1 if qdcs >= 5 then if qdcs >= 7 then _clearFiles(YxPath.."/Documents", nil, 300, "清理Documents内所有文件") --批量清理文件列表 _clearFiles(YxPath.."/Library/Preferences", nil, 300, "清理Preferences内所有文件") --批量清理文件列表 _restart() --重启脚本 else local dlgyc = _alert("异常启动次数:"..qdcs, 60, "继续操作", "停止运行", "重启脚本") --弹出系统提示 if dlgyc == 1 then _exit() --停止运行 end if dlgyc == 2 then _restart() --重启脚本 end end else _toast(selects["任务选项"].."\n"..#cd_sz..":"..jls.."-"..cdbh.."\n启动次数:"..qdcs) end _runApp(appid, 2000, "打开游戏") jssb_aa, jssb_bb, jssb_cc = {}, {}, {} gwdz_id = nil local lsbl = 0 local lsbl_pdsb, lsbl_pdbz = false, false--lsbl_pdsb:判断失败 lsbl_pdbz:判断有免费宝珠 local jls_txjz, jls_sjjz = 0, 0 --jls_txjz:通信加载次数 jls_sjjz:更新数据加载次数 local lsbl_zn, lsbl_zn_aa, lsbl_zn_bb, lsbl_zn_cc, lsbl_zn_dd, lsbl_zn_ee, lsbl_zn_jls, lsbl_zn_srjls = 0, 0, 0, 0, 0, 0, 0, 0 --坐标颜色 local sz_tyys = { ["连线中"] = {{ 86, 813, 0x48556f}, { 282, 895, 0x777d95}, { 335, 888, 0x737376}, { 590, 995, 0xefeff0}, { 662, 1045, 0x474f6a}}, ["资料下载"] = {{ 103, 997, 0x29325a}, { 109, 997, 0xdfdfdf}, { 114, 997, 0x000000}, { 640, 997, 0xdedede}, { 646, 997, 0x29325a}, { 414, 939, 0xb7bac7}}, ["主菜单选中"] = {{ 8, 1308, 0x4faeba}, { 120, 1308, 0x4faeba}, { 60, 1291, 0xffffff}, { 70, 1287, 0xffffff}}, ["主菜单未选中"] = {{ 60, 1291, 0xffffff}, { 70, 1287, 0xffffff}}, ["app更新"] = {{ 433, 596, 0x808183}, { 206, 662, 0x9ea0a6}, { 364, 670, 0x9ea0a5}, { 389, 779, 0xc98a5b}}, ["数据已引继"] = {{ 290, 614, 0xcbccd2}, { 424, 618, 0x787d95}, { 358, 687, 0x90939a}, { 477, 679, 0x808288}}, ["输入昵称"] = {{ 606, 670, 0xededed}, { 287, 725, 0xf3e3be}, { 89, 937, 0xe93e00}, { 379, 975, 0xfffffe}, { 661, 1025, 0xc90000}}, ["允许"] = {{ 198, 585, 0x000000}, { 561, 586, 0x000000}, { 204, 758, 0x007aff}, { 526, 753, 0x007aff}}, ["验证APPLEID"] = {{ 356, 577, 0x000000}, { 459, 596, 0x000000}, { 229, 766, 0x007aff}, { 497, 772, 0x007aff}}, ["SKIP"] = {{ 636, 98, 0x000000}, { 711, 98, 0x000000}, { 719, 98, 0xffffff}, { 558, 1292, 0xffffff}, { 619, 1292, 0xffffff}}, --["通用OK"] = { 0xffffff, "0|-5|0xffffff,0|6|0xffffff,0|-17|0xf07500,0|21|0xe35000"}, ["通用OK"] = { 0xffffff, "0|-5|0xffffff,0|6|0xffffff,0|-16|0xf27900,0|-23|0xf78900,0|-30|0xffdc00"}, ["返回箭头"] = {{ 55, 245, 0xbdffff}, { 66, 245, 0xbdffff}, { 77, 245, 0xbdffff}, { 99, 245, 0x0058ea}}, ["大宝珠"] = {{ 471, 109, 0x03fd34}, { 475, 108, 0x00f1f2}}, ["主页面:蓝黄按钮"] = {{ 121, 1141, 0x0125bf}, { 152, 1129, 0xffffff}, { 541, 1146, 0xbc4a00}, { 553, 1129, 0xffffff}}, ["10连转蛋"] = {{ 257, 903, 0xeb6400}, { 351, 905, 0x7f593d}, { 381, 901, 0x67625e}, { 413, 902, 0xa2856e}, { 421, 910, 0xffffff}}, ["领取转蛋结果:是"] = {{ 252, 1097, 0x602700}, { 362, 1097, 0x696969}, { 390, 1101, 0x000000}, { 494, 1097, 0x612900}}, ["礼物箱"] = {{ 182, 242, 0x4e4e4e}, { 182, 243, 0x828282}, { 211, 243, 0xffffff}, { 214, 243, 0x878787}}, ["消息图标"] = {0x5a5e64, "0|-11|0x5a5e64,0|-26|0x5a5e64,0|16|0x5a5e64,0|25|0x5a5e64"}, ["礼物盒图标"] = {0x5a5a64, "-15|-11|0x5a5a64,-9|-23|0x5a5a64,-14|21|0x5a5a64,26|22|0x5a5a64,17|-19|0x5a5a64,25|-10|0x5a5a64,37|-18|0xa30100"}, ["没有讯息:OK"] = {{ 337, 680, 0x75777b}, { 337, 683, 0x40434c}, { 398, 683, 0x83868e}, { 414, 663, 0xdadbdd}, { 390, 854, 0xb44e02}}, ["领取:位置1"] = {{ 575, 317, 0x5c5e6b}, { 689, 328, 0x919393}, { 692, 358, 0xb5b7b8}, { 689, 389, 0x797979}}, ["全部删除:是"] = {{ 183, 655, 0x4d4e52}, { 481, 629, 0x5f6784}, { 615, 629, 0xa1a5b6}, { 209, 880, 0xa86c42}}, ["全部删除:亮"] = {{ 598, 229, 0x1753be}, { 621, 232, 0x3b3b3b}, { 656, 235, 0xffffff}, { 685, 229, 0x8eb3f2}}, ["礼物弹窗锁图标:亮"] = { 0x000000, "0|-8|0xb19936,0|11|0xfbd52c,0|-17|0x000000,0|-27|0xf0c845,0|-41|0x2a3660,0|17|0x020102,0|31|0x29335c"}, ["邮件锁图标"] = {{ 650, 340, 0x000000}, { 657, 346, 0xedd37b}, { 657, 334, 0xdbcd87}, { 644, 350, 0xfbcd2a}}, ["扩充合成出售"] = {{ 171, 923, 0x69584e}, { 394, 914, 0x5b5a5a}, { 571, 910, 0x884a19}, { 393, 919, 0xffffff}}, ["变更排序"] = {{ 505, 227, 0x4ba62f}, { 556, 228, 0xffffff}, { 569, 232, 0x183e0c}, { 610, 228, 0xffffff}, { 632, 223, 0x4fae32}}, ["无怪物"] = { 0xe0e0e0, "0|105|0xe0e0e0,-153|105|0xe0e0e0,-153|0|0xe0e0e0,-295|52|0xe0e0e0,184|0|0xe0e0e0,184|105|0xe0e0e0,302|52|0xe0e0e0"}, ["决定"] = {{ 454, 1177, 0x00a000}, { 543, 1175, 0xffffff}, { 565, 1186, 0x000000}, { 666, 1177, 0x00a100}}, ["强化页面"] = {{ 46, 671, 0xfde77e}, { 21, 662, 0x081f00}, { 13, 652, 0x289b02}}, ["开始合成:亮"] = {{ 439, 962, 0x0f4c03}, { 434, 1168, 0x009f00}, { 505, 1172, 0xffffff}, { 619, 1181, 0x000000}, { 686, 1168, 0x00aa00}}, ["开始合成:暗"] = {{ 434, 1168, 0x006700}, { 505, 1172, 0xa6a6a6}, { 619, 1181, 0x000000}, { 686, 1168, 0x006f00}}, ["分享网站:否"] = {{ 360, 647, 0x7a8098}, { 511, 875, 0x873b02}, { 514, 868, 0xffffff}, { 555, 877, 0xec6500}}, -- sz_tyys[""] -- [""] = , -- sz_tyys[""] -- [""] = , ["礼物箱"] = { {{ 182, 242, 0x4e4e4e}, { 182, 243, 0x828282}, { 211, 243, 0xffffff}, { 214, 243, 0x878787}}, }, ["礼物弹窗:关闭"] = { {{ 536, 1116, 0xea4100}, { 599, 1139, 0xd6915c}, { 624, 1144, 0xa2490a}, { 669, 1138, 0xed6800}}, }, ["重温那一天"] = { { 0xf4d402, "-32|0|0xf4d402,0|3|0x000000,-37|-34|0x4e1d84,-25|-28|0x7d3a99,-14|-19|0x08295a,-9|-10|0x3f89af"},--位置1 }, ["龙头页面"] = { {{ 109, 390, 0x696663}, { 109, 406, 0xbe9132}, { 640, 391, 0x686d73}, { 640, 407, 0xc79a32}},--普通龙头1 {{ 109, 390, 0x686d73}, { 109, 406, 0xc79a33}, { 640, 391, 0x696663}, { 640, 407, 0xbb9635}},--普通龙头2 {{ 110, 391, 0x676c74}, { 109, 408, 0xc79a32}, { 643, 393, 0x868b8d}, { 641, 409, 0xc09432}},--普通龙头3 {{ 126, 463, 0xb564c2}, { 143, 542, 0xe33131}, { 622, 487, 0x71e533}, { 689, 705, 0x3fbcef}},--11周年龙头 {{ 112, 489, 0x8c4d96}, { 100, 649, 0xe33131}, { 599, 542, 0x67cb32}, { 683, 709, 0x3fbcef}},--5星弹珠龙头 {{ 10, 1200, 0x131212}, { 33, 1209, 0x212020}, { 80, 1218, 0x131212}, { 663, 1208, 0x151414}, { 696, 1206, 0x232121}, { 736, 1198, 0x141313}},--星光舞台龙头 }, ["注目转蛋"] = { {{ 77, 247, 0xffffff}, { 452, 212, 0x585858}, { 644, 275, 0x00c3ff}, { 690, 305, 0x00c3ff}},--注目转蛋页面 {{ 189, 442, 0xef8700}, { 387, 412, 0x000000}, { 514, 383, 0xffffff}, { 312, 1088, 0xe95d00}, { 343, 1082, 0xffffff}},--TOP20 {{ 399, 403, 0x808599}, { 601, 400, 0x3f4869}, { 119, 618, 0xfe4500}, { 310, 961, 0xeb6400}, { 388, 969, 0xffffff}},--选拔,13周年人气投票转蛋 }, ["编入队伍"] = { {{ 297, 410, 0x888da3}, { 353, 404, 0x626880}, { 422, 406, 0x444d70}, { 176, 1010, 0xeb6400}, { 514, 1004, 0xffffff}},--入:353,404 {{ 297, 403, 0x888da3}, { 353, 397, 0x626880}, { 422, 399, 0x444d70}, { 174, 1017, 0xeb6400}, { 514, 1011, 0xffffff}},--入:353,397 }, } for i = 1, xhcs, 1 do _yxty(0) if _multiColor( sz_tyys["连线中"], 95) == true then if jls_txjz >= 99 then _nlog("连线中加载过久..") break else _nlog("测试加载") jls_txjz = jls_txjz + 1 _msleep(1000) end end if lsbl == 0 then--进入主页面前操作 if _multiColor(sz_tyys["资料下载"], 95) == true then if jls_sjjz >= 60 then _nlog("卡在资料下载中位置过久") break else _nlog("测试下载") jls_sjjz = jls_sjjz + 1 _msleep(10000) end else local pd_ltym = false for i = 1, #sz_tyys["龙头页面"], 1 do if _multiColor(sz_tyys["龙头页面"][i], 95) == true then _nlog("龙头页面") pd_ltym = true break end end if pd_ltym == true then--龙头页面 _move(376, 875, 376, 1156, 3, 0.2, 100, 200, "异常:龙头+移动宝珠") else local pd_cqym = false for i = 1, #sz_tyys["注目转蛋"], 1 do if _multiColor(sz_tyys["注目转蛋"][i], 95) == true then _nlog("注目转蛋页面") pd_cqym = true break end end if pd_cqym == true then--注目转蛋页面 if _multiColor(sz_tyys["主菜单选中"], 95) == false then _multiColTap(sz_tyys["主菜单未选中"], 95, 56, 1273, 1600, "选主选单1") end else local pd_brym = false for i = 1, #sz_tyys["编入队伍"], 1 do if _multiColor(sz_tyys["编入队伍"][i], 95) == true then _nlog("编入队伍页面") pd_brym = true break end end if pd_brym == true then--编入队伍页面 _tap( 496, 1019, 200, "编入队伍-否") else if _multiColor(sz_tyys["app更新"], 95) == true then rwwc = -1 _nlog("app更新") break else if _multiColor(sz_tyys["数据已引继"], 95) == true then rwwc = 9 _nlog("数据已引继") break else if _multiColor(sz_tyys["输入昵称"], 95) == true then--输入昵称 rwwc = 8 _nlog("输入昵称-无数据存档") break else if _multiColor(sz_tyys["允许"], 95) == true then _tap( 508, 766, 200, "允许") else if _multiColor(sz_tyys["验证APPLEID"], 95) == true then _tap( 237, 762, 200, "验证APPLEID - 以后") else if _multiColor(sz_tyys["扩充合成出售"], 95) == true then lsbl, jls_txjz, lsbl_hbjs_a = 6, 0, 0 _nlog("进入合并角色") else if _multiColor(sz_tyys["大宝珠"], 95) == true and _multiColor(sz_tyys["主页面:蓝黄按钮"], 95) == true then if selects["任务选项"] == "转蛋抽取" then lsbl, jls_txjz = 5, 0 _nlog("进入转蛋抽取任务1") else local pd_hdym = false for i = 1, #sz_tyys["重温那一天"], 1 do local x, y = _findMultiColorInRegionFuzzy( sz_tyys["重温那一天"][i][1], sz_tyys["重温那一天"][i][2], 90, 17, 789, 727, 888) if x > 0 and y > 0 then _tap(x, y, 300, "重温那一天") pd_hdym = true break end end if pd_hdym == true then for i = 1, 60, 1 do if _multiColor(sz_tyys["返回箭头"], 95) == true then _nlog("进入重温那一天页面") break else _msleep(50) end end else local x, y = _findMultiColorInRegionFuzzy( sz_tyys["消息图标"][1], sz_tyys["消息图标"][2], 95, 691, 244, 691, 732) if x > 0 and y > 0 then local x, y = _findMultiColorInRegionFuzzy( sz_tyys["礼物盒图标"][1], sz_tyys["礼物盒图标"][2], 95, 623, 335, 746, 592) if x > 0 and y > 0 then _tap(x, y, 200, "点击礼物盒图标") for i = 1, 60, 1 do if _multiColor(sz_tyys["返回箭头"], 95) == true then _nlog("进入礼物箱页面1") break else _msleep(50) end end else local txt = _ocrText(555, 95, 665, 119, "1234567890") if tonumber(txt) ~= nil and tonumber(txt) >= 1 then _nlog("领取完成:"..cdbh.."----"..txt) file.set_line(LuaPath.."存档宝珠.txt", jls, cdbh.."----"..txt) else _nlog("领取完成:"..cdbh.."----0") end _snapshot(ResPath.."res/编号:"..cdbh..".png", 555, 95, 665, 119, ".png", 1) rwwc = 1 break end end end end else local pd_sqym = false for i = 1, #sz_tyys["礼物箱"], 1 do if _multiColor( sz_tyys["返回箭头"], 95) == true and _multiColor( sz_tyys["礼物箱"][i], 95) == true then _nlog("进入礼物箱页面2") pd_sqym = true break end end if pd_sqym == true and _multiColor( sz_tyys["变更排序"], 95) == false then if selects["任务选项"] == "转蛋抽取" then lsbl, jls_txjz = 5, 0 _nlog("进入转蛋抽取任务2") else lsbl, jls_txjz = 1, 0 _nlog("进入受取box页面") end else if _multiColor( sz_tyys["10连转蛋"], 95) == true then _tap( 369, 903, 300, "10连转蛋") for i = 1, 60, 1 do if _multiColor( sz_tyys["龙头页面"][1], 90) == true or _multiColor( sz_tyys["龙头页面"][2], 90) == true then _nlog("进入普通龙头1页面") break else _msleep(50) end end else local x, y = _findMultiColorInRegionFuzzy(sz_tyys["通用OK"][1], sz_tyys["通用OK"][2], 95, 350, 777, 397, 1288)--通用OK if x > 0 and y > 0 and _multiColor(sz_tyys["注目转蛋"][1], 95) == false then _tap(x, y, 200, "通用OK") else if _multiColor( sz_tyys["分享网站:否"], 95) == true then _tap( 513, 872, 300, "分享网站:否") else if _multiColor( sz_tyys["领取转蛋结果:是"], 95) == true then _tap( 137, 978, 300, "领取转蛋结果:是") else if _multiColor( sz_tyys["SKIP"], 95) == true then _tap( 685, 97, 300, "SKIP") else if _multiColor(sz_tyys["注目转蛋"][1], 95) == false then _tap( 370, 199, 1000, "随意点击1") end if _multiColor(sz_tyys["主菜单选中"], 95) == false then _multiColTap(sz_tyys["主菜单未选中"], 95, 56, 1273, 1600, "选主选单2") end end end end end end end end end end end end end end end end end end end if lsbl == 1 then if _multiColor(sz_tyys["没有讯息:OK"], 95) == true then--没有讯息-OK if selects["任务选项"] == "礼物盒" then local txt = _ocrText(555, 95, 665, 119, "1234567890") if tonumber(txt) ~= nil and tonumber(txt) >= 1 then _nlog("领取完成:"..cdbh.."----"..txt) file.set_line(LuaPath.."存档宝珠.txt", jls, cdbh.."----"..txt) else _nlog("领取完成:"..cdbh.."----0") end _snapshot(ResPath.."res/编号:"..cdbh..".png", 555, 95, 665, 119, ".png", 1) rwwc = 1 break else lsbl, jls_txjz, lsbl_hbjs_a = 2, 0, 0 _nlog("其他任务") end else if _multiColor(sz_tyys["全部删除:亮"], 95) == true then _tap( 644, 237, 200, "全部删除:亮") else local x, y = _findMultiColorInRegionFuzzy(sz_tyys["礼物弹窗锁图标:亮"][1], sz_tyys["礼物弹窗锁图标:亮"][2], 90, 692, 334, 692, 426) if x > 0 and y > 0 then _tap(x, y, 200, "礼物弹窗锁图标:亮") else if _multiColor( sz_tyys["邮件锁图标"], 95) == true then _tap( 350, 381, 200, "选择邮件锁图标") else local pd_tcgb = false for i = 1, #sz_tyys["礼物弹窗:关闭"], 1 do if _multiColor(sz_tyys["礼物弹窗:关闭"][i], 95) == true then _tap( 613, 1137, 200, "礼物弹窗:关闭") pd_tcgb = true break end end if pd_tcgb == false then if _multiColor(sz_tyys["全部删除:是"], 95) == true then _tap( 209, 880, 200, "已任务奖励全部删除:是") else if _multiColor(sz_tyys["领取:位置1"], 95) == true then _tap( 422, 347, 200, "领取:位置1") else local x, y = _findMultiColorInRegionFuzzy( sz_tyys["通用OK"][1], sz_tyys["通用OK"][2], 95, 350, 888, 397, 1188)--通用OK if x > 0 and y > 0 and _multiColor(sz_tyys["注目转蛋"][1], 95) == false then _tap(x, y, 200, "通用OK") else if _multiColor(sz_tyys["大宝珠"], 95) == false then _tap( 370, 199, 1000, "随意点击2") end end end end end end end end end end if lsbl == 3 then--任务奖励 if _multiColor({{ 171, 1295, 0xff8c3a}, { 192, 1296, 0xf1e8a2}, { 177, 1287, 0xce1100}, { 40, 1299, 0xffffff}, { 92, 1301, 0xffffff}}, 95) == true then--主菜单+位置1 local x, y = _findMultiColorInRegionFuzzy( 0xffffff, "0|-6|0xffffff,0|6|0xffffff,0|-32|0xffe100,0|33|0x000000", 95, 88, 666, 423, 1208)--通用OK+收取+确认 if x > 0 and y > 0 then _tap(x, y, 200, "通用OK") else if _multiColor({{ 221, 795, 0xfae616}, { 300, 1053, 0x984000}, { 362, 1050, 0xa6a6a6}, { 421, 1048, 0x000000}}, 95) == true then _tap( 231, 786, 200, "选中10宝珠") else if _multiColor({{ 56, 269, 0xbcffff}, { 240, 358, 0x0d62da}, { 270, 352, 0xffffff}, { 329, 366, 0x1244ce}}, 95) == true then--通常页面 if _multiColor({{ 673, 442, 0x6c6c6c}, { 670, 452, 0x6c6c6c}, { 677, 473, 0x6c6c6c}}, 95) == true then--位置1未达成 if _multiColor({{ 488, 87, 0xf2f013}, { 492, 87, 0x6bf66b}, { 496, 87, 0x0edde8}, { 502, 87, 0x3652fe}}, 95) == true then--小宝珠 _msleep(3000) local x, y = _findColor( 0xffff00, 95, 476, 101, 515, 116) if x > 0 and y > 0 then _tap(x, y, 200, "达成") else local txt = _ocrText(595, 76, 682, 98, "1234567890") if tonumber(txt) ~= nil and tonumber(txt) >= 1 then _nlog("任务奖励领取完成:"..cdbh.."----"..txt) file.set_line(LuaPath.."存档宝珠.txt", jls, cdbh.."----"..txt) else _nlog("任务奖励领取完成:"..cdbh.."----0") end --_snapshot(ResPath.."res/"..name_wjj.."-"..cdbh..".png", 588, 66, 685, 107, ".png", 1) _snapshot(ResPath.."res/编号:"..cdbh..".png", 588, 66, 685, 107, ".png", 1) lsbl, jls_txjz = 5, 0 _nlog("下一步:整理角色!") end end else if _multiColor({{ 286, 1176, 0xeb6400}, { 307, 1176, 0xffffff}, { 407, 1176, 0x000000}, { 435, 1176, 0xffffff}, { 440, 1176, 0x000000}, { 456, 1176, 0xec6800}}, 95) == true and _multiColor({{ 75, 813, 0x48546c}, { 674, 813, 0x48546c}, { 75, 1044, 0x464e68}, { 674, 1044, 0x464e68}}, 90) == false then--一括收取+非通讯中 _tap( 372, 1180, 600, "一括收取") -- else -- _multiColTap({{ 660, 449, 0xae0000}, { 685, 459, 0xae0000}, { 687, 478, 0xae0000}}, 95, 346, 531, 300, "达成") end end else if _multiColor({{ 21, 270, 0x0050e6}, { 37, 270, 0x005bec}, { 51, 270, 0xbcffff}, { 80, 270, 0xb9ffff}, { 98, 270, 0x0058ea}}, 95) == true then--返回主页箭头 local x, y = _findMultiColorInRegionFuzzy( 0xfefefe, "-24|-9|0x8b7302,11|-9|0x8b7302,9|20|0x8b7302,-24|19|0x8b7302,-15|-2|0xffffff,-8|7|0xfefefe", 90, 121, 227, 629, 308)--判断方框?号 if x > 0 and y > 0 then _tap( 58, 270, 200, "返回到主页") else _multiColTap({{ 55, 270, 0xbcffff}, { 237, 343, 0x004bae}, { 270, 352, 0xa6a6a6}, { 280, 371, 0x000000}}, 95, 312, 361, 300, "选中通常页面") end else _multiColTap({{ 647, 1165, 0x046378}, { 677, 1162, 0x002c20}, { 688, 1159, 0xffffff}, { 706, 1176, 0x085478}}, 95, 214, 943, 300, "选中任务奖励") _multiColTap({{ 281, 346, 0x0591ee}, { 329, 360, 0xffffff}, { 355, 369, 0x000001}, { 450, 380, 0x1238c8}}, 95, 58, 270, 300, "情报-返回") end end end end else _multiColTap({{ 32, 1313, 0x541800}, { 43, 1320, 0xffffff}, { 87, 1316, 0x562008}, { 82, 1320, 0xffffff}}, 95, 65, 1285, 300, "选中主菜单+位置1") end end if lsbl == 5 then--转蛋抽取 local pd_cqym = false for i = 1, #sz_tyys["注目转蛋"], 1 do if _multiColor(sz_tyys["注目转蛋"][i], 95) == true then _nlog("注目转蛋页面或TOP20或选拔,13周年人气-转蛋") pd_cqym = true break end end if pd_cqym == true then--注目转蛋页面或TOP20或选拔,13周年人气-转蛋 _tap( 56, 1273, 200, "选主选单") else end end if lsbl == 6 then--合并角色 if lsbl_hbjs_a == 0 then if _bgxx( 1, 0) == true then--合并角色:变更筛选选项 _msleep(200) lsbl_hbjs_a = 1 _nlog("开始合并角色操作!") end end if lsbl_hbjs_a == 1 then if _multiColor( sz_tyys["变更排序"], 90) == true then--表示顺变更 local x, y = _findColor( 0xffffff, 100, 626, 1158, 696, 1185)--下方识别角色数量 if _multiColor({{ 11, 1111, 0x141415}, { 11, 1166, 0x101010}, { 11, 1222, 0x0d0d0d}}, 95) == true and x > 0 and y > 0 then local x, y = _findMultiColorInRegionFuzzy( sz_tyys["无怪物"][1], sz_tyys["无怪物"][2], 95, 44, 414, 696, 999) if x > 0 and y > 0 then lsbl, jls_txjz = 3, 0 _nlog("未筛选出角色") else local lsbl_pdsl = 0 local x, y = _findColor( 0xffffff, 100, 535, 1159, 558, 1185) if x > 0 and y > 0 then local txt = _ocrText(520, 1155, 608, 1188, "1234567890") if tonumber(txt) ~= nil and tonumber(txt) <= 179 then lsbl_pdsl = 1 _nlog("识别数量<= 179") else _tap( 101, 456, 200, "选中位置1角色-0") end else local x, y = _findColor( 0xff0000, 90, 585, 1159, 608, 1185) if x > 0 and y > 0 then _tap( 101, 456, 200, "选中位置1角色-1") else lsbl_pdsl = 1 _nlog("识别数量<= 99") end end if lsbl_pdsl == 1 then if selects["任务选项"] == "礼物盒" then lsbl, jls_txjz = 0, 0 _nlog("下一步:开始礼物盒!") end if selects["任务选项"] == "免费抽取" then lsbl, jls_txjz = 3, 0 _nlog("下一步:开始抽取角色!") end if selects["任务选项"] == "整理角色" then lsbl, jls_txjz = 4, 0 _nlog("下一步:开始任务奖励!") end if selects["任务选项"] == "周年任务" then lsbl, jls_txjz, lsbl_zn, lsbl_zn_aa, lsbl_zn_bb, lsbl_zn_cc, lsbl_zn_dd, lsbl_zn_ee, lsbl_zn_jls, lsbl_zn_srjls = 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 _nlog("下一步:开始周年任务!") end end end end else if _multiColor( sz_tyys["决定"], 95) == true then _tap( 557, 1177, 1500, "决定") else if _multiColor( sz_tyys["强化页面"], 95) == true then if _multiColor( sz_tyys["开始合成:暗"], 95) == true then local x, y = _findMultiColorInRegionFuzzy( sz_tyys["无怪物"][1], sz_tyys["无怪物"][2], 95, 66, 595, 686, 727) if x > 0 and y > 0 then _tap( 66, 245, 200, "返回box页面") else _tap( 606, 626, 200, "自动添加角色") end else _multiColTap( sz_tyys["开始合成:亮"], 95, 561, 1170, 200, "点击开始合成") end else local x, y = _findMultiColorInRegionFuzzy(sz_tyys["通用OK"][1], sz_tyys["通用OK"][2], 95, 350, 777, 397, 1288)--通用OK if x > 0 and y > 0 then _tap(x, y, 200, "通用OK") else if _multiColor(sz_tyys["大宝珠"], 95) == false then _tap( 370, 199, 1000, "随意点击3") end end end end end end end if _frontAppBid() ~= appid or _multiColor({{ 119, 553, 0x48546c}, { 229, 608, 0xf4f4f4}, { 363, 597, 0xf5f5f5}, { 386, 612, 0x121928}, { 386, 779, 0xbea18d}}, 95) == true or _multiColor({{ 122, 736, 0xfe4500}, { 418, 742, 0xff4500}, { 307, 775, 0xff4500}, { 577, 666, 0xf5f5f5}, { 386, 879, 0xc7b1a1}}, 95) == true then _nlog("前台应用不是指定应用或日期变更或通信异常!") break end _msleep(200) end end function _bgxx(flag, att)--变更筛选选项 flag:0--筛选角色 1:合成其他角色 local lsbl_bgxx, lsbl_att = 0, 0 --坐标颜色 local sz_bgxx = { ["怪物未选中"] = {{ 166, 1277, 0xffffff}, { 190, 1288, 0xffffff}}, ["怪物选中"] = {{ 132, 1308, 0x52afbb}, { 244, 1308, 0x52afbb}, { 166, 1277, 0xffffff}, { 190, 1288, 0xffffff}}, ["怪物:怪物管理页面"] = {{ 87, 401, 0x0bc5ff}, { 95, 418, 0xf7f4b8}, { 104, 421, 0xffa300}, { 104, 430, 0xea4100}}, ["怪物管理:育成"] = {0xffa13b, "0|-13|0x491d2e,0|-23|0xe13300,0|-33|0xe73b00,0|18|0xffebac,0|31|0xffcd72"}, ["变更排序"] = {{ 505, 227, 0x4ba62f}, { 556, 228, 0xffffff}, { 569, 232, 0x183e0c}, { 610, 228, 0xffffff}, { 632, 223, 0x4fae32}}, ["关于怪物育成:OK"] = {{ 359, 240, 0xa1a2a9}, { 489, 247, 0x5b5b5e}, { 405, 417, 0xffd700}, { 390, 1157, 0xb44e02}}, ["决定:亮"] = {{ 464, 1177, 0x00a400}, { 543, 1175, 0xffffff}, { 565, 1186, 0x000000}, { 656, 1177, 0x00a400}}, ["决定:暗"] = {{ 453, 1177, 0x004e00}, { 543, 1175, 0x7d7d7d}, { 565, 1185, 0x000000}, { 656, 1177, 0x005000}}, ["左:筛选选中"] = {{ 156, 108, 0xffffff}, { 186, 124, 0x000000}, { 214, 116, 0xffffff}}, ["右:变更选项选中"] = {{ 554, 118, 0xffffff}, { 555, 125, 0x000000}, { 612, 115, 0xffffff}}, ["稀有度:最终6星选中"] = {{ 75, 783, 0x5e5145}, { 90, 785, 0x1e0e00}, { 147, 781, 0x743901}, { 151, 781, 0xc6c5c3}}, ["稀有度:弹窗"] = {{ 100, 402, 0xf6f8f9}, { 104, 405, 0x030405}, { 119, 396, 0x587385}, { 129, 405, 0x97a7b4}}, ["入手方式:幸运转蛋无图标"] = {{ 543, 981, 0x7a522c}, { 572, 982, 0xc2752c}, { 603, 982, 0x74563b}, { 620, 983, 0xfaf4ef}, { 656, 986, 0xd76502}}, ["入手方式:其他"] = {{ 570, 979, 0x834b14}, { 587, 980, 0xeba96a}, { 593, 990, 0x7e614a}, { 620, 983, 0xdb6b02}, { 656, 986, 0xd76502}}, ["入手方式:弹窗"] = {{ 656, 849, 0xffff00}, { 662, 849, 0xffffff}, { 661, 852, 0x000000}}, ["运MAX:YES选中"] = {{ 566, 873, 0xfae8d5}, { 586, 882, 0xa75202}, { 603, 884, 0xeae9e8}, { 607, 888, 0x190b00}}, ["运MAX:NO选中"] = {{ 566, 873, 0xe37702}, { 580, 883, 0x58493d}, { 585, 889, 0x030100}, { 596, 890, 0x7e3902}}, ["运MAX:弹窗"] = {{ 535, 686, 0x4b7088}, { 575, 693, 0xfcfdfd}, { 601, 702, 0x030405}, { 656, 707, 0x37546f}}, ["变更选项:持有数选中"] = {{ 111, 836, 0xfefcf9}, { 114, 847, 0x080400}, { 170, 850, 0xd6670c}, { 176, 839, 0x140a00}}, ["变更选项:使用次数选中"] = {{ 562, 838, 0xfffefd}, { 576, 846, 0x080400}, { 636, 847, 0x5e3613}, { 663, 839, 0xde6f02}}, ["属性:全选中"] = {{ 80, 203, 0x000000}, { 80, 215, 0xfffdf9}, { 80, 222, 0xfffdf9}}, ["属性:火选中"] = {{ 189, 211, 0xffc258}, { 198, 211, 0xffc258}, { 204, 211, 0xffc258}}, ["属性:水选中"] = {{ 305, 204, 0x1ef9ff}, { 305, 213, 0x37c3ff}, { 305, 221, 0x3682ff}}, ["属性:木选中"] = {{ 434, 199, 0x47f179}, { 434, 208, 0x97fb7c}, { 434, 216, 0x52f261}}, ["属性:光选中"] = {{ 542, 211, 0xfff366}, { 550, 211, 0x020000}, { 558, 211, 0xfff366}}, ["属性:暗选中"] = {{ 671, 208, 0xffc2ff}, { 666, 215, 0xdb5eff}, { 666, 225, 0x6b11d5}}, -- sz_bgxx[""] -- [""] = , -- sz_bgxx[""] -- [""] = , ["兽神化情报:关闭"] = { { {{ 300, 366, 0x50566d}, { 318, 364, 0x8f94a9}, { 367, 357, 0x000000}, { 376, 360, 0xf5f5f5}, { 471, 370, 0x979797}}, 596, 1158 }, }, } for var = 1, 100 do if _multiColor( sz_bgxx["怪物选中"], 95) == false then _multiColTap( sz_bgxx["怪物未选中"], 95, 179, 1272, 200, "主菜单-怪物") end if _multiColor( sz_bgxx["决定:亮"], 95) == true then if lsbl_bgxx == 0 then if _multiColor( sz_bgxx["左:筛选选中"], 95) == true then if flag == 0 then if _multiColor( sz_bgxx["稀有度:最终6星选中"], 95) == true then if _multiColor( sz_bgxx["入手方式:幸运转蛋无图标"], 95) == true then if lsbl_att == 0 then if _multiColor( sz_bgxx["属性:全选中"], 95) == true then lsbl_att = 1 _nlog("属性:全选中") else _tap( 79, 213, 300, "选中属性:全") end else if att == 1 then if _multiColor( sz_bgxx["属性:火选中"], 95) == true then lsbl_bgxx = 1 _nlog("属性:火选中") else _tap( 195, 213, 300, "选中属性:火") end end if att == 2 then if _multiColor( sz_bgxx["属性:水选中"], 95) == true then lsbl_bgxx = 1 _nlog("属性:水选中") else _tap( 313, 213, 300, "选中属性:水") end end if att == 3 then if _multiColor( sz_bgxx["属性:木选中"], 95) == true then lsbl_bgxx = 1 _nlog("属性:木选中") else _tap( 432, 213, 300, "选中属性:木") end end if att == 4 then if _multiColor( sz_bgxx["属性:光选中"], 95) == true then lsbl_bgxx = 1 _nlog("属性:光选中") else _tap( 550, 213, 300, "选中属性:光") end end if att == 5 then if _multiColor( sz_bgxx["属性:暗选中"], 95) == true then lsbl_bgxx = 1 _nlog("属性:暗选中") else _tap( 666, 213, 300, "选中属性:暗") end end end else if _multiColor( sz_bgxx["运MAX:YES选中"], 95) == true then _tap( 591, 986, 500, "点击入手方式") else _tap( 585, 888, 500, "点击运MAX") end end else _tap( 220, 782, 500, "点击稀有度") end end if flag == 1 then if _multiColor( sz_bgxx["运MAX:NO选中"], 95) == true then if _multiColor( sz_bgxx["入手方式:其他"], 95) == true then if _multiColor( sz_bgxx["属性:全选中"], 95) == true then lsbl_bgxx = 1 _nlog("属性:全选中") else _tap( 79, 213, 300, "选中属性:全") end else _tap( 591, 986, 500, "点击入手方式") end else _tap( 585, 888, 500, "点击运MAX") end end else _tap( 193, 100, 500, "点击左:筛选") end end if lsbl_bgxx == 1 then if _multiColor( sz_bgxx["右:变更选项选中"], 95) == true then if flag == 0 then if _multiColor( sz_bgxx["变更选项:使用次数选中"], 95) == true then lsbl_bgxx = 2 _nlog("下一步:筛选数量或整理角色!") break else _tap( 604, 845, 500, "选中变更选项:使用次数") end end if flag == 1 then if _multiColor( sz_bgxx["变更选项:持有数选中"], 95) == true then lsbl_bgxx = 2 _nlog("下一步:合成角色!") break else _tap( 138, 845, 500, "选中变更选项:所持数") end end else _tap( 560, 117, 500, "选中右:变更选项") end end else if _multiColor( sz_bgxx["决定:暗"], 95) == true then if _multiColor( sz_bgxx["稀有度:弹窗"], 95) == true then _tap( 111, 727, 500, "选中稀有度:最终6星") else if _multiColor( sz_bgxx["入手方式:弹窗"], 95) == true then if flag == 0 then _tap( 585, 815, 500, "选中入手方式:幸运转蛋无图标") end if flag == 1 then--选择入手方式:其他 _tap( 589, 926, 500, "选中入手方式:其他") end else if _multiColor( sz_bgxx["运MAX:弹窗"], 95) == true then--MAX筛选 if flag == 0 then _tap( 586, 694, 500, "选中运MAX:全部") end if flag == 1 then _tap( 581, 832, 500, "选中运MAX:NO") end end end end else if _multiColor( sz_bgxx["怪物:怪物管理页面"], 95) == true then local x, y = _findMultiColorInRegionFuzzy( sz_bgxx["怪物管理:育成"][1], sz_bgxx["怪物管理:育成"][2], 90, 110, 474, 110, 999) if x > 0 and y > 0 then _tap( x, y, 200, "点击怪物管理:育成") end else if _multiColor( sz_bgxx["关于怪物育成:OK"], 95) == true then _tap( 371, 1156, 200, "关于怪物育成:OK") else _multiColTap( sz_bgxx["变更排序"], 95, 568, 227, 200, "表示顺变更") for i = 1, #sz_bgxx["兽神化情报:关闭"] do if _multiColor( sz_bgxx["兽神化情报:关闭"][i][1], 95) == true then _tap( sz_bgxx["兽神化情报:关闭"][i][2], sz_bgxx["兽神化情报:关闭"][i][3], 200, "点击兽神化情报:关闭") break end end end end end end _msleep(200) end if lsbl_bgxx == 2 then return true else return false end end function _settings() --手机设置 _setAutoLockTime(0) --设置锁屏时间 0:永不锁屏 _setVolumeLevel(0) --设置音量 范围:0.1 ~ 1 _setBacklightLevel(0.8) --设置亮度 范围:0.1 ~ 1 _clearAllPhotos() --清空相册 -- _setBTEnable(false) --设置蓝牙 _setAssistiveTouch(false)--设置AssistiveTouch _clearCookies() --清理浏览器Cookies --_clearCache() --清理系统缓存 --_setVPNEnable(false, 200, "关闭vpn") _msleep(2000) end function _yxty(_flag) --游戏通用 _multiColTap({{ 249, 610, 0x000000}, { 487, 626, 0x000000}, { 356, 729, 0x007aff}}, 95, 356, 729, 200, "可能不支持此配件 - 关闭") _multiColTap({{ 261, 315, 0x000000}, { 497, 341, 0x000000}, { 495, 491, 0xffffff}, { 230, 594, 0x007aff}, { 502, 595, 0x007aff}}, 95, 237, 589, 200, "通过appid登录-取消") _multiColTap({{ 292, 593, 0x000000}, { 458, 617, 0x000000}, { 229, 787, 0x007aff}, { 497, 792, 0x007aff}}, 95, 237, 783, 200, "验证appid - 以后") _multiColTap({{ 243, 589, 0x000000}, { 502, 592, 0x000000}, { 253, 774, 0x007aff}, { 502, 770, 0x007aff}}, 95, 502, 770, 200, "蜂窝网络更新失败-好") _multiColTap({{ 324, 615, 0x000000}, { 409, 632, 0x000000}, { 367, 774, 0x007aff}, { 382, 767, 0x007aff}}, 95, 371, 767, 200, "触控ID-好") _multiColTap({{ 348, 512, 0x6a1f12}, { 362, 517, 0xec7860}, { 379, 528, 0xf5d08a}, { 364, 864, 0x007aff}}, 95, 364, 864, 200, "APP评分-以后") _multiColTap({{ 127, 439, 0x007bfe}, { 97, 601, 0x99caff}, { 98, 760, 0x007bfe}, { 63, 1161, 0x007aff}, { 682, 1168, 0x007aff}}, 95, 376, 1169, 200, "APP STORE 新内容-继续") _multiColTap({{ 178, 212, 0xd9d7db}, { 66, 1149, 0x007aff}, { 675, 1156, 0x007aff}, { 365, 1220, 0xffffff}, { 329, 1271, 0x007aff}}, 95, 374, 1268, 200, "Continue - 以后再说") _multiColTap({{ 119, 628, 0x48546c}, { 141, 663, 0x141b2c}, { 154, 678, 0xf5f5f5}, { 376, 676, 0xf5f5f5}, { 386, 860, 0xd5c9c1}}, 95, 386, 860, 300, "833错误-OK") _multiColTap({{ 119, 611, 0x48546c}, { 132, 620, 0x28345c}, { 142, 701, 0x141b2b}, { 389, 652, 0xf5f5f5}, { 386, 879, 0xa77a5b}}, 95, 386, 879, 300, "工*一错误-OK") _multiColTap({{ 533, 307, 0xe9e03d}, { 563, 303, 0x438c6f}, { 589, 324, 0x000000}, { 314, 1185, 0xee6d00}, { 380, 1188, 0xffffff}}, 95, 374, 1172, 200, "*****开催中-特殊情况-OK") _multiColTap({{ 85, 379, 0xca5a5a}, { 402, 368, 0x000000}, { 583, 418, 0x374559}, { 578, 399, 0x4b718d}, { 183, 1162, 0xea6100}}, 95, 619, 1159, 200, "****全国45局放送") _multiColTap({{ 337, 242, 0x2db3fd}, { 414, 214, 0xffdf23}, { 407, 276, 0xff3c81}, { 353, 291, 0xa137f5}}, 95, 65, 86, 200, "欢迎来到Game Center") _multiColTap({{ 170, 599, 0xf9e41c}, { 179, 565, 0xf417fe}, { 375, 551, 0xffffff}, { 318, 1157, 0xea6200}}, 95, 380, 1156, 200, "3.11-初级中级上级-异常OK") _multiColTap({{ 687, 685, 0x2a6477}, { 433, 769, 0x764a10}, { 321, 909, 0xe85d00}, { 386, 903, 0xffffff}}, 95, 386, 903, 200, "3.12-报酬获得-OK") _multiColTap({{ 162, 215, 0xfff24c}, { 294, 245, 0xff0000}, { 556, 255, 0xc68736}, { 295, 1213, 0xe93f00}}, 95, 452, 1206, 200, "2026.4.9-OK") _multiColTap({{ 284, 1203, 0x282e54}, { 291, 1209, 0xfffe00}, { 295, 1213, 0xe93f00}, { 449, 1205, 0xffe100}, { 454, 1213, 0xee4a00}}, 95, 452, 1210, 200, "2026.4.9-OK") _multiColTap({{ 148, 708, 0xf5f5f5}, { 420, 735, 0x00fefe}, { 491, 742, 0x00fefe}, { 226, 994, 0xffffff}, { 554, 987, 0xed6600}}, 95, 513, 987, 200, "AGAIN扭蛋-否") end function _bhhq(_jcs, _flag, _table)--_flag = 1 只获取指定文件的存档数组 _flag = 2 获取除指定文件外的其他文件存档数组 local aa_a, lsbl_bhsz, lsbl_wjsz, lsfh_wjsz = 0, {}, {}, {}--lsfh_wjsz:临时返回_文件数组 if _flag == 1 then for aa = 1, #_table, 1 do if _isFileExist(ResPath.._table[aa]) == true then if #_getFileList(ResPath.._table[aa]) >= 1 then lsbl_wjsz[#lsbl_wjsz + 1] = _table[aa] else if selects["任务选项"] == "合并存档" then _delfile(ResPath.._table[aa], 200, "删除空文件夹-1"); end end end end lsfh_wjsz = lsbl_wjsz else local lsbl_lssz = _getFileList(ResPath) for aa = 1, #lsbl_lssz, 1 do if lsbl_lssz[aa] ~= "res" and lsbl_lssz[aa] ~= "tessdata" then if #_getFileList(ResPath..lsbl_lssz[aa]) >= 1 then lsbl_wjsz[#lsbl_wjsz + 1] = lsbl_lssz[aa] local aa_b = 0 for bb = 1, #_table, 1 do if lsbl_lssz[aa] == _table[bb] then aa_b = 1 break end end if aa_b == 0 then lsfh_wjsz[#lsfh_wjsz + 1] = lsbl_lssz[aa] _nlog("存档文件夹:"..lsbl_lssz[aa]) end else if selects["任务选项"] == "合并存档" then _delfile(ResPath..lsbl_lssz[aa], 200, "删除空文件夹-2"); end end end end end if #lsbl_wjsz >= 1 then local lsbl_cdsl = 0 for aa = 1, #lsbl_wjsz, 1 do lsbl_cdsl = lsbl_cdsl + #_getFileList(ResPath..lsbl_wjsz[aa]) end if lsbl_cdsl >= 1 then repeat if _isFileExist(LuaPath.."存档编号.txt") == false then local jls_cd = 0 for aa = 1, _jcs, 1 do for bb = 1, #lsbl_wjsz, 1 do if _isFileExist(ResPath..lsbl_wjsz[bb].."/"..aa) == true then jls_cd = jls_cd + 1 _writeFileString(LuaPath.."存档编号.txt", tostring(aa), "m", "保存存档编号-1") break else if _isFileExist(ResPath..lsbl_wjsz[bb].."/"..aa..".bin") == true then jls_cd = jls_cd + 1 _writeFileString(LuaPath.."存档编号.txt", tostring(aa), "m", "保存存档编号-2") break end end end if jls_cd == lsbl_cdsl then _nlog("采集存档编号完成!") break end end aa_a, lsbl_bhsz = 1, {} else local jls_pd = 0 local lsbl_list = _readFile(LuaPath.."存档编号.txt") --读文件返回表 for aa = 1, #lsbl_list, 1 do if string.atrim(lsbl_list[aa]) ~= "" then if aa >= 2 and tonumber(lsbl_list[aa]) <= tonumber(lsbl_list[aa - 1]) then jls_pd = 1 break else local lsbl_pdcd = 0 local lsbl_wjbh = string.atrim(lsbl_list[aa]) --去除文本中所有的空白字符 for bb = 1, #lsbl_wjsz, 1 do if _isFileExist(ResPath..lsbl_wjsz[bb].."/"..lsbl_wjbh) == true or _isFileExist(ResPath..lsbl_wjsz[bb].."/"..lsbl_wjbh..".bin") == true then lsbl_pdcd = 1 lsbl_bhsz[#lsbl_bhsz + 1] = lsbl_list[aa] --_nlog("统计存档编号完成!") break end end if lsbl_pdcd == 0 then jls_pd = 1 _nlog("统计存档异常!") break end end end end if jls_pd == 0 and lsbl_cdsl == #lsbl_bhsz then aa_a = 2 else if aa_a == 1 then _clearFiles(LuaPath, "存档编号", 2000, "清理存档编号-2") dialog("获取编号异常,请检查存档文件夹!", 0) _exit() else _clearFiles(LuaPath, "存档编号", 5000, "清理存档编号-3") end end end until aa_a == 2 toast("编号获取完成!",3) return lsbl_bhsz, lsfh_wjsz else _clearFiles(LuaPath, "存档编号", 2000, "清理存档编号-1") dialog("获取编号的文件夹无存档数据!", 0) _exit() end else return lsbl_bhsz, lsfh_wjsz end end