ALSO CLICK TO ENLARGE IMAGES
First off, open the lua script for the current cheat table:
Table > Show Cheat Table Lua Script (Ctrl+Alt+L)
Put the following Lua code in your cheat table:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DEC_HEX(IN) | |
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0 | |
if IN<1 then | |
OUT=0 | |
return OUT | |
end | |
while IN>0 do | |
I=I+1 | |
IN,D=math.floor(IN/B),math.mod(IN,B)+1 | |
OUT=string.sub(K,D,D)..OUT | |
end | |
return OUT | |
end | |
function Aobswap(search, change) | |
aobs = AOBScan(search) | |
if(aobs ~= nil) then | |
j = stringlist_getCount(aobs) | |
--print("Found:",j); | |
for i = 1, j do | |
--print(stringlist_getString(aobs,i-1)); | |
--66 ?? ?? d1 a1 68 ?? ?? d0 d0 | |
address=stringlist_getString(aobs,i-1) | |
for i = 1, string.len(change), 3 do | |
z = string.sub(change, i, i+2) | |
x, y = string.find(z, "%?+") | |
if (x == nil) then | |
script=[[ | |
]]..address.."+"..(DEC_HEX((i-1)/3))..[[: | |
db ]]..z..[[ | |
]] | |
autoAssemble(script) | |
--print(z) | |
--print(address.."+"..(DEC_HEX((i-1)/3))) | |
end | |
end | |
end | |
object_destroy(aobs); | |
aobs=nil | |
end | |
end | |
function AobswapR(change, search) | |
aobs = AOBScan(search) | |
if(aobs ~= nil) then | |
j = stringlist_getCount(aobs) | |
for i = 1, j do | |
address=stringlist_getString(aobs,i-1) | |
for i = 1, string.len(change), 3 do | |
z = string.sub(change, i, i+2) | |
x, y = string.find(z, "%?+") | |
if (x == nil) then | |
script=[[ | |
]]..address.."+"..(DEC_HEX((i-1)/3))..[[: | |
db ]]..z..[[ | |
]] | |
autoAssemble(script) | |
end | |
end | |
end | |
object_destroy(aobs); | |
aobs=nil | |
end | |
end |
Save this to cheat table, and press Execute script.
Now open Memory View.
Then go to Tools > Auto Assemble (Crtl+A)
An auto assemble window should pop up, Template > Cheat table framework code (Ctrl+Alt+T)
Under [ENABLE] put this:
LuaCall(Aobswap("xx xx xx xx xx xx", "yy yy yy yy yy yy"))
And under [DISABLE] put
LuaCall(AobswapR("xx xx xx xx xx xx", "yy yy yy yy yy yy"))
Hint: Copy and paste the above and type an R in between p and (
xx xx xx xx xx xx is the AoB you want to find
yy yy yy yy yy yy is the AoB you replace with what you've found
After you have got the code ready, don't press Execute!
Do File > Assign to current cheat table
You should now see a new entry with value <script>.
That's it! Now you can enable or disable your cheats in one click.
No comments:
Post a Comment