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 


aobscanregion equivalent in Lua

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
LostInTransliteration
How do I cheat?
Reputation: 0

Joined: 25 Aug 2021
Posts: 9

PostPosted: Sun Sep 05, 2021 5:15 am    Post subject: aobscanregion equivalent in Lua Reply with quote

How do I constrain a Lua AOBScan to a region? I already figured out a way to filter the AOBScan results so that only ones inside the region end up being used but I'm looking for a way to constrain the scan itself to speed it up. I found some people saying that you have to use createMemScan() to do it but I couldn't find any explanations of how to do that.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Sun Sep 05, 2021 6:38 am    Post subject: Reply with quote

You can use these functions:
Code:

AOBScan(x,x,x,x,...):
scans the currently opened process and returns a StringList object containing all the results. don't forget to free this list when done
Bytevalue of higher than 255 or anything that is not an integer will be seen as a wildcard
AOBScan(aobstring, OPTIONAL protectionflags, OPTIONAL alignmenttype, OPTIONAL alignmentparam): see above, but here you just input one string
AOBScanUnique(aobstring, OPTIONAL protectionflags, OPTIONAL alignmenttype, OPTIONAL alignmentparam)- Integer: scans for the aobstring and returns the first result it finds and nil if nothing is found. Make sure it is unique as it will return the first result found and will return any random match
AOBScanModuleUnique(modulename, aobstring, OPTIONAL protectionflags, OPTIONAL alignmenttype, OPTIONAL alignmentparam)- Integer : scans for the aobstring in the designated module.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Sun Sep 05, 2021 11:14 am    Post subject: Reply with quote

If you want more control (e.g. exact start/stop address), see the MemScan class in celua.txt.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
LostInTransliteration
How do I cheat?
Reputation: 0

Joined: 25 Aug 2021
Posts: 9

PostPosted: Tue Sep 14, 2021 2:59 am    Post subject: Reply with quote

Late reply but making my own MemScan did the trick, thank you! Didn't know every class gets explained in celua.txt, that's very handy and good to know.
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 Lua Scripting 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