Jump to content
  • 0

Value serching by distance


Tomcio
 Share

Question

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

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
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

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.