Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. # Sell Prices
  2.  
  3. options:
  4. cactus: 15
  5. sugarcane: 15
  6. pumpkin: 10
  7. melon: 10
  8. sellwand: &bSell Wand
  9.  
  10. # Command
  11.  
  12. command /sellwand:
  13. permission: skript.sellwand
  14. permission message: &cYou do not have access to this command.
  15. trigger:
  16. give player 1 of glowing stick named "{@sellwand}" with lore "&7Right Click A Chest To Sell"
  17.  
  18. # Events
  19.  
  20. on right click on chest:
  21. if player is holding a stick:
  22. if name of player's tool is "{@sellwand}":
  23. cancel event
  24. if clicked chest's inventory contains cactus:
  25. set {_cactusAmount} to number of cactus in clicked chest's inventory
  26. set {_cactusTotal} to {_cactusAmount} * {@cactus}
  27. remove {_cactusAmount} of cactus from clicked chest's inventory
  28. add {_cactusTotal} to player's balance
  29. send "&2&lYOU SOLD: &7%{_cactusAmount}% &7Cactus for &a$%{_cactusTotal}%"
  30. if clicked chest's inventory contains sugar cane:
  31. set {_sugarcaneAmount} to number of sugar cane in clicked chest's inventory
  32. set {_sugarcaneTotal} to {_sugarcaneAmount} * {@sugarcane}
  33. remove {_sugarcaneAmount} of sugar cane from clicked chest's inventory
  34. add {_sugarcaneTotal} to player's balance
  35. send "&2&lYOU SOLD: &7%{_sugarcaneAmount}% &7Sugar Cane for &a$%{_sugarcaneTotal}%"
  36. if clicked chest's inventory contains pumpkin:
  37. set {_pumpkinAmount} to number of pumpkin in clicked chest's inventory
  38. set {_pumpkinTotal} to {_pumpkinAmount} * {@pumpkin}
  39. remove {_pumpkinAmount} of pumpkin from clicked chest's inventory
  40. add {_pumpkinTotal} to player's balance
  41. send "&2&lYOU SOLD: &7%{_pumpkinAmount}% &7Pumpkin for &a$%{_pumpkinTotal}%"
  42. if clicked chest's inventory contains melon slice:
  43. set {_melonAmount} to number of melon slice in clicked chest's inventory
  44. set {_melonTotal} to {_melonAmount} * {@melon}
  45. remove {_melonAmount} of melon slice from clicked chest's inventory
  46. add {_melonTotal} to player's balance
  47. send "&2&lYOU SOLD: &7%{_melonAmount}% &7Melon Slice for &a$%{_melonTotal}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement