Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on sign change:
- if 1st line is "buy":
- if player has permission "sign.use":
- set {shop.amount.%location of block%} to 2nd line parsed as a number
- set {shop.item.%location of block%} to 3rd line parsed as a item type
- set {shop.price.%location of block%} to 4th line parsed as a number
- set 1st line to "&a&l&b&lKøb"
- set 2nd line to "&f&l%2nd line% &f&lstk"
- set 3rd line to "&f&l%3rd line%"
- set 4th line to "&f&l$%4th line%"
- on sign change:
- if 1st line is "sell":
- if player has permission "sign.use":
- set {shop.amount.%location of block%} to 2nd line parsed as a number
- set {shop.item.%location of block%} to 3rd line parsed as a item type
- set {shop.price.%location of block%} to 4th line parsed as a number
- set 1st line to "&b&lSælg"
- set 2nd line to "&f&l%2nd line% &f&lstk"
- set 3rd line to "&f&l%3rd line%"
- set 4th line to "&f&l$%4th line%"
- on rightclick on sign:
- if {shop.item.%location of block%} is set:
- if 1st line is "&b&lKøb":
- if player's balance is greater than or equal to {shop.price.%location of block%}:
- add {shop.amount.%location of block%} of {shop.item.%location of block%} to player's inventory
- subtract {shop.price.%location of block%} from player's balance
- send "&c&l-%{shop.price.%location of block%}%"
- else:
- send "&cDu har ikke nok penge til dette!"
- on rightclick on sign:
- if {shop.item.%location of block%} is set:
- if 1st line is "&b&lSælg":
- if number of {shop.item.%location of block%} in player's inventory is greater or equal to {shop.amount.%location of block%}:
- remove {shop.amount.%location of block%} of {shop.item.%location of block%} from player's inventory
- add {shop.price.%location of block%} to player's balance
- send "&a&l+%{shop.price.%location of block%}%"
- else:
- send "&cDu har ikke tilstrækkelige midler til dette!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement