 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Reaper79 Advanced Cheater
Reputation: 2
Joined: 21 Nov 2013 Posts: 68 Location: Germany
|
Posted: Mon Aug 04, 2014 1:59 pm Post subject: AobScanModule if / else function? |
|
|
Hi there,
is it possible to check the Result of the AOBScanModule ?
Like:
| Code: |
if (AOBScanModule(test1, module1.dll, xx xx xx) != null)
then inject blabla1
else if (AOBScanModule(test2, module2.dll, xx xx xx) != null)
then inject blabla2
|
My problem is, if you change the Scenario or Expansion pack of the game, it loads / reloads another DLL which destroys my code injection / jump.
For Example, all i want is, if you press Numkey 1 (e.g. Raise Gold) that it checks if the code injection is still valid, else rescan and re-set the jump...
is this possible with CE ?
puh..hope you understand my german english
Reaper
EDIT: nevermind, i think LUA will be my new friend
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Mon Aug 04, 2014 3:33 pm Post subject: |
|
|
yeah, lua would be the only solution.
but you can do a hybrid solution
| Code: |
{$LUA}
errorOnLookupFailure(false)
local addressOfBla=getAddress("bla")
if addressOfBla~=0 then
--bla exists, this means it may have been hooked already
local firstbyte=readBytes(addressOfBla, 1)
if (firstbyte==0xe9) then --jmp to your codecave
--error('Activation is not needed. This script is still active')
return '' --do not reassign bla and reuse it
end
end
--still here, so not yet initialized or changed. Tell the auto assembler to (re)initialize bla
return [[
aobscanmodule(bla,module1.dll,11 22 33 44 55 66)
registersymbol(bla)
]]
{$ASM}
alloc(mycodecave, 65536)
label(exit)
bla:
jmp mycodecave
...
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Reaper79 Advanced Cheater
Reputation: 2
Joined: 21 Nov 2013 Posts: 68 Location: Germany
|
Posted: Mon Aug 04, 2014 4:19 pm Post subject: |
|
|
sooo much bla I like bla.
This helps me a lot, thank you very much.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|