Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

I'm stuck on this.

gg.setRanges(gg.REGION_C_ALLOC)
gg.searchNumber('1;2;3;4::13', gg.TYPE_DWORD)
if
	gg.getResultCount() == 0 
then
	gg.toast('Search not found')
	os.exit()
else
	p = gg.getResults(1)
	p[1].address = p[1].address + 0x653E5C= gg.getValues(p)
	p[1].address = p[1].value + 0x2CF21
	print(p)
end

IMG_20181024_105419.thumb.jpg.7babf46fec1bcd6da95a8f5528643748.jpg

How come I get 0xffffffff9257C800 instead of just 0x9257C800 ?

Link to comment
Share on other sites

When I add the list items, 0xffffffff9257C800 is the address and not 0x9257C800 and those 2 addresses don't have the same value so the code gets messed up. Any solutions?

Link to comment
Share on other sites

This may be a stupid question as I'm not really familiar with half of this stuff, but when you've completed a search and do:

a = gg.getResults(1)
print(a[1].address)

Should it print the same address that you see remaining in the results list in the UI, or does it use some other number?  Thanks in advance, and again, sorry if this is incredibly obvious!

Screenshot_2018-10-27-00-26-47.png

Link to comment
Share on other sites

26 minutes ago, Enyby said:

It is decimal number. In GG it show as hex.

Ah thank you! I just realized that after thinking to check it in a converter -_- 

So does that mean I can simply create a new item in the table and do

a[2].address = a[1].address - 4
a[2].value = 0
etc.
gg.addListItems(a) 

To go from the original address from the search results(example: 343739CC) to 343739C8 and change that value to 0, or do I need to somehow convert the hexadecimal address or use gg.setValues () or something?

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.