do if type(getrlyunyz) ~= 'function' then gg.alert('南坤入侵') os.exit() return end local info = { example_version = '1.0.3', name = '南坤', appid = '84811', appkey = '1hHoHbUH99Ih1b8o', rc4key = 'Gy6ga5LlMg9lVnlL', version = '2.0', mi_type = '3' } local rlyunyz = getrlyunyz(info) local ret = rlyunyz.start() if not ret or not isTable(ret) or ret.sign ~= 'b3d094ae6273ef1663c68d6f5aa5c829' then os.exit() return end end -- 把以上代码复制到你脚本最前面即可 gg.alert('RLGG') function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local function setvalue ( address , flags , value , freeze ) local t = { } t [ 1 ] = { } t [ 1 ].address = address t [ 1 ].flags = flags t [ 1 ].value = value t [ 1 ].freeze = freeze gg.setValues ( t ) gg.addListItems ( t ) end function S_Pointer ( t_So , t_Offset , _bit ) local function getRanges ( ) local ranges = { } local t = gg.getRangesList ( '^/data/*.so*$' ) for i , v in pairs ( t ) do if v.type : sub ( 2 , 2 ) == 'w' then table.insert ( ranges , v ) end end return ranges end local function Get_Address ( N_So , Offset , ti_bit ) local ti = gg.getTargetInfo ( ) local S_list = getRanges ( ) local t = { } local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs ( S_list ) do local _N = S_list [ i ].internalName : gsub ( '^.*/' , '' ) if N_So [ 1 ] == _N and N_So [ 2 ] == S_list [ i ].state then _S = S_list [ i ] break end end if _S then t [ # t + 1 ] = { } t [ # t ].address = _S.start + Offset [ 1 ] t [ # t ].flags = _t if # Offset ~= 1 then for i = 2 , # Offset do local S = gg.getValues ( t ) t = { } for _ in pairs ( S ) do if not ti.x64 then S [ _ ].value = S [ _ ].value & 0xFFFFFFFF end t [ # t + 1 ] = { } t [ # t ].address = S [ _ ].value + Offset [ i ] t [ # t ].flags = _t end end end _S = t [ # t ].address end return _S end local _A = string.format ( '0x%X' , Get_Address ( t_So , t_Offset , _bit ) ) return _A end function Unfreeze ( ) -- 获取保存列表 local t = gg.getListItems ( ) for k , v in pairs ( t ) do t [ k ] [ "freeze" ] = false end return gg.addListItems ( t ) end local function readD(a) return gg.getValues({{ address=a, flags=gg.TYPE_DWORD }})[1].value end local function readF(a) return gg.getValues({{ address=a, flags=gg.TYPE_FLOAT }})[1].value end local function setvalue(address,flags,value,freeze) local t={} t[1]={} t[1].address=address t[1].flags=flags t[1].value=value t[1].freeze=freeze gg.setValues(t) gg.addListItems(t) end --以上为读取d,f类型的值和修改某地址的值的函数 local function RUI(address) return gg.getValues({{address = address, flags = gg.TYPE_QWORD}})[1].value end --这个为获取指针的函数 function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A 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--静态 local Ranges=gg.getRangesList('/') local function Read(module,type) for k,v in pairs(Ranges) do if v['internalName']:match('[^/]*$')==module and v['type']==type then return v['start'] end end end local Table={} local function Modify(address,value,flags) Table[#Table+1]={address=address,value=value,flags=flags} end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end --遍历写法 local function readD ( a ) return gg.getValues ( { { address = a , flags = 4 } } ) [ 1 ].value end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function addListltems(address,flags,value,freeze) t={} t[1]={} t[1].address=address t[1].flags=flags t[1].value=value t[1].freeze=freeze gg.addListItems(t) end function xfnb(add,lx) return gg.getValues({ { address=add,flags = lx } })[1].value end local function RUI(address) return gg.getValues({{address = address, flags = gg.TYPE_QWORD}})[1].value end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function addListltems(address,flags,value,freeze) t={} t[1]={} t[1].address=address t[1].flags=flags t[1].value=value t[1].freeze=freeze gg.addListItems(t) end local function RUI(address) return gg.getValues({{address = address, flags = gg.TYPE_QWORD}})[1].value end function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true] = 32, [false] = 4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address = addr, flags = va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end function gg.edits(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2] + 1] = value else Table1[1][#Table1[1] + 1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改" .. #Table .. "个值") end function Format(tab, format, value, type, Function) if format == "查看" then tab[1]["flags"] = type return gg.getValues(tab) elseif format == "修改" then tab[1]["flags"] = type tab[1]["value"] = value return gg.setValues(tab) elseif format == "冻结" then tab[1]["flags"] = type tab[1]["freeze"] = true tab[1]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end end function Unfreeze() --获取保存列表 local t = gg.getListItems() for k, v in pairs(t) do t[k]["freeze"] = false end return gg.addListItems(t) end function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for indIT=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end function XGBase(Address,AFV) local address=0 for index,offset in ipairs(Address)do if index==1 then address=offset else address=gg.getValues({{address=address+offset,flags=4}})[1].value end end local Value,Freeze={},{} for index,value in ipairs(AFV)do local VALUE={address=address+value[3],flags=value[2],value=value[1],freeze=true} if value[4]then Freeze[#Freeze+1]=VALUE else Value[#Value+1]=VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end function Format(tab, format, value, type, Function) if format == "查看" then tab[1]["flags"] = type return print(gg.getValues(tab)) elseif format == "修改" then tab[1]["flags"] = type tab[1]["value"] = value return gg.setValues(tab) elseif format == "冻结" then tab[1]["flags"] = type tab[1]["freeze"] = true tab[1]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end end function LSQ_Chain(so, offset, format, value, type, Function)--模块设置, 偏移量, 功能参数, 修改值, 类型, 功能 频道:@dzyyds A91 getRanges = getRanges or (function() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v["type"]:sub(2, 2) == 'w' then--判断so是否可读可写 ranges[#ranges+1] = v end end return ranges end) local rest, ranges, sostart, valtype = {}, getRanges(), nil , gg.TYPE_DWORD if gg.getTargetInfo()["x64"] then--判断应用程序是否为64位 valtype = gg.TYPE_QWORD end for i in pairs(ranges) do local _name = ranges[i]["internalName"]:gsub('^.*/', '') if so[1] == _name and so[2] == ranges[i]["state"] then sostart = ranges[i]["start"] break end end if sostart then if offset[1] then for i = 1, #offset do rest = {{flags = valtype,address = sostart + offset[i]}} rest = gg.getValues(rest) if i == #offset then break end if valtype == gg.TYPE_DWORD then sostart = rest[1].value & 0xFFFFFFFF--对值进行补位操作 else sostart = rest[1].value end end end if #rest == 1 then end return Format(rest, format, value, type, Function) end gg.toast("功能:" .. Function .. "开启失败") print("功能开启失败原因: 未找到基址头") return os.exit() end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) 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"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 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) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end end end end function setvalue(address, flags, value) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = flags tt[1].value = value gg.setValues(tt) end function read(address, flags) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = flags filzer = gg.getValues(tt)[1].value return filzer end function getbase(address) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = 32 filzer = gg.getValues(tt)[1].value return filzer end local json =json--调用 local g = {} g.file = gg.getFile() g.sel = nil gqlb={"请先搜索歌曲",} idb={"1010"} SN,gc=1,nil g.config = gg.getFile():gsub("%lua$", "").."cfg" function bei() g.data = loadfile("音乐配置"..g.config) if g.data ~= nil then g.sel = g.data() g.data = nil end if g.sel == nil then g.sel = {"","10"} end end bei() local Ranges=gg.getRangesList('/') local function Read(module,type) for k,v in pairs(Ranges) do if v['internalName']:match('[^/]*$')==module and v['type']==type then return v['start'] end end end local Table={} local function Modify(address,value,flags) Table[#Table+1]={address=address,value=value,flags=flags} end function start(name,sl) fw=gg.makeRequest("http://music.163.com/api/search/get?s="..name.."&type=1&offset=0&total=true&limit="..sl) return fw end function play(id,name) gg.toast("正在播放音乐:"..name,true) gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3") end function Play(gqlb,idb) SN = gg.choice(gqlb,nil,ts) if SN == nil then XGCK =-1 else sn=gg.choice({"播放歌曲","播放并下载"},nil,"歌曲:"..gqlb[SN]) if sn == nil then end if sn == 1 then play(idb[SN],gqlb[SN]) end if sn == 2 then local XEY=gg.makeRequest("http://music.163.com/song/media/outer/url?id="..idb[SN]..".mp3").content local XEY1=gg.getFile():gsub("[^/]+$","")..gqlb[SN]..".mp3" io.open(XEY1,"w"):write(XEY) gg.alert("提示:\n\n音乐已成功下载位置:\n\n"..XEY1) end XGCK=-1 end end function zjson(jsonr) local str = jsonr local pattern = "\"[%w]+\":" string.gsub(str, pattern, function(v) if string.find(str, v) then str = string.gsub(str, v, string.gsub(v, "\"", "")) end end) str = string.gsub(str, ":", "=") str = string.gsub(str, "%[", "{") str = string.gsub(str, "%]", "}") local data = "-- WSG PRO 1.0.9(109)\nreturn " .. str local res = load(data)() return res end function json(con) res=zjson(con) zd=res.result.songCount pd=go3-zd if pd <= 0 then else go3=zd end ts="《"..go1.."》找到"..zd.."首歌曲,当前显示"..go3.."首" gqlb={} idb={} for i=1,go3 do gqlb[i]=res.result.songs[i].name idb[i]=res.result.songs[i].id end end ---+音乐配置 function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x2C4D6BCE) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A 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 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 --仿XS写法配置 function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end -- 读取内存地址的函数 function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true]=32, [false]=4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address=addr, flags=va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end -- 修改内存地址的函数 function gg.edits(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr+v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2]+1] = value else Table1[1][#Table1[1]+1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改"..#Table.."个值") end local Ranges=gg.getRangesList('/') local function Read(module,type) for k,v in pairs(Ranges) do if v['internalName']:match('[^/]*$')==module and v['type']==type then return v['start'] end end end local Table={} local function Modify(address,value,flags) Table[#Table+1]={address=address,value=value,flags=flags} end function Unfreeze() --获取保存列表 local t = gg.getListItems() for k, v in pairs(t) do t[k]["freeze"] = false end return gg.addListItems(t) end function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end function XGBase(Address,AFV) local address=0 for index,offset in ipairs(Address)do if index==1 then address=offset else address=gg.getValues({{address=address+offset,flags=4}})[1].value end end local Value,Freeze={},{} for index,value in ipairs(AFV)do local VALUE={address=address+value[3],flags=value[2],value=value[1],freeze=true} if value[4]then Freeze[#Freeze+1]=VALUE else Value[#Value+1]=VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end function Format(tab, format, value, type, Function) if format == "查看" then tab[1]["flags"] = type return print(gg.getValues(tab)) elseif format == "修改" then tab[1]["flags"] = type tab[1]["value"] = value return gg.setValues(tab) elseif format == "冻结" then tab[1]["flags"] = type tab[1]["freeze"] = true tab[1]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end end function LSQ_Chain(so, offset, format, value, type, Function)--模块设置, 偏移量, 功能参数, 修改值, 类型, 功能 getRanges = getRanges or (function() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v["type"]:sub(2, 2) == 'w' then--判断so是否可读可写 ranges[#ranges+1] = v end end return ranges end) local rest, ranges, sostart, valtype = {}, getRanges(), nil , gg.TYPE_DWORD if gg.getTargetInfo()["x64"] then--判断应用程序是否为64位 valtype = gg.TYPE_QWORD end for i in pairs(ranges) do local _name = ranges[i]["internalName"]:gsub('^.*/', '') if so[1] == _name and so[2] == ranges[i]["state"] then sostart = ranges[i]["start"] break end end if sostart then if offset[1] then for i = 1, #offset do rest = {{flags = valtype,address = sostart + offset[i]}} rest = gg.getValues(rest) if i == #offset then break end if valtype == gg.TYPE_DWORD then sostart = rest[1].value & 0xFFFFFFFF--对值进行补位操作 else sostart = rest[1].value end end end if #rest == 1 then end return Format(rest, format, value, type, Function) end gg.toast("功能:" .. Function .. "开启失败") print("功能开启失败原因: 未找到基址头") return os.exit() end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function getadd ( ) local t = { } -- 创建一个获取x坐标地址的表 so = gg.getRangesList ( 'libUE4.so' ) [ 1 ].start Uworld = RUI ( RUI ( RUI ( so + 0xCE93A70 ) + 0x30 ) + 0x440 ) -- 0x6C0A70 , 0xc0 , 0x9d0 Uleve = RUI ( Uworld + 0x20 ) Arrayaddr = RUI ( Uleve + 0xA0 ) Count = readD ( Uleve + 0xA8 ) -- 数组数量 Oneself = RUI ( RUI ( RUI ( so + 0xCE93A70 ) + 0x30 ) + 0x440 ) -- self -- gg.copyText(string.format("%X", Oneself)) MyTeam = readD ( Oneself + 0x938 ) -- 自身队伍 t [ # t + 1 ] = { } t [ # t ].x = RUI ( Oneself + 0x1b0 ) + 0x1c0 -- 表内第一个存放自身坐标地址 t [ # t ].y = RUI ( Oneself + 0x1b0 ) + 0x1c4 t [ # t ].z = RUI ( Oneself + 0x1b0 ) + 0x1c8 if Count < 0 or Count > 9999 then gg.toast ( "获取数组数量时出错" ) else for i = 0 , Count do Object = RUI ( Arrayaddr + i * 0x8 ) if ( readF ( Object + 0x2860 ) == 479.5 ) and ( readD ( Object + 0x938 ) ~= MyTeam ) then -- 判断对象是否是人物,且不是队友 t [ # t + 1 ] = { } t [ # t ].x = RUI ( Object + 0x498 ) + 0x1c0 t [ # t ].y = RUI ( Object + 0x498 ) + 0x1c4 t [ # t ].z = RUI ( Object + 0x498 ) + 0x1c8 t [ # t ].x1 = RUI ( Object + 0x1b0 ) + 0x1c0 t [ # t ].y1 = RUI ( Object + 0x1b0 ) + 0x1c4 t [ # t ].z1 = RUI ( Object + 0x1b0 ) + 0x1c8 t [ # t ].hp = Object + 0xdc0 end end end if # t < 2 then gg.toast ( "附近没有人" ) end return t end --龍神 function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function XunK_Chain(so, offset, format, value, type, Function)--模块设置, 偏移量, 功能参数, 8.47963525e-21, 类型, 功能 getRanges = getRanges or (function() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v["type"]:sub(2, 2) == 'w' then--判断so是否可读可写 ranges[#ranges+1] = v end end return ranges end) local rest, ranges, sostart, valtype = {}, getRanges(), nil , gg.TYPE_DWORD if gg.getTargetInfo()["x64"] then--判断应用程序是否为64位 valtype = gg.TYPE_QWORD end for i in pairs(ranges) do local _name = ranges[i]["internalName"]:gsub('^.*/', '') if so[1] == _name and so[2] == ranges[i]["state"] then sostart = ranges[i]["start"] break end end if sostart then if offset[1] then for i = 1, #offset do rest = {{flags = valtype,address = sostart + offset[i]}} rest = gg.getValues(rest) if i == #offset then break end if valtype == gg.TYPE_DWORD then sostart = rest[1].value & 0xFFFFFFFF--对值进行补位操作 else sostart = rest[1].value end end end if #rest == 1 then end return Format(rest, format, value, type, Function) end gg.toast("功能:" .. Function .. "开启失败") gg.alert("选择游戏进程 ") return os.exit() 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--静态 local Ranges=gg.getRangesList('/') local function Read(module,type) for k,v in pairs(Ranges) do if v['internalName']:match('[^/]*$')==module and v['type']==type then return v['start'] end end end local Table={} local function Modify(address,value,flags) Table[#Table+1]={address=address,value=value,flags=flags} end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end --遍历写法 local function readD ( a ) return gg.getValues ( { { address = a , flags = 4 } } ) [ 1 ].value end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function addListltems(address,flags,value,freeze) t={} t[1]={} t[1].address=address t[1].flags=flags t[1].value=value t[1].freeze=freeze gg.addListItems(t) end function xfnb(add,lx) return gg.getValues({ { address=add,flags = lx } })[1].value end local function X(address) return gg.getValues({{address = address, flags = gg.TYPE_QWORD}})[1].value end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function addListltems(address,flags,value,freeze) t={} t[1]={} t[1].address=address t[1].flags=flags t[1].value=value t[1].freeze=freeze gg.addListItems(t) end local function X(address) return gg.getValues({{address = address, flags = gg.TYPE_QWORD}})[1].value end function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true] = 32, [false] = 4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address = addr, flags = va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end function gg.edits(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2] + 1] = value else Table1[1][#Table1[1] + 1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改" .. #Table .. "个值") end function Format(tab, format, value, type, Function) if format == "查看" then tab[1]["flags"] = type return gg.getValues(tab) elseif format == "修改" then tab[1]["flags"] = type tab[1]["value"] = value return gg.setValues(tab) elseif format == "冻结" then tab[1]["flags"] = type tab[1]["freeze"] = true tab[1]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end end function Unfreeze() --获取保存列表 local t = gg.getListItems() for k, v in pairs(t) do t[k]["freeze"] = false end return gg.addListItems(t) end function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end function XGBase(Address,AFV) local address=0 for index,offset in ipairs(Address)do if index==1 then address=offset else address=gg.getValues({{address=address+offset,flags=4}})[1].value end end local Value,Freeze={},{} for index,value in ipairs(AFV)do local VALUE={address=address+value[3],flags=value[2],value=value[1],freeze=true} if value[4]then Freeze[#Freeze+1]=VALUE else Value[#Value+1]=VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end function Format(tab, format, value, type, Function) if format == "查看" then tab[1]["flags"] = type return print(gg.getValues(tab)) elseif format == "修改" then tab[1]["flags"] = type tab[1]["value"] = value return gg.setValues(tab) elseif format == "冻结" then tab[1]["flags"] = type tab[1]["freeze"] = true tab[1]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end end function XunK_Chain(so, offset, format, value, type, Function)--模块设置, 偏移量, 功能参数, 修改值, 类型, 功能 频道:@dzyyds A91 getRanges = getRanges or (function() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v["type"]:sub(2, 2) == 'w' then--判断so是否可读可写 ranges[#ranges+1] = v end end return ranges end) local rest, ranges, sostart, valtype = {}, getRanges(), nil , gg.TYPE_DWORD if gg.getTargetInfo()["x64"] then--判断应用程序是否为64位 valtype = gg.TYPE_QWORD end for i in pairs(ranges) do local _name = ranges[i]["internalName"]:gsub('^.*/', '') if so[1] == _name and so[2] == ranges[i]["state"] then sostart = ranges[i]["start"] break end end if sostart then if offset[1] then for i = 1, #offset do rest = {{flags = valtype,address = sostart + offset[i]}} rest = gg.getValues(rest) if i == #offset then break end if valtype == gg.TYPE_DWORD then sostart = rest[1].value & 0xFFFFFFFF--对值进行补位操作 else sostart = rest[1].value end end end if #rest == 1 then end return Format(rest, format, value, type, Function) end gg.toast("功能:" .. Function .. "开启失败") print("功能开启失败原因: 未找到基址头") return os.exit() end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) 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"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 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) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end end end end function setvalue(address, flags, value) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = flags tt[1].value = value gg.setValues(tt) end function read(address, flags) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = flags filzer = gg.getValues(tt)[1].value return filzer end function getbase(address) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = 32 filzer = gg.getValues(tt)[1].value return filzer end local json =json--调用 local g = {} g.file = gg.getFile() g.sel = nil gqlb={"请先搜索歌曲",} idb={"1010"} SN,gc=1,nil g.config = gg.getFile():gsub("%lua$", "").."cfg" function bei() g.data = loadfile("音乐配置"..g.config) if g.data ~= nil then g.sel = g.data() g.data = nil end if g.sel == nil then g.sel = {"","10"} end end bei() local Ranges=gg.getRangesList('/') local function Read(module,type) for k,v in pairs(Ranges) do if v['internalName']:match('[^/]*$')==module and v['type']==type then return v['start'] end end end local Table={} local function Modify(address,value,flags) Table[#Table+1]={address=address,value=value,flags=flags} end function start(name,sl) fw=gg.makeRequest("http://music.163.com/api/search/get?s="..name.."&type=1&offset=0&total=true&limit="..sl) return fw end function play(id,name) gg.toast("正在播放音乐:"..name,true) gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3") end function Play(gqlb,idb) SN = gg.choice(gqlb,nil,ts) if SN == nil then XGCK =-1 else sn=gg.choice({"播放歌曲","播放并下载"},nil,"歌曲:"..gqlb[SN]) if sn == nil then end if sn == 1 then play(idb[SN],gqlb[SN]) end if sn == 2 then local XEY=gg.makeRequest("http://music.163.com/song/media/outer/url?id="..idb[SN]..".mp3").content local XEY1=gg.getFile():gsub("[^/]+$","")..gqlb[SN]..".mp3" io.open(XEY1,"w"):write(XEY) gg.alert("提示:\n\n音乐已成功下载位置:\n\n"..XEY1) end XGCK=-1 end end function zjson(jsonr) local str = jsonr local pattern = "\"[%w]+\":" string.gsub(str, pattern, function(v) if string.find(str, v) then str = string.gsub(str, v, string.gsub(v, "\"", "")) end end) str = string.gsub(str, ":", "=") str = string.gsub(str, "%[", "{") str = string.gsub(str, "%]", "}") local data = "-- WSG PRO 1.0.9(109)\nreturn " .. str local res = load(data)() return res end function json(con) res=zjson(con) zd=res.result.songCount pd=go3-zd if pd <= 0 then else go3=zd end ts="《"..go1.."》找到"..zd.."首歌曲,当前显示"..go3.."首" gqlb={} idb={} for i=1,go3 do gqlb[i]=res.result.songs[i].name idb[i]=res.result.songs[i].id end end ---+音乐配置 function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x2C4D6BCE) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A 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 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 --仿XS写法配置 function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end -- 读取内存地址的函数 function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true]=32, [false]=4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address=addr, flags=va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end -- 修改内存地址的函数 function gg.edits(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr+v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2]+1] = value else Table1[1][#Table1[1]+1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改"..#Table.."个值") end local Ranges=gg.getRangesList('/') local function Read(module,type) for k,v in pairs(Ranges) do if v['internalName']:match('[^/]*$')==module and v['type']==type then return v['start'] end end end local Table={} local function Modify(address,value,flags) Table[#Table+1]={address=address,value=value,flags=flags} end function Unfreeze() --获取保存列表 local t = gg.getListItems() for k, v in pairs(t) do t[k]["freeze"] = false end return gg.addListItems(t) end function xqmnb(Search,Modification) gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount()==0 then gg.toast(Search[2].name..'开启失败') return end local Result=gg.getResults(gg.getResultCount()) local sum for index=4,#Search do sum=0 for i=1,#Result do if gg.getValues({{address=Result[i].address+Search[index].offset,flags=Search[index].type}})[1].value~=Search[index].lv then Result[i].Usable=true sum=sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes={},{},0 sum=0 for index,value in ipairs(Modification)do for index=1,#Result do if not Result[index].Usable then local Value={address=Result[index].address+value.offset,flags=value.type,value=value.value,freeze=true} if value.freeze then Freeze[#Freeze+1]=Value Freezes=Freezes+1 else Data[#Data+1]=Value end sum=sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes==0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end function XGBase(Address,AFV) local address=0 for index,offset in ipairs(Address)do if index==1 then address=offset else address=gg.getValues({{address=address+offset,flags=4}})[1].value end end local Value,Freeze={},{} for index,value in ipairs(AFV)do local VALUE={address=address+value[3],flags=value[2],value=value[1],freeze=true} if value[4]then Freeze[#Freeze+1]=VALUE else Value[#Value+1]=VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end function Format(tab, format, value, type, Function) if format == "查看" then tab[1]["flags"] = type return print(gg.getValues(tab)) elseif format == "修改" then tab[1]["flags"] = type tab[1]["value"] = value return gg.setValues(tab) elseif format == "冻结" then tab[1]["flags"] = type tab[1]["freeze"] = true tab[1]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end end function XunK_Chain(so, offset, format, value, type, Function)--模块设置, 偏移量, 功能参数, 修改值, 类型, 功能 getRanges = getRanges or (function() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v["type"]:sub(2, 2) == 'w' then--判断so是否可读可写 ranges[#ranges+1] = v end end return ranges end) local rest, ranges, sostart, valtype = {}, getRanges(), nil , gg.TYPE_DWORD if gg.getTargetInfo()["x64"] then--判断应用程序是否为64位 valtype = gg.TYPE_QWORD end for i in pairs(ranges) do local _name = ranges[i]["internalName"]:gsub('^.*/', '') if so[1] == _name and so[2] == ranges[i]["state"] then sostart = ranges[i]["start"] break end end if sostart then if offset[1] then for i = 1, #offset do rest = {{flags = valtype,address = sostart + offset[i]}} rest = gg.getValues(rest) if i == #offset then break end if valtype == gg.TYPE_DWORD then sostart = rest[1].value & 0xFFFFFFFF--对值进行补位操作 else sostart = rest[1].value end end end if #rest == 1 then end return Format(rest, format, value, type, Function) end gg.toast("功能:" .. Function .. "开启失败") print("功能开启失败原因: 未找到基址头") return os.exit() end function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end--JGNB4 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 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 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("未搜索到数据,开启失败", false) return false end else gg.toast("Not Found") return false end end function HaoGe(Nc,Type,Search,Write) gg.clearResults() gg.setRanges(Nc) 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 tPUBGMH={} local offset=Search[k][2]-base local num=Search[k][1] for i,v in ipairs(result)do tPUBGMH[#tPUBGMH+1]={} tPUBGMH[#tPUBGMH].address=v.address+offset tPUBGMH[#tPUBGMH].flags=v.flags end tPUBGMH=gg.getValues(tPUBGMH) for i,v in ipairs(tPUBGMH)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 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.sleep(400) else return false end else return false end end -- 应用在101行 local task local function getSyncThreadCallbak(func) return function() if task then gg.toast('正在运行其它任务,再稍后!') return end luajava.startThread(function() task=true pcall(func) task=nil end) end end local floatingWindowManager = require('floatingWindowManager') floatingWindowManager:init() floatingWindowManager:newWindow(('训旧国体'):format(floatingWindowManager.version), { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_margin = '10dp', layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', { Button, background = { GradientDrawable, cornerRadius='10dp', color='#00BFFF', cornerRadius = 15 }, layout_width = 'match_parent', layout_margin = '5dp', text = '选择进程', textSize = '16sp', onClick = function(View) string.toMusic('请选择游戏进程') gg.setProcessX() end }, { Button, background = { GradientDrawable, cornerRadius='10dp', color='#00BFFF', cornerRadius = 15 }, layout_width = 'match_parent', layout_margin = '5dp', text = '范围功能', textSize = '16sp', onClick = function() floatingWindowManager:start('范围功能') end }, } }) end, onDestroy = function() end }) floatingWindowManager:newWindow('范围功能', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', { Switch, layout_width = 'match_parent', text = '大厅一套', onCheckedChange = function(CompoundButton, state) if state then GJ=gg.prompt({'广角:200--260'},{[1]='240'},{[1]='number'})---自改 if GJ == nil or GJ[1] == '' or GJ[1] == '0' then gg.toast("取消") else so=gg.getRangesList('libUE4.so')[1].start py=0x66F4F48 setvalue(so+py,16,GJ[1]) end py=0x2A4418C setvalue(so+py,16,0) py=0x664CBBC setvalue(so+py,16,0) py=0x2DD2964 setvalue(so+py,16,0) py=0x679654C setvalue(so+py,16,0) py=0x2A3EE1C setvalue(so+py,16,0) py=0x34917FC setvalue(so+py,16,0) py=0x2A1345C setvalue(so+py,16,0) py=0x34917F8 setvalue(so+py,16,0) else end end }, { Switch, layout_width = 'match_parent', text = '小柠檬范围', onCheckedChange = function(CompoundButton, state) if state then 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"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 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) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end 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("🕹:搜索0条数据.修改失败", false) return false end else gg.toast("🕹:搜索0条数据.修改失败") return false end end MIAONEI=gg.prompt({'头部范围180~230'},{[1]='200'},{[1]='number'}) if MIAONEI == nil or MIAONEI[1] == '' or MIAONEI[1] == '0' then gg.toast("取消") else qmnb = { {["memory"] = 32}, {["name"] = "自改范围"}, {["value"] = 23.0, ["type"] = 16}, {["lv"] = 25.0, ["offset"] = 4, ["type"] = 16}, {["lv"] = 30.5, ["offset"] = 8, ["type"] = 16}, {["lv"] = 0.0, ["offset"] = 12, ["type"] = 16}, {["lv"] = 0.0, ["offset"] = 16, ["type"] = 16}, } qmxg = { {["value"] = MIAONEI[1], ["offset"] = 8, ["type"] = 16}, } xqmnb(qmnb) end gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber(';测试版本不代表最终品质',gg.TYPE_WORD,false,gg.SIGN_EQUAL,0, -1) gg.getResults(520) gg.editAll(';南坤国体内置',gg.TYPE_WORD) else end end }, { Switch, layout_width = 'match_parent', text = '核客范围', onCheckedChange = function(CompoundButton, state) if state then 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"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 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) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end 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("🕹:搜索0条数据.修改失败", false) return false end else gg.toast("🕹:搜索0条数据.修改失败") return false end end MIAONEI=gg.prompt({'头部范围180~230'},{[1]='200'},{[1]='number'}) if MIAONEI == nil or MIAONEI[1] == '' or MIAONEI[1] == '0' then gg.toast("取消") else qmnb = { {["memory"] = 32}, {["name"] = "自改范围"}, {["value"] = 23.0, ["type"] = 16}, {["lv"] = 25.0, ["offset"] = 4, ["type"] = 16}, {["lv"] = 30.5, ["offset"] = 8, ["type"] = 16}, {["lv"] = 0.0, ["offset"] = 12, ["type"] = 16}, {["lv"] = 0.0, ["offset"] = 16, ["type"] = 16}, } qmxg = { {["value"] = MIAONEI[1], ["offset"] = 4, ["type"] = 16}, {["value"] = MIAONEI[1], ["offset"] = 8, ["type"] = 16}, } xqmnb(qmnb) end gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber(';测试版本不代表最终品质',gg.TYPE_WORD,false,gg.SIGN_EQUAL,0, -1) gg.getResults(520) gg.editAll(';南坤国体内置',gg.TYPE_WORD) else end end }, { Switch, layout_width = 'match_parent', text = '基质范围', onCheckedChange = function(CompoundButton, state) if state then xm = gg.prompt({"自改头部","自改身体","自改脚部"},{"180","80","40"},{"text","text","text"},{"true","true","true"}) if xm then so=gg.getRangesList('')[1].start py=0x7668B5A8 setvalue(so+py,16,xm[1]) py=0x7668B5AC setvalue(so+py,16,xm[2]) py=0x7668B5B0 setvalue(so+py,16,xm[3]) end else end end }, { Switch, layout_width = 'match_parent', text = '头部范围', onCheckedChange = function(CompoundButton, state) if state then gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber(';测试版本不代表最终品质',gg.TYPE_WORD,false,gg.SIGN_EQUAL,0, -1) gg.getResults(520) gg.editAll(';训旧国体',gg.TYPE_WORD) 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 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 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("未搜索到数据,开启失败", false) return false end else gg.toast("Not Found") return false end end function HaoGe(Nc,Type,Search,Write) gg.clearResults() gg.setRanges(Nc) 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 tPUBGMH={} local offset=Search[k][2]-base local num=Search[k][1] for i,v in ipairs(result)do tPUBGMH[#tPUBGMH+1]={} tPUBGMH[#tPUBGMH].address=v.address+offset tPUBGMH[#tPUBGMH].flags=v.flags end tPUBGMH=gg.getValues(tPUBGMH) for i,v in ipairs(tPUBGMH)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 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.sleep(400) else return false end else return false end end Name = "范围<" local Nc = 16384 local Lx = 16 local Sz1 = {{-1.42781105e28, 0}} local Sz2 = {{0, 0}} HaoGe(Nc, Lx, Sz1, Sz2) qmnb = { {["memory"] = 32}, {["name"] = "南坤"}, {["value"] = 4740038608910024704, ["type"] = 32}, {["lv"] = 4752423507886342144, ["offset"] = 4, ["type"] = 32}, {["lv"] = 1106509824, ["offset"] = 8, ["type"] = 32}, } qmxg = { {["value"] = 700, ["offset"] = 4, ["type"] = 16}, {["value"] = 700, ["offset"] = 8, ["type"] = 16}, } xqmnb(qmnb) qmnb = { {["memory"] = 32}, {["name"] = "南坤"}, {["value"] = 4719772412750681353, ["type"] = 32}, {["lv"] = 4742290408720039936, ["offset"] = 4, ["type"] = 32}, } qmxg = { {["value"] = -460, ["offset"] = 8, ["type"] = 16}, } xqmnb(qmnb) qmnb = { {["memory"] = 32}, {["name"] = "修伤"}, {["value"] = -4417614866316724128, ["type"] = 32}, {["lv"] = 4724276012378061487, ["offset"] = 4, ["type"] = 32}, } qmxg = { {["value"] = -560, ["offset"] = 12, ["type"] = 16}, } xqmnb(qmnb) qmnb = { {["memory"] = 32}, {["name"] = "大范围"}, {["value"] = -4416487068034336677, ["type"] = 32}, {["lv"] = 4724276012378324073, ["offset"] = 4, ["type"] = 32}, } qmxg = { {["value"] = -660, ["offset"] = 8, ["type"] = 16}, {["value"] = -660, ["offset"] = 12, ["type"] = 16}, } xqmnb(qmnb) qmnb = { {["memory"] = 32}, {["name"] = "特效"}, {["value"] = 4771563806291656704, ["type"] = 32}, {["lv"] = 1110966272, ["offset"] = 4, ["type"] = 32}, {["lv"] = 4692750811720056832, ["offset"] = -4, ["type"] = 32},} qmxg = { {["value"] = 999, ["offset"] = 0, ["type"] = 16},} xqmnb(qmnb) else end end } } }) end }) floatingWindowManager:run() 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"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 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) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end 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("🕹:搜索0条数据.修改失败", false) return false end else gg.toast("🕹:搜索0条数据.修改失败") return false end end MIAONEI=gg.prompt({'头部范围100~300'},{[1]='180'},{[1]='number'}) if MIAONEI == nil or MIAONEI[1] == '' or MIAONEI[1] == '0' then gg.toast("取消") else qmnb = { {["memory"] = 32}, {["name"] = "自改范围"}, {["value"] = 23.0, ["type"] = 16}, {["lv"] = 25.0, ["offset"] = 4, ["type"] = 16}, {["lv"] = 30.5, ["offset"] = 8, ["type"] = 16}, {["lv"] = 0.0, ["offset"] = 12, ["type"] = 16}, {["lv"] = 0.0, ["offset"] = 16, ["type"] = 16}, } qmxg = { {["value"] = MIAONEI[1], ["offset"] = 8, ["type"] = 16}, } xqmnb(qmnb) end gg.toast("范围开启成功")