Onions96 Posted March 18, 2022 Share Posted March 18, 2022 Hello guys. I just want to ask. How to run lua script continuously? For example: --main code-- gg.searchNumber("4;5;180;200::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("9999", gg.TYPE_DWORD == then how to run it again starting from main code? What code should I put at the end? Link to comment Share on other sites More sharing options...
MAARS Posted March 18, 2022 Share Posted March 18, 2022 There might be more simple and short way for doing this but I just like keeping my code organized script.lua Link to comment Share on other sites More sharing options...
MonkeySAN Posted March 18, 2022 Share Posted March 18, 2022 dont know if this the correct way but it will keep searching until script is interrupt. local gg = gg while true do if gg.isVisible() then gg.setVisible(false) function main() gg.clearResults() gg.searchNumber("4;5;180;200::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("9999", gg.TYPE_DWORD) gg.toast("Done") gg.sleep(3000)--short break between search end repeat until main() end end Link to comment Share on other sites More sharing options...
Onions96 Posted March 18, 2022 Author Share Posted March 18, 2022 1 hour ago, MAARS said: There might be more simple and short way for doing this but I just like keeping my code organized script.lua 569 B · 2 downloads Thanks you. Its working dude. 1 hour ago, MonkeySAN said: dont know if this the correct way but it will keep searching until script is interrupt. local gg = gg while true do if gg.isVisible() then gg.setVisible(false) function main() gg.clearResults() gg.searchNumber("4;5;180;200::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil) gg.editAll("9999", gg.TYPE_DWORD) gg.toast("Done") gg.sleep(3000)--short break between search end repeat until main() end end Thanks a lot its working now. Link to comment Share on other sites More sharing options...
Question
Onions96
Hello guys. I just want to ask. How to run lua script continuously?
For example:
--main code--
gg.searchNumber("4;5;180;200::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("9999", gg.TYPE_DWORD
== then how to run it again starting from main code? What code should I put at the end?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.