Jump to content
  • 0

I want to edit many address from original address


anhdrg

Question

Posted

I have value and address in PIC1

I want to make a scripts edit many value at Address above 30.
 

What gg classes can I use?

z3394723940920_73f3a283033cba8762e2fbdbfe8a8585.jpg

z3394723950770_2196585451f406ef2ce6c7a52f6510c0.jpg

z3394723959105_976829f7fb6f9934276a2cc5e5ae6f0c.jpg

1 answer to this question

Recommended Posts

Posted

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

 

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.