Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


AutoAssembler AOBScan mem allocation makes no sense?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
thethiny
Cheater
Reputation: 0

Joined: 01 Apr 2012
Posts: 38
Location: earth

PostPosted: Thu May 16, 2019 1:28 pm    Post subject: AutoAssembler AOBScan mem allocation makes no sense? Reply with quote

Hi,
so I'm working on a mod for a game, and it's working perfectly. However, I don't understand the fashion of the memory allocation used!
Code:
aobscanmodule(npc,MK11.exe,89 44 24 30 89 44 24 34 85 C0 74 2A 8B D0 33 C9 44 8D 41 08 E8 03 B7) // should be unique
alloc(newmem,$1000,"MK11.exe"+4405C4)

Here the purpose of aob scan is that we DON'T know the address. But in the second line, we're allocating newmem near a specific address. Doesn't that defeat the purpose of AOB Scan? I mean we're eventually specifying the addres... I don't get this.
Can't I just do "npc" instead of
Code:
"MK11.exe" + 4405c4?



Edit:

I was correct. It works. However I have a question:
Code:

aobscanmodule(npc,MK11.exe,89 44 24 30 89 44 24 34 85 C0 74 2A 8B D0 33 C9 44 8D 41 08 E8 03 B7) // should be unique
alloc(newmem,$1000, npc)//"MK11.exe"+4405C4)


for a reason too hard to explain, the aobscanned result is only there once. This means my function works once only, then fails the 2nd time. Is there a pre-built function that tests if "npc" is registered?
currently I created a 2nd script that does the aobscan and registers it, then this script above will utilize the npc that the previous script found. I'm trying to remove the need of the 2nd script.

Also I realized that npc is registered without me having to registersymbol. How did that happen?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites