Jump to content
  • 0

How to change the value of some searched values when in game without having to pause.


Question

Posted

Hey guys I'm a newbie,

I don't know how to change the value of a particular data mid game without pausing the game (i.e opening game guardian). For eg if I am playing slither.io and in search menu if I search 36 as double I get 4 values now these values can be changed to increase and decrease the zoom from 36 to 0(0 being the farthest). Now if I want to change the value (To zoom out or zoom in) in mid game how can I do that without having to open game guardian? Casue if I open game guardian and change the  value I'll be dead by then(online mode). Basically I am asking for a similar feature that game guardian provides when you hold down the gg icon (Speed hack) . However in this case I want to change the zoom and not the speed but in a similar way. 

Recommended Posts

  • 0
Posted

function zoom()

   gg.setRanges(gg.REGION_ANONYMOUS) -- example

   gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

   gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

   

   revert = gg.getResults(4)

   local r = gg.getResults(4)

   r[1].value = '0'

   r[2].value = '0'

   r[3].value = '0'

   r[4].value = '0'

   gg.setValues(r)

   gg.addListItems(r)

   

   gg.toast('Zoom +')

   gg.sleep(1000)

   gg.clearResults()

  end

 end

 

 gg.toast('To change zoom +, touch the gameguardian icon')

    gg.sleep(100)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom2()

     end

 end

end

 

function zoom2()

 gg.setRanges(gg.REGION_ANONYMOUS) -- example

 gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

 gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

 

 revert = gg.getResults(4)

 local r = gg.getResults(4)

 r[1].value = '0'

 r[2].value = '0'

 r[3].value = '0'

 r[4].value = '0'

 gg.setValues(r)

 gg.addListItems(r)

 

 gg.toast('To change zoom -, touch the gameguardian icon')

 gg.sleep(1000)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom()

     end

 end

end

 

-- I thought something like that, it's just to force the script to stop ... (?)

  • 0
Posted
42 minutes ago, -SAICOBO- said:

function zoom()

   gg.setRanges(gg.REGION_ANONYMOUS) -- example

   gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

   gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

   

   revert = gg.getResults(4)

   local r = gg.getResults(4)

   r[1].value = '0'

   r[2].value = '0'

   r[3].value = '0'

   r[4].value = '0'

   gg.setValues(r)

   gg.addListItems(r)

   

   gg.toast('Zoom +')

   gg.sleep(1000)

   gg.clearResults()

  end

 end

 

 gg.toast('To change zoom +, touch the gameguardian icon')

    gg.sleep(100)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom2()

     end

 end

end

 

function zoom2()

 gg.setRanges(gg.REGION_ANONYMOUS) -- example

 gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

 gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

 

 revert = gg.getResults(4)

 local r = gg.getResults(4)

 r[1].value = '0'

 r[2].value = '0'

 r[3].value = '0'

 r[4].value = '0'

 gg.setValues(r)

 gg.addListItems(r)

 

 gg.toast('To change zoom -, touch the gameguardian icon')

 gg.sleep(1000)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom()

     end

 end

end

 

-- I thought something like that, it's just to force the script to stop ... (?)

Hey man, I have no idea about lua scripting although I look forward to learning it. But in the meantime I copied this script and converted it into .lua and I got these errors. But I really appreciate your help I didn't expect such benevolent reply.   🙂

  • 0
Posted
50 minutes ago, -SAICOBO- said:

function zoom()

   gg.setRanges(gg.REGION_ANONYMOUS) -- example

   gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

   gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

   

   revert = gg.getResults(4)

   local r = gg.getResults(4)

   r[1].value = '0'

   r[2].value = '0'

   r[3].value = '0'

   r[4].value = '0'

   gg.setValues(r)

   gg.addListItems(r)

   

   gg.toast('Zoom +')

   gg.sleep(1000)

   gg.clearResults()

  end

 end

 

 gg.toast('To change zoom +, touch the gameguardian icon')

    gg.sleep(100)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom2()

     end

 end

end

 

function zoom2()

 gg.setRanges(gg.REGION_ANONYMOUS) -- example

 gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

 gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

 

 revert = gg.getResults(4)

 local r = gg.getResults(4)

 r[1].value = '0'

 r[2].value = '0'

 r[3].value = '0'

 r[4].value = '0'

 gg.setValues(r)

 gg.addListItems(r)

 

 gg.toast('To change zoom -, touch the gameguardian icon')

 gg.sleep(1000)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom()

     end

 end

end

 

-- I thought something like that, it's just to force the script to stop ... (?)

 

Screenshot_20200330-075929.jpg

Screenshot_20200330-075934.jpg

  • 0
Posted
1 hour ago, Enyby said:

Write script with desired actions on click GG icon.

Can you suggest me a script if possible? Thanks tho 🙂

  • 0
Posted (edited)
1 hour ago, -SAICOBO- said:

function zoom()

   gg.setRanges(gg.REGION_ANONYMOUS) -- example

   gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

   gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

   

   revert = gg.getResults(4)

   local r = gg.getResults(4)

   r[1].value = '0'

   r[2].value = '0'

   r[3].value = '0'

   r[4].value = '0'

   gg.setValues(r)

   gg.addListItems(r)

   

   gg.toast('Zoom +')

   gg.sleep(1000)

   gg.clearResults()

  end

 end

 

 gg.toast('To change zoom +, touch the gameguardian icon')

    gg.sleep(100)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom2()

     end

 end

end

 

function zoom2()

 gg.setRanges(gg.REGION_ANONYMOUS) -- example

 gg.searchNumber('1;2;3;4', gg.TYPE_FLOAT)

 gg.refineNumber("1;2;3;4", gg.TYPE_FLOAT)

 

 revert = gg.getResults(4)

 local r = gg.getResults(4)

 r[1].value = '0'

 r[2].value = '0'

 r[3].value = '0'

 r[4].value = '0'

 gg.setValues(r)

 gg.addListItems(r)

 

 gg.toast('To change zoom -, touch the gameguardian icon')

 gg.sleep(1000)

 gg.setVisible(false)

 while true do

     if gg.isVisible() then

         gg.setVisible(false)

         zoom()

     end

 end

end

 

-- I thought something like that, it's just to force the script to stop ... (?)

I tried to understand the code and I did get some of it. Can u tell me what all things I have to edit?  Like I can understand I have to change the TYPE_FLOAT to TYPE_DOUBLE. But I can't understand what other things I have to change. What I want is that the values of the searched data to range from 36(which is the actual value) to 0 so 36-0 is the range. I might sound dumb I'm sorry I'm new to this language.

Edited by CoyFanatic
  • 0
Posted (edited)

Sorry it doesn't work maybe Ill do something myself.

Spoiler

 

 

Edited by TheMech
Delete this please.
  • 0
Posted
6 minutes ago, TheMech said:

Sorry it doesn't work maybe Ill do something myself.

  Reveal hidden contents

 

 

Yes I tried it didn't work but thanks for helping. Please lmme know when you figure it out.

  • 0
Posted

I think it can be done with that Ui button that was added recently.

Spoiler

By the way how do I remove that?

 

  • 0
Posted
3 hours ago, TheMech said:

I think it can be done with that Ui button that was added recently.

  Reveal hidden contents

By the way how do I remove that?

 

Yes I just saw that thanks for making me aware. I'll try and let you know

 

  • 0
Posted
45 minutes ago, CmP said:

There is an example of the code for performing an action by clicking on GG icon: 

Examples of Lua scripts (#d2j0lrom)

It's not a complete solution for your task, but may be a good starting point. 

Hey man I used this script and then I added my desired action and can you tell me where I went wrong? 

This is the script :

function doAction()
local ret = gg.choice({'Zoom out', 'Moderate', 'Zoom in', 'Cancel', 'Exit'})
gg.searchNumber('36',gg.TYPE_DOUBLE) gg.getResults(4)
if ret == 1 then editAll('0',gg.TYPE_DOUBLE) end
if ret == 2 then editAll('13',gg.TYPE_DOUBLE) end
if ret == 3 then editAll('36',gg.TYPE_DOUBLE) end
if ret == 4 then os.exit() end
end
gg.setVisible(false)
while true do
if gg.isVisible() then gg.setVisible(false) doAction()
end
gg.sleep(100)
end

So you see I wanted to change/edit the searched values depending on my choice(i.e the value of ret) but I don't know where I went wrong, I guess when I use the editAll function I'm not mentioning which values to edit and I don't know how I can connect the searchresults with the editAll function in different cases of different values of ret. Please lemme know where I went wrong.

  • 0
Posted
1 hour ago, CoyFanatic said:

Hey man I used this script and then I added my desired action and can you tell me where I went wrong?

You don't need to search for values each time, so move the code for searching values (and the call to "getResults" function) outside the function. It should be executed once before the first call to "doAction" function, so you can insert it, for example, right before the line with "while true do" code.

  • 0
Posted
21 minutes ago, CmP said:

You don't need to search for values each time, so move the code for searching values (and the call to "getResults" function) outside the function. It should be executed once before the first call to "doAction" function, so you can insert it, for example, right before the line with "while true do" code.

I made the changes as per your instructions and I got these errors. 

The script (after changing)

function doAction()
local ret = gg.choice({'Zoom out', 'Moderate', 'Zoom in', 'Cancel', 'Exit'})
if ret == 1 then editAll('0',gg.TYPE_DOUBLE) end
if ret == 2 then editAll('13',gg.TYPE_DOUBLE) end
if ret == 3 then editAll('36',gg.TYPE_DOUBLE) end
if ret == 5 then os.exit() end
end
gg.setVisible(false)
gg.searchNumber('36',gg.TYPE_DOUBLE) gg.getResults(4)
while true do
if gg.isVisible() then       gg.setVisible(false)       doAction()
end
gg.sleep(100)
end

The error occurs with all the first three options.

Screenshot_20200331-081029.jpg

  • 0
Posted
3 hours ago, CmP said:

You don't need to search for values each time, so move the code for searching values (and the call to "getResults" function) outside the function. It should be executed once before the first call to "doAction" function, so you can insert it, for example, right before the line with "while true do" code.

Update it's finally done and your advice was not wrong it's me I actually missed the setRanges. The script is working thanks for helping 👍

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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.