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 


Pointer in Code Injection
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Sat Jan 16, 2016 8:17 am    Post subject: Reply with quote

////////////////////
It are for enable/disable?
Address Pointer for health is needed?
/////////////////////////
The "maxHP","currentHP","originalMaxHP" values are 0 because :
maxHP:
dd 00



134.png
 Description:
address values are 0.
It are for enable/disable?
Address Pointer for health is needed?
 Filesize:  73.59 KB
 Viewed:  4050 Time(s)

134.png


Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Sat Jan 16, 2016 8:39 am    Post subject: Reply with quote

They are initialized with a zero, but when the script is injected and gets executed then the values will be overwritten with the ones from [esi+4c] resp. [esi+48] ...
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Jan 16, 2016 8:45 am    Post subject: Reply with quote

You can initialize them like this:
Code:
currentHP:
dd (float)NaN

maxHP:
dd (float)NaN

_________________
Back to top
View user's profile Send private message MSN Messenger
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Jan 19, 2016 8:08 am    Post subject: Reply with quote

(In image1) I search in cheat engine forum site for this and find Dark byte Auto assembly script.
(In image2) I can do it.But for example Current HP not go to any value(fixed in his value and I can't change value of them).Help



Image2.png
 Description:
 Filesize:  3.19 KB
 Viewed:  3977 Time(s)

Image2.png



Image1.png
 Description:
 Filesize:  107.03 KB
 Viewed:  3983 Time(s)

Image1.png


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

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Jan 19, 2016 7:13 pm    Post subject: Reply with quote

Your script is only saving the VALUE of the health.
You want to save the ADDRESS of the health value.
Code:
mov [currentHP],esi

Then, add a manual address to your table and check the Pointer option.
Give it a base address of "currentHP" and change the offset from 0 to 4C.
Set the type to Float.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Jan 19, 2016 7:42 pm    Post subject: Reply with quote

In addition to what Zanzer said, you can also save it with offset included:

Code:
push edx
lea edx,[esi+4c]
mov [currentHP],edx
pop edx
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Jan 19, 2016 9:28 pm    Post subject: Reply with quote

Thanks,now if we want originalMaxHP fixed Whilst maxHP changed?(for example if fisrt maxHP:3000 , originalMaxHP:3000 when we changed maxHP to:4000 , originalMaxHP to:3000 in fact originalMaxHP always fixed).
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4703

PostPosted: Tue Jan 19, 2016 9:58 pm    Post subject: Reply with quote

The easiest way would be to only store something into originalMaxHP if it hasn't been assigned yet (still default value of 0). If it isn't 0, then don't write to it. Use cmp or test to do this.
Make sure you always write 0 to it when you enable the script just in case (line 34/35 very first image).

_________________
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
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Wed Jan 20, 2016 2:16 am    Post subject: Reply with quote

Thanks again.
If we have "cmp dword ptr[esi+48],(float)25000" , "cmp dword ptr[esi+48],(float)3000" , "cmp dword ptr[esi+48],(float)100" ,.... how to make that script realized who unit is 25000 , 3000 , 100 max hp. then when we change unit max value to 26000 , 5000 , 300 when press a one key realized who unit max value is 25000 , 3000 , 100 and go max value that change to this stored value.
Back to top
View user's profile Send private message
Noobrzor
Advanced Cheater
Reputation: 0

Joined: 19 May 2014
Posts: 74

PostPosted: Wed Jan 20, 2016 5:13 pm    Post subject: Reply with quote

Quote:
Max health is [eax+40], but all instructions are no good for injection purposes, but some random value at [eax+70] (inside the same structure) is only being accessed once every second, making a better injection point to read [eax+40].


That and all the other responses, so very helpful, so very clever. Thank you all for replying, great insight I'm having from this. Smile
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 Gamehacking All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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