LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1066 Location: 0x90
|
Posted: Thu Jan 12, 2023 3:18 pm Post subject: |
|
|
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
|
|
|