Dissection Help

Z

zachillios

Expert Cheater
Table Maker
Joined
Mar 3, 2017
Messages
531
So I'm new to scripting, but essentially I'm trying to do a God Mode script, and I've managed to find the code that reduces health which is
Code:
13FFF0043 - 29 87 94000000  - sub [rdi+00000094],eax
And so I dissected off of the damage everyone took, and I'm pretty sure I've found the identifier in question.



15:players
31:Enemies

So my question is how exactly would I set the script up? I tried following a few of the tutorials and everything I've tried has either had no effect, or has had me die in one hit rather than make me invisible. Because following the tutorials had me end up with:
Code:
add [rdi+00000094],eax
cmp [rdi+00000070],15
jne +6
mov eax,[rdi+00000098]
mov [rdi+00000094],eax
And this ended up with me being killed in one hit. Any help would greatly be appreciated.

0094 was current health, and then 0098 was Maximum health.
 
B

Bloodybone

Expert Cheater
Table Maker
Joined
Aug 3, 2017
Messages
319
Maybe try this out:
Code:
add [rdi+00000094],eax
cmp [rdi+00000070],(int)15
jne @f
mov eax,[rdi+00000098]
mov [rdi+00000094],eax
@@:
 
Z

zachillios

Expert Cheater
Table Maker
Joined
Mar 3, 2017
Messages
531
Bloodybone said:
Maybe try this out:
Code:
add [rdi+00000094],eax
cmp [rdi+00000070],(int)15
jne @f
mov eax,[rdi+00000098]
mov [rdi+00000094],eax
@@:
Thank you for help! So this got me a little closer. I'm now invincible, and enemies health decreases, however they never die. So the code I ended up with that does this is:
Code:
sub [rdi+00000094],eax
cmp [rdi+00000008],0
jne +6
mov eax,[rdi+00000098]
mov [rdi+00000094],eax
jmp return
So I'm still confused on how this should be setup to also include their deaths. These are all the codes that execute when an enemy is killed.



Again, thank you for your help.
 
J

JohnFK

Expert Cheater
Joined
Aug 29, 2017
Messages
52
You subtract eax from [rdi+94], then later you write eax to [rdi+94]. So [rdi+94] will ALWAYS be what EAX is. You should write it like this:

is player?
jump if not to original code
(else)
write max health in [rdi+98] to eax
write eax to [rdi+94]

In assembly it can look like this:
Code:
cmp [rdi+8],0
jne @f //jumps to the next anonymous label
mov eax,[rdi+98]
mov [rdi+94],eax 
jmp return //skip original code for player and exit script

@@: //anonymous label you dont need to declare
sub [rdi+00000094],eax //originalcode
But since it subtract a value you can also write it differently
Code:
cmp [rdi+8],0
jne @f //jumps to the next anonymous label
xor eax,eax //clears eax, so for player it subtracts 0 which doesnt change the health

@@: //anonymous label you dont need to declare
sub [rdi+00000094],eax //originalcode
 
Z

zachillios

Expert Cheater
Table Maker
Joined
Mar 3, 2017
Messages
531
JohnFK said:
You subtract eax from [rdi+94], then later you write eax to [rdi+94]. So [rdi+94] will ALWAYS be what EAX is. You should write it like this:

is player?
jump if not to original code
(else)
write max health in [rdi+98] to eax
write eax to [rdi+94]

In assembly it can look like this:
Code:
cmp [rdi+8],0
jne @f //jumps to the next anonymous label
mov eax,[rdi+98]
mov [rdi+94],eax 
jmp return //skip original code for player and exit script

@@: //anonymous label you dont need to declare
sub [rdi+00000094],eax //originalcode
But since it subtract a value you can also write it differently
Code:
cmp [rdi+8],0
jne @f //jumps to the next anonymous label
xor eax,eax //clears eax, so for player it subtracts 0 which doesnt change the health

@@: //anonymous label you dont need to declare
sub [rdi+00000094],eax //originalcode
This helped so much, I was able to get it. Thank you so much!
 
Top