Jump to content
marken

how to track value change

Recommended Posts

this is for 1 value change .

local v = gg.getResults(1) gg.setVisible(false) while not gg.isVisible() do     local old = v[1].value     v = gg.getValues(v) if old ~= v[1].value then         gg.toast('changed: '..old..' -> '..v[1].value)     end     gg.sleep(100) end

 

how to make this 2 value change like 2 adress/or 2 result ?

this script is a big help for me esp farming

Share this post


Link to post
Share on other sites

The idea is same for tracking changes of multiple values. Just few things need to be changed in the code:

1. Build/get a table with all required values, not just one. Example: 

local t = gg.getResults(2) -- Using first two results
t[#t + 1] = {address = 0x11223344, flags = gg.TYPE_DWORD} -- And a value at custom address

2. Save old values of table elements before entering loop. Custom field can be used for that. Example: 

t = gg.getValues(t)
for i, v in ipairs(t) do
  v.old_value = v.value
end

3. Process all elements of the table in loop. Example: 

while not gg.isVisible() do
  t = gg.getValues(t)
  for i, v in ipairs(t) do
    if v.value ~= v.old_value then
      -- do something
      v.old_value = v.value
    end
  end
  gg.sleep(100)
end

Share this post


Link to post
Share on other sites

local v = gg.getResults(1) gg.setVisible(false) while not gg.isVisible() do     local old = v[1].value     v = gg.getValues(v) if old ~= v[1].value then         gg.setSpeed(1.0)gg.toast('changed: '..old..' -> '..v[1].value)     end     gg.sleep(100) end
gg.getResults(2)
do     local old = v[2].value     v = gg.getValues(v) if old ~= v[2].value then         gg.setSpeed(90.0)gg.toast('changed: '..old..' -> '..v[2].value)     end     gg.sleep(100) end

[added 3 minutes later]

error. how do i make that

 1st result make normal speed 

and second result make faster.

Share this post


Link to post
Share on other sites

local v = gg.getResults(1) gg.setVisible(false) while not gg.isVisible() do     local old = v[1].value     v = gg.getValues(v) if old ~= v[1].value then         gg.setSpeed(1.0)
gg.toast('changed: '..old..' -> '..v[1].value)     end     gg.sleep(100) end

 

this is working

my problem is how do i make second result for gg.setSpeed(90.0)

 

tnx for help

Share this post


Link to post
Share on other sites
6 minutes ago, marken said:

my problem is how do i make second result for gg.setSpeed(90.0)

Identically to the code for one value, just different actions in "if" blocks. For example: 

local v = gg.getResults(2)
gg.setVisible(false)
while not gg.isVisible() do
  local old1 = v[1].value
  local old2 = v[2].value
  v = gg.getValues(v)
  if old1 ~= v[1].value then
    gg.setSpeed(1.0)
    gg.toast('First value has changed: ' .. old1 .. ' -> ' .. v[1].value)
  end
  if old2 ~= v[2].value then
    gg.setSpeed(90.0)
    gg.toast('Second value has changed: ' .. old2 .. ' -> ' .. v[2].value)
  end
  gg.sleep(100)
end

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 Ampouzer
      features: ...
      money hack and diamonds hack

      auto update by the web no passwords need
      Must have internet connection
      if in the feature require password the password will be 0 or you can join on the discord and find all the passwords
      find me on discord: αμπουσερούκος καπιταλουκος#9921

      here is the official discord that i will start sell some scripts and there you will find all my scripts and you will find my new youtube account
      Join to discord if you need support and if you want to get my new scripts faster than anyone
      https://discord.gg/vEMJpkW
       
    • By Ampouzer
      View File hotel empire tycoon menu by ampouzer
      features: ...
      money hack and diamonds hack

      auto update by the web no passwords need
      Must have internet connection
      if in the feature require password the password will be 0 or you can join on the discord and find all the passwords
      find me on discord: αμπουσερούκος καπιταλουκος#9921

      here is the official discord that i will start sell some scripts and there you will find all my scripts and you will find my new youtube account
      Join to discord if you need support and if you want to get my new scripts faster than anyone
      https://discord.gg/vEMJpkW
       
      Submitter Ampouzer Submitted 01/07/2020 Category LUA scripts  
    • By Satriqc
      Please Fix virtual xposed support Pubg Mobile, No Force Close
    • By deepankar
      8.5.11 version is not installing properly help me 
       
    • By AustinWolfclaw
      I installed Bluestacks KitKat on my PC. Got GG 6.0.5 and a game I love to play with GG... Amazing Game's "Hit The Beast".
       
      Almost instantly I noticed a problem: on my ICS tablet, I would use the Speed Control to slow down the fast paced play to about 0.2 - 0.1. However, in KitKat, it doesnt work at all. It's all rooted and everything...
       
      I noticed someone released an unofficial mod called GG Extended. Tried that, then when I went to adjust speed, GGex crashed.
       
      What seems to have changed between ICS and KK that is giving GG trouble?
       
      I also tried this on my friend's KK tablet, no results there.
×
×
  • Create New...