Shop run.
Every kill pays a coin. The shop book opens a shop where coins buy gear: a sword, golden apples, food and a diamond pickaxe. Defeat the dragon with what you can afford.
- Players
- 1 to 8 players
- Length
- about 2 hours
- Goal
- Defeat the Ender Dragon.
The rules.
Each rule waits for its event, checks its if, then runs its steps in order; a branch or a loop's steps are set in.
Welcome
- Show the title “Shop run” to everyone
- Give Shop to everyone
A kill pays a coin
- Add 1 to coins
- Show “+1 coin ({coins})” above the hotbar of the player
The book opens the shop
- Open shop for the player
Buy: Iron sword
- Run buy
Buy: Golden apples
- Run buy
Buy: Cooked beef
- Run buy
Buy: Diamond pickaxe
- Run buy
Its functions.
Steps several rules run by name.
buy
- If coins is at least price
- Add 0 − price to coins
- Give count item to the player
- Show “{label}: yours for {price} coins. {coins} left.” above the hotbar of the player
- Show “{label} costs {price} coins; you have {coins}.” above the hotbar of the player
- If coins is at least price
What it declares.
Variables
- coins: a number, per player, at least 0, starting at 0, on the sidebar as Coins
Custom items
- Shop (Book)
Menus
- The shop: 1 row, 4 slots stocked