Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- #----====#Message Prefix#====----#
- p: &2&lSHOP&7 >>&r
- p2: &2&lBALANCE&7 >>&r
- #----====#Message Prefix#====----#
- #----====#Prices Buy#====----#
- 1xSteakPrice: 4
- 64xSteakPrice: 256
- 1xWheatSeedsPrice: 15
- 32xWheatSeedsPrice: 480
- 1xWaterBucketPrice: 500
- #----====#Prices Buy#====----#
- #----====#Prices SELL#====----#
- SellWheatSeedsPrice: 10
- SellSteakPrice: 2
- SellWheatPrice: 20
- SellWaterBucketPrice: 250
- #----====#Prices SELL#====----#
- on join:
- if {balance.%player%} is not set:
- set {balance.%player%} to 0
- command /bal:
- trigger:
- send "{@p2} Balance: $%{balance.%player%}%" to player
- command /balance:
- trigger:
- send "{@p2} Balance: $%{balance.%player%}%" to player
- command /balanceedit <text> <player> [<integer>]:
- permission: shop.balance.edit
- usage: {@p2} Usage &a/balanceedit <Add | Reset | Remove | Set> <player> <Integer>
- trigger:
- if arg-1 is "add":
- add arg-3 to {balance.%arg 2%}
- send "{@p2} Added $%arg 3% To %arg 2%'s Balance. %arg 2%'s Balance Is Now $%{balance.%arg 2%}%"
- else if arg-1 is "reset":
- set {balance.%arg 2%} to 0
- send "{@p2} %arg 2%'s Balance Is Now $0"
- else if arg-1 is "remove":
- subtract arg-3 from {balance.%arg 2%}
- send "{@p2} Removed $%arg 3% From %arg 2%'s Balance. %arg 2%'s Balance Is Now $%{balance.%arg 2%}%"
- else if arg-1 is "Set":
- set {balance.%arg 2%} to arg-3
- send "{@p2} Set %arg 2%'s Balance To $%{balance.%arg 2%}%"
- command /pay <player> <integer>:
- cooldown: 10 seconds
- cooldown message: {@p2} You Need To Wait 10 Seconds To Use That Command Again.
- trigger:
- if {balance.%player%} is greater or equal to arg-2:
- if arg-2 is greater than 0:
- remove arg-2 from {balance.%player%}
- add arg-2 to {balance.%arg 1%}
- send "{@p2} You Payed %arg 1% $%arg 2%" to player
- send "{@p2} %player% Payed You $%arg 2%" to arg-1
- else:
- send "{@p2} You Can't Pay Anyone Less Than $1"
- else:
- send "{@p2} You Dont Have Enough Money To Do That" to player
- command /shop:
- trigger:
- open chest with 1 rows named "&2&lSHOP" to player
- set slot 0 of player's current inventory to wheat seeds named "&2Seeds" with lore "&6Open The Seeds Section"
- set slot 1 of player's current inventory to melon slice named "&2Food" with lore "&6Open The Food Section"
- set slot 2 of player's current inventory to water bucket named "&2Misc" with lore "&6Open The Misc Section"
- on inventory click:
- if inventory name of player's current inventory is "&2&lSHOP":
- cancel event
- if clicked slot is 0:
- open chest with 2 rows named "&2&lSHOP &7&l| &2&lSEEDS" to player
- set slot 0 of player's current inventory to Barrier named "&2Back"
- set slot 1 of player's current inventory to wheat seeds named "&21x Wheat Seeds" with lore "&6Price: {@1xWheatSeedsPrice}"
- set slot 2 of player's current inventory to wheat seeds named "&232x Wheat Seeds" with lore "&6Price: {@32xWheatSeedsPrice}"
- else if clicked slot is 1:
- open chest with 2 rows named "&2&lSHOP &7&l| &2&lFOOD" to player
- set slot 0 of player's current inventory to Barrier named "&2Back"
- set slot 1 of player's current inventory to cooked beef named "&264x Steak" with lore "&6Price: {@64xSteakPrice}"
- else if clicked slot is 2:
- open chest with 2 rows named "&2&lSHOP &7&l| &2&lMISC" to player
- set slot 0 of player's current inventory to Barrier named "&2Back"
- set slot 1 of player's current inventory to water bucket named "&21x Water Bucket" with lore "&6Price: {@1xWaterBucketPrice}"
- #SEEDS SECTION#
- on inventory click:
- if inventory name of player's current inventory is "&2&lSHOP &7&l| &2&lSEEDS":
- cancel event
- if clicked slot is 0:
- make player say "/shop"
- else if clicked slot is 1:
- if {balance.%player%} is greater or equal to {@1xWheatSeedsPrice}:
- remove {@1xWheatSeedsPrice} from {balance.%player%}
- give player 1 wheat seeds
- send "{@p} You Bought 1x Wheat Seeds For ${@1xWheatSeedsPrice} Your New Balance Is $%{balance.%player%}%" to player
- else:
- send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
- else if clicked slot is 2:
- if {balance.%player%} is greater or equal to {@32xWheatSeedsPrice}:
- remove {@32xWheatSeedsPrice} from {balance.%player%}
- give player 32 wheat seeds
- send "{@p} You Bought 32x Wheat Seeds For ${@32xWheatSeedsPrice} Your New Balance Is $%{balance.%player%}%" to player
- else:
- send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
- #SEEDS SECTION#
- #FOOD SECTION#
- on inventory click:
- if inventory name of player's current inventory is "&2&lSHOP &7&l| &2&lFOOD":
- cancel event
- if clicked slot is 0:
- make player say "/shop"
- else if clicked slot is 1:
- if {balance.%player%} is greater or equal to {@64xSteakPrice}:
- remove {@64xSteakPrice} from {balance.%player%}
- give player 64 cooked beef
- send "{@p} You Bought 64x Steak For ${@64xSteakPrice} Your New Balance Is $%{balance.%player%}%" to player
- else:
- send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
- #FOOD SECTION#
- #MISC SECTION#
- on inventory click:
- if inventory name of player's current inventory is "&2&lSHOP &7&l| &2&lMISC":
- cancel event
- if clicked slot is 0:
- make player say "/shop"
- else if clicked slot is 1:
- if {balance.%player%} is greater or equal to {@1xWaterBucketPrice}:
- remove {@1xWaterBucketPrice} from {balance.%player%}
- give player 1 water bucket
- send "{@p} You Bought 1x Water Bucket For ${@1xWaterBucketPrice} Your New Balance Is $%{balance.%player%}%" to player
- else:
- send "{@p} You Dont Have Enough Money. Your Balance Is $%{balance.%player%}%" to player
- command /sell:
- trigger:
- send "&a" to player
- send "{@p2} Sold All Sellable Items In Your Inventory." to player
- if player's inventory contains wheat seeds:
- set {_wheatseedsamount} to amount of wheat seeds in player's inventory
- set {_profit} to {@SellWheatSeedsPrice}*{_wheatseedsamount}
- add {_profit} to {balance.%player%}
- remove all wheat seeds from player's inventory
- send "Wheat Seeds Sold: %{_wheatseedsamount}% Pieces "
- if player's inventory contains wheat:
- set {_wheatamount} to amount of wheat in player's inventory
- set {_profit} to {@SellWheatSeedsPrice}*{_wheatamount}
- add {_profit} to {balance.%player%}
- remove all wheat from player's inventory
- send "Wheat Sold: %{_wheatamount}% Pieces"
- send "{@p2} You Earned $%{_profit}% In Total" to player
- send "&a" to player
- command /clearchat:
- permission: shop.clearchat
- trigger:
- loop 300 times:
- broadcast "&a"
- broadcast "&2The Chat Has Been Cleared By %player%"
- broadcast "&a"
- on chat:
- if player has permission "shop.rank.owner":
- set the chat format to "&7[&c&lOWNER&7]&r %player%: %message%"
- else if player has permission "shop.rank.admin":
- set the chat format to "&7[&e&lADMIN&7]&r %player%: %message%"
- else if player has permission "shop.rank.Helper":
- set the chat format to "&7[&9&lHELPER&7]&r %player%: %message%"
- else if player has permission "shop.rank.vip":
- set the chat format to "&7[&6&lVIP&7]&r %player%: %message%"
- else:
- set the chat format to "&r%player%: %message%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement