Oxalist

Untitled

Dec 16th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. Variables:
  2. {PickaxeLevel.%player%} = 1
  3. # This is the starting level for the pickaxe
  4. {PickaxeCounter.%player%} = 0
  5. # This is the starting blocks mined counter
  6. {UpgradePoints.%player%} = 0
  7. # This is the starting amount of points
  8. {BlockBroken.%player%} = 0
  9. Options:
  10. ToolName: &fStarter Pickaxe &8? &fBlocks &b%{BlockBroken.%player%}% &8? &fLevel &b%{PickaxeLevel.%player%}% &8? &fExp &8? &b%{PickaxeCounter.%player%}%&3/
  11. # This is the name for the pickaxe. You can change this however the Level and the Counter should be in the name
  12. UPoint: 1
  13. # This is how many points a player get's once a player has levelled a pickaxe up
  14. BlocksBroken: 200
  15. # This is the amount of blocks that need to be broken to a pickaxe has levelled up
  16. Header: &8&m--&7&m--&b&m--&3&m--&b( &f&lPICKAXE UPGRADES &b)&3&m--&b&m--&7&m--&8&m--
  17. Footer: &8&m--&7&m--&b&m--&3&m--&b( &f&lPICKAXE UPGRADES &b)&3&m--&b&m--&7&m--&8&m--
  18. Upgrade: &3(&bCurrent Level&3) &3? &f%{PickaxeLevel.%player%}% &3(&bUpgrade Points&3) &3? &f%{UpgradePoints.%player%}%
  19. # Header, Footer and upgrade message
  20. EffUP: 1
  21. ForUP: 1
  22. UnbUP: 1
  23. # These are how much the enchantment upgrades costs per points - Can change the amount
  24. UpgradeSuccess: &3(&bYou have enchanted your tool&3)
  25. MissingPoints: &3(&bYou need upgrade points to purchase this enchantment &3)
  26. # These are the messages if an upgrade is success or if a player doesn't have enough points
  27.  
  28.  
  29.  
  30.  
  31.  
  32. on mine of coal ore:
  33. if player is holding a pickaxe:
  34. add 1 to {PickaxeCounter.%player%}
  35. set name of tool of player to "{@ToolName}&b{@BlocksBroken}"
  36. if {PickaxeCounter.%player%} is greater than or equal to 200:
  37. add 1 to {PickaxeLevel.%player%}
  38. add {@UPoint} to {UpgradePoints.%player%}
  39. set {PickaxeCounter.%player%} to 0
  40. launch ball firework colored white and ball firework colored blue at targeted block timed 1
  41.  
  42. command /upgrades:
  43. trigger:
  44. send ""
  45. send " {@Header}"
  46. send " &7&oClick on enchantments to upgrade your tool"
  47. send ""
  48. send " {@Upgrade}"
  49. send ""
  50. send ""
  51. json("%player%"," &7&oEfficiency||cmd:/eff||ttp:&3» &b&l{@EffUP} Upgrade Point%newline%&fIncrease your%newline%&f&lEfficiency&fon your tool|| &7&oFortune||cmd:/for||ttp:&3» &b&l{@ForUP} Upgrade Point%newline%&fIncrease your%newline%&f&oFortune &fon your tool|| &7&oUnbreaking||cmd:/unb||ttp:&3» &b&l{@UnbUP} Upgrade Point%newline%&fIncrease your%newline%&f&oUnbreaking &fon your tool")
  52. send ""
  53. send " {@Footer}"
  54.  
  55. command /eff:
  56. trigger:
  57. if {UpgradePoints.%player%} is greater than or equal to {@EffUP}:
  58. send ""
  59. send " {@UpgradeSuccess}"
  60. send ""
  61. remove 1 from {UpgradePoints.%player%}
  62. evaluate "enchant player's tool with efficiency %level of efficiency of player's tool + 1%"
  63. else:
  64. send ""
  65. send " {@MissingPoints}"
  66. send ""
  67.  
  68. command /for:
  69. trigger:
  70. if {UpgradePoints.%player%} is greater than or equal to {@ForUP}:
  71. send ""
  72. send " {@UpgradeSuccess}"
  73. send ""
  74. remove 1 from {UpgradePoints.%player%}
  75. evaluate "enchant player's tool with fortune %level of fortune of player's tool + 1%"
  76. else:
  77. send ""
  78. send " {@MissingPoints}"
  79. send ""
  80.  
  81. command /unb:
  82. trigger:
  83. if {UpgradePoints.%player%} is greater than or equal to {@UnbUP}:
  84. send ""
  85. send " {@UpgradeSuccess}"
  86. send ""
  87. remove 1 from {UpgradePoints.%player%}
  88. evaluate "enchant player's tool with unbreaking %level of unbreaking of player's tool + 1%"
  89. else:
  90. send ""
  91. send " {@MissingPoints}"
  92. send ""
  93. on drop:
  94. if tool of player is diamond pickaxe
  95. cancel event
  96. on rightclick holding a diamond pickaxe:
  97. make player execute "/upgrades"
  98. on mine of ore:
  99. add 1 to {BlockBroken.%player%}
Advertisement
Add Comment
Please, Sign In to add comment