Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /shop [<text>]:
- permission: command.shop
- permission message: &cI'm sorry, but you do not have permission to perform this command.
- trigger:
- if arg 1 is not set:
- message "&eUsage: {@Color}/shop &f<category>"
- else:
- if arg 1 is "weapon" or "block" or "ammo" or "other":
- open chest with 4 rows named "&eItem Shop" to player
- wait 1 tick
- format slot 0 of player with black stained glass named "&7" to be unstealable
- format slot 1 of player with black stained glass named "&7" to be unstealable
- format slot 2 of player with black stained glass named "&7" to be unstealable
- format slot 3 of player with black stained glass named "&7" to be unstealable
- format slot 4 of player with black stained glass named "&7" to be unstealable
- format slot 5 of player with black stained glass named "&7" to be unstealable
- format slot 6 of player with black stained glass named "&7" to be unstealable
- format slot 7 of player with black stained glass named "&7" to be unstealable
- format slot 8 of player with glistering melon named "&aNext Page &7({@Color}1&7/{@Color}null&7)" to run [make player execute command "/shop-pageview-2"]
- add 8 to {_itemSlot}
- loop {shop.items.%arg-1%} times:
- add 1 to {_numberOfItems}
- add 1 to {_itemSlot}
- if {shop.item.%{_numberOfItems}%.type} is arg 1:
- format slot {_itemSlot} of player with 1 of {shop.item.%{_numberOfItems}%.product.%arg-1%} named "&d%{shop.item.%{_numberOfItems}%.name.%arg-1%}%" with lore "&7&m------------------||&eType: &f%{shop.item.%{_numberOfItems}%.type.%arg-1%}%||&ePurchases: &f%{shop.item.%{_numberOfItems}%.purchases.%arg-1%}%||&7&m------------------||&ePrice: &a$%{shop.item.%{_numberOfItems}%.price-name.%arg-1%}%||&7&m------------------" to run [make player execute command "/shop-purchaseitem %{_numberOfItems}%"]
- else:
- message "&cThe specified category does not exist. (&cAmmo&e, &cBlock&e, &cOther&e, &cWeapon&c)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement