Ex:
// This cheat work, but if I restart the game the cheat cannot be activated anymore
[ENABLE]
aobscan (INJECT, 7A DA D2 89 11 8B 0D 40 9F 92 01) // should be unique
alloc (newmem, $ 1000)
label (code)
label (return)
newmem:
code:
mov edx, (float) 800
mov [ecx], edx
mov ecx, [pcsx2.exe + 1199F40]
jmp return
INJECT + 03:
jmp newmem
nop 3
return:
registersymbol (INJECT)
[DISABLE]
INJECT + 03:
db 89 11 8B 0D 40 9F 92 01
unregistersymbol (INJECT)
dealloc (newmem)
When I start the game the script does not activate anymore, so I do the AoB scan and replace the scan values that change at each restart with ? ...
Ex:
// With this the cheat can be activated, but if I take damage the game crashes. aobscan is unique (I tested it)
[ENABLE]
aobscan(INJECT,0F 88 ?? ?? E? D2 89 11 8B 0D 40 9F 92 01 81 C1 10 04 00 00 89 C8 C1 E8 0C 8B 04 85 30 ?0 ?? 1E BB ?? ?? ?? 30 01 C1 0F 88 ?? ?? E? D2 0F BF 01 99) // should be unique
alloc(newmem,$1004)
label(code)
label(return)
label(exit)
newmem:
jmp exit
code:
mov edx,(float)800
mov [ecx],edx
mov ecx,[pcsx2.exe+1199F40]
jmp return
exit:
jmp return
INJECT+03:
jmp newmem
nop 3
return:
registersymbol(INJECT)
[DISABLE]
INJECT+03:
db 89 11 8B 0D 40 9F 92 01
unregistersymbol(INJECT)
dealloc(newmem)
Now I can activate the cheat, but when I take damage the game crashes. I don't know what I need to do to fix this. In other games Aob Scan does not give any problem, the cheat is activated and taking damage the game does not crash. I tried to scan with cheat engine to see if inject was unique and is actually unique.
What should I do to fix?
Here is my Cheat Engine Tutorial:
Spoiler
[Link]