Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Sell Prices
- options:
- cactus: 15
- sugarcane: 15
- pumpkin: 10
- melon: 10
- sellwand: &bSell Wand
- # Command
- command /sellwand:
- permission: skript.sellwand
- permission message: &cYou do not have access to this command.
- trigger:
- give player 1 of glowing stick named "{@sellwand}" with lore "&7Right Click A Chest To Sell"
- # Events
- on right click on chest:
- if player is holding a stick:
- if name of player's tool is "{@sellwand}":
- cancel event
- if clicked chest's inventory contains cactus:
- set {_cactusAmount} to number of cactus in clicked chest's inventory
- set {_cactusTotal} to {_cactusAmount} * {@cactus}
- remove {_cactusAmount} of cactus from clicked chest's inventory
- add {_cactusTotal} to player's balance
- send "&2&lYOU SOLD: &7%{_cactusAmount}% &7Cactus for &a$%{_cactusTotal}%"
- if clicked chest's inventory contains sugar cane:
- set {_sugarcaneAmount} to number of sugar cane in clicked chest's inventory
- set {_sugarcaneTotal} to {_sugarcaneAmount} * {@sugarcane}
- remove {_sugarcaneAmount} of sugar cane from clicked chest's inventory
- add {_sugarcaneTotal} to player's balance
- send "&2&lYOU SOLD: &7%{_sugarcaneAmount}% &7Sugar Cane for &a$%{_sugarcaneTotal}%"
- if clicked chest's inventory contains pumpkin:
- set {_pumpkinAmount} to number of pumpkin in clicked chest's inventory
- set {_pumpkinTotal} to {_pumpkinAmount} * {@pumpkin}
- remove {_pumpkinAmount} of pumpkin from clicked chest's inventory
- add {_pumpkinTotal} to player's balance
- send "&2&lYOU SOLD: &7%{_pumpkinAmount}% &7Pumpkin for &a$%{_pumpkinTotal}%"
- if clicked chest's inventory contains melon slice:
- set {_melonAmount} to number of melon slice in clicked chest's inventory
- set {_melonTotal} to {_melonAmount} * {@melon}
- remove {_melonAmount} of melon slice from clicked chest's inventory
- add {_melonTotal} to player's balance
- send "&2&lYOU SOLD: &7%{_melonAmount}% &7Melon Slice for &a$%{_melonTotal}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement