Jump to content
  • 0

How to code an script to add offsets?


LightWarrior
 Share

Question

Hi,

So i used the function "Record" to make a group search of 10920;264;11000;80::233

Then i always get only this exatcly 4 results 10920,264,11000 and 80.

So i filter the result to only 10920 which is always constant value everytime i play the game, which is good to add offsets to find other values.

I save this value of 10920 and apply an offset of 990And great i found, the other value i actually want. 

The record function works fine up to this point only. After that it do not record the actions perfomed by me in game guardian.

The recorded script do not edit the value found by the offset, also i want to find 6 other values adding offsets to that value of 10920, but i don't know how to make a script do this.

It's possible? 

Edited by LightWarrior
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

in basic, it will be like this :

--after search and refine
local start = gg.getResults(1)
local target = start[1].address + 0x990

--editing
gg.setValues({
    {address = target, flags = gg.TYPE_DWORD, value = 999999} })

 

 

Edited by MonkeySAN
Link to comment
Share on other sites

  • 0
On 7/12/2024 at 11:13 PM, MonkeySAN said:

in basic, it will be like this :

--after search and refine
local start = gg.getResults(1)
local target = start[1].address + 0x990

--editing
gg.setValues({
    {address = target, flags = gg.TYPE_DWORD, value = 999999} })

 

 

If i want to apply more offsets, so it will be like
local target = start[1].address + 0x990;0x29;0x34;0x32D

like that?

And this

local start = gg.getResults(1) 

The number one here it means it will get the first result to work with it? And add the offsets?

Link to comment
Share on other sites

  • 0
1 hour ago, LightWarrior said:

If i want to apply more offsets, so it will be like
local target = start[1].address + 0x990;0x29;0x34;0x32D

like that?

it would be something like this :

--after search and refine
local start = gg.getResults(1)
local target = start[1].address + 0x990
local target2 = start[1].address + 0x29
local target3 = start[1].address + 0x34
local target4 = start[1].address + 0x32

--editing
gg.setValues({
    {address = target, flags = gg.TYPE_DWORD, value = 999999},
    {address = target2, flags = gg.TYPE_DWORD, value = 999999}, 
    {address = target3, flags = gg.TYPE_DWORD, value = 999999},  
    {address = target4, flags = gg.TYPE_DWORD, value = 999999} 
  })

 

1 hour ago, LightWarrior said:

And this

local start = gg.getResults(1) 

The number one here it means it will get the first result to work with it? And add the offsets?

yup.

adding offsets only to first result to get to another target.

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.