Macroing

> *"Auto-clicking and macroing CIFI is allowed and all good! Go nuts guys." - Chrysto*
>
>

Macroing (not to be confused for Automation) is the act of using **external programs** to simulate clicks/taps without any input from the player (besides setting it up).

## How it Works

External programs and some emulators are capable of **simulating** the action of clicking on the screen, or tapping on a phone, among other actions such as swiping.

These actions are **mapped out** in a sequence to perform events such as opening token and diamond chests, buying upgrades, and so on.

Usually these sequences are put on an **indefinite loop** so they can be run over and over again.

This is the biggest strength of macros; repeatedly performing **mundane** tasks that would otherwise take too much time and attention for the player.

## Getting Started

### Macroing on mobile phones

If your phone does not come with built-in macro functionality (highly likely), install a macro program such as Click Assistant or similar.

Most macro programs work in similar ways, so the **general guide below** should give a rough idea of what to do. Feel free to mess around with your macro program of choice to see what works and what doesn't.

Macros usually **run for hours,** which is not great for phone screens. You may want to consider a program such as **Blackr** or **proximity service apps**. Do note that programs like Blackr **require** being macro'd to work (although it only takes a few clicks/taps), whereas proximity simply requires blocking your phone's proximity sensor (usually by making it face a surface).

You may also want to **turn on battery-saver mode**, especially if you're doing particularly long idle sessions such as overnight runs. Usually this involves turning the mode on, then setting the game and the external programs as exceptions.

### Macroing on PCs

Check if your Android emulator has **built-in macro functionality**. Most do, but if yours doesn't you can either try out LDPlayer, Bluestacks, or Mumu Player, or install external autoclicker programs\*

Most macro programs work in similar ways, so the **general guide below** should give a rough idea of what to do. Feel free to mess around with your emulator's options or the external program to see what works and what doesn't.

\**not recommended; most programs simulate clicks across the entire desktop, whereas emulators only do so within their own window, allowing you to leave it in the background with no interference.*

## General Guide

This section will use Click Assistant for reference, but is not required to follow along.

There are 2 ways to set up macro sequences;

* **Manual**: individually create and set up actions
* **Recording**: record every action you do, to be saved and be replicated 1:1 by the macro

### Manual

*Note: If your emulator does not have manual macro functionality, see Recording below instead.*

Before beginning to manually enter actions, check their default settings. These are the properties that each action will have when created.

The most **important** setting for all actions is how long it takes before the next one is performed**.** During certain events in the game such as opening a tab, switching screens, etc. the game may **freeze** for a short duration, which can cause **sync issues** with your macros if not dealt with. Luckily, this is as easy as setting the **delay** to the next action to a time such as **1 second**. The delay ultimately does not matter as long as it's long enough to compensate for these short freezes.

If you're on phone, start your macro's service (after enabling its permissions, accessibility, yada yada...). Now we go to the juicy bit!

On the **panel** of whatever macro you're using, there should be **+** and **-** buttons, or similar. These buttons **add and remove actions**, respectively. Actions are normally **identified** by a number, which indicates which order they are clicked in (action #2 happens after action #1, etc).

Once created, these actions can be **moved around** to indicate where on the screen it will tap. There should also be ways in your macro to edit the settings of each **individual action**, either by clicking or double clicking it, or a button on the panel that displays a list of all actions.

The most basic kind of sequence for CIFI is opening token chests:

(Screen dimmed using the in-game option, to see the actions better).

The actions are set as so:

* **Action #1** taps the chest.
* **Action #2** taps the 'open chest' button
* **Action #3** taps the button again to close it.

All 3 actions have the same **default settings**, notably the aforementioned 1 second to delay to make sure it can't go out of sync.

This macro can still be **improved** though; notice that actions #2 and #3 are merely double taps, since they both tap the same button. If your macro allows for it, you can set a single action to tap the same place **multiple times**.

Within the individual action, we can set action #2 to tap twice:

We can now remove action #3 as it's redundant.

We have now saved ourselves 1 action in this layout. This may seem superfluous at first, but can help simplify your layout as you add more and more actions for other sequences.

After you've set up the layout, make sure it **loops indefinitely**. Now you may set the macro and sit back.

### Recording

Unlike **manual**, which involves creating and setting the properties such as location for each individual action, **recording** is a macro method in which your sequence of actions is **replicated** 1:1 by the macro. This makes it more convenient than manual, with the downside of **less customizability** for each individual action (or none at all). This only applies to some macros, though.

Your macro should have a button somewhere to **allow recording** (usually on the same panel as manual buttons, if they exist). When initiated, every action you do is recorded until you stop the recording.

Once done, every macro will have options for **looping** recordings. Usually this should just be set to **infinite**, or a large number of times.

## Cell King Beef's Discord Guide

*This section is dedicated to quoting Cell King Beef's guide (requires being in the Discord server to see)*

First of all, see the apps in the pin below [Click Assistant and Blackr]. Those are the apps I will be referencing and the ones I personally recommend.

### Introduction

The apps I will be using are **Click Assistant** and **Blackr**.

***Click Assistant*** is my macro of choice. It has it’s problems, like having to **watch an ad** every 12 hours, but that’s a small price to pay imo.

***Blackr*** is a nice app for **preventing burn-in** on your screen, especially when using the app for hours at a time.

For **Blackr**, you’re going to want to make sure that you have the **“show”** setting selected. This will allow you to turn off the screen using a single click from the autoclicker. Also, there is a setting to **set the unlock style to swipe up**. I also recommend this. **Disable sleep** should also be on to prevent your phone from turning itself off, though it should be unnecessary due to the amount of clicks being done.

### **Setup**

The first thing you must do is **choose what you want to macro**. Click Assistant has a handy feature that you can **record clicks** that you physically do, and it will map those (timings and all, but we will be changing those in the next step).

Your first step should always be a **swipe up** (to disable blackr) and your last one should be clicking the blackr icon (to enable it again).

Where the recording can be a little less than optimal is when it comes to things that you’ll **click** **twice in a row** (i.e. chests). With Click Assistant, you can **set a single click to happen twice in a row**, thus allowing you to save one of your 20 clicks, and use them to automate more things.

Once you have all of your clicks set up by recording, and then editing the double clicks into a single click, you are ready to move into **timing**.

### **Timings**

Token chests have a timer of 140s. This means you want your entire loop to take the full 140s or less, to avoid missing token chests.

When it comes to the clicks, I try to keep the touch and hold delay at 100ms and the delay at 900ms. This totals 1 second, and makes it easy to keep track of how long you need the delay of the final click to be. For the swipe up at the beginning, it’s not going to let you put 100ms as the touch and hold delay. This is fine. Just make sure that whatever the minimum amount of delay it lets you put, adds up to 1 second (1000ms) with the delay.

Now, for the final click. This is gonna be some math. You want to set the touch and hold delay at 100ms, like the other clicks.

The delay should follow the following formula:

`(140,000 - 100 - (number of clicks)*1000)`

Let’s break that down:

* `140,000` is 140,000ms, or 140 seconds. This is our tokens chest timer.
* `100` is the touch and hold delay you just set for the final click.
* The number of clicks is the number of clicks your macro will be making (make sure to count the points that click multiple times, like for chests, as many times as they click, such as 2 or 3 times), not including the final click but you do include the swipe up that starts the macro.
* The `1000` is 1 second, which is how long each click lasts.

As an example, let’s say you have 10 points not including your final click, but including the initial swipe up. Your delay time would be:

`140,000 - 100 - 10*1000`

This comes out to be 129,900. This is what you would input into the delay for the final click.

Below you can find an example macro setup that I used. This macro setup clicks the 2x boost, then token chest, then diamond chest, then claims the banked token, buys MP token boost, then buys the latest gen's hardware and software.

## Restrictions

While it is allowed to macro CIFI, there are restrictions to take into account. These include:

* Scriping image recognition software\*
* Scripting bots that makes the player obsolete
* Automating mini-games
* Making different versions of the APK/AAB

*\*Certain macro programs have built-in image recognition functionality. If this is the case for yours, the macro is still allowed, so long as the image recognition is not used.*