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 


Help with adding One-Hit Kill to my God Mode Hack

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

Joined: 02 Jun 2012
Posts: 41
Location: Canada

PostPosted: Sat Jun 02, 2012 11:13 am    Post subject: Help with adding One-Hit Kill to my God Mode Hack Reply with quote

The Game is the single player demo of Armies of Exigo, here is the godmode i got:

alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
fstp dword ptr [esi+04] //original code which is changing the health
pushfd //save flags
pushad //save registers
cmp [esi],0 //check if ESI=0
jne +6 //if ESI is not 0, the code will jump over the next 2 lines, jumping to the "popad" instruction
mov eax,[esi+08] //copy the max health on eax
mov [esi+04],eax //copy eax to the health, so max health = health
popad //load registers
popfd //load flags

originalcode:
//fstp dword ptr [esi+04]
//test eax,eax

exit:
jmp returnhere

"Exigo_spdemo.exe"+1DA8DC:
jmp newmem
returnhere:

now how do I add one-hit kill on the enemy and not me too thus canceling my god mode because that's what happend when I tried this code for both:

alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(enemy)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
fstp dword ptr [esi+04] //original code which is changing the health
pushfd //save flags
pushad //save registers
cmp [esi],0 //check if ESI=0
jmp enemy //if ESI is not 0, the code will jump to the "enemy" instruction
mov eax,[esi+08] //copy the max health on eax
mov [esi+04],eax //copy eax to the health, so max health = health
popad //load registers
popfd //load flags

originalcode:
//fstp dword ptr [esi+04]
//test eax,eax

enemy:
mov eax,0 //copy the 0 health on eax
mov [esi+04],eax //copy eax to the health, so 0 health = enemy health
popad //load registers
popfd //load flags

exit:
jmp returnhere

"Exigo_spdemo.exe"+1DA8DC:
jmp newmem
returnhere:

Thanks for the help.
Back to top
View user's profile Send private message
Corruptor
Advanced Cheater
Reputation: 3

Joined: 10 Aug 2011
Posts: 82

PostPosted: Sat Jun 02, 2012 12:04 pm    Post subject: Reply with quote

Code:
cmp [esi],0 //check if ESI=0
jmp enemy //if ESI is not 0, the code will jump to the "enemy" instruction


I asume that ESI, at this point, is only 0 if the player is hit. Is that right? that would mean that you allready found the condition.

Asuming the esi-stuff is right, try this instead:

Code:
cmp [esi],0 //check if ESI=0
je enemy //if ESI is not 0, the code will jump to the "enemy" instruction


Problem is, that "jmp" is a unconditional jump, that means, he will always jump, no matter what the cmp-instruction resulted in. Use "je" instead (short for jump if equal), so he will jump if [esi] is 0.
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 Jun 02, 2012 1:07 pm    Post subject: Reply with quote

Same as above, and you forgot original "test eax,eax"

Code:
[ENABLE]
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(enemy)
label(exit)

newmem:
fstp dword ptr [esi+04] //original code
pushfd
pushad
cmp [esi],0
jne enemy

//godmode
mov eax,[esi+08]
mov [esi+04],eax
popad
popfd
jmp exit

enemy:
//OHK
mov [esi+04],0
popad
popfd

exit:
test eax,eax //original code
jmp returnhere

"Exigo_spdemo.exe"+1DA8DC:
jmp newmem
returnhere:
 
[DISABLE]

dealloc(newmem)
"Exigo_spdemo.exe"+1DA8DC:
fstp dword ptr [esi+04]
test eax,eax


Above should be good only when:
if [esi] == 0 then player
if [esi] != 0 then enemy

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

Joined: 02 Jun 2012
Posts: 41
Location: Canada

PostPosted: Sun Jun 03, 2012 2:12 am    Post subject: Reply with quote

Thanks so much now my god mode doesn't crash the game sometimes and the one hit kills works. The only odd problem is a few enemy units health actually says Invulnerable making my units not attack them, and not all of them really odd. It does not give Invulnerable to Neutral Units or Neutral Hostile Units only the Computer Player's unit's get it. They seem to be the unit's the computer makes and not the pre-placed starting units.
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: Sun Jun 03, 2012 5:06 am    Post subject: Reply with quote

Maybe change this line:

//OHK
mov [esi+04],0

to

//OHK
mov [esi+04],(float)0.01

For example, in Dead Space 2, writing zero wasn't good idea. Because some doors where still locked after killing mini-boss.

You can try (float)10, (float)1.0, (float)0.1
Or this check "cmp [ESI],0" isn't enough.

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

Joined: 02 Jun 2012
Posts: 41
Location: Canada

PostPosted: Sun Jun 03, 2012 6:05 am    Post subject: Reply with quote

Perfect no Invulnerable enemies now THANKS so much for your help.
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: Mon Jun 04, 2012 8:44 am    Post subject: Reply with quote

@DaHacker878, Gr8.

Btw. sometimes it is better to do "two hit kill" (games with statistics like: # of killed monsters/enemies, etc. )

_________________
Back to top
View user's profile Send private message 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