Oxalist

Untitled

Mar 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. options:
  2. coal: 1
  3. diamond: 5
  4.  
  5. command /sell:
  6. trigger:
  7. if amount of coal in player's inventory is less than 1:
  8. if amount of diamond in player's inventory is less than 1:
  9. send "&e(!) Please obtain some blocks before selling"
  10. stop
  11. set {_coal} to number of coal in player's inventory
  12. set {_diamond} to number of diamond in player's inventory
  13. set {_value1} to {@coal} * {_coal}
  14. set {_value2} to {@diamond} * {_diamond}
  15. set {_money1} to {_coal}
  16. set {_money2} to {_diamond}
  17. set {blocks} to {_value2} + {_value1}
  18. set {_money} to {_money2} + {_money1}
  19. remove all diamond and coal from player's inventory
  20. add {blocks} to player's balance
  21. send ""
  22. send "&e(!) Sold x%{_money}% items for a total of $%{blocks}%"
  23. stop
Advertisement
Add Comment
Please, Sign In to add comment