Skip to content

Conditions commands

Applies Logical AND together on the condition commands. All conditions must be true to be satisfied.

ParameterTypeDescription
factories(() => void)[]
cmd.and(() => cmd.in_cell("Enter"), () => cmd.equipped("Staff"));

Whether any player’s hp percentage is greater than the specified value.

ParameterTypeDescription
percentagenumberThe health percentage to compare against.

Whether any player’s hp percentage is less than the specified value.

ParameterTypeDescription
percentagenumberThe health percentage to compare against.

Whether an item can be bought from the current shop (client-side check).

ParameterTypeDescription
itemstringThe name of the item.

Whether the specified quest can be completed.

ParameterTypeDescription
questIdnumberThe ID of the quest to check.

Whether the specified quest cannot be completed.

ParameterTypeDescription
questIdnumberThe ID of the quest to check.

Whether the player count in the specified cell is greater than the specified value.

ParameterTypeDescription
countnumberThe number of players to compare against.
cellstring?The name of the cell. If not provided, it will default to the current cell.

Whether the player count in the specified cell is less than the specified value.

ParameterTypeDescription
countnumberThe number of players to compare against.
cellstring?The name of the cell. If not provided, it will default to the current cell.

Whether the player has the specified item equipped.

ParameterTypeDescription
itemstringThe name of the item.

Whether the player faction rank is greater than the specified rank.

ParameterTypeDescription
factionstringThe name of the faction.
ranknumberThe rank to compare against.

Whether the player faction rank is less than the specified rank.

ParameterTypeDescription
factionstringThe name of the faction.
ranknumberThe rank to compare against.

Whether the player has more than the specified amount of gold.

ParameterTypeDescription
goldnumberThe amount of gold to compare against.

Whether the player has less than the specified amount of gold.

ParameterTypeDescription
goldnumberThe amount of gold to compare against.

Whether the player does not have a target.

Whether the player has a target.

Whether the player’s hp is greater than the specified amount.

ParameterTypeDescription
hpnumberThe amount of health to compare against.

Whether the player’s hp is less than the specified amount.

ParameterTypeDescription
hpnumberThe amount of health to compare against.

Whether the player’s hp is greater than the specified percentage.

ParameterTypeDescription
percentagenumberThe percentage of health to compare against.

Whether the player’s hp is less than the specified percentage.

ParameterTypeDescription
percentagenumberThe percentage of health to compare against.

Whether a specific item exists in the player’s bank.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether the player is in the specified cell.

ParameterTypeDescription
cellstringTHe name of the cell.

Whether the player is in combat.

Whether the specified item is in the player’s house inventory.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether a specific item exists in the player’s inventory.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether the player is in the specified map.

ParameterTypeDescription
mapstringThe name of the map.

Whether a specific item exists in the player’s tempinventory.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether this player’s role is the leader in the army.

Whether this player’s role is a member in the army.

Whether the specified item is maxed in the player’s inventory.

ParameterTypeDescription
itemstringThe name of the item.

Whether the player has an active membership.

Whether the specified item is not maxed in the player’s inventory.

ParameterTypeDescription
itemstringThe name of the item.

Whether the player does not have an active membership.

Whether this player’s role is the specified player number.

ParameterTypeDescription
playerNumbernumberThe player number to check.

Whether the specified item has dropped.

ParameterTypeDescription
itemstringThe name of the item.

Whether the specified item has not dropped.

ParameterTypeDescription
itemstringThe name of the item.

Whether the player’s level is greater than the specified level.

ParameterTypeDescription
levelnumberThe level to compare against.

Whether the player’s level equals the specified level.

ParameterTypeDescription
levelnumberThe level to compare against.

Whether the player’s level is less than the specified level.

ParameterTypeDescription
levelnumberThe level to compare against.

Whether the specified monster’s hp is greater than the specified amount.

ParameterTypeDescription
monsterstringThe name of the monster.
hpnumberThe health value to compare against.

Whether the specified monster’s hp is less than the specified amount.

ParameterTypeDescription
monsterstringThe name of the monster.
hpnumberThe health value to compare against.

Whether the specified monster is in the room (is not dead).

ParameterTypeDescription
monsterstringThe name of the monster.

Whether the specified monster is not in the room (is dead).

ParameterTypeDescription
monsterstringThe name of the monster.

Whether the player’s mp is greater than the specified amount.

ParameterTypeDescription
mpnumberThe mp value to compare against.

Whether the player’s mp is less than the specified amount.

ParameterTypeDescription
mpnumberThe mp value to compare against.

Whether the player does not have the specified item equipped.

ParameterTypeDescription
itemstringThe name of the item.

Whether a specific item does not exist in the player’s bank.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether the player is not in the specified cell.

ParameterTypeDescription
cellstringThe name of the cell.

Whether the player is not in combat.

Whether the specified item is not in the player’s house inventory.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether a specific item does not exist in the player’s inventory.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Whether the player is not in the specified map.

ParameterTypeDescription
mapstringThe name of the map.

Whether a specific item does not exist in the player’s tempinventory.

ParameterTypeDescription
itemstringThe name of the item.
quantitynumber?The minimum quantity required. If not provided, it will default to 1.

Applies Logical OR together on the condition commands. At least one condition must be true to be satisfied.

ParameterTypeDescription
factories(() => void)[]
cmd.or(() => cmd.in_cell("Enter"), () => cmd.equipped("Staff"));

Whether a player’s aura value is greater than the specified value.

ParameterTypeDescription
playerstringThe name of the player.
aurastringThe name of the aura.
valuenumberThe value to compare against.

Whether a player’s aura value is less than the specified value.

ParameterTypeDescription
playerstringThe name of the player.
aurastringThe name of the aura.
valuenumberThe value to compare against.

Whether the player count in the map is greater than the specified value.

ParameterTypeDescription
countnumberThe number of players to compare against.

Whether the player count in the map is less than the specified value.

ParameterTypeDescription
countnumberThe number of players to compare against.

Whether a specified player’s hp is greater than the specified value.

ParameterTypeDescription
playerstringThe name of the player.
hpnumberThe health value to compare against.

Whether a specified player’s hp is less than the specified value.

ParameterTypeDescription
playerstringThe name of the player.
hpnumberThe health value to compare against.

Whether a specified player’s hp percentage is greater than the specified value.

ParameterTypeDescription
playerstringThe name of the player.
percentagenumberThe health percentage to compare against.

Whether a specified player’s hp percentage is less than the specified value.

ParameterTypeDescription
playerstringThe name of the player.
percentagenumberThe health percentage to compare against.

Whether a player is in the specified cell.

ParameterTypeDescription
playerstringThe name of the player.
cellstringThe name of the cell.

Whether a player is in the map.

ParameterTypeDescription
playerstringThe name of the player.

Whether the player’s name is equal to the specified name.

ParameterTypeDescription
playerstringThe name to compare against.

Whether a player is not in the specified cell.

ParameterTypeDescription
playerstringThe name of the player.
cellstringThe name of the cell.

Whether a player is not in the map.

ParameterTypeDescription
playerstringThe name of the player.

Whether the specified quest is in progress.

ParameterTypeDescription
questIdnumberThe ID of the quest to check.

Whether the specified quest is available.

ParameterTypeDescription
questIdnumberThe ID of the quest to check.

Whether the specified quest is not available.

ParameterTypeDescription
questIdnumberThe ID of the quest to check.

Whether the specified quest is not in progress.

ParameterTypeDescription
questIdnumberThe ID of the quest to check.

Whether the target’s hp is between the specified range.

ParameterTypeDescription
monsterstringThe name of the monster.
minnumberThe minimum hp.
maxnumberThe maximum hp.

Whether the target’s hp is greater than the specified amount.

ParameterTypeDescription
hpnumberHp to compare against.

Whether the target’s hp is less than the specified amount.

ParameterTypeDescription
hpnumberHp to compare against.