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 


Always max value

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

Joined: 10 May 2011
Posts: 84
Location: Philippines

PostPosted: Sun Apr 05, 2026 7:14 pm    Post subject: Always max value Reply with quote

I mistakenly posted this in Cheat Engine Tutorials so I'm posting this here.

I need help on how to keep a value to max after it increases and get it to stay there. My idea is to create a script that modify the opcode that set to max the value after it increase, and to nop the opcode that decreases its value. My problem is I don't know how to combine both into one script.

Or if you have a different idea on how to do this I would appreciate the help.
Back to top
View user's profile Send private message Yahoo Messenger
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 518

PostPosted: Mon Apr 06, 2026 1:28 am    Post subject: Reply with quote

Code:

mov eax, [esi+maxval]
mov [esi+value], eax
// replace maxval and value with individual offsets
// or
// ecx is max value
mov [esi+value], ecx
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3375

PostPosted: Mon Apr 06, 2026 6:04 am    Post subject: Reply with quote

This is the LUA forum.
Code:
if myval<=currentval then
  currentval=myval
...

Here's what I would do in AA:
Code:
bEnableValueCapCheck:
dd 1
iValueCap:
dd (int)100

cmp dword ptr [bEnableValueCapCheck],1
jne short lblSkip
mov eax,[iValueCap]
cmp dword ptr [<value's address>],iValueCap
jle short lblSkip // Put jge here if you want to limit it the other way around, or just remove the check and jump altogether.
mov dword ptr [<value's address>],iValueCap
lblSkip:
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 Lua Scripting 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