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 script

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

Joined: 11 Oct 2023
Posts: 2

PostPosted: Wed Oct 11, 2023 2:12 pm    Post subject: AoB script Reply with quote

how would I make a script that does an AoB scan, takes that value, adds an offset, assigns that (aob+offset) to a symbol?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4306

PostPosted: Wed Oct 11, 2023 3:09 pm    Post subject: Reply with quote

Scanning for unique code pattern:
Code:
local result = AOBScanUnique('12 34 ...', '+X-C-W')
assert(result, 'AOB pattern not found')

registerSymbol('my_symbol', result + offset, true)

_________________
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
cosinegamingniggaballs
How do I cheat?
Reputation: 0

Joined: 11 Oct 2023
Posts: 2

PostPosted: Wed Oct 11, 2023 4:06 pm    Post subject: Error Reply with quote

ParkourPenguin wrote:
Scanning for unique code pattern:
Code:
local result = AOBScanUnique('12 34 ...', '+X-C-W')
assert(result, 'AOB pattern not found')

registerSymbol('my_symbol', result + offset, true)


I am not sure if it is because of the length of my string or what, but I got a 2nd line error for could not be compiled:

Code:
[ENABLE]
local result = AOBScanUnique('00 00 00 00 07 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF', '+X-C-W')
assert(result, 'AOB pattern not found')

registerSymbol('inv', result + 0xC5C, true)

[DISABLE]
unregisterSymbol('inv')
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4306

PostPosted: Wed Oct 11, 2023 4:21 pm    Post subject: Reply with quote

That's an AA script, not a Lua script...
Also, that aob pattern isn't code.
Code:
[ENABLE]
aobscan(result,00 00 00 00 07 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF)

label(inv)

result+C5C:
inv:

registersymbol(inv)

[DISABLE]
unregistersymbol(inv)

_________________
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
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