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 


Script Help. Increase value but do not decrease

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

Joined: 25 Mar 2021
Posts: 3

PostPosted: Thu Mar 25, 2021 12:10 pm    Post subject: Script Help. Increase value but do not decrease Reply with quote

So i have a script made and code written out but im unsure how to go about doing this. i want to make the value only be able to increase but not decrease this is for health.

this is my code:

ENABLE]

aobscan(test,F3 0F 11 68 0C 49 63)
alloc(newmem,$1000,test)

label(code)
label(return)

newmem:

code:
movss [rax+0C],xmm5 //this is what i want to change
jmp return

test:
jmp newmem
return:
registersymbol(test)

[DISABLE]

test:
db F3 0F 11 68 0C

unregistersymbol(test)
dealloc(newmem)

i know i can change "movss [rax+0C],xmm5" to "mov [rax+0C],(float)#"
--# being the float value but i still want the value to increase. i just dont want it to decrease but idk how to do it and ive been looking for an answer and havent found one so im making a post. please help if you can
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4719

PostPosted: Thu Mar 25, 2021 1:20 pm    Post subject: Reply with quote

Code:
code:
  // if xmm5 <= [rax+0C], skip write
  comiss xmm5,[rax+0C]
  jbe short @f
  movss [rax+0C],xmm5
@@:
  jmp return

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
rambo7880
How do I cheat?
Reputation: 0

Joined: 25 Mar 2021
Posts: 3

PostPosted: Thu Mar 25, 2021 9:49 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Code:
code:
  // if xmm5 <= [rax+0C], skip write
  comiss xmm5,[rax+0C]
  jbe short @f
  movss [rax+0C],xmm5
@@:
  jmp return



Well it works but it also works on enemies and now they cant die lol
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4719

PostPosted: Thu Mar 25, 2021 10:11 pm    Post subject: Reply with quote

Yeah, that's difficult for a beginner to deal with. Try looking at step 9 of the CE tutorial. There are plenty of video walkthroughs that might provide more information. e.g. Dark Byte made one here:
https://www.youtube.com/watch?v=m6YLs05o8xA

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
rambo7880
How do I cheat?
Reputation: 0

Joined: 25 Mar 2021
Posts: 3

PostPosted: Thu Mar 25, 2021 11:27 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Yeah, that's difficult for a beginner to deal with. Try looking at step 9 of the CE tutorial. There are plenty of video walkthroughs that might provide more information. e.g. Dark Byte made one here:
youtube(dot)com/watch?v=m6YLs05o8xA


alrighty thanks ill give it a watch, im try to figure this out

--[edit] yeah i cant figure it out, manly because its xmm's everything i watch or see is for eax so im confused
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