Jump to content

Recommended Posts

Posted

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 ?

Posted

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?

Posted

Oh nevermind, I found out my problem. I was doing it all wrong. Thanks for the help though @Enyby

Posted (edited)

Can any one teach me how to write lua scripts for game guardian

I dont know whats going on when i watch a tutorial on youtube

 

Edited by RandomWords
  • Administrators
Posted

If you know the exact address, use getValues. If you do not know, then everything is different.

Posted

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

Posted
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?

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
×
×
  • 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.