Jump to content

Help Set Values at Address with sequential offset

Recommended Posts

Help me to build this script..

gg.searchNumber('0;1;2:', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.refineNumber('0', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)

--for information, i need to edit 100 items--
--t[1], t[1].address +150, t[1].address +300, t[1].address +450, ..etc.--
--I already know the pattern is t[1].address +(150*n)--

--its for edit first item--
t = gg.getResults(5)
for i, v in ipairs(t) do
  t[1].value = 99

--here the problem --
--QUESTION : how to edit 2nd item untill 100th item in one command?--

for i, v in ipairs(t) do
  t[1].address = t[1].address +150
  t[1].value = 99 --edit 2nd item--

--its waste time to edit it one by one untill 100th item--
--i did some trial and error to edit all of them in one shoot--
--like n = (1~100) , t[1].address = t[1].address + (150*n)--
--but fail, i tried on gg.alert(1~100) its show alert 101, i feel stupid 😁 --

--READ Some guide on this web, but not yet found the answear.--


Help Set Multiple Values.lua

Share this post

Link to post
Share on other sites

local t = gg.getResults(5)
local t1 = {}
for i = 0, 99 do 
	t1[#t1+1] = {address = t[1].address + 150*i, flags = 4,value = 99}


Edited by ItsSC

Share this post

Link to post
Share on other sites
8 minutes ago, ItsSC said:

t1[#t1+1] = {address = t[1].address + 150*i, flags = 4}

t1[#t1] = {value = 99}

Second row rewrite first row.

Share this post

Link to post
Share on other sites
18 minutes ago, ItsSC said:

local t = gg.getResults(5)
local t1 = {}
for i = 0, 99 do 
	t1[#t1+1] = {address = t[1].address + 150*i, flags = 4,value = 99}


Thanks brother.. For your help,

Will try on my real codes now..

Share this post

Link to post
Share on other sites
10 minutes ago, Enyby said:

Second row rewrite first row.

The form like this was out of my knowledge..

But when i see this.. I can get it,

Where i can learn more about scripting language like this?

Anyway.. This forum really helpfull to help people like me who want to learn more about lua scripting.

Thanks alot..

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

  • Similar Content

    • By soffter
      hello, can anyone help me with this? after the offset I want to add another offset and then edit the value, I searched but I can't find a way to achieve it

      gg.searchNumber("100;300;450;25" , gg.TYPE_DWORD) 
      gg.refineNumber("25", gg.TYPE_DWORD) 
      p = gg.getResults(2)
      local q = {}
      q[1] = {}
      q[1].address = p[2].address + 16 
                                                             <----------- ADD OTHER OFFSET, BUT HOW?

      q[1].flags = 4 
      q[1].value = 100 
    • By Wyvernium
      Greetings, my fellow Guardians.
      I'm having a bit of issues with this game called "Shadow of Death". It's all based on microtransactions and it is very annoying (Thanks, devs). I'd like to get either a Lua script or the addresses to the Crystals or Soul amounts (or even a tutorial on how to change the amounts), because not even good old LP can put an end to this. I have the GG basics down, with XOR keys and everything. But where or what do I need to change the Crystals and Soul that I have currently?
      Here is a link to the app in the GP Store:
    • By imskeletonking
      I need help for coding of offsett 
      This topic is for pubg mobile

      The wallhack i.e vehicle wallhack and body wallhack is 804 offset distance from vehicle cokor and body color.....
      But 1 problem after every search the table location for vehicle color and body color change thats why i am not able to locate the exact position of that address
      The code i write with the offset is below
      Any help
      gg.searchNumber("3152519739159347240" , gg.TYPE_QWORD) ---your group search value / or your search number
      p = gg.getResults(20)  
      gg.editAll("36", gg.TYPE_QWORD)
                 -- saving the result
      for i, v in ipairs(p) do
       if v == nil then goto exit
       v.address = p.address + 0x804
       v.flags = gg.TYPE_QWORD
        v.value = "4878524296349089792"
        v.freeze = true
    • By Un_Known
      I found a value in Game located at  libgame.so + 0x8AE13.
      But when I would open lib in IDA what should be base address to which I have to add this offset to find that value?
      would it be 0000000 OR something else
    • By -SAICOBO-
      Can you search more than one mask at a time?
      gg.searchNumber("60;79", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
      gg.refineNumber("60", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
      gg.refineAddress("B08;?C9;80?", -1, gg.TYPE_FLOAT, gg.SIGN_EQUAL, 0, -1)
      "It is if you can either refine or search several addresses directly"
      My second question is whether you can add color to the letters within the script
      GradientColor | 120 | 255,0,0,255 ; 0.0 | 0,255,0,255 ; 0.5 | 0,0,255,255 ; 1.0
      Text=Hello World
      gg.alert(''..Text.. '')
      Thank you
  • Create New...