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 


[ASK] set address

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

Joined: 27 May 2007
Posts: 61

PostPosted: Fri Mar 25, 2016 12:59 am    Post subject: [ASK] set address Reply with quote

Hello, sorry for noob question.

How to set an address based on value of another address ?
for example, here I have 2 address.
1 is baseAddress and another is foo.
my question, how to automatically set foo's address based on baseAddress value.
so it will become like this :
foo's address = (value of baseAddress) + 4410



Screenshot_96.png
 Description:
 Filesize:  3.5 KB
 Viewed:  4299 Time(s)

Screenshot_96.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25840
Location: The netherlands

PostPosted: Fri Mar 25, 2016 1:46 am    Post subject: Reply with quote

drag foo so it becomes a child of baseaddress
then give it as address
Code:
 
+4410



or just copy the baseaddress entry and increase the top offset with 4410

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
n1vX
Advanced Cheater
Reputation: 0

Joined: 27 May 2007
Posts: 61

PostPosted: Fri Mar 25, 2016 3:11 am    Post subject: Reply with quote

Sorry Dark Byte for my poor English, so I can't explain it correctly, so I use this picture.

B = A +4410

How can I do this automatically ? with LUA script and B will update every A changes.

EDIT

OK, I make this.
but I can't add +4410 to baseAddress because it is String.



Screenshot_100.png
 Description:
 Filesize:  28.64 KB
 Viewed:  4265 Time(s)

Screenshot_100.png



Screenshot_96.jpg
 Description:
 Filesize:  35.27 KB
 Viewed:  4278 Time(s)

Screenshot_96.jpg


Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Mar 25, 2016 10:11 am    Post subject: Reply with quote

This will do what Dark Byte told you to do manually.
Code:
local list = getAddressList()
local parent = list.getMemoryRecordByDescription("baseAddress")
local child = list.createMemoryRecord()
child.Description = "foo"
child.Address = "+4410"
child.appendToEntry(parent)
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