Jump to content
  • 0

Offset help


Crystal_Mods100x
 Share

Question

Hi everyone im requesting help here because i was making a script for a game and i could not get it to work it requires 20 shotgun ammo then it needs to be refined to 16 then i caculated the 2 numbers to offset and i got 70 (0x46), i entered the number but it does not work (it works when player glides toward the direction they are pointing toward + fast fire rate)

here is the source code i did not code this all credits go towards > @AKRAMRAZA for coding the script base Thank you 😃

but here is the problem i keep getting the wrong results and it does not work -Source code

function test()  
gg.clearResults()
gg.searchNumber("20", gg.TYPE_DWORD)
gg.alert('10 seconds to change ammo to 17')
gg.sleep(10000) --10 seconds
gg.refineNumber("16", gg.TYPE_DWORD)
p = gg.getResults(1)
local q = {}
q[1] = {}
q[1].address = p[1].address + 0x46     --address to the offset(ex: -4) to the refined result
q[1].flags = gg.TYPE_FLOAT             --datatype which i want to edit the value
q[1].value = 1                         --value i want to edit the glide value to
gg.setValues(q)
gg.alert('Done')
gg.clearResults()
end
function stop()
os.exit()
end
main = gg.choice({'Glide speed','Exit'})
if main==1 then
test()
end
if main==2 then
stop()
end

But what am i doing wrong? i also dont know how many results only one result comes in for the shotgun ammo is that?

Link to comment
Share on other sites

Recommended Posts

  • 0
3 hours ago, MonkeySAN said:

Did you get the right offset..??

20210205_021910.thumb.jpg.b41fa0180e064df4844fdcf2a7ffa7e4.jpg

20210205_022024.thumb.jpg.b1facac951d9f5d72c52f111986cde04.jpg

20210205_022702.thumb.jpg.78ca3516121654d620c0cdc59bb98f63.jpg

this is my offset..different from yours but you always write it like that.

where you had got that 46...??

WHAT. i got 70 when i caculated the 2? what just happened ;-; i really caculated 70 there is no way

lemme try that then =)) wait. did u convert it to hex?

Edited by Crystal_Mods100x
was this hex?
Link to comment
Share on other sites

  • 0
9 hours ago, Crystal_Mods100x said:

WHAT. i got 70 when i caculated the 2? what just happened ;-; i really caculated 70 there is no way

lemme try that then =)) wait. did u convert it to hex?

didn't u convert hex to dec, in first step in offset???🙄

Link to comment
Share on other sites

  • 0
13 hours ago, Crystal_Mods100x said:

WHAT. i got 70 when i caculated the 2? what just happened ;-; i really caculated 70 there is no way

lemme try that then =)) wait. did u convert it to hex?

nope.

the offset 68 is already in Hex.

therefore you must write 

= 0x68

Edited by MonkeySAN
Link to comment
Share on other sites

  • 0
4 hours ago, nio04 said:

didn't u convert hex to dec, in first step in offset???🙄

to convert it to Dec...you can use calculator app that can do just that.

example your offset 70

20210205_191331.thumb.jpg.25a37ed5b8becf55a8d2ea4d8e2ed67e.jpg

or you can use GG itself to convert it.

1547127085_Screenshot_20210205-191228_NovaLauncher.thumb.jpg.4f17ed0e5ec95ee336357b2ef781adb3.jpg

must put h behind it...then tap the pointer down next to it to get to below screen.

20210205_191302.thumb.jpg.479b2114d2ac11a8990f2caff11c244e.jpg

offset in Dec is 112..so you must write like this

= shotgun ammo address + 112

you can use either both of them but always write it like this for :

Hex = address + 0x70

Dec = address + 112

Edited by MonkeySAN
Link to comment
Share on other sites

  • 0
On 2/5/2021 at 6:31 AM, MonkeySAN said:

i think this is how you had got your offset wrong.

you think it was Dec then convert it to Hex.

20210205_192921.thumb.jpg.86f9909c166de0582d1e2760e50092a8.jpg

Question? what do i do if i get a letter as my offset? like C. im modding a game called pixel force and i caculated 2 numbers 

one being the original value (ammo) other being the bullet speed or range (6.0F) or (20 something F)

after i caculated the 2 it just gave me C

Link to comment
Share on other sites

  • 0

that offset C is Hex...

refer the example i gave above..you should have know what to do.

what you C is what you get is thats how you write it.

even if the offset got godzillion numbers/letters.

Edited by MonkeySAN
Link to comment
Share on other sites

  • 0
2 hours ago, MonkeySAN said:

that offset C is Hex...

refer the example i gave above..you should have know what to do.

what you C is what you get is thats how you write it.

even if the offset got godzillion numbers/letters.

Oh. so just 0x12

Edited by Crystal_Mods100x
dec to hex
Link to comment
Share on other sites

  • 0

🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️

Please do READ what  MonkeySAN had wrote and explained all above.

its plain and simple.

cannot read very well in English...well use google translate.

for better find a person who can read well in English.

Edited by zam535582
Link to comment
Share on other sites

  • 0
1 hour ago, Crystal_Mods100x said:

This is hard.

the number gg spit out was 70 so 0x70 worked for me

i still do not get the C part im supposed to convert C into dex c into decimal is 12

why isnt it 0x12

 

 

Screenshot_20210209-202920.png

i got the 46 because i convert 70 to hex

Edited by Crystal_Mods100x
screenshot
Link to comment
Share on other sites

  • 0

Things you should know before understanding how everything works.

There are four major number systems. 

1. Binary

2. Octal

3. Decimal

4. Hexadecimal

Range

Binary system consist of 0 and 1 only. 

Octal system consist of 0 to 7 only.

Decimal consist of 0 to 9 only.

Hexadecimal includes 0 to 9 and A, B, C, D, E, F.

 

Programming syntax (PART THAT YOU GET CONFUSED)

Every programming has a special syntax for programmers to code whatever number system they want. Since we are using Lua, we focus on Lua syntax.If you want to print out 30 in decimal, you use print(30). But if you want to print 30 in decimal from hexadecimal, you use print(0x1e). 

0x1e: 0x indicates this number is in hexadecimal, 1e means 30 in decimal.

Now, look back to what you get from game guardian, offset :70. The 70 is in hexadecimal, so it works when you write 0x70 or 112. Also, 0xC not equal to 0x12, but 0xC equal to 12.

Link to comment
Share on other sites

  • 0
Quote

 

16 hours ago, Crystal_Mods100x said:

This is hard.

the number gg spit out was 70 so 0x70 worked for me

i still do not get the C part im supposed to convert C into dex c into decimal is 12

why isnt it 0x12 (i also used dword but the shotgun has 2 types that logs ammo which is dword and word)

 

Another problem. i only used one value which was dword i did not used the word value to get the glide speed. thats why its probably diffrent because im  not using word im just using only one value thats probably why i got 0x70 one more thing is the word that logs shotgun ammo is exactly the same as my dword value for the shotgun

and yes 0x70 works for the glide speed. and some how the region changed from .bss to anonymous

Edited by Crystal_Mods100x
range changed
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.