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 


How to multiply the value in a register?

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

Joined: 29 Jul 2013
Posts: 38

PostPosted: Mon Aug 31, 2020 11:21 am    Post subject: How to multiply the value in a register? Reply with quote

I have this code which deducts health from enemies when you attack them:

Code:
sub [rbx+000000B0],r14d


I can modify it with a large value to produce one hit kills:

Code:
sub [rbx+000000B0],5000


But what I really want is to multiply the value of r14d, because I think that's the damage output of the currently held weapon.

How do you do that? I've tried:

Code:
sub [rbx+000000B0],[r14d x 8]


But it won't compile.

Thanks
Back to top
View user's profile Send private message
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 129
Location: Milkey Way

PostPosted: Mon Aug 31, 2020 7:18 pm    Post subject: Reply with quote

There are multiple ways u can make One Hit KIll these are a few

Code:
mov r14d,[rbx+B0]             //r14d has max health value of enemy
sub [rbx+000000B0],r14d


Other way (the simplest way)
Code:
mov [rbx+B0],00


But if your main objective is to make a multiplier then:
Code:
shl r14d,2 //multiplies r14d with 4
shl r14d,3 //multiplies r14d with 8
shl r14d,4 //multiplies r14d with 16

then you can do:
Code:
sub [rbx+000000B0],r14d

but do note that this method will not be one hit kill.

Another way to make a multiplier:

Code:
imul r14d,r14d,5   //multiples r14d with 5 and stores the value in r14d
sub [rbx+000000B0],r14d

_________________
Hitler PeaceBeUponYou
Back to top
View user's profile Send private message
daninthemix
Cheater
Reputation: 0

Joined: 29 Jul 2013
Posts: 38

PostPosted: Mon Aug 31, 2020 10:56 pm    Post subject: Reply with quote

Brilliant - thanks so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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