Jump to content
  • 0

Any lua script command to just ADD to a value??


spinninglink

Question

Posted

Currently I'm using a script to search for values then edit them, such as:

gg.searchNumber('"3483;698;210"', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0xb0b00000, 0xbf7fffff)
revert = gg.getResults(100)
gg.editAll('"1500"', gg.TYPE_DWORD)

 

However, I want to just add 1500 to the current values, I dont want to CHANGE IT completely.   Something like a gg.AddAll()  command? or something? 

Thank you!
 

4 answers to this question

Recommended Posts

  • Administrators
Posted

Load values to table via getResults.

Loop over table and add to value desired amount.

Set values back by setValues.

Posted

What do you mean "loop over table and add to value" .   I'm using  gg.getResults(100) already, but even when I record the script from game guardian and use the "add to value" option, it doesn't reflect it in the script. 

  • Administrators
Posted

Google what is that lua loop.

I am not going to explain to you every silly question. Learn yourself or forget about scripts. There is enough information on the Internet.

  • Administrators
Posted
gg.clearResults()
gg.searchNumber('42', gg.TYPE_DWORD)
local t = gg.getResults(100)
for i, v in ipairs(t) do
	v.value = v.value + 10
end
gg.setValues(t)

 

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.