Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. /shop:
  2. trigger:
  3. open chest with 3 rows named "&cMultiples &7Enchantment Shop" to player
  4. format slot 10 with emerald named "&c›› &7Fortune I" with lore "&7Gives you 1 extra item when you mine!" to close then run "make player execute [fortunebuy 1]"
  5. format slot 11 with emerald named "&c›› &7Fortune II" with lore "&7Gives you 2 extra item when you mine!" to close then run "make player execute [fortunebuy 2]"
  6. format slot 12 with emerald named "&c›› &7Fortune III" with lore "&7Gives you 3 extra item when you mine!" to close then run "make player execute [fortunebuy 3]"
  7. format slot 13 with emerald named "&c›› &7Fortune IV" with lore "&7Gives you 4 extra item when you mine!" to close then run "make player execute [fortunebuy 4]"
  8. format slot 14 with emerald named "&c›› &7Fortune V" with lore "&7Gives you 5 extra item when you mine!" to close then run "make player execute [fortunebuy 5]"
  9.  
  10. command /fortunebuy [<text>]:
  11. trigger:
  12. if arg 1 is "1":
  13. if player is holding a pickaxe:
  14. if %player's balance% is greater than or equal to 5000:
  15. enchant player's tool with fortune 1
  16. set {fortune.%player%} to 1
  17. remove 5000 from %player's balance%
  18. else:
  19. message "&c›› &7You do not have the required &c$5,000 &7for this purchase!"
  20. else:
  21. message "&c›› &7You must be holding a &cPickaxe &7to buy an enchantment!"
  22. if arg 1 is "2":
  23. if player is holding a pickaxe:
  24. if %player's balance% is greater than or equal to 7500:
  25. enchant player's tool with fortune 2
  26. set {fortune.%player%} to 2
  27. remove 7500 from %player's balance%
  28. else:
  29. message "&c›› &7You do not have the required &c$7,500 &7for this purchase!"
  30. else:
  31. message "&c›› &7You must be holding a &cPickaxe &7to buy an enchantment!"
  32. if arg 1 is "3":
  33. if player is holding a pickaxe:
  34. if %player's balance% is greater than or equal to 10000:
  35. enchant player's tool with fortune 3
  36. set {fortune.%player%} to 3
  37. remove 10000 from %player's balance%
  38. else:
  39. message "&c›› &7You do not have the required &c$10,000 &7for this purchase!"
  40. else:
  41. message "&c›› &7You must be holding a &cPickaxe &7to buy an enchantment!"
  42. if arg 1 is "4":
  43. if player is holding a pickaxe:
  44. if %player's balance% is greater than or equal to 12500:
  45. enchant player's tool with fortune 4
  46. set {fortune.%player%} to 4
  47. remove 12500 from %player's balance%
  48. else:
  49. message "&c›› &7You do not have the required &c$12,500 &7for this purchase!"
  50. else:
  51. message "&c›› &7You must be holding a &cPickaxe &7to buy an enchantment!"
  52. if arg 1 is "5":
  53. if player is holding a pickaxe:
  54. if %player's balance% is greater than or equal to 15000:
  55. enchant player's tool with fortune 5
  56. set {fortune.%player%} to 5
  57. remove 15000 from %player's balance%
  58. else:
  59. message "&c›› &7You do not have the required &c$15,000 &7for this purchase!"
  60. else:
  61. message "&c›› &7You must be holding a &cPickaxe &7to buy an enchantment!"
  62.  
  63. on break of coal ore:
  64. cancel event
  65. set event-block to air
  66. add 1 to {coal.%player%}
  67.  
  68. every tick:
  69. loop all players:
  70. if {coal.%player%} is set:
  71. if {fortune.%player%} is 1:
  72. give loop-player 2 coal
  73. else:
  74. give loop-player 1 coal
  75. if {fortune.%player%} is 2:
  76. give loop-player 3 coal
  77. else:
  78. give loop-player 1 coal
  79. if {fortune.%player%} is 3:
  80. give loop-player 4 coal
  81. else:
  82. give loop-player 1 coal
  83. if {fortune.%player%} is 4:
  84. give loop-player 5 coal
  85. else:
  86. give loop-player 1 coal
  87. if {fortune.%player%} is 5:
  88. give loop-player 6 coal
  89. else:
  90. give loop-player 1 coal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement