holaboludo How do I cheat? Reputation: 0
Joined: 22 Oct 2018 Posts: 5
|
Posted: Mon Oct 04, 2021 4:46 pm Post subject: [SOLVED] LUA autoAssemble help! |
|
|
Grettings! I'd like to someone proficient in AA programming to explain me (and give me an example if possible) on how to use CE's autoAssemble command (including enabling and disabling).
I'm currently writing a "free-camera" script that when activated performs multiple LUA AOBscans and write data to specific offsets as well create memory records for them regardless of if the ASM AOBscan and code injection was successful or not.
What I want my script to do is to perform these actions IF the AOBscan was successful, otherwise print an error. I have learned of this autoAssemble function which can return the activation/code injection status as a boolean value but I have trouble implementing it and when I try to execute it I get either "ACCESS VIOLATION" or "UNKNOWN" errors.
The original script is quite long so here is a simplified snippet of the current code. The target application of the script is the PCSX2 emulator.
Code: |
[ENABLE]
{$lua}
disable_code = [[
aobscan(GAMEPLAY_CAM_CONTROL, long array of bytes)
registersymbol(GAMEPLAY_CAM_CONTROL)
GAMEPLAY_CAM_CONTROL + 0xC0:
db 90 90 90
[DISABLE]
GAMEPLAY_CAM_CONTROL + 0xC0:
db 0F 29 31
unregistersymbol(GAMEPLAY_CAM_CONTROL)
]]
if autoAssemble(disable_code) then
--[[Disable menu and HUD]]
--[[Set array of bytes to search]]
array = "B0 C5 3C 00 01 01 00 ??"
--[[Start search]]
ms = createMemScan()
ms.firstScan(soExactValue, vtByteArray, nil,array, nil, 0x20900000,0x21f00000,"",1,"4",true,nil,nil,nil)
ms.waitTillDone()
fl = createFoundList(ms)
fl.initialize()
--[[Process found results and create cheat table with entries]]
if (fl~=nil) then
al = getAddressList()
for i = 1, 1 do
zaddress = getAddress(fl[0])
mntrsnprncy = al.createMemoryRecord()
menutransparency = zaddress + 0x05
writeBytes(menutransparency, 00)
mntrsnprncy.Description = "Pause menu transparency"
mntrsnprncy.setAddress(menutransparency)
mntrsnprncy.Type = vtByte
mntrsnprncy.appendToEntry(header)
end
fl.destroy()
fl=nil
else
ms.destroy()
end
ms.destroy()
else
print("AoBscan error.")
end
--[[disable script]]
autoAssemble(disable_code, disableInfo)
{$asm}
|
I have tried to understand some of the autoAssemble command examples posted by other users in the forum but my lack of programming experience (as you have noticed in the example script posted above) gets in the way.
Thanks for any help and I apologize for any grammatical mistakes, as I'm not a native english speaker .
Last edited by holaboludo on Sat Oct 09, 2021 12:56 pm; edited 1 time in total |
|