Jump to content
ThienTeakee

How to group values to edit in a search?

Recommended Posts

Hi guys, I'm new at GG

I have a script like this

gg.clearResults()

gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber('1.014.350.479;1.012.202.996;1.083.179.008;1.050.253.722;1.031.127.695;1.065.353.216;1.065.353.216;1.067.282.596:61', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(5000)

I want to change "1.014.350.479" to "1.011.011.011" and "1.050.253.722;1.031.127.695" to "1". Because I only know how to edit all of them with "editAll()", not know how to group them like this.

Thanks for your help

Share this post


Link to post
Share on other sites

Dot decimal separator. So '1.014.350.479' is not a valid number.

For change one value from group search need do refine search and editAll after that.

Or load all values and work with it in loop. Use 'if' and 'setValues'.

Share this post


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

Dot decimal separator. So '1.014.350.479' is not a valid number.

For change one value from group search need do refine search and editAll after that.

Or load all values and work with it in loop. Use 'if' and 'setValues'.

Do I have to use clearResults after each refine search? Does old group's values exist to do refine search again after doing clearResults?

Share this post


Link to post
Share on other sites

No. No.

You need read API help. Do some small examples, use record script feature and so on. Al of these described in help and on forum.

Share this post


Link to post
Share on other sites
1 minute ago, Enyby said:

No. No.

You need read API help. Do some small examples, use record script feature and so on. Al of these described in help and on forum.

Thank you so much. I'm learning now ♥️

Share this post


Link to post
Share on other sites

as a noob....this is how i would do it

search =  '1.014.350.479;1.012.202.996;1.083.179.008;1.050.253.722;1.031.127.695;1.065.353.216;1.065.353.216;1.067.282.596:61'

refine to '1.014.350.479'

then edit all to '1.011.011.011'

continue...

search = '1.011.011.011;1.012.202.996;1.083.179.008;1.050.253.722;1.031.127.695;1.065.353.216;1.065.353.216;1.067.282.596:61'

refine to '1.050.253.722;1.031.127.695'

then edit all to '1'

not a perfect way i think.... but it did worked for me in some of the script that i made.

 

Share this post


Link to post
Share on other sites

As a noob, here is my solution.

gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber('1014350479;1012202996;1083179008;1050253722;1031127695;1065353216;1065353216;1067282596:61', 4) -- search
gg.getResults(5000)
gg.searchNumber("1014350479;1050253722;1031127695",4)-- refine the three values that you want to edit
gg.editAll("1011011011;1;1",4) -- edit all of them individually

 

Edited by ItsSC

Share this post


Link to post
Share on other sites
4 minutes ago, zam535582 said:

as a noob....this is how i would do it

search =  '1.014.350.479;1.012.202.996;1.083.179.008;1.050.253.722;1.031.127.695;1.065.353.216;1.065.353.216;1.067.282.596:61'

refine to '1.014.350.479'

then edit all to '1.011.011.011'

continue...

search = '1.011.011.011;1.012.202.996;1.083.179.008;1.050.253.722;1.031.127.695;1.065.353.216;1.065.353.216;1.067.282.596:61'

refine to '1.050.253.722;1.031.127.695'

then edit all to '1'

not a perfect way i think.... but it did worked for me in some of the script that i made.

 

Yes, that what I did and it worked well. But I want to find a shortcut 😂

Share this post


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

As a noob, here is my solution.


gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber('1014350479;1012202996;1083179008;1050253722;1031127695;1065353216;1065353216;1067282596:61', 4) -- search
gg.getResults(5000)
gg.searchNumber("1014350479;1050253722;1031127695",4)-- refine the three values that you want to edit
gg.editAll("1011011011;1;1",4) -- edit all of them individually

 

Thank you, I will try that

Share this post


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

As a noob, here is my solution.


gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber('1014350479;1012202996;1083179008;1050253722;1031127695;1065353216;1065353216;1067282596:61', 4) -- search
gg.getResults(5000)
gg.searchNumber("1014350479;1050253722;1031127695",4)-- refine the three values that you want to edit
gg.editAll("1011011011;1;1",4) -- edit all of them individually

 

you totally not a noob as how noob i am...

another thing learned.

[added 4 minutes later]
10 minutes ago, ThienTeakee said:

Yes, that what I did and it worked well. But I want to find a shortcut 😂

well....we both got lucky today.

Thanks to @ItsSC

Share this post


Link to post
Share on other sites
1 minute ago, zam535582 said:

you totally not a noob as how noob i am...

another thing learned.

C'mon man. We all need to learn and improve ourself. My English is bad but I don't care because you guys still understand what I said

Share this post


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

gg.searchNumber("1014350479;1050253722;1031127695",4)-- refine the three values that you want to edit

gg.editAll("1011011011;1;1",4) -- edit all of them individually

Search not ordered, so order can be any and this code not work properly.

This is not even taking into account the fact that there may be duplicates of the same values in a row.

[added 1 minute later]
38 minutes ago, ThienTeakee said:

I want to find a shortcut

Iterate over results, build table and pass it to setValues.

Best solution if you have small amount of results.

Share this post


Link to post
Share on other sites

The group search is not ordered, so I would prefer second approach from those Enyby mentioned. For this case it would be something like the following: 

gg.setRanges(gg.REGION_ANONYMOUS)
gg.clearResults()
gg.searchNumber('1014350479;1012202996;1083179008;1050253722;1031127695;1065353216;1065353216;1067282596:61', gg.TYPE_DWORD)
local results = gg.getResults(5000)
local edited = {}
for i, v in ipairs(results) do
  if v.value == 1014350479 then
    edited[#edited + 1] = {address = v.address, flags = v.flags, value = 1011011011}
  elseif v.value == 1050253722 or v.value == 1031127695 then
    edited[#edited + 1] = {address = v.address, flags = v.flags, value = 1}
  end
end
gg.setValues(edited)

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 danihelios10
      Look that video,anyone know how to do it, if anyone knows i can explain how to hack stats 
    • By argarrize
      Pocong Hunter — 
      🇮🇩 Woi njir script pertama gua nih
      🇺🇸 Hello Everyone this my first post 
      Feature look at screenshot
       
      Password : 333
      sorry im forget to add password
    • By argarrize
      View File Pocong Hunter Script V1
      Pocong Hunter — 
      🇮🇩 Woi njir script pertama gua nih
      🇺🇸 Hello Everyone this my first post 
      Feature look at screenshot
       
      Password : 333
      sorry im forget to add password
      Submitter argarrize Submitted 02/26/2020 Category LUA scripts  
    • By RikiVeron
      gg.setRanges(32)
      gg.searchNumber("256;100F;30F::65", 4, false, 536870912, 0, -1)
      gg.getResults(1)
      gg.searchNumber("256", 4, false, 536870912, 0, -1)
      gg.getResults(1)
      gg.setValues({ -- table(f0daf39)
          [1] = { -- table(34d297e)
              ['address'] = 0xabf68a54,
              ['flags'] = 4, -- gg.TYPE_DWORD
              ['value'] = 1,
          },
      })
      gg.addListItems({ -- table(ff33edf)
          [1] = { -- table(733e72c)
              ['address'] = 0xabf68a54,
              ['flags'] = 4, -- gg.TYPE_DWORD
              ['freeze'] = true,
              ['value'] = 1,
          },
          [2] = { -- table(99105f5)
              ['address'] = 0xabf68a60,
              ['flags'] = 4, -- gg.TYPE_DWORD
              ['freeze'] = true,
              ['value'] = 0,
          },
      })
       
      PM me= rikiveron44@gmail.com
      Because i rarely online in game guardian forum. Thanks
      Please help me...
    • By nio04
      First, i am very beginning at this lua script hacking. And i am running sooo trouble doing every search (group, basic search, finding stuff)
       
      The reason i knock -- i hope someone here, can help me, how should i run these codes!!! or how to do these stuff (practical). or basic rules, how things should be done
       
      the tuts r here... is direct. impossiblefor me, to understand
       
      if someone r so friendly amd know about how to find stuff and modify them then plz knock here. i will install any other social media to join and have some conversation with you about it. 
       
      plz i do it for my curious. only education purpose. 
       
      And lastly, veryy soory for my bad English.
×
×
  • Create New...