|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
MustangNil Newbie cheater Reputation: 0
Joined: 13 Jun 2022 Posts: 10
|
Posted: Mon Jun 13, 2022 5:58 am Post subject: How to find and modify an "array adress" |
|
|
Well, I found a certain address that accesses the lives of all characters: "A0409689" my question is: how can I find and change the addresses that access "A0409689" to 0 in lua? I thought about making pointers to each address, but it's really unfeasible. If possible, I would like a code example. I've seen some similar threads but it's still not clear to me.
Sorry for any spelling mistakes, I'm using or translator. _________________
As always, with doubts... |
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1055 Location: 0x90
|
Posted: Mon Jun 13, 2022 8:52 am Post subject: |
|
|
You would need to know the size of the array. Assuming, that 0xA0409689 is the base address of the array and that the value type is an integer.
Code: |
local array = 0xA0409689
for i = 0, array_count -1 do
writeInteger(array + i, 0)
end
--array_count is the amount of elements within the array
|
|
|
Back to top |
|
|
MustangNil Newbie cheater Reputation: 0
Joined: 13 Jun 2022 Posts: 10
|
Posted: Mon Jun 13, 2022 11:28 am Post subject: |
|
|
LeFiXER wrote: | You would need to know the size of the array. Assuming, that 0xA0409689 is the base address of the array and that the value type is an integer.
Code: |
local array = 0xA0409689
for i = 0, array_count -1 do
writeInteger(array + i, 0)
end
--array_count is the amount of elements within the array
|
|
Could say it worked, but Could also say it didn't.
the code itself looks right, but I don't think that's exactly what I wanted. The code above modified exactly like an array, a chain of bytes. but... although I said "array" I was referring to the addresses that access the instruction from address A0409689, I wanted to find and modify the values of the addresses that access A0409689
I used the name "Array" because the instruction of A0409689 stores the life of at least 80 characters in the game, which reminds me of an Array. but I don't think that was the appropriate term, sorry for that. _________________
As always, with doubts... |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1253
|
Posted: Mon Jun 13, 2022 12:11 pm Post subject: |
|
|
I just stopped by while passing by.
This code will make every byte it reaches (80 bytes in the example) 0, including the first address given.
If you don't want the address to change, start counting from 4.
Code: | for i=4, tonumber(byte) do |
Code: | function youChoose(address,byte)
for i=0, tonumber(byte) do
local addr=address .. "+" .. i
--print(i .. " (Original byte): " .. readByte(addr))
writeBytes(addr,0)
--print(i .. " (New byte): " .. readByte(addr) .. "\n")
if i==byte then
print("The operation is complete. Please check!")
end
end
end
--use
youChoose("A0409689",80) |
_________________
|
|
Back to top |
|
|
MustangNil Newbie cheater Reputation: 0
Joined: 13 Jun 2022 Posts: 10
|
Posted: Mon Jun 13, 2022 1:06 pm Post subject: |
|
|
AylinCE wrote: | I just stopped by while passing by.
This code will make every byte it reaches (80 bytes in the example) 0, including the first address given.
If you don't want the address to change, start counting from 4.
Code: | for i=4, tonumber(byte) do |
Code: | function youChoose(address,byte)
for i=0, tonumber(byte) do
local addr=address .. "+" .. i
--print(i .. " (Original byte): " .. readByte(addr))
writeBytes(addr,0)
--print(i .. " (New byte): " .. readByte(addr) .. "\n")
if i==byte then
print("The operation is complete. Please check!")
end
end
end
--use
youChoose("A0409689",80) |
|
I seem to get it, it worked! thank you so much! _________________
As always, with doubts... |
|
Back to top |
|
|
|
|
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
|
|