Jump to content

How to clear listItems and reset values?


 Share

Recommended Posts

first not that it is not need to add value in the saved list if you are not freezing them 

 

I recommend this in case of no freeze 

local values
local home = {}
function home.menu ()
	debug = -1
	if not values then
		gg.clearResults()
		gg.searchNumber(4, gg.TYPE_DWORD)
		values = gg.getResults(gg.getResultsCount())
		gg.clearResults()
	end
	local menu = gg.choice({"Activate hack","Deactivate hack","Exit"},0,"")
	if menu == nil then return nil
	elseif menu == 1 then home.activate()
	elseif menu == 2 then home.deactivate()
	end
end
function home.activate ()
	gg.loadResults(values)
	gg.getResults(#values)
	gg.editAll("5", gg.TYPE_DWORD)
	gg.clearResults()
	gg.toast("Activated")
end
function home.deactivate ()
	gg.loadResults(values)
	gg.getResults(#values)
	gg.editAll("5", gg.TYPE_DWORD)
	gg.clearResults()
	gg.toast("Deactivated")
end
while true do
	if gg.isVisible(true) then
		gg.setVisible(false) debug = 1
	end
	if debug == 1 then home.menu() end
end

 

note this will only work if all values are edited to the same value, also the default values for all is the same

Link to comment
Share on other sites

2 hours ago, MAARS said:

first not that it is not need to add value in the saved list if you are not freezing them 

 

I recommend this in case of no freeze 

local values
local home = {}
function home.menu ()
	debug = -1
	if not values then
		gg.clearResults()
		gg.searchNumber(4, gg.TYPE_DWORD)
		values = gg.getResults(gg.getResultsCount())
		gg.clearResults()
	end
	local menu = gg.choice({"Activate hack","Deactivate hack","Exit"},0,"")
	if menu == nil then return nil
	elseif menu == 1 then home.activate()
	elseif menu == 2 then home.deactivate()
	end
end
function home.activate ()
	gg.loadResults(values)
	gg.getResults(#values)
	gg.editAll("5", gg.TYPE_DWORD)
	gg.clearResults()
	gg.toast("Activated")
end
function home.deactivate ()
	gg.loadResults(values)
	gg.getResults(#values)
	gg.editAll("5", gg.TYPE_DWORD)
	gg.clearResults()
	gg.toast("Deactivated")
end
while true do
	if gg.isVisible(true) then
		gg.setVisible(false) debug = 1
	end
	if debug == 1 then home.menu() end
end

 

note this will only work if all values are edited to the same value, also the default values for all is the same

Hey bro! when my values change, they freeze. And only some of the changed values are the same, and the default value is not the same, I think it's hard math!

Link to comment
Share on other sites

17 hours ago, hoangninyb said:

clear all values in listItems

gg.clearListItems()

17 hours ago, hoangninyb said:

reset the values that have been changed many times to their original values!

Use gg.saveVariable to save original value.

This example:

gg.searchNumber("1234;1.0F;12B", 4)
if gg.getResutsCount() > 0 then
	local a = gg.getResuts(gg.getResutsCount())
	gg.clearResults()
	gg.saveVariable(a, gg.EXT_CACHE_DIR.."/orig.value")--save original value
	--dofile(gg.EXT_CACHE_DIR.."/orig.value")--revert to original value
	for _, __ in next, a do 
		if __.flags == gg.TYPE_DWORD then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		elseif __.flags == gg.TYPE_FLOAT then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		elseif __.flags == gg.TYPE_BYTE then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		end
	end
	--gg.setValues(a)--apply you value
end

 

Link to comment
Share on other sites

2 hours ago, HEROGAMEOfficial said:

gg.clearListItems()

Use gg.saveVariable to save original value.

This example:

gg.searchNumber("1234;1.0F;12B", 4)
if gg.getResutsCount() > 0 then
	local a = gg.getResuts(gg.getResutsCount())
	gg.clearResults()
	gg.saveVariable(a, gg.EXT_CACHE_DIR.."/orig.value")--save original value
	--dofile(gg.EXT_CACHE_DIR.."/orig.value")--revert to original value
	for _, __ in next, a do 
		if __.flags == gg.TYPE_DWORD then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		elseif __.flags == gg.TYPE_FLOAT then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		elseif __.flags == gg.TYPE_BYTE then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		end
	end
	--gg.setValues(a)--apply you value
end

 

Bro, it

Don't work
[added 4 minutes later]

gg.clearListItems() error

 

Link to comment
Share on other sites

3 hours ago, HEROGAMEOfficial said:

gg.clearListItems()

Use gg.saveVariable to save original value.

This example:

gg.searchNumber("1234;1.0F;12B", 4)
if gg.getResutsCount() > 0 then
	local a = gg.getResuts(gg.getResutsCount())
	gg.clearResults()
	gg.saveVariable(a, gg.EXT_CACHE_DIR.."/orig.value")--save original value
	--dofile(gg.EXT_CACHE_DIR.."/orig.value")--revert to original value
	for _, __ in next, a do 
		if __.flags == gg.TYPE_DWORD then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		elseif __.flags == gg.TYPE_FLOAT then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		elseif __.flags == gg.TYPE_BYTE then 
			a[_].value = a[_].value -- Edit your value 
			--a[_].freeze = true --If you want freeze value
		end
	end
	--gg.setValues(a)--apply you value
end

 

Hey bro! I solved this problem using gg.clearList()

gg.saveList()

gg.loadList()

thank you for your help!

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.