我使用作弊引擎在 MyGame 中找到了一个值的地址并创建了一个作弊表(mygame.ct)
这是我发现的一些更改值的 Lua 代码:
function AOBRep(search, change)
local aob = AOBScan(search)
if aob then
for i=0,aob.Count-1 do
autoAssemble(aob[i]..':\ndb '..change)
end
aob.Destroy()
end
end
function option2()
searchV = 'B8 41 00 00 C8 41 00 00 F4 41' --off
searchV2 = 'B8 41 00 00 AF 43 00 00 AF 43' --on1
replaceV = 'B8 41 00 00 2F 44 00 00 2F 44' --on2
AOBRep(searchV,replaceV)
AOBRep(searchV2,replaceV)
end
function option1()
searchV = 'B8 41 00 00 C8 41 00 00 F4 41' --off
replaceV = 'B8 41 00 00 AF 43 00 00 AF 43' --on
AOBRep(searchV,replaceV)
end
MyForm = createForm(true)
MyForm.Caption = 'My Game'
MyForm.Width = 300
MyForm.Height = 200
mbbo = createButton(MyForm)
mbbo.Left = 20
mbbo.Top = 100
mbbo.Width = 80
mbbo.Height = 40
mbbo.onClick = option2
mbbo.Caption = 'Option2'
ahbf = createButton(MyForm)
ahbf.Left = 6
ahbf.Top = 4
ahbf.Width = 90
ahbf.Height = 50
ahbf.onClick = option1
ahbf.Caption = 'Option1'
我想转换此 Lua 代码以更改 C++ 中的值,
例如,将此 Lua 代码转换为将 AOB 值更改B8 41 00 00 C8 41 00 00 F4 41
为B8 41 00 00 AF 43 00 00 AF 43
function option2()
searchV = 'B8 41 00 00 C8 41 00 00 F4 41' --off
searchV2 = 'B8 41 00 00 AF 43 00 00 AF 43' --hs
replaceV = 'B8 41 00 00 2F 44 00 00 2F 44' --mb
AOBRep(searchV,replaceV)
AOBRep(searchV2,replaceV)
end