本文由周某(既本人)整理。
——
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.toast("开始搜索") gg.setVisible(false)
gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.setVisible(false)
if gg.getResultCount() == 0 then gg.setVisible(false)
gg.toast(qmnb[2]["name"] .. "失败") gg.setVisible(false)
else
gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.setVisible(false)
gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.setVisible(false)
gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.setVisible(false)
gg.setVisible(false) if gg.getResultCount() == 0 then
gg.setVisible(false) gg.toast(qmnb[2]["name"] .. "失败") gg.setVisible(false)
gg.setVisible(false) else
gg.setVisible(false) sl = gg.getResults(999999)
gg.setVisible(false) sz = gg.getResultCount()
gg.setVisible(false) xgsl = 0 if sz > 999999 then
gg.setVisible(false) sz = 999999 end for i = 1, sz do
pdsz = true for v = 4, #(qmnb) do if
pdsz == true then gg.setVisible(false)
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
gg.setVisible(false) if xgjg == true then
gg.setVisible(false) gg.toast(qmnb[2]["name"] .. "成功")
else
gg.setVisible(false) gg.toast(qmnb[2]["name"] .. "失败")
end end end end
D=gg.TYPE_DWORD E=gg.TYPE_DOUBLE F=gg.TYPE_FLOAT W=gg.TYPE_WORD B=gg.TYPE_BYTE X=gg.TYPE_XOR Q=gg.TYPE_QWORD
-------------------------------------------------------------------------------------------------------------------------------
gg.alert("输入一开始提示的文字一般是欢迎之类的")
function main()--这个是当运行main时显示这个页面
aa=gg.choice({
"◎第一个分类◎",
"◎第二个分类◎",
"◎退出◎",
},0,"输入页面上方显示的文字,一般是这里是主菜单")
if aa==1 then a1() end--前面的1是指按下第一个按钮,后面的a1是指运行a1文件
if