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 


AoB Scanning in Lua using Assembly

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

Joined: 08 Jun 2018
Posts: 64

PostPosted: Fri Aug 02, 2019 7:01 am    Post subject: AoB Scanning in Lua using Assembly Reply with quote

I'm trying to run this code in Lua but I'm not getting any results. I've searched for the same address using cheat engine's own memory scan options aka start - finish and it finds the address.

Code:
function Scanner()


script = [[

aobScanRegion(SymbolAdd, 17B3B182, 17B3B186, 07 00 00)

]]

autoAssemble(script)
end

Scanner()



print(SymbolAdd)



could someone point out what I might be missing here. Appreciate it
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Fri Aug 02, 2019 7:55 am    Post subject: Re: AoB Scanning in Lua using Assembly Reply with quote

Code:
scan = AOBScan("4F 6E 53 65 74")
print("Result : "..scan.count) --// The Result

for i=1,scan.count do
 print(i.." - "..scan[i-1]) --// Prints the address
end


maybe this helps

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Fri Aug 02, 2019 9:13 am    Post subject: Reply with quote

SymbolAdd isn't a lua variable after running the script, you can't just print it. It's also not a global symbol that you can access, it's just a label in that script.

add registerSymbol(SymbolAdd) and use print(getAddress('SymbolAdd'))

_________________
https://github.com/FreeER/ has a few CE related repos
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