Friday, September 25, 2015

Using Activator with CoCBot

Lately, I've been playing with ways to have Activator start and stop my bot at different times, allowing me to collect resources, spend what's in my storages, or even pause long enough to build a war army and attack.

The general break down is as follows:
In AutoTouch, I have set the CoCBot script to the trigger of "Unlock device." This means any time my iPad is unlocked, it starts the script. Of course, Clash won't be open, but the bot will sense this within a few seconds and load the game.

The only way I've found to easily stop the bot, is to set Activator to reboot my iPad at a scheduled time. There may be a better way to do this, but I see no harm in letting the iPad reboot.

I set another Activator scheduled event to unlock the iPad, which triggers the AutoTouch trigger, above.


A visual walk through:

Step 1: Open AutoTouch. Seen here, the only scripts I have relate to CoCBot. Click on the bot script, and select Play Settings.

Step 2: Make sure the bot is set to run indefinitely, by having the Time set to 0. Click "Trigger with Activator" and select "Unlocked".


Step 3: Open Activator and click on "More" in the top right corner. This brings up the Custom Events window, scroll down to "Scheduled"

Step 4: Set up a few scheduled events. I've been doing these day by day, but you could set it to repeat every day or set up as many different events as you need.

Step 5: To set up the event to reboot the iPad (to stop the bot), click on "Anywhere" on the list to the left, and then on the right, scroll through all of the events until you find the scheduled event you want to use. After you click on the scheduled event, a popup window will list all of the possible actions. Scroll down to Reboot.


Step 6: To start the bot again, you will need to set up an Activator under "At Lock Screen", doing the same method as above. Select "At Lock Screen" then scroll to the appropriate scheduled event, then find the option "Unlock Device." This will unlock the device and wake up the screen.
NOTE: It is important that your device is in a position that the screen will auto-rotate properly. I left my iPad laying flat one day and the bot got stuck because the screen was upside down.


You should be set up now! You can make as many events as you want, to fit your needs. I tend to have the bot take breaks of 2-4 hours, depending on what I need (war attacks, give me a window to spend loot, etc).