Advertisement
Dreyer11

Untitled

Jul 16th, 2019
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. on sign change:
  2.  
  3. if 1st line is "buy":
  4.  
  5. if player has permission "sign.use":
  6.  
  7. set {shop.amount.%location of block%} to 2nd line parsed as a number
  8.  
  9. set {shop.item.%location of block%} to 3rd line parsed as a item type
  10.  
  11. set {shop.price.%location of block%} to 4th line parsed as a number
  12.  
  13. set 1st line to "&a&l&b&lKøb"
  14.  
  15. set 2nd line to "&f&l%2nd line% &f&lstk"
  16.  
  17. set 3rd line to "&f&l%3rd line%"
  18.  
  19. set 4th line to "&f&l$%4th line%"
  20.  
  21. on sign change:
  22.  
  23. if 1st line is "sell":
  24.  
  25. if player has permission "sign.use":
  26.  
  27. set {shop.amount.%location of block%} to 2nd line parsed as a number
  28.  
  29. set {shop.item.%location of block%} to 3rd line parsed as a item type
  30.  
  31. set {shop.price.%location of block%} to 4th line parsed as a number
  32.  
  33. set 1st line to "&b&lSælg"
  34.  
  35. set 2nd line to "&f&l%2nd line% &f&lstk"
  36.  
  37. set 3rd line to "&f&l%3rd line%"
  38.  
  39. set 4th line to "&f&l$%4th line%"
  40.  
  41.  
  42.  
  43.  
  44.  
  45. on rightclick on sign:
  46.  
  47. if {shop.item.%location of block%} is set:
  48.  
  49. if 1st line is "&b&lKøb":
  50.  
  51. if player's balance is greater than or equal to {shop.price.%location of block%}:
  52.  
  53. add {shop.amount.%location of block%} of {shop.item.%location of block%} to player's inventory
  54.  
  55. subtract {shop.price.%location of block%} from player's balance
  56.  
  57. send "&c&l-%{shop.price.%location of block%}%"
  58.  
  59. else:
  60.  
  61. send "&cDu har ikke nok penge til dette!"
  62.  
  63.  
  64.  
  65. on rightclick on sign:
  66.  
  67. if {shop.item.%location of block%} is set:
  68.  
  69. if 1st line is "&b&lSælg":
  70.  
  71. if number of {shop.item.%location of block%} in player's inventory is greater or equal to {shop.amount.%location of block%}:
  72.  
  73. remove {shop.amount.%location of block%} of {shop.item.%location of block%} from player's inventory
  74.  
  75. add {shop.price.%location of block%} to player's balance
  76.  
  77. send "&a&l+%{shop.price.%location of block%}%"
  78.  
  79. else:
  80.  
  81. send "&cDu har ikke tilstrækkelige midler til dette!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement