function editData(qmnb,qmxg)gg.setVisible(false)gg.clearResults()qmnbv=qmnb[3]["value"]or qmnb[3][1]qmnbt=qmnb[3]["type"]or qmnb[3][2]qmnbn=qmnb[2]["name"]or qmnb[2][1]gg.setRanges(qmnb[1]["memory"]or qmnb[1][1])gg.searchNumber(qmnbv,qmnbt)gg.refineNumber(qmnbv,qmnbt)sz=gg.getResultCount()if sz==0 then gg.toast(qmnbn.."开启失败")else sl=gg.getResults(1000)for i=1,sz do pdsz=true for v=4,#qmnb do if pdsz==true then pysz={{}}pysz[1].address=sl[i].address+(qmnb[v]["offset"]or qmnb[v][2])pysz[1].flags=qmnb[v]["type"]or qmnb[v][3]szpy=gg.getValues(pysz)tzszpd=tostring(qmnb[v]["lv"]or qmnb[v][1]):gsub(",","")pyszpd=tostring(szpy[1].value):gsub(",","")if tzszpd==pyszpd then pdjg=true pdsz=true else pdjg=false pdsz=false end end end if pdjg==true then szpy=sl[i].address for x=1,#qmxg do xgsz=qmxg[x]["value"]or qmxg[x][1]xgpy=szpy+(qmxg[x]["offset"]or qmxg[x][2])xglx=qmxg[x]["type"]or qmxg[x][3]xgdj=qmxg[x]["freeze"]or qmxg[x][4]xg={{address=xgpy,flags=xglx,value=xgsz}}if xgdj==true then xg[1].freeze=xgdj gg.addListItems(xg)else gg.setValues(xg)end end xgjg=true end end if xgjg==true then gg.toast(qmnbn.."开启成功")else gg.toast(qmnbn.."开启失败")end end end function FZ() MG = gg.multiChoice({ "无限黄金", "无限水晶", "无限人口", "退出脚本", },nil,"开启结束后请退出脚本\n在保存数值中取消冻结数值或者清除所有数值") if MG == nil then else if MG[1] == true then a1() end if MG[2] == true then a2() end if MG[3] == true then a3() end if MG[4] == true then TCJB() end FX1=0 end end function a1() editData( { {["memory"] = 32}, {["name"] = "功能1"}, {["value"] = 200608, ["type"] = 4},--主特征码 {["lv"] = 199584,["offset"] =0x8, ["type"] = 4},--副特征码 {["lv"] = 199616,["offset"] =0x4, ["type"] = 4},--副特征码 }, { {["value"] = 999999999,["offset"] =-0x64, ["type"] = 4,["freeze"] = true},--这里是修改值 } ) gg.clearResults()--清除搜索结果 gg.toast("无限黄金开启成功")--弹出提示 end function a2() editData( { {["memory"] = 32}, {["name"] = "功能1"}, {["value"] = 200496, ["type"] = 4},--主特征码 {["lv"] = 200608,["offset"] =0xc, ["type"] = 4},--副特征码 {["lv"] = 199616,["offset"] =0x10, ["type"] = 4},--副特征码 }, { {["value"] = 999999999,["offset"] =-0x50, ["type"] = 4,["freeze"] = true},--这里是修改值 } ) gg.clearResults()--清除搜索结果 gg.toast("无限水晶开启成功")--弹出提示 end function a3() editData( { {["memory"] = 32}, {["name"] = "功能1"}, {["value"] = 200496, ["type"] = 4},--主特征码 {["lv"] = 199568,["offset"] =0x4, ["type"] = 4},--副特征码 {["lv"] = 200608,["offset"] =0xc, ["type"] = 4},--副特征码 }, { {["value"] = 999999999,["offset"] =-0x4c, ["type"] = 4,["freeze"] = true},--这里是修改值 } ) gg.clearResults()--清除搜索结果 gg.toast("无限人口开启成功")--弹出提示 end function TCJB() print([[ l ̄ ̄ ̄ ̄ ̄ ̄ ̄| | 脚本已结束!! |_______| (\__/) || (•ㅅ•).|| / . . . .づ ]]) gg.toast("已退出脚本") gg.alert([[ l ̄ ̄ ̄ ̄ ̄ ̄ ̄| | 已退出脚本!! |_______| (\__/) || (•ㅅ•).|| / . . . .づ ]]) os.exit() end while true do if gg.isVisible(true) then FX1 = nil gg.setVisible(false) end if FX1 == nil then FZ() end end