cookietouch

CookieTouch API Documentation

Summary | Single page summary


Table of Contents

Character

All functions related to the character.

character.isAlive

Returns true if the character is alive, otherwise returns false.

Example:

if (character.isAlive) {
  // The character is alive.
}

character.isTombstone

Returns true if the character is a tombstone, otherwise returns false.

Example:

if (character.isTombstone) {
  // The character is a tombstone.
}

character.isPhantom

Returns true if the character is a ghost, otherwise returns false.

Example:

if (character.isPhantom) {
  // The character is a phantom.
}

character.name

Returns the name of the character.

Example:

character.name

character.level

Returns the level of the character.

Example:

character.level

character.sex

Returns true if the character is a male, false if it is a female.

Example:

character.sex

character.lifePoints

Returns the life points of the character.

Example:

character.lifePoints

character.maxLifePoints

Returns the maximum life points of the character.

Example:

character.maxLifePoints

character.lifePointsP

Returns the percentage of life of the character.

Example:

character.lifePointsP

character.experience

Returns the character’s experience.

Example:

character.experience

character.energyPoints

Returns the character’s energy points.

Example:

character.energyPoints

character.maxEnergyPoints

Returns the maximum energy points of the character.

Example:

character.maxEnergyPoints

character.energyPointsP

Returns the energy percentage of the character.

Example:

character.energyPoints

character.kamas

Returns the number of kamas the character has.

Example:

character.kamas

character.sit()

Allows the character to sit down.

Example:

character.sit()

character.freeSoul()

Free the soul of the character.

Returns true if the character has successfully free his soul, otherwise returns false.

Example:

if (character.isTombstone) {
  if (character.freeSoul()) { // If the character is a grave, then free his soul.
  // The soul has been released.
  } else {
  // The soul has not been released.
  }
}