Oxalist

Untitled

Apr 8th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. variables:
  2. {mana::%player%} = 0
  3. {level::%player%} = 0
  4.  
  5. every tick:
  6. loop all players:
  7. set action bar of loop-player to "&8"
  8.  
  9. options:
  10. coal: 2 # Prices
  11. stone: 1 # Prices
  12.  
  13. command /convert:
  14. permission: convert.use
  15. permission message: &e(!) Purchase a rank to use the command
  16. trigger:
  17. if amount of light gray dye in player's inventory is less than 1:
  18. if amount of gray dye in player's inventory is less than 1:
  19. send "&9Convert> &7Obtain some crystals to sell" to player
  20. stop
  21. set {_stone} to number of light gray dye in player's inventory
  22. set {_coal} to number of gray dye in player's inventory
  23. set {_value1} to {@stone} * {_stone}
  24. set {_value2} to {@coal} * {_coal}
  25. set {_money1} to {_stone}
  26. set {_money2} to {_coal}
  27. set {blocks} to {_value2} + {_value1}
  28. set {_money} to {_money2} + {_money1}
  29. remove all gray dye and light gray dye from player's inventory
  30. add {_money} to player's balance
  31. send player title "&9&lConvert" with subtitle "&7Sold &f%{_money}%x &7crystals for &f$%{blocks}%" for 3 seconds
  32. stop
  33.  
  34. command /consoleconvert <player>:
  35. executable by: console
  36. trigger:
  37. if amount of light gray dye in arg 1's inventory is less than 1:
  38. if amount of gray dye in arg 1's inventory is less than 1:
  39. send "&9Convert> &7Obtain some crystals to sell" to arg 1
  40. stop
  41. set {_stone} to number of light gray dye in arg 1's inventory
  42. set {_coal} to number of gray dye in arg 1's inventory
  43. set {_value1} to {@stone} * {_stone}
  44. set {_value2} to {@coal} * {_coal}
  45. set {_money1} to {_stone}
  46. set {_money2} to {_coal}
  47. set {blocks} to {_value2} + {_value1}
  48. set {_money} to {_money2} + {_money1}
  49. remove all gray dye and light gray dye from arg 1's inventory
  50. add {_money} to arg 1's balance
  51. send arg 1 title "&9&lConvert" with subtitle "&7Sold &f%{_money}%x &7crystals for &f$%{blocks}%" for 3 seconds
  52. stop
  53.  
  54. command /bypass:
  55. permission: bypass.use
  56. trigger:
  57. if {bypass::%player%} is not set:
  58. set {bypass::%player%} to "True"
  59. send "&9Bypass> &7Bypass mode activated"
  60. stop
  61. if {bypass::%player%} is "True":
  62. delete {bypass::%player%}
  63. send "&9Bypass> &7Bypass mode deactivated"
  64. stop
  65.  
  66. on break:
  67. if {bypass::%player%} is "True":
  68. stop
  69. if event-block is any ore or cobble:
  70. stop
  71. else:
  72. cancel event
  73. send "&9Mining> &7You cannot mine this block"
  74.  
  75.  
  76. on break of cobble:
  77. if {bypass::%player%} is "True":
  78. stop
  79. if player is not holding a pickaxe:
  80. cancel event
  81. send "&9Mining> &7You must be holding a pickaxe"
  82. stop
  83. else:
  84. cancel drops
  85. give player 1 light gray dye named "&7Stone Crystal"
  86. set event-block to bedrock
  87. wait 4 seconds
  88. set event-block to cobble
  89. stop
  90. on break of coal ore:
  91. if {bypass::%player%} is "True":
  92. stop
  93. if player is holding a wooden pickaxe:
  94. cancel event
  95. send "&9Mining> &7You cannot mine this block with this pickaxe"
  96. stop
  97. else:
  98. cancel drops
  99. give player 1 gray dye named "&fCoal Crystal"
  100. set event-block to bedrock
  101. wait 4 seconds
  102. set event-block to coal ore
  103. stop
  104.  
  105. on rightclick on dispenser:
  106. if {bypass::%player%} is "True":
  107. stop
  108. cancel event
  109. make console execute command "/consoleconvert %player%"
Advertisement
Add Comment
Please, Sign In to add comment