Jump to content
  • 0

(Offset) Edit value with condition is a value at different address


Khi

Question

Posted

Hi,

I want to edit a value but on condition that the value is in another address.

I want to find the value 10 and edit all to the value 9999. Provided that the value at another address has:

• offset 0x8, value = 20 

• offset 0x18, value = 4

Ex:

gg.clearResults()
gg.clearList()
gg.setRanges(32)
gg.searchNumber("10",4)
F= gg.getResultsCount()
if F <= 0 then gg.alert("No found") else
r = gg.getResults(F) --I want edit all this value with condition is a value at different address (offset1 = 0x8, offset2 = 0x18)
    for i,v in pairs(r) do -- I can't do it from here. I try to learn from other help:
    local A = { address = v.address + 0x8, flags=4}
    local B = { address = v.address + 0x18, flags=4}
    if A.value == 20 and B.value== 4 then
    v.value = 100
    gg.setValues(t)
    gg.addListItems(t)
    end end 
end

Please help me!

2 answers to this question

Recommended Posts

Posted
gg.clearResults()
gg.clearList()
gg.setRanges(32)
gg.searchNumber("10",4)
F= gg.getResultsCount()
if F <= 0 then gg.alert("No found") else
r = gg.getResults(F) --I want edit all this value with condition is a value at different address (offset1 = 0x8, offset2 = 0x18)
    for i,v in pairs(r) do -- I can't do it from here. I try to learn from other help:
    local A = {[1]={ address = v.address + 0x8, flags=4}}
    local B = {[1]={ address = v.address + 0x18, flags=4}}
    A = gg.getValues(A)
    B = gg.getValues(B)
    if A[1].value == 20 and B[1].value == 4 then
    v.value = 100
    gg.setValues(r)
    end
  end 
end

I think that will do it didnt test and about to fall asleep though lol

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.