Jump to content
  • 0

I want to edit many address from original address


anhdrg

Question

1 answer to this question

Recommended Posts

To target a value base on another value, it is all about address and offset. Eg 

Value1.address = 0x27266 

Now just calculate the offset to the value you want to edit so 

Value2 address = Value1.address + offset

now let see a practical example 

-- I have a group search
gg.searchNumber('10;20;39', gg.TYPE_DWORD)
-- now I want to edit 4 value above
-- the value 10
gg.refineNumber('10', gg.TYPE_DWORD)
local baseAdrr = gg.getResults(1)[1].address
-- here I used minus (-) since you want to edit
--.value above. if you want to edit value that
--. come after the base address you will use plus (+)
gg.setValues({
  {
    address = baseAdrr - myOffset
    flags = gg.TYPE_DWORD
    value = "value to edit to"
  },
  {
   address = baseAdrr - myOffset
   flags = gg.TYPE_DWORD
   value = "value to edit to"
  },
}
-- you can edit as many as you want.
-- but since you see this code is
-- repeating itself multiple times
-- you should wrap it to a function

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.