Jump to content
Enyby

LUA scripting

Recommended Posts


thx but i already made a script that works it loads years but it works 

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

If this is 32 bit process then this is same.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

How can i search an adress and edit it in a script is it 

gg.searchAdress({'000',...

Or how does this work?

Edited by RandomWords

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Type random words instead of reading the API help.

Share this post


Link to post
Share on other sites
Type random words instead of reading the API help.
l m a o

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
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

×
×
  • Create New...