cookietouch

CookieTouch API Documentation

Summary | Single page summary


Table of Contents

Exchange

All functions related to exchanges.

exchange.weightP

Returns the current bot pods as a percentage.

Example:

while (exchange.weightP > 10) {
  exchange.putItem(289, 100); // While you have more than 10% pods, add 100 wheat to the exchange.
}

exchange.targetWeightP

Returns the current pods of the exchange’s target as a percentage.

Example:

while (exchange.targetWeightP < 90) {
  yield* exchange.putItem(289, 100); // While the target hasn't more than 90% pods, add 100 wheat to the exchange.
}

yield*exchange.startExchange(playerId: number)

Start the exchange with a given player.

Example:

yield* exchange.startExchange(TODO);

yield*exchange.sendReady()

Validate the exchange.

Example:

yield* exchange.sendReady()

yield*exchange.putItem(gid: number, quantity: number)

Put an item in the exchange.

Example:

yield* exchange.putItem(289, 100);

yield*exchange.removeItem(gid: number, quantity: number)

Remove an item from the exchange.

Example:

yield* exchange.removeItem(289, 100); // Remove 100 wheat from the exchange.

yield*exchange.putKamas(quantity: number)

Put a given amount of kamas into the exchange.

Example:

yield* exchange.putKamas(10000); // Add 10 000 kamas to the exchange.

yield*exchange.removeKamas(quantity: number)

Remove a given amount of kamas from the exchange.

Example:

yield* exchange.removeKamas(10000); // Remove 10 000 kamas from the exchange.

yield*exchange.putAllItems()

Put all the items in your inventory in the exchange.

Example:

yield* exchange.putAllItems();