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 


One code writes multiple values

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
eTo
Newbie cheater
Reputation: 0

Joined: 23 Sep 2011
Posts: 10

PostPosted: Fri Sep 23, 2011 10:05 am    Post subject: One code writes multiple values Reply with quote

Hi everyone.
I was recently trying to start playing with code injection, but i came across this issue: code responsible for decreasing players hp is also responsible for decreasing hp of enemy (dungeon siege demo currently, loki, titan quest and ohers before). so when i try to nop it, then enemies also have god mode -.-
I was thinking about making script like:

if (address to which value is written = address stored in pointer)
then don't change/decrease value
else work like before

but i'm not good enough to make it, and learning assemblers is not going to well :/
Or maybe i need to track where values of damage taken by player originates? But i have no idea how to do that :/

So i would be grateful for any tips on haw to solve this issue.
Or just stick to freezing hp pointers? (that works, but as i said i was trying to mess some with code injection)
Back to top
View user's profile Send private message
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Fri Sep 23, 2011 10:34 am    Post subject: Reply with quote

Hey,
there are different ways to achieve what you are planning to do. If you already found out the pointer, you can use this way, assuming that your health address is stored in ebx:

Code:

pushfd //save flags
push eax //save the eax register
mov eax, "Game.exe"+BaseOffset
mov eax, [eax] //move the value from eax into eax
add eax, 20 //add second offset
mov eax, [eax] //and so on
add eax, 10 //add third offset
mov eax, [eax]
add eax, 4C
mov eax, [eax]
add eax, 13C
mov eax, [eax]
add eax, 0C //add last offset - eax now holds the address to your player's health
cmp eax, ebx  //
je moveFullhealth: //if eax == ebx jmp to moveFullhealth
//else
//orig code here
pop eax //restore register
popfd //restore flags
moveFullhealth:
//your code here
pop eax //restore register
popfd //restore flags


Forgot to save flags...
Back to top
View user's profile Send private message
eTo
Newbie cheater
Reputation: 0

Joined: 23 Sep 2011
Posts: 10

PostPosted: Sun Sep 25, 2011 3:13 am    Post subject: Reply with quote

Thx for script Smile
But when i try assign it to table i have error:
Code:
[Window Title]
Error

[Content]
Error in line 18 (je moveFullhealth:) :This address specifier is not valid

[OK]

I was trying to change moveFullhealth to something else, adding laber(moveFullhealth) at beginning of script, still same error.
Code that writes health values is: mov [esi+70],eax
so i added add esi, 70 to get accurate address to compare with (in esi is stored hex address anyway, so it should work, at least in my theory), but that should not be an issue here (since without any changes i have same error). Also reverted this before esi is used again.
Btw, i'm using CE6.1.

And btw#2, can you mention about that other ways to get gm? Only other idea i have, is that to try to find part of code responsible to collisions with player, but i have no idea how to start looking for it :/
Back to top
View user's profile Send private message
haunted5
Cheater
Reputation: 1

Joined: 23 Aug 2011
Posts: 35

PostPosted: Sun Sep 25, 2011 7:21 am    Post subject: Reply with quote

The other option is to use 'Dissect data/structures' option in memory viewer under tools. Put ESI for both player and enemy in the starting address and analyze the data to find something that will identify the player from enemy. Geri wrote a nice tutorial on this so search the forums to get an indepth view on using it.
Back to top
View user's profile Send private message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Wed Feb 15, 2012 8:50 am    Post subject: Reply with quote

Can you please explain better every step.
Because i think doing the scrip blindly will not help much.

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