Oxalist

Untitled

Mar 25th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.19 KB | None | 0 0
  1. variables:
  2. {joined::%player%} = "False"
  3. {crate} = "False"
  4. {booster.active} = 0
  5.  
  6.  
  7. on chat:
  8. cancel event
  9. broadcast "&8[&e%{level::%player%}%&8] %colored player's prefix% &e%player% &8» &7%message%"
  10.  
  11. on first join:
  12. set slot 0 of player's inventory to 1 diamond pickaxe of efficiency 2 named "&fDiamond Pickaxe"
  13. set {joined::%player%} to "True"
  14.  
  15. command /pickaxe [<player>]:
  16. trigger:
  17. if arg 1 is not set:
  18. if {joined::%player%} is "True":
  19. send "&e(!) You should already have a pickaxe, if this is wrong contact an admin"
  20. if {joined::%player%} is "False":
  21. set slot 0 of player's inventory to 1 diamond pickaxe of efficiency 2 named "&fDiamond Pickaxe"
  22. set {joined::%player%} to "True"
  23. if arg 1 is set:
  24. if player has permission "pickaxe.others":
  25. if {joined::%arg 1%} is "True":
  26. send "&e(!) That person should already have a pickaxe" to player
  27. if {joined::%arg 1%} is "False":
  28. set slot 0 of arg 1's inventory to 1 diamond pickaxe of efficiency 2 named "&fDiamond Pickaxe"
  29. set {joined::%arg 1%} to "True"
  30.  
  31. command /testy:
  32. trigger:
  33. set {joined::%player%} to "False"
  34.  
  35.  
  36.  
  37. on break:
  38. repair tool of player
  39. if event-block is coal ore:
  40. cancel drops
  41. add 1 to {blocks::%player%}
  42. add 1 to {exp::%player%}
  43. give 1 coal ore to player
  44. chance of 0.5%:
  45. set event-block to sponge
  46. if "%lore of player's tool%" contains "&eLuck 1":
  47. chance of 1%:
  48. set event-block to sponge
  49. if "%lore of player's tool%" contains "&eLuck 2":
  50. chance of 2%:
  51. set event-block to sponge
  52. if "%lore of player's tool%" contains "&eLuck 3":
  53. chance of 3%:
  54. set event-block to sponge
  55. if event-block is stone:
  56. cancel drops
  57. add 1 to {blocks::%player%}
  58. add 1 to {exp::%player%}
  59. give 1 stone to player
  60. chance of 0.5%:
  61. set event-block to sponge
  62. if "%lore of player's tool%" contains "&eLuck 1":
  63. chance of 0.6%:
  64. set event-block to sponge
  65. if "%lore of player's tool%" contains "&eLuck 2":
  66. chance of 0.8%:
  67. set event-block to sponge
  68. if "%lore of player's tool%" contains "&eLuck 3":
  69. chance of 1%:
  70. set event-block to sponge
  71. if event-block is sponge:
  72. cancel drops
  73. set {luckyblock} to random integer between 3 and 7
  74. if {luckyblock} is 3:
  75. send "&e(!) Lucky Block &8» &e3 tokens"
  76. add 3 to {tokens::%player%}
  77. if {luckyblock} is 4:
  78. send "&e(!) Lucky Block &8» &e4 tokens"
  79. add 4 to {tokens::%player%}
  80. if {luckyblock} is 5:
  81. send "&e(!) Lucky Block &8» &e5 tokens"
  82. add 5 to {tokens::%player%}
  83. if {luckyblock} is 6:
  84. send "&e(!) Lucky Block &8» &e6 tokens"
  85. add 6 to {tokens::%player%}
  86. if {luckyblock} is 7:
  87. send "&e(!) Lucky Block &8» &e7 tokens"
  88. add 7 to {tokens::%player%}
  89. if player has enough space for 1 stone:
  90. if player has enough space for 1 coal ore:
  91. stop
  92. else:
  93. send player title "&7" with subtitle "&cInventory is Full" for 2 seconds
  94.  
  95.  
  96. on break of stone or coal ore:
  97. if player is holding pickaxe:
  98. set name of player's tool to "&e&lPickaxe &8» &eBlocks: &6%{blocks::%player%}% &8» &eExp: &6%{exp::%player%}%/%{expneeded::%player%}%"
  99.  
  100. command /join:
  101. trigger:
  102. set {joined::%player%} to "False"
  103.  
  104. # Selling #
  105.  
  106.  
  107. command /rewards:
  108. trigger:
  109. open chest with 3 rows named " &0&nReward Shop" to player
  110. format slot 10 of player with 1 emerald named "&6&lReward ##1 &e(Click to redeem)" with lore "&7||&eObjective: &fEarn 25 harvesting levels||&7||&eReward: &f$1000||&7" to run [make player execute command "/reward1"]
  111. format slot 11 of player with 1 emerald named "&6&lReward ##2 &e(Click to redeem)" with lore "&7||&eObjective: &fEarn 100 harvesting levels||&7||&eReward: &f$5000||&7" to run [make player execute command "/reward2"]
  112. format slot 12 of player with 1 emerald named "&6&lReward ##3 &e(Click to redeem)" with lore "&7||&eObjective: &fEarn 500 harvesting levels||&7||&eReward: &f1 Iron Key||&7" to run [make player execute command "/reward3"]
  113.  
  114. command /reward1:
  115. trigger:
  116. if {reward1::%player%} is "True":
  117. send "&e(!) You have already redeemed this reward"
  118. stop
  119. if {harvest::%player%} is less than 24:
  120. send "&e(!) You do not have enough levels to redeem this"
  121. if {harvest::%player%} is more than 24:
  122. set {reward1::%player%} to "True"
  123. send "&e(!) Here is your reward"
  124. remove 25 from {harvest::%player%}
  125. add 1000 to player's balance
  126. command /reward2:
  127. trigger:
  128. if {reward2::%player%} is "True":
  129. send "&e(!) You have already redeemed this reward"
  130. stop
  131. if {harvest::%player%} is less than 99:
  132. send "&e(!) You do not have enough levels to redeem this"
  133. if {harvest::%player%} is more than 99:
  134. set {reward2::%player%} to "True"
  135. send "&e(!) Here is your reward"
  136. remove 100 from {harvest::%player%}
  137. add 5000 to player's balance
  138.  
  139. command /reward3:
  140. trigger:
  141. if {reward3::%player%} is "True":
  142. send "&e(!) You have already redeemed this reward"
  143. stop
  144. if {harvest::%player%} is less than 499:
  145. send "&e(!) You do not have enough levels to redeem this"
  146. if {harvest::%player%} is more than 499:
  147. set {reward3::%player%} to "True"
  148. send "&e(!) Here is your reward"
  149. remove 500 from {harvest::%player%}
  150. make console execute command "/key give %player% iron"
  151.  
  152. command /key [<text>] [<player>] [<text>]:
  153. trigger:
  154. if arg 1 is not set:
  155. if arg 2 is not set:
  156. if arg 3 is not set:
  157. send ""
  158. send "&e(!) /key <give/list> [<player>] [<keyname>]"
  159. send ""
  160. if arg 1 is "list":
  161. send ""
  162. send "&e(!) List of keys:"
  163. send ""
  164. send "&7(!) &bDiamond"
  165. send "&7(!) &6Gold"
  166. send "&7(!) &fIron"
  167. send ""
  168. if arg 1 is "give":
  169. if arg 2 is set:
  170. if arg 3 is "iron":
  171. give 1 light gray dye named "&f&lIron Key &7(Click on crate to redeem)" to arg 2
  172. if arg 1 is "give":
  173. if arg 2 is set:
  174. if arg 3 is "gold":
  175. give 1 orange dye named "&6&lGold Key &7(Click on crate to redeem)" to arg 2
  176. if arg 1 is "give":
  177. if arg 2 is set:
  178. if arg 3 is "diamond":
  179. give 1 light blue dye named "&b&lDiamond Key &7(Click on crate to redeem)" to arg 2
  180.  
  181. command /crate:
  182. permission: crate.admin
  183. trigger:
  184. give 1 magma_block named "&6Crate &7(Place to set a crate)" to player
  185.  
  186. command /cratereset:
  187. permission: crate.admin
  188. trigger:
  189. set {crate} to "False"
  190. delete holo object "crate"
  191.  
  192. on place of magma_block:
  193. if player's tool is magma_block named "&6Crate &7(Place to set a crate)":
  194. set {crate} to location of event-block
  195.  
  196. on rightclick on magma_block:
  197. if {crate} is set:
  198. if player's tool is light gray dye named "&f&lIron Key &7(Click on crate to redeem)":
  199. set {ironcrate} to random integer between 1 and 5
  200. remove 1 light gray dye from player
  201. if {ironcrate} is 1:
  202. send "&e(!) You have just opened an iron crate and got $1000"
  203. add 1000 to player's balance
  204. stop
  205. if {ironcrate} is 2:
  206. send "&e(!) You have just opened an iron crate and got $2000"
  207. add 2000 to player's balance
  208. stop
  209. if {ironcrate} is 3:
  210. send "&e(!) You have just opened an iron crate and got $3000"
  211. add 3000 to player's balance
  212. stop
  213. if {ironcrate} is 4:
  214. send "&e(!) You have just opened an iron crate and got $5000"
  215. add 5000 to player's balance
  216. stop
  217. if {ironcrate} is 5:
  218. send "&e(!) You have just opened an iron crate and got 50 harvest levels"
  219. add 50 to {harvest::%player%}
  220. stop
  221.  
  222. every minute:
  223. make console execute command "/mrl reset Coal -s"
  224.  
  225. on join:
  226. set player's gamemode to creative
  227.  
  228.  
  229. # Selling #
  230.  
  231. options:
  232. coalore: 2 # Prices
  233. ironore: 3 # Prices
  234. stone: 1 # Prices
  235. coalorebooster1: 4 # Prices
  236. ironorebooster1: 6 # Prices
  237. stonebooster1: 2 # Prices
  238. coalorebooster2: 6 # Prices
  239. ironorebooster2: 9 # Prices
  240. stonebooster2: 3 # Prices
  241. coalorebooster3: 8 # Prices
  242. ironorebooster3: 12 # Prices
  243. stonebooster3: 4 # Prices
  244.  
  245. command /sell <player>:
  246. permission: sell.use
  247. permission message: &e(!) Purchase a rank to use the command
  248. executable by: console
  249. trigger:
  250. if arg 1 is set:
  251. if {booster.active} is equal to 1:
  252. if amount of coal ore in arg 1's inventory is less than 1:
  253. if amount of stone in arg 1's inventory is less than 1:
  254. if amount of iron ore in arg 1's inventory is less than 1:
  255. send "&e(!) Please mine some blocks before trying to sell" to arg 1
  256. stop
  257. set {_stone} to number of stone in arg 1's inventory
  258. set {_coalore} to number of coal ore in arg 1's inventory
  259. set {_value1} to {@stonebooster1} * {_stone}
  260. set {_value2} to {@coalorebooster1} * {_coalore}
  261. set {_money1} to {_stone}
  262. set {_money2} to {_coalore}
  263. set {blocks} to {_value2} + {_value1}
  264. set {_money} to {_money2} + {_money1}
  265. remove all stone and coal ore from arg 1's inventory
  266. add {_money} to arg 1's balance
  267. set action bar of arg 1 to "&eSold &fx%{_money}% &eblocks for &f$%{blocks}% &ewith (* 1 Booster)"
  268. stop
  269. if {booster.active} is equal to 2:
  270. if amount of coal ore in arg 1's inventory is less than 1:
  271. if amount of stone in arg 1's inventory is less than 1:
  272. if amount of iron ore in arg 1's inventory is less than 1:
  273. send "&e(!) Please mine some blocks before trying to sell" to arg 1
  274. stop
  275. set {_stone} to number of stone in arg 1's inventory
  276. set {_coalore} to number of coal ore in arg 1's inventory
  277. set {_value1} to {@stonebooster2} * {_stone}
  278. set {_value2} to {@coalorebooster2} * {_coalore}
  279. set {_money1} to {_stone}
  280. set {_money2} to {_coalore}
  281. set {blocks} to {_value2} + {_value1}
  282. set {_money} to {_money2} + {_money1}
  283. remove all stone and coal ore from arg 1's inventory
  284. add {_money} to arg 1's balance
  285. set action bar of arg 1 to "&eSold &fx%{_money}% &eblocks for &f$%{blocks}% &ewith (* 2 Booster)"
  286. stop
  287. if {booster.active} is equal to 3:
  288. if amount of coal ore in arg 1's inventory is less than 1:
  289. if amount of stone in arg 1's inventory is less than 1:
  290. if amount of iron ore in arg 1's inventory is less than 1:
  291. send "&e(!) Please mine some blocks before trying to sell" to arg 1
  292. stop
  293. set {_stone} to number of stone in arg 1's inventory
  294. set {_coalore} to number of coal ore in arg 1's inventory
  295. set {_value1} to {@stonebooster3} * {_stone}
  296. set {_value2} to {@coalorebooster3} * {_coalore}
  297. set {_money1} to {_stone}
  298. set {_money2} to {_coalore}
  299. set {blocks} to {_value2} + {_value1}
  300. set {_money} to {_money2} + {_money1}
  301. remove all stone and coal ore from arg 1's inventory
  302. add {_money} to arg 1's balance
  303. set action bar of arg 1 to "&eSold &fx%{_money}% &eblocks for &f$%{blocks}% &ewith (* 3 Booster)"
  304. stop
  305. if amount of coal ore in arg 1's inventory is less than 1:
  306. if amount of stone in arg 1's inventory is less than 1:
  307. if amount of iron ore in arg 1's inventory is less than 1:
  308. send "&e(!) Please mine some blocks before trying to sell" to arg 1
  309. stop
  310. set {_stone} to number of stone in arg 1's inventory
  311. set {_coalore} to number of coal ore in arg 1's inventory
  312. set {_value1} to {@stone} * {_stone}
  313. set {_value2} to {@coalore} * {_coalore}
  314. set {_money1} to {_stone}
  315. set {_money2} to {_coalore}
  316. set {blocks} to {_value2} + {_value1}
  317. set {_money} to {_money2} + {_money1}
  318. remove all stone and coal ore from arg 1's inventory
  319. add {_money} to arg 1's balance
  320. set action bar of arg 1 to "&eSold &fx%{_money}% &eblocks for &f$%{blocks}% &ewith (* 0 Booster)"
  321. stop
  322.  
  323. command /booster [<text>] [<text>] [<offlineplayer>]:
  324. permission: boosters.use
  325. trigger:
  326. if arg 1 is not set:
  327. if arg 2 is not set:
  328. if arg 3 is not set:
  329. if player has the permission "boosters.use":
  330. open chest with 5 rows named "&7Boosters" to player
  331. format slot 11 of player with 1 emerald named "&6Booster &e##1" with lore "&7Click to enable a *1 booster" to run [make console execute "/booster global 1 %player%"]
  332. format slot 13 of player with 1 emerald named "&6Booster &e##2" with lore "&7Click to enable a *2 booster" to run [make console execute "/booster global 2 %player%"]
  333. format slot 15 of player with 1 emerald named "&6Booster &e##3" with lore "&7Click to enable a *3 booster" to run [make console execute "/booster global 3 %player%"]
  334. format slot 30 of player with 1 compass named "&6Stop the current booster" with lore "&7%{booster.scoreboard}%" to run [make player execute "/booster stop"]
  335. format slot 32 of player with 1 book named "&6Check the current active booster" to run [make player execute "/booster current"]
  336. if arg 1 is "global":
  337. if arg 2 is "1":
  338. if {booster} is "True":
  339. send "&e(!) A booster has already been activated"
  340. stop
  341. broadcast ""
  342. broadcast "&e(!) %arg 3% has activated a 1x Booster"
  343. broadcast "&7(!) This booster will last for 60 minutes"
  344. broadcast ""
  345. set {booster} to "True"
  346. add 1 to {booster.active}
  347. wait 60 minutes
  348. broadcast ""
  349. broadcast "&e(!) %arg 3%'s 1x Booster has ended"
  350. broadcast "&7(!) This booster will last for 60 minutes"
  351. broadcast ""
  352. set {booster} to "False"
  353. set {booster.active} to 0
  354. if arg 2 is "2":
  355. if {booster} is "True":
  356. send "&e(!) A booster has already been activated"
  357. stop
  358. broadcast ""
  359. broadcast "&e(!) %arg 3% has activated a 2x Booster"
  360. broadcast "&7(!) This booster will last for 60 minutes"
  361. broadcast ""
  362. set {booster} to "True"
  363. add 2 to {booster.active}
  364. wait 60 minutes
  365. broadcast ""
  366. broadcast "&e(!) %arg 3%'s 2x Booster has ended"
  367. broadcast "&7(!) This booster will last for 60 minutes"
  368. broadcast ""
  369. set {booster} to "False"
  370. set {booster.active} to 0
  371. if arg 2 is "3":
  372. if {booster} is "True":
  373. send "&e(!) A booster has already been activated"
  374. stop
  375. broadcast ""
  376. broadcast "&e(!) %arg 3% has activated a 3x Booster"
  377. broadcast "&7(!) This booster will last for 60 minutes"
  378. broadcast ""
  379. set {booster} to "True"
  380. add 3 to {booster.active}
  381. wait 60 minutes
  382. broadcast ""
  383. broadcast "&e(!) %arg 3%'s 3x Booster has ended"
  384. broadcast "&7(!) This booster will last for 60 minutes"
  385. broadcast ""
  386. set {booster} to "False"
  387. set {booster.active} to 0
  388. if arg 1 is "stop":
  389. broadcast ""
  390. broadcast "&e(!) %player% has ended the booster"
  391. broadcast "&7(!) Force stopped by an admin"
  392. broadcast ""
  393. set {booster} to "False"
  394. set {booster.active} to 0
  395. if arg 1 is "current":
  396. broadcast ""
  397. broadcast "&e(!) There is currently a a %{booster.scoreboard}% booster active"
  398. broadcast ""
  399. stop
  400.  
  401. every 1 minute:
  402. loop all players:
  403. if {booster.active} is equal to 1:
  404. broadcast ""
  405. broadcast "&e(!) A booster of 1x is active"
  406. broadcast "&7(!) This booster will last for 60 minutes"
  407. broadcast ""
  408. stop
  409. if {booster.active} is equal to 2:
  410. broadcast ""
  411. broadcast "&e(!) A booster of 2x is active"
  412. broadcast "&7(!) This booster will last for 60 minutes"
  413. broadcast ""
  414. stop
  415. if {booster.active} is equal to 3:
  416. broadcast ""
  417. broadcast "&e(!) A booster of 3x is active"
  418. broadcast "&7(!) This booster will last for 60 minutes"
  419. broadcast ""
  420. stop
  421.  
  422. every tick:
  423. if {booster.active} is equal to 1:
  424. set {booster.scoreboard} to "1x"
  425. if {booster.active} is equal to 2:
  426. set {booster.scoreboard} to "2x"
  427. if {booster.active} is equal to 3:
  428. set {booster.scoreboard} to "3x"
  429. if {booster.active} is less than 1:
  430. set {booster.scoreboard} to "0x"
  431.  
  432.  
  433.  
  434. on rightclick on sign:
  435. 2nd line of clicked block is "&3[Sell All]":
  436. make console execute command "/sell %player%"
  437. set line 3 of clicked block to "&8%player%"
  438.  
  439. command /test:
  440. trigger:
  441. add 1000 to {tokens::%player%}
Advertisement
Add Comment
Please, Sign In to add comment