Shop System
Learn how to create a comprehensive shop system with multiple items and prices.
Create a complete economy system with virtual currency, shops, and player balances using Command Maker's custom syntax and variables.
First, set up your economy variables:
/setcmdvariable currency_name "Coins"
/setcmdvariable starting_balance 100
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"}
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\"}"
}
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"}
Learn how to create a comprehensive shop system with multiple items and prices.
Create kits that players can purchase with in-game currency.
Master the syntax system used in economy commands.