function conv(B1)
return 1072693248+1048576*math.floor(math.log(B1)/math.log(2))+math.floor(1048576*((B1+B1-math.pow(2,math.floor(math.log(B1)/math.log(2))+1))/math.pow(2,math.floor(math.log(B1)/math.log(2))+1)))
end
local d = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
while true do
while not gg.isVisible() do
gg.sleep(100)
end
d = gg.prompt({'health 1', 'attack 1', 'health 2', 'attack 2', 'health 3', 'attack 3', 'health 4', 'attack 4', 'health 5', 'attack 5'}, d,
{'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number'})
if (d == nil) then
os.exit()
end
for i = 1, 10, 2 do
gg.clearResults()
local s = conv(d[i])..';'..conv(d[i+1])..'::1024'
gg.searchNumber (s, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(100)
local log = i .. '; request = "' .. s .. '"; found = ' .. gg.getResultCount() .. '; edited = ' .. gg.editAll(conv(9999999999), gg.TYPE_DWORD)
print(log)
-- gg.toast(log, true)
end
gg.toast('Click on icon for next search')
gg.setVisible(false)
end