function SearchWrite(Search, Write, Type) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = v.flags end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then gg.toast("搜索到"..#data.."条数据") local t = {} local base = Search[1][2] for i=1, #data do for k, w in ipairs(Write) do offset = w[2] - base t[#t+1] = {} t[#t].address = data[i] + offset t[#t].flags = Type t[#t].value = w[1] if (w[3] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = true gg.addListItems(item) end end end gg.setValues(t) gg.toast("已修改"..#t.."条数据") gg.addListItems(t) else gg.toast("not found", false) return false end else gg.toast("Not Found") return false end end function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] xgdj = qmxg[x]["freeze"] if xgdj == nil or xgdj == "" then gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) else gg.addListItems({[1] = {address = xgpy, flags = xglx, freeze = xgdj, value = xgsz}}) end xgsl = xgsl + 1 xgjg = true end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end end end end function PS() end function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要修改的值)') local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function Main() menu = gg.multiChoice({ "雨泽打飞天加速范围自用", "退出", }, nil, "(自用交流群977835307)") if menu == nil then else if menu[1] == true then A1() end if menu[2] == true then kk() end end XGCK = -1 end function A1() gg.setRanges(gg.REGION_C_DATA) gg.searchNumber("0.10000000149;64.50088500977", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber("0.10000000149", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(30) gg.editAll("89", gg.TYPE_FLOAT) gg.toast("开启成功") gg.setRanges(gg.REGION_CODE_APP) gg.searchNumber("-3.77830899e28;-3.74440972e28;-3.71834013e28;-1.7334334e28", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) gg.refineNumber("-3.77830899e28", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) revert = gg.getResults(999999, nil, nil, nil, nil, nil, nil, nil, nil) gg.clearResults() gg.setRanges(32)--头 local dataType = 16 local search = {{9.20161819458,0},{25.0,28},{30.5,32},} local modify = {{180.0,24},{180.0,28},{180.0,32},} SearchWrite(search,modify,dataType) gg.clearResults() gg.setRanges(32)--头 local dataType = 16 local search = {{-88.73961639404,0},{18,4},{90.48510742188,4},} local modify = {{180.0,4},} SearchWrite(search,modify,dataType) gg.clearResults() gg.setRanges(32)--2 local dataType = 16 local search = {{0.00009203507,0},{30.5,24},} local modify = {{240.0,20},{240.0,24},} SearchWrite(search,modify,dataType) gg.toast("飞天全头反胃") gg.setRanges(32) Name='范围' local tb1={{9.201618194580078,16,0},{23.0,16,24},{25.0,16,28},{30.5,16,32},} local tb2={{133,16,24},{132,16,28},{132,16,32},} SearchWrite(tb1,tb2,dataType) gg.clearResults() qmnb = { {["memory"] = 32}, {["name"] = " "}, {["value"] = 4771563806291656704, ["type"] = 32}, {["lv"] = 1110966272, ["offset"] = 4, ["type"] = 32}, {["lv"] = 4692750811720056832, ["offset"] = -4, ["type"] = 32},} qmxg = { {["value"] = 9999, ["offset"] = 0, ["type"] = 16},} xqmnb(qmnb) end function kk() os.exit()end while true do if gg.isVisible(true) then XGCK = 1 gg.setVisible(false)end gg.clearResults() if XGCK == 1 then Main()end end