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 


Problem in moving max health to current health

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

Joined: 01 Jul 2013
Posts: 134
Location: India

PostPosted: Tue Aug 06, 2013 8:01 am    Post subject: Problem in moving max health to current health Reply with quote

The game is prototype in this the max health is seperated in two addresses.

Code:

mov eax,[esi+14]
add eax,[esi+10]
mov [esi+0c],eax

originalcode:
movss [esi+0c],xmm0


But this code doesnt add health. player dies instantly.(health reduced to 200 and nxt hit he dies)



prototype.png
 Description:
 Filesize:  9.78 KB
 Viewed:  4183 Time(s)

prototype.png


Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
mgr.inz.Player
I post too much
Reputation: 222

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

PostPosted: Tue Aug 06, 2013 5:16 pm    Post subject: Reply with quote

You are using wrong instructions.
1000.0 = 447A0000 (as hex integer) = 1148846080 (as decimal unsigned integer)
2700.0 = 4528C000 (as hex integer) = 1160298496 (as decimal unsigned integer)


1148846080 + 1160298496 = 2309144576 = 89A2C000 (as hex integer) = -3.918063731E-33

Your code is overwriting health value with very small value, value which is below zero and very close to zero.





You should use floating-point instructions:
Code:
fld [esi+14]
fadd [esi+10]
fstp [esi+0c]
jmp returnhere

originalcode:
movss [esi+0c],xmm0
jmp returnhere

_________________
Back to top
View user's profile Send private message MSN Messenger
_Veggy
Cheater
Reputation: 2

Joined: 30 Apr 2013
Posts: 34
Location: BReWErS rox your dox

PostPosted: Wed Aug 07, 2013 1:33 am    Post subject: Reply with quote

You could simply use:

mov eax, [MaxHealth]
mov [CurrentHealth], eax

Considering your code:
mov eax,[esi+<..>] //Max health?
mov [esi+0c],eax

Which game is this for?

Here is a snippet from my trainer source for Devil May Cry 3.

cmp byte ptr [HealthFlag],01h
jne OriginalHealth
push eax
mov eax, [ebp+2a20h]
mov [ebp+2a4ch],eax
pop eax
OriginalHealth:
push 59b7afh
ret
nop
nop
Back to top
View user's profile Send private message
vergilganesh
Expert Cheater
Reputation: 0

Joined: 01 Jul 2013
Posts: 134
Location: India

PostPosted: Wed Aug 07, 2013 7:30 am    Post subject: Reply with quote

The code given by mgr.inz.player is worked for me. The game is prototype. Maximum health is seperated in 3 instructions.
max health = [esi+10]+[esi+14]+[esi+1F8] (2700+1000+200). I already hacked devil may cry 3. This is the code for god mode cheat.
Code:

[ENABLE]
alloc(health,64)
label(returnhere)
label(originalcode)
label(god)
label(exit)
health:
cmp byte ptr [eax+3c],1
je god
originalcode:
fsub dword ptr [esp+24]
god:
fstp dword ptr [eax+04]

exit:
jmp returnhere

"dmc3se.exe"+467A5:
jmp newmem
nop
nop
returnhere:


 
 
[DISABLE]
dealloc(newmem)
"dmc3se.exe"+467A5:
fsub dword ptr [esp+24]
fstp dword ptr [eax+04]
//Alt: db D8 64 24 24 D9 58 04
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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