twogz

Untitled

Jul 13th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. on first join:
  2. set {level::%uuid of player%} to 0
  3. set {xp::%uuid of player%} to 0
  4. set {xpmax::%uuid of player%} to 50
  5.  
  6. on break:
  7. cancel event
  8.  
  9. if event-block is coal ore:
  10. set event-block to stone
  11. give coal item to player
  12. execute console command "/xp add %player% 5"
  13. wait 10 seconds
  14. set event-block to coal ore
  15.  
  16. if event-block is iron ore:
  17. set event-block to stone
  18. give iron ingot to player
  19. execute console command "/xp add %player% 5"
  20. wait 10 seconds
  21. set event-block to iron ore
  22.  
  23. if event-block is gold ore:
  24. set event-block to stone
  25. give gold ingot to player
  26. execute console command "/xp add %player% 5"
  27. wait 10 seconds
  28. set event-block to gold ore
  29.  
  30. if event-block is diamond ore:
  31. if {level::%uuid of player%} < 20:
  32. message "&c&lYou must be at least Level 20 to mine this!"
  33. else:
  34. set event-block to stone
  35. give diamond to player
  36. execute console command "/xp add %player% 5"
  37. wait 10 seconds
  38. set event-block to diamond ore
  39.  
  40. if event-block is emerald ore:
  41. if {level::%uuid of player%} < 20:
  42. message "&c&lYou must be at least Level 20 to mine this!"
  43. else:
  44. set event-block to stone
  45. give emerald to player
  46. execute console command "/xp add %player% 5"
  47. wait 10 seconds
  48. set event-block to emerald ore
  49.  
  50. on chat:
  51. cancel event
  52. broadcast "&7Lvl %{level::%uuid of player%}% &e%player% &f%message%"
  53.  
  54.  
  55. command /xp [<text>] [<player>] [<integer>]:
  56. executable by: console
  57. trigger:
  58. if arg 1 is "add":
  59. add arg 3 to {xp::%uuid of arg 2%}
  60. message "&a&l + %arg 3% XP" to arg 2
  61. if {xp::%uuid of arg 2%} >= {xpmax::%uuid of arg 2%}:
  62. add 1 to {level::%uuid of arg 2%}
  63. set {xp::%uuid of arg 2%} to 0
  64. message "&e&lYou are now Level %{level::%uuid of arg 2%}%" to arg 2
Advertisement
Add Comment
Please, Sign In to add comment