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 


Please, need help in AOB Scripting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials
View previous topic :: View next topic  
Author Message
Loveness
How do I cheat?
Reputation: 0

Joined: 30 Aug 2016
Posts: 3

PostPosted: Mon Aug 26, 2019 10:53 am    Post subject: Please, need help in AOB Scripting Reply with quote

Hi!

I found the address in the game: Monster Boy, is responsible for the walk speed of the character, so when i make an AOB Injection i have the original code:

movss [rbx+38],xmm0
jmp return

I'm new in assembler and in these codes, but reading the forum, i replace the original code, by:

Code:
...
label(myv)

newmem:

code:
  movss xmm0,[myv]
  movss [rbx+38],xmm0
  jmp return

myv:
  dq (float)1.2

...


The default value of the float point is 0.7, but i set to 1.2 that is fine for me. All works fine, but i have a problem:
This code works if i walk forward, but when i go back (the float value gets negative) it's doesn't, because i need to set in code the negative value instead of positive to work, i. e. dq (float)-1.2

Please, how to make the code to know if is a positive number, then the code to set 1.2, if is negative than to set -1.2?
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Mon Aug 26, 2019 11:53 am    Post subject: Reply with quote

just change it to mulss the original with whatever 1.2/0.7 is um... 1.714... according to my calculator. Then if it's positive it stays positive and becomes 0.7*1.714 = 1.2 and if it's negative then it's -0.7*1.714 = -1.2
_________________
https://github.com/FreeER/ has a few CE related repos
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 Tutorials 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