 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
DaHacker878 Cheater
Reputation: 1
Joined: 02 Jun 2012 Posts: 41 Location: Canada
|
Posted: Sat Jun 02, 2012 11:13 am Post subject: Help with adding One-Hit Kill to my God Mode Hack |
|
|
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 |
|
 |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Sat Jun 02, 2012 12:04 pm Post subject: |
|
|
| 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 |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jun 02, 2012 1:07 pm Post subject: |
|
|
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 |
|
 |
DaHacker878 Cheater
Reputation: 1
Joined: 02 Jun 2012 Posts: 41 Location: Canada
|
Posted: Sun Jun 03, 2012 2:12 am Post subject: |
|
|
| 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 |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 03, 2012 5:06 am Post subject: |
|
|
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 |
|
 |
DaHacker878 Cheater
Reputation: 1
Joined: 02 Jun 2012 Posts: 41 Location: Canada
|
Posted: Sun Jun 03, 2012 6:05 am Post subject: |
|
|
| Perfect no Invulnerable enemies now THANKS so much for your help.
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jun 04, 2012 8:44 am Post subject: |
|
|
@DaHacker878, Gr8.
Btw. sometimes it is better to do "two hit kill" (games with statistics like: # of killed monsters/enemies, etc. )
_________________
|
|
| Back to top |
|
 |
|
|
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
|
|