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 


Help with memoryrecord_setAddress to set adress from pointer

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

Joined: 15 Dec 2016
Posts: 31

PostPosted: Fri Mar 22, 2019 1:58 pm    Post subject: Help with memoryrecord_setAddress to set adress from pointer Reply with quote

Have had a working trainer for my game for a while now. But after a recent game update. It had been difficult to locate a valid pointer that functions the same way it use to.

Trying to make this a little more simple.

MyValue=getAddressList().getMemoryRecordByDescription("My Value")
MyAddress=getAddressList().getMemoryRecordByDescription("My Address")

My trainer has two items in the cheat table. The first item is my pointer that can sometimes randomly change 1% of the time. When I activate my trainer. It makes the game do an action. The location found by my pointer will never change as long as the game is doing the action I told it to do. I would like to then use the memoryrecord_setAddress to change the second item in my table to the address found by my pointer.

memoryrecord_setAddress(MyAddress, MyValue)

While I know the line above is incorrect. I'm not sure what I need to do make it grab the correct address.

memoryrecord_setAddress(MyAddress, string.format('%x', memoryrecord_getAddress(MyValue)))

Looks like I figured it out with this line.

Thanks for any help given.
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 51

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Mar 22, 2019 9:30 pm    Post subject: Reply with quote

You could just use the base of "My Value" as the base for your "My Address".

https://wiki.cheatengine.org/index.php?title=Tutorials:Pointers

_________________
Back to top
View user's profile Send private message Visit poster's website
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