Jump to content
  • 0

Value serching by distance


Tomcio

Question

Posted

Hello ladies and gentlemen. I would like to ask if it is possible to search for a value that is 140 distance, as in the attached screenshot. So far, I do it by scanning the initial value and then the second value when I lose some HP. I will be grateful for your answer. Regards

IMG_20241028_223641.jpg

1 answer to this question

Recommended Posts

Posted
local value1 = 140
local value2 = 140
local offset = 140
gg.searchNumber(value1, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
l = gg.getResultsCount()
aaa = gg.getResults(l)
for i = 1, l do
	bbb = gg.getValues({{ address = aaa[i].address + offset, flags = gg.TYPE_DWORD }})[1].value
	if bbb == value2 then
-- Here you insert what you need, for example a print()
		print(aaa[i].address)
	end
end

 

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.