gwen
New Member
Posts: 9
|
Post by gwen on Nov 6, 2015 0:19:17 GMT
I have a game where you usually wait for a friend to send something and click on it to claim the rewards, this happens throughout the day and randomly.
Is it possible for AnkuLua to loop back to the beginning of the script? I've tried using Lua's goto statements but they don't work ("::start::" and "goto start")
At the moment I was using a while loop and I noticed that the CPU temperature of my phone rose to 72 fahrenheit which is not suitable for 24/7 usage! I've tried using Settings:setWaitScanRate(1) so that it would only scan the screen once a second but that doesn't work. Any way to slow down or reduce scan rate?
|
|
|
Post by AnkuLua on Nov 6, 2015 0:42:45 GMT
Here is one example function code to reduce scanrate
function waitOneScan(target)
while (true) do if (exists(target, 0)) then -- 0 is to scan once return getLastMatch() end wait(1) -- wait one second, tune the scanrate here end
end
|
|
gwen
New Member
Posts: 9
|
Post by gwen on Nov 6, 2015 2:51:58 GMT
Great! Thanks for the example.
|
|
|
Post by AnkuLua on Nov 6, 2015 2:58:46 GMT
You are welcome. Please give AnkuLua five stars in google play. Tell your friends the benefits of AnkuLua.
|
|