Jump to content

Reverting Freeze Script


Private
 Share

Recommended Posts

Hi, I need guidance here, About that gg.sleep seems not working on my script Bellow.

The saved lists seems will be reverting soon after the searching or script has finished without waiting about 5 minutes to sleep. And freeze is gone .

This freeze I must do when I entering the map game and must revert back after game play is over. If not my game will be crashed.

If I do reverting for different function reverting() menu is always come crash anyway. Is there a solution or mistakes I made this script? Tks for help anyway.

Ps: I use unanymous memory range.

gg.clearResults()
gg.searchNumber('2.57754444', gg.TYPE_FLOAT)
local t = gg.getResults(13)
for i, v in ipairs(t) do
t.value = '1.92456'
t.freeze = true
end
print('Replaced: ', gg.addListItems(t))

local v = 5000
gg.sleep(v)

gg.searchNumber('1.92456', gg.TYPE_FLOAT)
local t = gg.getResults(13)
for i, v in ipairs(t) do
t.freeze = false
end
print('Replaced: ', gg.removeListItems(t))

 

 

 

Link to comment
Share on other sites

Yes, but if I use gg.sleep(5000) it will not sleeping for 5 minutes, its immidiately execute script 

gg.searchNumber('1.92456', gg.TYPE_FLOAT)
local t = gg.getResults(13)
for i, v in ipairs(t) do
t.freeze = false
end
print('Replaced: ', gg.removeListItems(t))

and my freeze is gone

Link to comment
Share on other sites

6 minutes ago, Private said:

Yes, but if I use gg.sleep(5000) it will not sleeping for 5 minutes, its immidiately execute script 

gg.searchNumber('1.92456', gg.TYPE_FLOAT)
local t = gg.getResults(13)
for i, v in ipairs(t) do
t.freeze = false
end
print('Replaced: ', gg.removeListItems(t))

and my freeze is gone

lol bro he mean 5 seconds not 5 minutes   5000 equal 5 seconds not 5 minutes , if you want 5 minutes  is more

Link to comment
Share on other sites

About resetting freeze on saved list, is there any simple method that not so specifically mentioning the real value? I mean just cleared everything in it. 

gg.clearResults()
gg.searchNumber('0.91610002518', gg.TYPE_FLOAT)
local t = gg.getResults(11)
for i, v in ipairs(t) do
t.value = '1.902456'
t.freeze = true
t.freezeType = gg.FREEZE_NORMAL
end
print('Replaced: ', gg.addListItems(t))
gg.sleep(250000)
gg.searchNumber('1.902456', gg.TYPE_FLOAT)
local t = gg.getResults(61)
for i, v in ipairs(t) do
t.freeze = false
end
print('Replaced: ', gg.removeListItems(t))
 

Link to comment
Share on other sites

55 minutes ago, Private said:

About resetting freeze on saved list, is there any simple method that not so specifically mentioning the real value? I mean just cleared everything in it.

Use "removeListItems" functions to remove desired elements from saved list or "clearList" function to remove everything from saved list. When an element is removed from saved list, it is automatically being unfreezed, so no need to set "freeze" field to false in these cases.

Edit: your code can be adjusted this way to reduce "complexity"

gg.clearResults()
gg.searchNumber('0.91610002518', gg.TYPE_FLOAT)
local t = gg.getResults(11)
for i, v in ipairs(t) do
  t.value = '1.902456'
  t.freeze = true
  t.freezeType = gg.FREEZE_NORMAL
end
print('Replaced: ', gg.addListItems(t))
gg.sleep(250000)
print('Replaced: ', gg.removeListItems(t))

Only elements that were added to saved list will be removed from it after the delay.

Edited by CmP
Added example
Link to comment
Share on other sites

What this errors after I added this line from CmP' s scrip above. It was always showing syntax error near 'ï'

gg.sleep(250000)
print('Replaced: ', gg.removeListItems(t))
if I removed this line everything is working.

_---------------;--;;;;;------------

Script ended:
Script error: org.luaj.vm2.LuaError: load /sdcard/Download/LUA/LookWhatICanDo.lua: org.luaj.vm2.LuaError: /sdcard/Download/LUA/LookWhatICanDo.lua:153
`gg.removeListItems(t)`
syntax error near 'ï'
    at org.luaj.vm2.LuaValue.error(LuaValue.java:1082)
    at org.luaj.vm2.Globals.loadfile(Globals.java:235)
    at android.ext.Script.runScript(Script.java:5070)
    at android.ext.Script$ScriptThread.run(Script.java:4904)
Caused by: org.luaj.vm2.LuaError: /sdcard/Download/LUA/LookWhatICanDo.lua:153
`gg.removeListItems(t)`
syntax error near 'ï'
    at org.luaj.vm2.compiler.LexState.lexerror(LexState.java:278)
    at org.luaj.vm2.compiler.LexState.syntaxerror(LexState.java:282)
    at org.luaj.vm2.compiler.LexState.check_condition(LexState.java:867)
    at org.luaj.vm2.compiler.LexState.exprstat(LexState.java:2034)
    at org.luaj.vm2.compiler.LexState.statement(LexState.java:2128)
    at org.luaj.vm2.compiler.LexState.statlist(LexState.java:2145)
    at org.luaj.vm2.compiler.LexState.body(LexState.java:1304)
    at org.luaj.vm2.compiler.LexState.funcstat(LexState.java:2018)
    at org.luaj.vm2.compiler.LexState.statement(LexState.java:2101)
    at org.luaj.vm2.compiler.LexState.statlist(LexState.java:2145)
    at org.luaj.vm2.compiler.LexState.mainfunc(LexState.java:2161)
    at org.luaj.vm2.compiler.LuaC$CompileState.luaY_parser(LuaC.java:129)
    at org.luaj.vm2.compiler.LuaC.compile(LuaC.java:99)
    at org.luaj.vm2.Globals.compilePrototype(Globals.java:354)
    at org.luaj.vm2.Globals.loadPrototype(Globals.java:333)
    at org.luaj.vm2.Globals.load(Globals.java:304)
    at org.luaj.vm2.Globals.loadfile(Globals.java:229)
    ... 2 more


Edited by Private
Link to comment
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
 Share

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