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 


address of health

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
blackmorpheus
Expert Cheater
Reputation: 0

Joined: 05 Apr 2008
Posts: 159

PostPosted: Mon Nov 17, 2008 3:13 pm    Post subject: address of health Reply with quote

Hi, i have yet another question. ( don't really know if this belongs in this part of forum)
I am trying to read the health value of my character in a game.
I use CE, find a pointer to it, but the problem is that the pointer and the address keep changing. First problem, how do i find a " static" pointer that points me to the health address?
Second problem, how can i read this value in c++ ( i know there are tons of topics about that but i find it rather hard with a pointer) Can i read the EAX register somehow?

This is how it looks like in CE : as you can see, the pointer and address change when you restart the game.



finding address of health.JPG
 Description:
 Filesize:  249.17 KB
 Viewed:  4284 Time(s)

finding address of health.JPG


Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Mon Nov 17, 2008 3:51 pm    Post subject: Reply with quote

You use ReadProcessMemory to read the address and as for a static pointer, I believe the correct term is pointer to a pointer.

Edit: Are you using Vista or is that a CE 5.4 skinned in Vista? I'm guessing skinned, but I just want to make sure.
Back to top
View user's profile Send private message
arigity
Advanced Cheater
Reputation: 0

Joined: 03 Jul 2008
Posts: 65
Location: middle of nowhere.

PostPosted: Mon Nov 17, 2008 3:54 pm    Post subject: Reply with quote

58A400 doesn't work?
_________________
Back to top
View user's profile Send private message
blackmorpheus
Expert Cheater
Reputation: 0

Joined: 05 Apr 2008
Posts: 159

PostPosted: Mon Nov 17, 2008 4:40 pm    Post subject: Reply with quote

tnx, it is indeed the pointer to address: 0058A400 with offset 000000d0

So how can i read this value in c++ ??

by the way, im using windows xp sp3, with vista skins.
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Mon Nov 17, 2008 7:53 pm    Post subject: Reply with quote

You use the ReadProcessMemory API: http://msdn.microsoft.com/en-us/library/ms680553(VS.85).aspx
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Nov 17, 2008 7:56 pm    Post subject: Reply with quote

int ptrvalue = *(ULONG*)(0x0058A400+0xD0);

Must be injected.
Back to top
View user's profile Send private message
blackmorpheus
Expert Cheater
Reputation: 0

Joined: 05 Apr 2008
Posts: 159

PostPosted: Tue Nov 18, 2008 12:38 pm    Post subject: Reply with quote

this somehow keeps showing 4 on the screen:



Code:

                float color[4];
           int ptrvalue = *(ULONG*)(0x0058A400+0xD0);
      char buffer[1000];
      sprintf(buffer, "%i", ptrvalue);
      glGetFloatv(GL_CURRENT_COLOR, color);
      glutPrint(300.0f, 60.0f, glutFonts[5], buffer, 1.0f, 0.0f, 0.0f, 1.0f);
      glColor4f(color[0],color[1],color[2],color[3]);

ps, nothing wrong with the glutPrint function.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Nov 22, 2008 1:29 pm    Post subject: Reply with quote

_void_ wrote:
int ptrvalue = *(ULONG*)(0x0058A400+0xD0);

Must be injected.


Not quite.

Code:

ULONG ulVal = *(ULONG *)( ( *(ULONG *) 0x0058A400 ) + 0xD0 );


For pointers, the value stored at the base address is added to the offset, and then you read from there.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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