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 


Using an addresses value as a offset pointer?

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

Joined: 09 Mar 2011
Posts: 130
Location: USA, FL

PostPosted: Tue Jul 05, 2016 8:17 pm    Post subject: Using an addresses value as a offset pointer? Reply with quote

So, I have a game.

My Index is say 3.

I found the playerBase address where all 255 players are stored. I am aware of their offsets and their changes. Each player is off by 4.

I know my player is playerBase -> 4*3 -> My player base address.

How would I use the index I have found with a script and use it in another script or in a pointer offset? I need to multiply my Index Number with 4 in order to get the right pointer offset for my player, where my health and all information is stored, otherwise I get someone else's player data.

Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Jul 05, 2016 9:48 pm    Post subject: Reply with quote

Much simpler to just save the direct player address after you've resolved the offset.

You could use Lua to dynamically change your entry's offset.

There is also a little CE hack you could do after "Index" has been populated with the correct value.

Code:
[ENABLE]
label(player_index)
registersymbol(player_index)
[Index]:
player_index:
[DISABLE]


Once you enable that, "player_index" will have its address set to match the value of "Index" (6 in your screenshot).

Now you can create a table entry with the address "+player_index*4"
Move that entry as a child under your "players[]" entry
Back to top
View user's profile Send private message
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 130
Location: USA, FL

PostPosted: Wed Jul 06, 2016 8:01 am    Post subject: Reply with quote

Zanzer wrote:
Much simpler to just save the direct player address after you've resolved the offset.

You could use Lua to dynamically change your entry's offset.

There is also a little CE hack you could do after "Index" has been populated with the correct value.

Code:
[ENABLE]
label(player_index)
registersymbol(player_index)
[Index]:
player_index:
[DISABLE]


Once you enable that, "player_index" will have its address set to match the value of "Index" (6 in your screenshot).

Now you can create a table entry with the address "+player_index*4"
Move that entry as a child under your "players[]" entry


Each of the 255 players is a pointer offset, not a direct offset off the base address, so this wouldn't work. I need to use it on a pointer.

Doesn't work:
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Wed Jul 06, 2016 10:10 pm    Post subject: Reply with quote

mr. mgr.inz.Player may have a solution,
http://forum.cheatengine.org/viewtopic.php?p=5642733#5642745

bye~

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