JoxxApart Posted December 5, 2021 Posted December 5, 2021 Hi, I need help with the prompt command, I want to know if it's possible to replace sleep function in the code below with some other method in which I can choose when to execute the refine function local fi = gg.prompt({"Enter Clip Size"}, {[1] ="0"}, {[1] ="number"}) gg.searchNumber(fi[1],gg.TYPE_DWORD) gg.getResults(20000) gg.sleep(3000) local gi = gg.prompt({"Shoot And Enter Clip Size"}, {[1] ="0"}, {[1] ="number"}) gg.refineNumber(gi[1], gg.TYPE_DWORD) gg.getResults(100) gg.sleep(5000) local gti = gg.prompt({"Shoot And Enter Clip Size last time"}, {[1] ="0"}, {[1] ="number"}) gg.refineNumber(gti[1], gg.TYPE_DWORD) local t = gg.getResults(3) for i, v in ipairs(t) do t[i].freeze = true end gg.addListItems(t) gg.setRanges(gg.REGION_CODE_APP,gg.REGION_C_ALLOC, gg.REGION_C_DATA,gg.REGION_ANONYMOUS) One thing that just came to my mind is using functions, sleep and a loop and asking to either sleep or use refine in prompt, please give ideas and new methods to use. I used setranges function in the beginning but it was only searching in anonymous region,why??
MonkeySAN Posted December 5, 2021 Posted December 5, 2021 gg.setRanges(gg.REGION_CODE_APP | gg.REGION_C_ALLOC | gg.REGION_C_DATA | gg.REGION_ANONYMOUS) it should be like this. 2
MonkeySAN Posted December 5, 2021 Posted December 5, 2021 (edited) someone gave me this a very long time ago..dont know if this what you need. TEST_PromptInput.lua it still has gg.sleep in it but this time around the second prompt in the script will not open until you tap GG logo. Edited December 5, 2021 by MonkeySAN 3
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 Ohh, okay, thank you so much Oh ya, that's what I needed, thank you so much, let me try the script and find out if it works for me, I guess it will cuz it sounds like the only exact solution as using loops for asking will cause unnecessary prompts and is inefficient. Tysm!!<3 Love ya bruh, no homo
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 7 hours ago, MonkeySAN said: someone gave me this a very long time ago..dont know if this what you need. TEST_PromptInput.lua 596 B · 3 downloads it still has gg.sleep in it but this time around the second prompt in the script will not open until you tap GG logo. gg.searchNumber(input[1], 4) If you can tell what does the second argument mean in this function, I'll be very grateful again.
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 (edited) @MonkeySANby using the method you provided for tapping gg for executing script, I used it thrice, but it infinitely looped second one(shoot and enter clip size) gg.setRanges(gg.REGION_CODE_APP | gg.REGION_C_ALLOC | gg.REGION_C_DATA | gg.REGION_ANONYMOUS) gg.setVisible(false) while true do if gg.isVisible() then gg.setVisible(false) local fi = gg.prompt({"Enter Clip Size"}, {[1] ="0"}, {[1] ="number"}) gg.searchNumber(fi[1],gg.TYPE_DWORD) gg.getResults(20000) gg.sleep(100) end gg.setVisible(false) while true do if gg.isVisible() then gg.setVisible(false) local gi = gg.prompt({"Shoot And Enter Clip Size"}, {[1] ="0"}, {[1] ="number"}) gg.refineNumber(gi[1], gg.TYPE_DWORD) gg.getResults(100) end gg.sleep(100) end gg.setVisible(false) while true do if gg.isVisible() then gg.setVisible(false) local gti = gg.prompt({"Shoot And Enter Clip Size last time"}, {[1] ="0"}, {[1] ="number"}) gg.refineNumber(gti[1], gg.TYPE_DWORD) local t = gg.getResults(3) for i, v in ipairs(t) do t[i].freeze = true end gg.addListItems(t) end gg.sleep(100) end end Edited December 6, 2021 by JoxxApart Mistake, update,mistake
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 1 hour ago, JoxxApart said: @MonkeySANby using the method you provided for tapping gg for executing script, I used it thrice, but it infinitely looped first one( enter clip size) gg.setRanges(gg.REGION_CODE_APP | gg.REGION_C_ALLOC | gg.REGION_C_DATA | gg.REGION_ANONYMOUS) gg.setVisible(false) while true do if gg.isVisible() then gg.setVisible(false) local fi = gg.prompt({"Enter Clip Size"}, {[1] ="0"}, {[1] ="number"}) gg.searchNumber(fi[1],gg.TYPE_DWORD) gg.getResults(20000) end gg.sleep(100) end gg.setVisible(false) while true do if gg.isVisible() then gg.setVisible(false) local gi = gg.prompt({"Shoot And Enter Clip Size"}, {[1] ="0"}, {[1] ="number"}) gg.refineNumber(gi[1], gg.TYPE_DWORD) gg.getResults(100) end gg.sleep(100) end gg.setVisible(false) while true do if gg.isVisible() then gg.setVisible(false) local gti = gg.prompt({"Shoot And Enter Clip Size last time"}, {[1] ="0"}, {[1] ="number"}) gg.refineNumber(gti[1], gg.TYPE_DWORD) local t = gg.getResults(3) for i, v in ipairs(t) do t[i].freeze = true end gg.addListItems(t) end gg.sleep(100) end
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 41 minutes ago, MonkeySAN said: try this.. TEST2_PromptInput.lua 940 B · 1 download Thanks for telling 4 is dword in ur script. I don't wanna edit any value as it freezes the game, I just wanna freeze the refined values. The initial search shows less than 20K results, second refine can either be 2(final) or 100 results. Third refine is the last and final, you didn't include refine function, will it still work? And there's no need to loop the script, please don't mind And a huge thanks for being so great!
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 54 minutes ago, MonkeySAN said: try this.. TEST2_PromptInput.lua 940 B · 1 download d*** bruh, I just made the required change at last and it worked. Thanks for your smart efforts bruh I'm very grateful!!<3
JoxxApart Posted December 6, 2021 Author Posted December 6, 2021 1 hour ago, MonkeySAN said: Great. which one...mine or your script? Yours bruh 1
MAARS Posted December 6, 2021 Posted December 6, 2021 (edited) To pause a function there is library in lua called coroutine that permit you to suspend your code and resume at anytime. but the actual version of gg do not include this library, you will need to find a moded gg that include it Edited December 6, 2021 by MAARS 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now