Jump to content
YeetMeister

Record value change

Recommended Posts

Can somebody help me code a script where I search an value and it records the value all the time In the background

And if it changes it will output the changed value with a toast or something idk

Share this post


Link to post
Share on other sites

--Simple real-time value detector
function check()
  if r == "" or r == nil then 
      gg.searchNumber("Your code",gg.TYPE_DWORD)
  gg.refineNumber("First value in the code",gg.TYPE_DWORD)
  t1 = gg.getResults(1)
  gg.addListItems(t1)
    end
  r = gg.getListItems()
  r1 = gg.getValues(r) -- Update value
  gg.alert("Address: "..r1[1].address.."\nValue: "..r1[1].value.."\nFlag: "..r1[1].flag)
  end

function main()
  local main = gg.choice({"Check value","Exit"},nil,nil)
  if main == 1 then check()
    elseif main == 2 then 
	gg.setVisible(true) 
	os.exit()
  end
  XGCK = 0
end  

while true do
  if gg.isVisible(true) then
    XGCK = 1
    gg.setVisible(false)
  end
  gg.clearResults()
  if XGCK == 1 then
    main()
  end
 end

main()

 

Edited by ItsSC

Share this post


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

--Simple real-time value detector
function check()
  if r == "" or r == nil then 
      gg.searchNumber("Your code",gg.TYPE_DWORD)
  gg.refineNumber("First value in the code",gg.TYPE_DWORD)
  t1 = gg.getResults(1)
  gg.addListItems(t1)
    end
  r = gg.getListItems()
  r1 = gg.getValues(r) -- Update value
  gg.alert("Address: "..r1[1].address.."\nValue: "..r1[1].value.."\nFlag: "..r1[1].flag)
  end

function main()
  local main = gg.choice({"Check value","Exit"},nil,nil)
  if main == 1 then check()
    elseif main == 2 then 
	gg.setVisible(true) 
	os.exit()
  end
  XGCK = 0
end  

while true do
  if gg.isVisible(true) then
    XGCK = 1
    gg.setVisible(false)
  end
  gg.clearResults()
  if XGCK == 1 then
    main()
  end
 end

main()

 

Thank you! But is it possible to set this all in a loop? Because I want to press stuff while recording yk

 

The menu gets kinda in the way then

Idk why but I have problems creating loops

 

Edited by YeetMeister

Share this post


Link to post
Share on other sites
25 minutes ago, YeetMeister said:

Thank you! But is it possible to set this all in a loop? Because I want to press stuff while recording yk

 

The menu gets kinda in the way then

Idk why but I have problems creating loops

 

The part of while true do code help you to create loop.

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

×
×
  • Create New...