Jump to content
  • 0

Help me to Learn and fix this lua code


Tjpatel99090

Question

This the Code i am using on Script 

function st1()
 gg.setRanges(gg.REGION_ANONYMOU)
  gg.clearResults()
  gg.searchNumber("1 073 741 824;1 058 642 330;1 099 956 224::41", gg.TYPE_DWORD)
  gg.refineNumber("1 073 741 824", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
  gg.getResultsCount()
  gg.getResults(1)
  gg.startFuzzy(gg.TYPE_FLOAT, gg.getResults(gg.getResultsCount())[1].address - 100, gg.getResults(gg.getResultsCount())[1].address - 92)
  gg.getResults(3)[1].value = 177
  gg.getResults(3)[2].value = 5
  gg.getResults(3)[3].value = -4
  gg.setValues((gg.getResults(3)))
end 

### PROBLEM : IT'S NOT CHANGING Values ###

Results of load 

gg.setRanges(gg.REGION_ANONYMOUS)
gg.clearResults()
gg.searchNumber("1 073 741 824;1 058 642 330;1 099 956 224::41", gg.TYPE_DWORD)
gg.refineNumber("1 073 741 824", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResultsCount()
gg.getResults(1)
gg.startFuzzy(gg.TYPE_FLOAT, 0x7829b90e70, 0x7829b90e78)
gg.getResults(3)
gg.setValues({ -- table(825ca8b)
    [1] = { -- table(e4fc768)
        ['address'] = 0x7829b90e70,
        ['flags'] = 16, -- gg.TYPE_FLOAT
        ['value'] = 129.89476013183594,
    },
    [2] = { -- table(929c781)
        ['address'] = 0x7829b90e74,
        ['flags'] = 16, -- gg.TYPE_FLOAT
        ['value'] = 0.37661129236221313,
    },
    [3] = { -- table(597026)
        ['address'] = 0x7829b90e78,
        ['flags'] = 16, -- gg.TYPE_FLOAT
        ['value'] = 31.283729553222656,
    },
})
gg.setVisible(false)

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Try this:





--
function st1()
	gg.setRanges(gg.REGION_ANONYMOUS)
	gg.clearResults()
	gg.searchNumber("1 073 741 824;1 058 642 330;1 099 956 224::41", gg.TYPE_DWORD)
	gg.refineNumber("1 073 741 824", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
	local found = gg.getResults(gg.getResultsCount())
	gg.clearResults()
	for z, x in next, found do
		gg.startFuzzy(gg.TYPE_FLOAT, x.address - 100, x.address - 92)
		break
	end
	found = gg.getResults(gg.getResultsCount())
	for z, x in next, found do
		for z, x in next, {177, 5, -4} do
			found[z].value = x
		end
		break
	end
	for z, x in next, found do
		gg.setValues(found)
		break
	end
end 

 

Link to comment
Share on other sites

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.