Jump to content
Sign in to follow this  
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
Sign in to follow this  

  • Similar Content

    • By Kruvcraft
      this script is for evil lands.
      functions: hacking the price of the chest, reducing the cooldown
    • By Kruvcraft
      View File Evil Lands script
      this script is for evil lands.
      functions: hacking the price of the chest, reducing the cooldown
      Submitter Kruvcraft Submitted 09/26/2020 Category LUA scripts  
    • By argarrize
      View File Script : Among Us
      Hi Everyone, 
      Enjoy The Script !
       
      All descriptions of its features are in the script
      Feature :
      - No clip
      - Giant Size
      - Vision Hack
      Support ON/OFF : Yes
      *Sorry typo at my nick name lol haha
      Submitter argarrize Submitted 09/12/2020 Category LUA scripts  
    • By argarrize
      Hi Everyone, 
      Enjoy The Script !
       
      All descriptions of its features are in the script
      Feature :
      - No clip
      - Giant Size
      - Vision Hack
      Support ON/OFF : Yes
      *Sorry typo at my nick name lol haha
    • By _GanGster_
      View File League of Stickman Hack/Script
      Its a simple hack, with it you can hack gems and coins, you don't get banned, cuz this game have only protection for resources. Good luck!
      Submitter _GanGster_ Submitted 04/21/2019 Category LUA scripts  
×
×
  • Create New...