cookietouch

CookieTouch API Documentation

Summary | Single page summary


Table of Contents

Paths

The following variables are used to create paths with the following parameters:

Parameters Type Description
map number | string Correspond to currentPos and to currentMapId
path string Correspond to where, can also be a cellId
gather boolean True if the bot has to harvest resources, otherwise false
fight boolean True if the bot has to fight, otherwise false
npcBank boolean True if the bot has to open bank, otherwise false
phenix number Corresponds to the cellId of the phenix to use
door number Corresponds to the cellId of the door to use
custom GeneratorFunction Allows you to execute a custom function

move

Contains the path and most actions of the bot.

It is important that the bot is in one of the maps of the move path to start it.

const move = [
  { map: "67371008", custom: usePotion },
]

function* usePotion() {
if (currentMapId === 67371008) {
  yield* inventory.useItem(6965);
  yield* delay(1000);
}

bank

Contains the path to the bank.

The bot will automatically use this path when it has exceeded the maximum pod percentage MAX_PODS.

It is important that the bot is in one of the bank path maps to start it.

const bank = [
  { map: "11,9", path: "right" },
  { map: "12,9", path: "top" },
  { map: "12,8", path: "right" },
  { map: 88081177, door: 216 }, // External map of the bank
  { map: 99095051, npcBank: true, path: "410" } // Inside the bank. "410" corresponds to the cell to exit the bank.
]

Here, the mapId are used to differentiate the inside from the outside of the bank (the bot does not change map by entering the bank, it remains in “13.8”).

npcBank is set to true, so the bot will open the bank and execute the predefined actions in Configuration.

phenix

Contains the path to the phenix.

It is important that the bot is in one of the maps of the phenix path to start it.

This is not a mandatory route if the bot does not fight and has no risk of becoming a ghost.