Jump to content
  • 0

How to goto a pointer in a script?


Question

Posted

How do i goto a pointer or at least get the address(or value) it is pointing to in a lua script

i cant find much info on this in the help just a single line that outputs the same result as a regular gg.getResults

 

12 answers to this question

Recommended Posts

  • 0
Posted
6 hours ago, Enyby said:

Use getResults for get value. Use value as address. It is called pointer.

Thank you for the response, how is it that i retrieve the Hex little-endian notation from a specified search result in a script, I see only a Hex search in the documentation

  • 0
  • Administrators
Posted

All android use little-endian.

In any case, you can use google for understand what is that. And find byte swap algorithm and so on.

  • 0
Posted
All android use little-endian.
In any case, you can use google for understand what is that. And find byte swap algorithm and so on.
Shouldn't there be a documented function to retrieve the hex value in a script that we see along with the floats dwords bytes xor etc when we goto a value in game guardian ?

Sent from my SM-S337TL using Tapatalk

  • 0
Posted (edited)
4 hours ago, Enyby said:

All android use little-endian.

In any case, you can use google for understand what is that. And find byte swap algorithm and so on.

I think maybe I did not explain my question very well

in a script after doing gg.searchNumber()

and gg.getResults()

i have the Address selected in  this screen shot in the results table

1040828058_Screenshot_20190101-0129041.thumb.png.a143bad6f2a4b5c31a39bdaf281ef780.png

in a script is there a function to goto or simply retrieve  the address stored in the Hex little-endian notation field?

any way at all to get it? even if i need to dump data to a file and then parse it

 

Edited by BadCase
  • 0
  • Administrators
Posted

If you need address, then you have field address. If you need show value as hex number - use lua power for this. It is common question, so you can google answer for it.

On screen 0xA86EDED0 = -1.469.129.008

You can check it in any hex converter.

  • 0
Posted
If you need address, then you have field address. If you need show value as hex number - use lua power for this. It is common question, so you can google answer for it.
On screen 0xA86EDED0 = -1.469.129.008
You can check it in any hex converter.
Thank you I was missing the 0X at the beginning when I tried, sorry was up all night and my brain is going at half speed.

I need to have a no coding when sleep deprived rule for myself lol

Sent from my SM-S337TL using Tapatalk

  • 0
Posted
33 minutes ago, Enyby said:

If you need address, then you have field address. If you need show value as hex number - use lua power for this. It is common question, so you can google answer for it.

On screen 0xA86EDED0 = -1.469.129.008

You can check it in any hex converter.

thank you again it was an incredibly simple one line solution if anyone else needs to do it.

p = string.gsub(("%x"):format(-1469129008), "ffffffff", "")
 

 

  • 0
  • Administrators
Posted
36 minutes ago, BadCase said:

p = string.gsub(("%x"):format(-1469129008), "ffffffff", "")

If you need 32-bit hex value (8 hex digit) it must be:

p = ("%x"):format(-1469129008):sub(-8)

Because if you try use -1 with your code, you can get empty string.

  • 0
Posted
7 hours ago, Enyby said:

If you need 32-bit hex value (8 hex digit) it must be:


p = ("%x"):format(-1469129008):sub(-8)

Because if you try use -1 with your code, you can get empty string.

Nice thank you again for the help 

  • 0
Posted

Little tweak to the solution above, so that returned string will look like address in GG:

function toHexString(n)
  return string.format('%08X', n):sub(-8)
end

print(toHexString(12398754))

 

  • 0
Posted (edited)
On 12/31/2018 at 11:28 PM, Enyby said:

Use getResults for get value. Use value as address. It is called pointer.

I am trying to do this libBase + offset then goto pointer how can i achieve that i checked api but I didn't find anything that will help me about this

Edited by Shadow_here

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.