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 


Changing thousands of values at a time

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

Joined: 12 Jan 2023
Posts: 1

PostPosted: Thu Jan 12, 2023 12:37 pm    Post subject: Changing thousands of values at a time Reply with quote

Hello everyone! I have like thousand addresses and values. I should change them in one click. How to do that? any tutorial video or smth else?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

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

PostPosted: Thu Jan 12, 2023 3:18 pm    Post subject: Reply with quote

Create a Lua table, and a function that takes two parameters. The address and the function of which you want to change.

Code:

local my_addresses = { 0x10000000, 0x20000000 } -- This is the table

local function changeAddress(address, value)
          if address == nil or value == nil then return nil end
          writeInteger(address, value)
       end

local value_to_set = 100

for i = 1, #my_addresses do
     changeAddress(my_addresses[i], value_to_set)
end

This is assuming you want all addresses to be the same value. If you would like different values, then you could create a table with key/value pairs.

Code:

local my_addresses = {
 '0x10000000' = 100,
 '0x20000000' = 200,
} -- This is the table

local function changeAddress(address, value)
          if value == nil then return nil end
          writeInteger(address, value)
       end

for k,v in pairs(my_addresses)
     changeAddress(k, v)
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 -> General Discussions 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