rom37
New Member
Posts: 9
|
Post by rom37 on May 28, 2018 22:15:38 GMT
Hello I'm quite new and still testing capacities of Ankulua. I posted a dumb first post, apologies for that, i hope the second will be less nooby. I have create a small script which last 5 minuts and wanted to start it every hour without having to click on the start button. Is there a way to do it automaticaly without the script runs 24/24 ? My phone is not root. Thanks ! Romain
|
|
|
Post by Exilereven on May 28, 2018 22:52:25 GMT
Maybe use a timer? Or a loop that waits for certain image to appear and then begin script...
What exactly are you trying to accomplish? Details make easier answers.
|
|
rom37
New Member
Posts: 9
|
Post by rom37 on May 28, 2018 23:27:33 GMT
Thanks for reply exilereven ! I don't know how to use timer.
By now, my script just launch a game, recover gems and do 2/3 more things, nothing complicated.
I want to start this script every 1 hour or so. To do this, i have to tap on the play button.
My question is to know if there is a possibility to automaticaly start the script without : 1/ having to tap the play buton myself every hour 2/ leaving the script run 24/24 (i have just the trial version)
|
|
|
Post by AnkuLua on May 29, 2018 0:21:12 GMT
|
|
|
Post by Acera Dryd on May 29, 2018 9:49:57 GMT
You could do something like:
while true do dosomething() wait(3600) -- 60 seconds * 60 minutes = 1 hour end But it would better, if you check for a Pattern. For example: You wait that you energy is max. You know this needs 50-70 minutes. A better method than to wait 60 minutes is to check for example every minute how many energy you have. Therefore you need a Pattern of max energy and check every minute if the Pattern exists:
while true do
dosomething()
waitForFullEnergy() end
function waitForFullEnergy() while not energyRegion:exists(fullEnergyPattern) do wait(60) end end Furthermore you cant execute your script longer than 30 minutes, if you have only the trial version of ankulua. If you want to execute your script longer use the pro version.
|
|
rom37
New Member
Posts: 9
|
Post by rom37 on Jun 19, 2018 11:23:06 GMT
Thanks to AnkuLua and @ancera Dryd for their help. I have by now only the trial version, i want to test some things before purchasing the pro one. I imagine the use of wait() function is counting for the lenght of the script ?
|
|
|
Post by AnkuLua on Jun 19, 2018 14:46:23 GMT
Yes.
|
|