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"] .. "开启成功") else gg.toast(qmnb[2]["name"] .. "开启成功") end end end end function edit(orig, ret) _om = orig[1].memory or orig[1][1] _ov = orig[3].value or orig[3][1] _on = orig[2].name or orig[2][1] gg.clearResults() gg.setRanges(_om) gg.searchNumber(_ov, orig[3].type or orig[3][2]) sz = gg.getResultCount() if sz < 1 then gg.toast(_on .. "开启成功") else sl = gg.getResults(720) for i = 1, sz do ist = true for v = 4, #orig do if ist == true and sl[i].value == _ov then cd = {{}} cd[1].address = sl[i].address + (orig[v].offset or orig[v][2]) cd[1].flags = orig[v].type or orig[v][3] szpy = gg.getValues(cd) cdlv = orig[v].lv or orig[v][1] cdv = szpy[1].value if cdlv == cdv then pdjg = true ist = true else pdjg = false ist = false end end end if pdjg == true then szpy = sl[i].address for x = 1, #(ret) do xgpy = szpy + (ret[x].offset or ret[x][2]) xglx = ret[x].type or ret[x][3] xgsz = ret[x].value or ret[x][1] xgdj = ret[x].freeze or ret[x][4] xgsj = {{address = xgpy, flags = xglx, value = xgsz}} if xgdj == true then xgsj[1].freeze = xgdj gg.addListItems(xgsj) else gg.setValues(xgsj) end end xgjg = true end end if xgjg == true then gg.toast(_on .. "开启成功") else gg.toast(_on .. "开启成功") end end end 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) else gg.toast("", false) return false end else gg.toast("") return false end end qmnb = { {["memory"] = 32}, {["name"] = "头部100%"}, {["value"] = 4740038608910024704, ["type"] = 32}, {["lv"] = 4752423507886342144, ["offset"] = 4, ["type"] = 32}, {["lv"] = 1106509824, ["offset"] = 8, ["type"] = 32}, } qmxg = { {["value"] = 150, ["offset"] = 0, ["type"] = 16}, {["value"] = 150, ["offset"] = 4, ["type"] = 16}, {["value"] = 150, ["offset"] = 8, ["type"] = 16}, } xqmnb(qmnb) gg.toast("修伤") 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) Name = "范围修复" local Nc = 16392 local Lx = 4 local Sz1 = {{1115750516, 0}, {1036831949, -176}} local Sz2 = {{1114636288, -176}} gg.toast("开启成功") gg.searchNumber("-298284466", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(15) gg.editAll("0", gg.TYPE_DWORD) gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber("90000", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber("90000", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(100) gg.editAll("500000", gg.TYPE_FLOAT) gg.clearResults() gg.toast("正在撸管") gg.getResults(999) gg.editAll("371;365", gg.TYPE_FLOAT) gg.alert("别慌先撸一下") gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber("15;28;16;26;8;18", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) 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("-5.77775931e27", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(2) gg.editAll("-560", gg.TYPE_FLOAT) gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.refineNumber("-534315007", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.setRanges(gg.REGION_ANONYMOUS) gg.clearResults() Name = "测试范围" local Nc = 32 local Lx = 16 local Sz1 = {{71500, 0}, {0.10000000149, 36}} local Sz2 = {{400000, 0}} Name = "测试范围" local Nc = 32 local Lx = 16 local Sz1 = {{88000, 0}, {0.08600000292, 36}} local Sz2 = {{400000, 0}} Name = "测试范围" local Nc = 32 local Lx = 16 local Sz1 = {{87000, 0}, {0.09600000083, 36}} local Sz2 = {{400000, 0}} Name = "测试范围" local Nc = 32 local Lx = 16 local Sz1 = {{91500, 0}, {0.07500000298, 36}} local Sz2 = {{400000, 0}} Name = "半成品" local Nc = 32 local Lx = 16 local Sz1 = {{71500, 0}, {0.109, 36}} local Sz2 = {{400000, 0}}