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 


Convert AOB Scan Addresses

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

Joined: 13 Mar 2022
Posts: 6
Location: Your Mum

PostPosted: Tue Apr 19, 2022 3:36 pm    Post subject: Convert AOB Scan Addresses Reply with quote

I have this Lua script:

local Flight = AOBScan("75 08 85 C9 0F 85 8B 00 00")
local FlightAddress = Flight[0]
print ("Flight = "..FlightAddress)

once I activate it, I receive this:
Flight = 7FF76A19ED54

if I take that address and disassemble the memory region I receive:
Game.exe+40ED54

how do I make it so I receive this as a printed message?:
Flight = Game.exe+40ED54

Any responses are very much appreciated Very Happy

_________________
I'm Stupid but I will figure it out eventually!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Tue Apr 19, 2022 4:23 pm    Post subject: Reply with quote

Code:
-- AOBScan returns a stringlist
local result = AOBScan(...)
assert(result, 'No results found')

-- get the address (an integer) from the string
local addr = getAddress(result[0])

-- don't forget to destroy the stringlist when done with it
result.destroy()

-- get a string representation of that address: e.g. "game.exe+whatever"
local addr_name = getNameFromAddress(addr)

_________________
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