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 


Check value of address help (lua)

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

Joined: 27 Jul 2021
Posts: 5

PostPosted: Sun Aug 08, 2021 10:34 am    Post subject: Check value of address help (lua) Reply with quote

Is there a way to check if a value of an address (using getAdressList) is lower than 1, and if it is then do something

Something like this:

Code:
if lpvz.Value < 1 then
lpvz.Value = lpvz.Value * 1.2
end


Last edited by TitusHM on Sun Aug 08, 2021 8:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Sun Aug 08, 2021 11:05 am    Post subject: Reply with quote

Pretty much what you said. Assuming it's a 4-byte value type:

Code:

local al = getAddressList()
local addr = al.getMemoryRecordByDescription('address description here')

if addr.value < 1 then
 writeInteger(addr, math.ceil(addr.value * 1.2))
end
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