Oxalist

Untitled

Apr 5th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.39 KB | None | 0 0
  1. every 5 minutes in world "ul_Prison":
  2. broadcast "&e(Mines) &7Mines have been reset." to world "ul_Prison"
  3. make console execute "/mrl reset A -s"
  4. make console execute "/mrl reset A1 -s"
  5. make console execute "/mrl reset A2 -s"
  6. make console execute "/mrl reset B -s"
  7. make console execute "/mrl reset B1 -s"
  8. make console execute "/mrl reset B2 -s"
  9. make console execute "/mrl reset C -s"
  10. make console execute "/mrl reset C1 -s"
  11. make console execute "/mrl reset C2 -s"
  12. make console execute "/mrl reset D -s"
  13. make console execute "/mrl reset D1 -s"
  14. make console execute "/mrl reset D2 -s"
  15.  
  16. on break:
  17. if player is in world "ul_Prison":
  18. if event-block is stone:
  19. give player 1 stone
  20.  
  21. # Selling #
  22.  
  23. options:
  24. coalore: 2 # Prices
  25. ironore: 3 # Prices
  26. stone: 1 # Prices
  27.  
  28. command /sell [<player>]:
  29. permission: sell.use
  30. permission message: &e(!) Purchase a rank to use the command
  31. trigger:
  32. if arg 1 is set:
  33. if arg 1 is in world "ul_Prison":
  34. if amount of coal ore in arg 1's inventory is less than 1:
  35. if amount of stone in arg 1's inventory is less than 1:
  36. if amount of iron ore in arg 1's inventory is less than 1:
  37. send "&e(Sell) &7Please mine some blocks before trying to sell" to arg 1
  38. stop
  39. set {_stone} to number of stone in arg 1's inventory
  40. set {_coalore} to number of coal ore in arg 1's inventory
  41. set {_value1} to {@stone} * {_stone}
  42. set {_value2} to {@coalore} * {_coalore}
  43. set {_money1} to {_stone}
  44. set {_money2} to {_coalore}
  45. set {blocks} to {_value2} + {_value1}
  46. set {_money} to {_money2} + {_money1}
  47. remove all stone and coal ore and iron ore from arg 1's inventory
  48. add {_money} to {prisonmoney::%arg 1%}
  49. set action bar of arg 1 to "&eSold &fx%{_money}% &eblocks for &f$%{blocks}% &ewith (* 0 Booster)"
  50. stop
  51. if arg 1 is not set:
  52. if player is in world "ul_Prison":
  53. if amount of coal ore in player's inventory is less than 1:
  54. if amount of stone in player's inventory is less than 1:
  55. if amount of iron ore in player's inventory is less than 1:
  56. send "&e(Sell) &7Please mine some blocks before trying to sell" to player
  57. stop
  58. set {_stone} to number of stone in player's inventory
  59. set {_coalore} to number of coal ore in player's inventory
  60. set {_value1} to {@stone} * {_stone}
  61. set {_value2} to {@coalore} * {_coalore}
  62. set {_money1} to {_stone}
  63. set {_money2} to {_coalore}
  64. set {blocks} to {_value2} + {_value1}
  65. set {_money} to {_money2} + {_money1}
  66. remove all stone and coal ore and iron ore from player's inventory
  67. add {_money} to {prisonmoney::%player%}
  68. set action bar of player to "&eSold &fx%{_money}% &eblocks for &f$%{blocks}% &ewith (* 0 Booster)"
  69. stop
  70.  
  71. on rightclick on sign:
  72. 2nd line of clicked block is "&3[Sell All]":
  73. make console execute command "/sell %player%"
  74. set line 3 of clicked block to "&8%player%"
  75.  
  76. variables:
  77. {RUP::%player%} = 1300
  78. {prisonmoney::%player%} = 0
  79. command /rankup:
  80. trigger:
  81. if player is not in world "ul_Prison":
  82. send "&fUnknown command. Type ""/help"" for help."
  83. stop
  84. if player is in world "ul_Prison":
  85. if {prisonmoney::%player%} is greater than or equal to {RUP::%player%}:
  86. remove 1800 from {prisonmoney::%player%}
  87. set {RUP::%player%} to {RUP::%player%} * 1.67
  88. add 1 to {prisonrank::%player%}
  89. send "&e(Rankup) &7You have ranked up to level &f%{prisonrank::%player%}%"
  90. send "&e(Rankup) &7You now need &f%{RUP::%player%}% to level up again"
  91. stop
  92. if {prisonmoney::%player%} is less than {RUP::%player%}:
  93. send "&e(Rankup) &7You need &f%{RUP::%player%}% &7to rankup"
  94. stop
Advertisement
Add Comment
Please, Sign In to add comment