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 


How to script module base address + offsets in LUA

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

Joined: 27 Feb 2023
Posts: 59

PostPosted: Tue Feb 28, 2023 10:46 pm    Post subject: How to script module base address + offsets in LUA Reply with quote

How do I get the value at an address by using multi level pointers using LUA e.g. [game.exe + 0x1234] + 0xC, 0x6, 0x0.

This code below works for finding the modules base address, but I am not sure how to add offsets to xbase.

local xbase = readInteger(process)and GetAddress(process)
return xbase and string.format("define(moduleAddr,%X)",xbase)
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 Feb 28, 2023 11:14 pm    Post subject: Reply with quote

Code:
readInteger('[[[game.exe+1234]+C]+6]+0')

_________________
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
wulfcare
Advanced Cheater
Reputation: 0

Joined: 27 Feb 2023
Posts: 59

PostPosted: Tue Feb 28, 2023 11:32 pm    Post subject: Reply with quote

Thank you
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