Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- currency: &a$
- command /sell [<text>]:
- description: Sell Your Items
- permission: lot.sell
- usage: &d/sell [all]
- permission message: {@noperm}
- trigger:
- if arg 1 is not set:
- set {_sellamount} to amount of tool of player
- set {_sell} to tool of player
- set tool of player to 1 of tool of player
- if tool of player is air:
- send "&d(!) &7You cannot sell air."
- stop
- if {worth.%tool of player%} is not set:
- send "&d(!) &7A(n) %tool of player% is worth nothing."
- set tool of player to {_sell}
- clear {_sell}
- stop
- if {worth::%tool of player%} is 0:
- send "&d(!) &7A(n) %tool of player% is worth nothing."
- set tool of player to {_sell}
- clear {_sell}
- stop
- else:
- loop {_sellamount} times:
- set tool of player to 1 of tool of player
- add {worth::%tool of player%} to {balance::%uuid of player%}
- send "&d(!) &a%{_sellamount}% &7%tool of player% has been sold for &a$%{worth::%tool of player%} * {_sellamount}% {@currency}."
- set the tool of player to air
- clear {_sell}
- clear {_sellamount}
- stop
- if arg 1 is set:
- send "(!) &7Selling all items is coming soon!"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement