Jump to content
ThienTeakee

How to group values to edit in a search?

Recommended Posts

6 minutes ago, Enyby said:

No. Any loop work one-by-one. But you do same work again and again.

You can compile both examples to LASM and compare count of instructions.

You will be unpleasantly surprised by the number of instructions in your code.


for i = 1 ,#t1 do
if(t1[i].value==1014350479)then -- get t1[i]
    t1[i].value = 1011011011 -- get t1[i] again
    elseif(t1[i].value==1050253722 or t1[i].value ==1031127695)then -- get t1[i] two times
    t1[i].value = 1 -- get t1[i] again
	end
end

Lua do not optimize any code. So if you write get same value few times - lua do it for you. With decrease performance, because it is pointless work.

Aight, this refreshed my knowledge of how the loop actually works. Thanks

Share this post


Link to post
Share on other sites

4 minutes ago, CmP said:

it does not really matter when results count is relatively small.

Depends on the specific situation. For example, if the code needs to be executed within a certain time frame or 30 such code sections must be executed. In this case, even for 100 elements there can be a noticeable difference.

Share this post


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

You can make it is faster, by cache get 'value' from inner table:


local results = gg.getResults(5000)
for i, v in ipairs(results) do
  local value = v.value
  if value == 1014350479 then
    v.value = 1011011011
  elseif value == 1050253722 or value == 1031127695 then
    v.value = 1
  else
    results[i] = nil
  end
end
gg.setValues(results)
results = nil

 

the previous one was already gave a big improvement in my script.

lots new things i had learned today from this topic only.

Share this post


Link to post
Share on other sites

so i had this code = 0;2;800;0::13

want to change = 2;800 

i want to give user to change =  2 to any value they like

but change = 800 to a fixed value.

how can i do that??

Share this post


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

so i had this code = 0;2;800;0::13

want to change = 2;800 

i want to give user to change =  2 to any value they like

but change = 800 to a fixed value.

how can i do that??

use prompt for help and do the same as the iterate, just v.value = prompt[1]

Share this post


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

use prompt for help and do the same as the iterate, just v.value = prompt[1]

many thanks.

got it now.

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 Wisteria
      Sorry to say admin.. Forgive me if thi is wrong saying.. 
      But the most difficult hack anyone can introduce in this platform seems to be homescapes hack.. No scrip for it no hack for it at all.. I have made request and help yet everyone who creates scripts close their eyes from it.. That shows no one is capable of making the hack script... Pls is anyone capable of creating it????? 
    • By mlbb123190
      can some help me to fix this my record script in gg,,im newbee here please someone??
       
      -- main code
      gg.searchNumber("198D;1D;1D;0D;0F;0D::21", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
      gg.processResume()
      gg.processResume()
      gg.refineNumber("5", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
      revert = gg.getResults(100, nil, nil, nil, nil, nil, nil, nil, nil)
      local t = gg.getResults(100, nil, nil, nil, nil, nil, nil, nil, nil)
      for i, v in ipairs(t) do
          if v.flags == gg.TYPE_DWORD then
              v.value = "99999999"
              v.freeze = true
          end
      end
      gg.addListItems(t)
      t = nil
      gg.processResume()
      revert = gg.getResults(100, nil, nil, nil, nil, nil, nil, nil, nil)
      local t = gg.getResults(100, nil, nil, nil, nil, nil, nil, nil, nil)
      for i, v in ipairs(t) do
          if v.flags == gg.TYPE_DWORD then
              v.value = "5"
              v.freeze = true
          end
      end
      gg.addListItems(t)
      t = nil
      gg.processResume()
       
       
       
       
      i appreciate any help!!
      thank you!!
      unliammo.txt
    • By mkconsult
      Hello,
      Have rooted phone. But unable to hack ludo king in both online and offline mode. Even downloaded lua script available . every time after refine search 3results are coming. Wen I edit value to 6 in all 3. On dice it show 6 but actual show other no.  But it work wen I play with computer since i get 1 search result. Wat to do. 
    • By Hamy200
      https://play.google.com/store/apps/details?id=com.futureplay.battleground
      Hello! Does anyone know how to hack Battlelands Royale e.g Speedhack, godmode, ammo etc.
      I have tried the speedhack on gameguardian but it doesn't work and changing the ammo also doesn't work. 
      There are other LUA scripts but they don't work.
      Thanks
       
       
       
    • By loversSlayer
      Want to use group search with variable.
      Its easy to search with one var like (var, gg.TYPE_), but i want to know is there way that i could put var in group search like (1;1~100;var;98::16, gg TYPE_)
      For me its only way to search for value in script cause its always so different.
×
×
  • Create New...