APEX手游牛马功能脚本


z="" zz="" zzz="" x="" xx="" xxx="" v="" vv="" vvv=""
DWORD=gg.TYPE_DWORD DOUBLE=gg.TYPE_DOUBLE FLOAT=gg.TYPE_FLOAT WORD=gg.TYPE_WORD BYTE=gg.TYPE_BYTE XOR=gg.TYPE_XOR QWORD=gg.TYPE_QWORD

Memory_offset=function(Search,Write,nc,Type,name) gg.clearResults() gg.setRanges(nc) gg.setVisible(false) lx=Search[1][2] gg.searchNumber(Search[1][1], lx) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} if (count > 0) then gg.toast("搜索到"..count.."条数据") for i, v in ipairs(result) do v.isUseful=true end for k=2,#Search do local tmp = {} local num = Search[k][1] if Search[k][3]~= nil then lx=Search[k][3] else lx=Type end for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + Search[k][2] tmp[#tmp].flags = lx 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 = {} for i=1, #data do for k, w in ipairs(Write) do if w[3] ~= nil then lx = w[3] else lx=Type end t[#t+1] = {} t[#t].address = data[i] + w[2] t[#t].flags = lx if (w[1]~=nil) and (w[1]~=false) then t[#t].value = w[1] if (w[4] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = true gg.addListItems(item) else gg.setValues(t) end end end end gg.loadResults(t) gg.toast(name.."成功,共修改了"..#t.."个数值") else gg.toast(name.."开启失败") end else gg.toast(name.."搜索失败") end gg.clearResults() 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 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"]
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,name)
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((Name or "").."开启成功共修改"..#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((Name or "").."开启失败", false)
return false
end
else
gg.toast((Name or "").."开启失败")
return false
end
end

 

function Main()
SN = gg.multiChoice({
"人物透视",
"人物绿色",
"全身范围",
"人物高跳",
"人物跳远",
"人物加速",
"退出脚本",
}, nil, "神谕嘎嘎乱杀")
if SN == nil then
else
if SN[1] == true then
a()
end
if SN[2] == true then
b()
end
if SN[3] == true then
c()
end
if SN[4] == true then
d()
end
if SN[5] == true then
e()
end
if SN[6] == true then
f()
end
if SN[7] == true then
Exit()
end
end
XGCK = -1
end

 

function a()
gg.setRanges(1048576)
local dataType = 16
local Name ="透视"
local tb1 = {{4.777708403940634E21, 0}, {2.007874011993408, 76}, {2.0, 80}, {0.02500000037252903, 96}, }
local tb2 = {{120, 80}, }
SearchWrite(tb1, tb2, dataType)

gg.setRanges(1048576)
local dataType = 16
local Name ="透视"
local tb1 = {{-1.614302837394511E-39, 0}, {2.2500007152557373, 36}, {4.777708403940634E21, 60}, }
local tb2 = {{5444, 0}, }
SearchWrite(tb1, tb2, dataType)
end

function b()
gg.setRanges(1048576)
Name = "人物绿色"
local dataType = 4
local tb1 = {{1194344481, 0}, {8200, 4}, {1194380068, 8}, }
local tb2 = {{1, 4}, }
SearchWrite(tb1, tb2, dataType)
end

function c()
gg.setRanges(32)
Name = "人物范围"
local dataType = 16
local tb1 = {{3.7274539151040134E-43, 0}, {2.0, -4}, {2.802596928649634E-45, 8}, }
local tb2 = {{300,12}, }
SearchWrite(tb1, tb2, dataType)
c()
end

function d()
gg.setRanges(32)
Name = "人物高跳"
local dataType = 16
local tb1 = {{145.0, 0}, {0.30000001192092896, 4}, {0.15000000596046448, 12}, }
local tb2 = {{8, 4}, }
SearchWrite(tb1, tb2, dataType)
end

function e()
gg.setRanges(32)
Name = "人物跳远"
local dataType = 16
local tb1 = {{145.0, 0}, {0.15000000596046448, 12}, {0.75, 16}, {300.0, 20}, }
local tb2 = {{666, 20}, }
SearchWrite(tb1, tb2, dataType)
end

function f()
gg.setRanges(32)
Name = "人物加速"
local dataType = 16
local tb1 = {{476.0, 0}, {7.5, -4}, {150.0, 4}, {20.0, 8}, }
local tb2 = {{777, 0}, }
SearchWrite(tb1, tb2, dataType)
end

function Exit()
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

标签

发表评论