Jump to content

Question

Posted

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?

Recommended Posts

  • 0
Posted (edited)

see this pic of your offset that you had got..

20210211_012710.thumb.png.d5a63ea5622ef4222b1e696849483e49.png

whatever value it showed..that you see...be it numbers or letters or both...it ALWAYS IN HEX.

to write in a script for that offset 70 which i will say again it ALWAYS IN HEX.

you put 0x in front of 70 as 0x70 to incidate that offset 70 is a Hex.

or if you dont want use Hex...you can convert to Dec which im already show to you..

0x70 in Hex = 112 in Dec

but you not need to put 0x in front of 112 because Dec not need it...only for 70 in Hex.

if put it in front 112 as 0x112...

that will become different offset altogether..as 0x70 ≠ 0x112.

as i said before you can use the offset as in Hex or Dec.

with Hex..just go with whatever you got and put 0x in front.

with Dec...must convert the offset to Dec and dont put 0x in front.

recap :

OFFSET THAT YOU GOT AS SHOWN IN THAT PICTURE IS ALWAYS IN HEX.

Hex = address + 0xC

Dec = address + 12

Hex = address + 0x70

Dec = address + 112

i hope you can understand it now

sorry if my english is bad.

Edited by MonkeySAN
  • 0
Posted (edited)
2 hours ago, MonkeySAN said:

see this pic of your offset that you had got..

20210211_012710.thumb.png.d5a63ea5622ef4222b1e696849483e49.png

whatever value it showed..that you see...be it numbers or letters or both...it ALWAYS IN HEX.

to write in a script for that offset 70 which i will say again it ALWAYS IN HEX.

you put 0x in front of 70 as 0x70 to incidate that offset 70 is a Hex.

or if you dont want use Hex...you can convert to Dec which im already show to you..

0x70 in Hex = 112 in Dec

but you not need to put 0x in front of 112 because Dec not need it...only for 70 in Hex.

if put it in front 112 as 0x112...

that will become different offset altogether..as 0x70 ≠ 0x112.

as i said before you can use the offset as in Hex or Dec.

with Hex..just go with whatever you got and put 0x in front.

with Dec...must convert the offset to Dec and dont put 0x in front.

recap :

OFFSET THAT YOU GOT AS SHOWN IN THAT PICTURE IS ALWAYS IN HEX.

Hex = address + 0xC

Dec = address + 12

Hex = address + 0x70

Dec = address + 112

i hope you can understand it now

sorry if my english is bad.

Alright so the value i actually got was 1C i did not pay attention correctly and thats how i got the offset wrong but like u said that offset 1C will always be in hex

i need to put 0x infront of 1C to get 0x1C to indicate that its a hex what the problem was we didnt add one it was me not paying attention to the mistake i made therefore me not getting it

but now i get it. i will revert to hex Thanks Everyone and monkey san mostly. probably might have broken your fingers from all that typing

we both said 0xC without me throwing what else was there 0x1C for pixel force 2 is bullet speed

while 0x18 is bullet range which makes the bullets fly farther

Thanks everyone problem was what i really got was 1C and i said 0xC instead of 0x1C and that resulted in this  1C to dec is 28 but its still not working so imma just use dec

 

Edited by Crystal_Mods100x
hex not working

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.