 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
MiNDTH3G4P How do I cheat?
Reputation: 0
Joined: 20 Aug 2022 Posts: 9
|
Posted: Thu Mar 02, 2023 5:25 am Post subject: One-Hit Kill kills me in the process |
|
|
Im trying to do a one hit kill in elden ring but once I put 0 to eax and activating the script couple of enemies gets killed instantly and I get killed as well when I touch a bonfire and dead when I response every time afterwards
Is there any condition that I need to check or I am injecting the code in wrong location. I attached a sreenshot if it helps
| Code: |
alloc(newmem,2048,"start_protected_game.exe"+4340E2)
label(returnhere)
label(exit)
label(enemy)
newmem:
cmp dword ptr [rcx+000000D0],48
jne enemy
mov eax,[rcx+0000013C]
mov [rcx+00000138],eax
jmp exit
enemy:
mov eax,0
mov [rcx+00000138],eax
exit:
jmp returnhere
"start_protected_game.exe"+4340E2:
jmp newmem
nop
returnhere:
|
any help would be much appreciated
| Description: |
|
| Filesize: |
74.04 KB |
| Viewed: |
5851 Time(s) |

|
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Mar 02, 2023 9:16 am Post subject: |
|
|
Depending on the game, you may have to set health to something other than 0. If setting health to 0 causes instant death, then try setting health to something slightly above 0.
Use an instruction that is accessing all enemy health addresses (or all health addresses).
Filter hero health out, if needed.
Check if enemy health is 1 (or 0), if it is not, then jump to one-hit-kill code, otherwise, jump to originalcode.
one-hit-kill:
Set enemy health to 1 (or 0).
jmp originalcode
|
|
| Back to top |
|
 |
MiNDTH3G4P How do I cheat?
Reputation: 0
Joined: 20 Aug 2022 Posts: 9
|
Posted: Sun Mar 05, 2023 3:31 pm Post subject: |
|
|
| ++METHOS wrote: | Depending on the game, you may have to set health to something other than 0. If setting health to 0 causes instant death, then try setting health to something slightly above 0.
Use an instruction that is accessing all enemy health addresses (or all health addresses).
Filter hero health out, if needed.
Check if enemy health is 1 (or 0), if it is not, then jump to one-hit-kill code, otherwise, jump to originalcode.
one-hit-kill:
Set enemy health to 1 (or 0).
jmp originalcode |
if 1 is set then all enemies can't be killed otherwise if 0 then everyone is dead instantly
I inject the code in the instruction which is accessing all enemies and friendly health
now I am not killed in the process, therefore, filtered myself and my companion as well.
Any help please to overcome this
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun Mar 05, 2023 3:56 pm Post subject: |
|
|
Add a check after your hero/companion filter to see if health is 1. If health is equal or less than 1, jump to original code (to allow new health/damage to be applied). If health is not equal or less than 1, jump to area of code to change health value to 1.
Maybe try something like this:
| Code: |
[ENABLE]
alloc(newmem,2048,"start_protected_game.exe"+4340E2)
label(returnhere)
label(exit)
label(originalcode)
label(hero)
newmem:
cmp dword ptr [rcx+000000D0],48
je hero
cmp [rcx+00000138],1
jle originalcode
mov [rcx+00000138],1
jmp exit
hero:
mov [rcx+00000138],#999 //whatever value you want
jmp exit
originalcode:
mov [rcx+00000138],eax
exit:
jmp returnhere
//remainder of code |
That being said, you may need to try a different injection point, since I do not really know what this instruction is doing or what other instructions may also be doing etc..
|
|
| Back to top |
|
 |
bfoster15no2 How do I cheat?
Reputation: 0
Joined: 29 Apr 2017 Posts: 1
|
Posted: Sun Mar 05, 2023 9:54 pm Post subject: |
|
|
use the commonality finder to find a difference between you, your horse, and all the other enemies
_________________
This account is a treasure trove of cringe. |
|
| Back to top |
|
 |
MiNDTH3G4P How do I cheat?
Reputation: 0
Joined: 20 Aug 2022 Posts: 9
|
Posted: Sat Mar 11, 2023 7:40 am Post subject: |
|
|
| ++METHOS wrote: | Add a check after your hero/companion filter to see if health is 1. If health is equal or less than 1, jump to original code (to allow new health/damage to be applied). If health is not equal or less than 1, jump to area of code to change health value to 1.
Maybe try something like this:
| Code: |
[ENABLE]
alloc(newmem,2048,"start_protected_game.exe"+4340E2)
label(returnhere)
label(exit)
label(originalcode)
label(hero)
newmem:
cmp dword ptr [rcx+000000D0],48
je hero
cmp [rcx+00000138],1
jle originalcode
mov [rcx+00000138],1
jmp exit
hero:
mov [rcx+00000138],#999 //whatever value you want
jmp exit
originalcode:
mov [rcx+00000138],eax
exit:
jmp returnhere
//remainder of code |
That being said, you may need to try a different injection point, since I do not really know what this instruction is doing or what other instructions may also be doing etc.. |
it worked thank you very much however, i have one question
why if I put a 1 into eax register and that 1 was copied to the [rcx+00000138] in the original code
then the health of the enemy becomes static/indefinite for example
| Code: |
cmp [rcx+00000138],1
jle originalcode
mov eax,1 // rather mov [rcx+00000138],1
jmp exit
originalcode:
mov [rcx+00000138],eax // this becomes health - 1 rather enemy health is 1 and health of enemy becomes indefinite |
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Mar 11, 2023 2:14 pm Post subject: |
|
|
If we assume that eax holds the new value that the health should become after taking damage, and you keep moving 1 into eax, then the new health will always become 1, and can never decrease (just as an example, since I do not know what the instruction is actually doing).
If, however, you set the health to 1 yourself, regardless of whether or not damage is applied, and then allow the game to process that data, then the next time that damage is applied, it will move the new health value from eax into the health address, allowing the opportunity to set the new health value correctly, instead of being stuck at 1.
Hopefully that makes sense.
|
|
| Back to top |
|
 |
MiNDTH3G4P How do I cheat?
Reputation: 0
Joined: 20 Aug 2022 Posts: 9
|
Posted: Mon Mar 13, 2023 12:06 pm Post subject: |
|
|
| ++METHOS wrote: | If we assume that eax holds the new value that the health should become after taking damage, and you keep moving 1 into eax, then the new health will always become 1, and can never decrease (just as an example, since I do not know what the instruction is actually doing).
If, however, you set the health to 1 yourself, regardless of whether or not damage is applied, and then allow the game to process that data, then the next time that damage is applied, it will move the new health value from eax into the health address, allowing the opportunity to set the new health value correctly, instead of being stuck at 1.
Hopefully that makes sense. |
makes perfect sense. cheers man for all the help
|
|
| 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
|
|