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 


Search by for numbers that are a multiple of 4

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

Joined: 05 Apr 2021
Posts: 2

PostPosted: Mon Apr 05, 2021 8:31 pm    Post subject: Search by for numbers that are a multiple of 4 Reply with quote

Hey, I'm wondering if it is possible to search for all addresses in which the value is a multiple of 4, for example. It doesn't have to be 4. For example, if I have 100 gold, and know that the value is stored as 100 times Y, but I don't know what Y is, I would like to start off the scan with "Multiple of 100" rather than "Unknown Initial Value".

Is it possible?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25796
Location: The netherlands

PostPosted: Tue Apr 06, 2021 1:29 am    Post subject: Reply with quote

yes.
check the lua formula checkbox and scan for
Code:

value % 100 == 0



% (modulo) returns what is left after dividing by the given value
so when it's 0 it's dividable by 100

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Anomander
How do I cheat?
Reputation: 0

Joined: 05 Apr 2021
Posts: 2

PostPosted: Tue Apr 06, 2021 9:31 am    Post subject: Reply with quote

Absolutely what I wanted. Is there another bit I can tag on that excludes 0 (since 0/100 = 0)? I can just follow it up with a "Greater Than 99" but I'd feel better if I could learn how to make it cleaner.
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 51

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Tue Apr 06, 2021 10:55 am    Post subject: Reply with quote

It's lua so I'm betting this would work.
Code:
value % 100 == 0 and value ~= 0

_________________
Back to top
View user's profile Send private message Visit poster's website
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