Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- coal: 1
- diamond: 5
- command /sell:
- trigger:
- if amount of coal in player's inventory is less than 1:
- if amount of diamond in player's inventory is less than 1:
- send "&e(!) Please obtain some blocks before selling"
- stop
- set {_coal} to number of coal in player's inventory
- set {_diamond} to number of diamond in player's inventory
- set {_value1} to {@coal} * {_coal}
- set {_value2} to {@diamond} * {_diamond}
- set {_money1} to {_coal}
- set {_money2} to {_diamond}
- set {blocks} to {_value2} + {_value1}
- set {_money} to {_money2} + {_money1}
- remove all diamond and coal from player's inventory
- add {blocks} to player's balance
- send ""
- send "&e(!) Sold x%{_money}% items for a total of $%{blocks}%"
- stop
Advertisement
Add Comment
Please, Sign In to add comment