Economy System

Create a complete economy system with virtual currency, shops, and player balances using Command Maker's custom syntax and variables.

Basic Setup

First, set up your economy variables:

/setcmdvariable currency_name "Coins"
/setcmdvariable starting_balance 100

Balance Commands

Create commands to check and manage player balances:

/cmd add balance tellraw ${player} {"text":"Your balance: ${balance} ${currency_name}","color":"green"}
/cmd add pay tellraw ${player} {"text":"Paid ${amount} ${currency_name} to ${target}","color":"yellow"} && tellraw ${target} {"text":"Received ${amount} ${currency_name} from ${player}","color":"green"}

Shop System

Use custom syntax to create a shop system:

// In syntax.json
{
  "buy": {
    "pattern": "/buy  ",
    "description": "Buy items from the shop"
  }
}

// In aliases.json
{
  "buy_diamond": "give ${player} diamond ${buy_amount} && tellraw ${player} {\"text\":\"Bought ${buy_amount} diamonds for ${price} ${currency_name}\",\"color\":\"green\"}"
}

Earning Currency

Create ways for players to earn currency:

/cmd add daily give ${player} emerald 1 && tellraw ${player} {"text":"Daily reward: 1 Emerald!","color":"gold"}
/cmd add work tellraw ${player} {"text":"You worked hard and earned 50 ${currency_name}!","color":"green"}