Oxalist

Untitled

Mar 25th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.90 KB | None | 0 0
  1. variables:
  2. {explosive::%player%} = 0
  3. {merchant::%player%} = 0
  4. {luck::%player%} = 0
  5.  
  6. on first join:
  7. wait 10 ticks
  8. teleport player to {spawn}
  9.  
  10. on join:
  11. wait 10 ticks
  12. teleport player to {spawn}
  13.  
  14. every tick:
  15. loop all players:
  16. set the loop-player's food level to 10
  17.  
  18. command /shop:
  19. trigger:
  20. close player's inventory
  21. wait 1 tick
  22. open chest with 6 rows named " &0&nPlayer Shop" to player
  23. format slot 0 of player with 1 black glass named "" to be unstealable
  24. format slot 1 of player with 1 black glass named "" to be unstealable
  25. format slot 2 of player with 1 black glass named "" to be unstealable
  26. format slot 3 of player with 1 black glass named "" to be unstealable
  27. format slot 4 of player with 1 black glass named "" to be unstealable
  28. format slot 5 of player with 1 black glass named "" to be unstealable
  29. format slot 6 of player with 1 black glass named "" to be unstealable
  30. format slot 7 of player with 1 black glass named "" to be unstealable
  31. format slot 8 of player with 1 black glass named "" to be unstealable
  32. format slot 9 of player with 1 black glass named "" to be unstealable
  33. format slot 27 of player with 1 black glass named "" to be unstealable
  34. format slot 18 of player with 1 black glass named "" to be unstealable
  35. format slot 36 of player with 1 black glass named "" to be unstealable
  36. format slot 17 of player with 1 black glass named "" to be unstealable
  37. format slot 35 of player with 1 black glass named "" to be unstealable
  38. format slot 26 of player with 1 black glass named "" to be unstealable
  39. format slot 44 of player with 1 black glass named "" to be unstealable
  40. format slot 45 of player with 1 black glass named "" to be unstealable
  41. format slot 46 of player with 1 black glass named "" to be unstealable
  42. format slot 47 of player with 1 black glass named "" to be unstealable
  43. format slot 48 of player with 1 black glass named "" to be unstealable
  44. format slot 49 of player with 1 black glass named "" to be unstealable
  45. format slot 50 of player with 1 black glass named "" to be unstealable
  46. format slot 51 of player with 1 black glass named "" to be unstealable
  47. format slot 52 of player with 1 black glass named "" to be unstealable
  48. format slot 53 of player with 1 black glass named "" to be unstealable
  49. format slot 20 of player with 1 book named "&6&lBuy Shop &e(Click to open)" to run [make player execute command "/buyshop"]
  50. format slot 24 of player with 1 book named "&6&lSell Shop &e(Click to open)" to run [make player execute command "/sellshop"]
  51.  
  52. command /buyshop:
  53. trigger:
  54. close player's inventory
  55. wait 1 tick
  56. open chest with 6 rows named " &0&nPlayer Buy Shop" to player
  57. format slot 0 of player with 1 black glass named "" to be unstealable
  58. format slot 1 of player with 1 black glass named "" to be unstealable
  59. format slot 2 of player with 1 black glass named "" to be unstealable
  60. format slot 3 of player with 1 black glass named "" to be unstealable
  61. format slot 4 of player with 1 black glass named "" to be unstealable
  62. format slot 5 of player with 1 black glass named "" to be unstealable
  63. format slot 6 of player with 1 black glass named "" to be unstealable
  64. format slot 7 of player with 1 black glass named "" to be unstealable
  65. format slot 8 of player with 1 black glass named "" to be unstealable
  66. format slot 9 of player with 1 black glass named "" to be unstealable
  67. format slot 18 of player with 1 black_banner_item named "&7&l← Previous Page" to run [make player execute "/shop"]
  68. format slot 27 of player with 1 black_banner_item named "&7&l← Previous Page" to run [make player execute "/shop"]
  69. format slot 36 of player with 1 black glass named "" to be unstealable
  70. format slot 17 of player with 1 black glass named "" to be unstealable
  71. format slot 26 of player with 1 black_banner_item named "&7&l→ Next Page" to close
  72. format slot 35 of player with 1 black_banner_item named "&7&l→ Next Page" to close
  73. format slot 44 of player with 1 black glass named "" to be unstealable
  74. format slot 45 of player with 1 black glass named "" to be unstealable
  75. format slot 46 of player with 1 black glass named "" to be unstealable
  76. format slot 47 of player with 1 black glass named "" to be unstealable
  77. format slot 48 of player with 1 black glass named "" to be unstealable
  78. format slot 49 of player with 1 black glass named "" to be unstealable
  79. format slot 50 of player with 1 black glass named "" to be unstealable
  80. format slot 51 of player with 1 black glass named "" to be unstealable
  81. format slot 52 of player with 1 black glass named "" to be unstealable
  82. format slot 53 of player with 1 black glass named "" to be unstealable
  83. format slot 10 of player with 32 stone named "&6Stone &e(Click to buy)" with lore "||&ePrice: &f$10 per 32||&eClick to purchase||&7" to run [make player execute "/buystone"]
  84. format slot 11 of player with 32 grass named "&6Grass &e(Click to buy)" with lore "||&ePrice: &f$20 per 32||&eClick to purchase||&7" to run [make player execute "/buygrass"]
  85. format slot 12 of player with 32 dirt named "&6Dirt &e(Click to buy)" with lore "||&ePrice: &f$5 per 32||&eClick to purchase||&7" to run [make player execute "/buydirt"]
  86. format slot 13 of player with 32 98 named "&6Stone Brick &e(Click to buy)" with lore "||&ePrice: &f$5 per 32||&eClick to purchase||&7" to run [make player execute "/buystonebrick"]
  87. format slot 14 of player with 32 oak_planks named "&6Oak Planks &e(Click to buy)" with lore "||&ePrice: &f$5 per 32||&eClick to purchase||&7" to run [make player execute "/buyoakplanks"]
  88. format slot 15 of player with 32 seeds named "&6Seeds &e(Click to buy)" with lore "||&ePrice: &f$20 per 32||&eClick to purchase||&7" to run [make player execute "/buyseeds"]
  89.  
  90. # Withdraw #
  91.  
  92. command /withdraw [<text>] [<int>]:
  93. trigger:
  94. if arg 1 is not set:
  95. send "&e(!) Usage: /withdraw <money|tokens> <amount>"
  96. else if arg 2 is not set:
  97. send "&e(!) Usage: /withdraw <money|tokens> <amount>"
  98. if arg 1 is "tokens":
  99. if arg 2 is set:
  100. if player has enough space for 1 emerald:
  101. remove arg 2 from {Tokens::%player%}
  102. give player 1 emerald named "&6&lTokens: &e+%arg 2%" with lore "&e(!) &rright-click &eand claim the tokens||||&e(!) &eWithdrawed by: &6%player%||&e(!) &eAmount: &6%arg 2%."
  103. set {_coin} to "%arg 1%"
  104. message "&e(!) &eYou have just withdrawn &6%arg 1%"
  105. stop
  106. if arg 1 is "money":
  107. if arg 2 is set:
  108. if {Tokens::%player%} is less than 1:
  109. send "&e(!) &eYou need to get more tokens to withdraw"
  110. if player has enough space for 1 emerald:
  111. remove arg 2 from balance of player
  112. give player 1 emerald named "&6&lMoney: &e+%arg 2%" with lore "&e(!) &rright-click &eand claim the money||||&e(!) &eWithdrawed by: &6%player%||&e(!) &eAmount: &6%arg 2%."
  113. set {_coin} to "%arg 1%"
  114. message "&e(!) &eYou have just withdrawn &6%arg 1%"
  115. stop
  116.  
  117. on rightclick with emerald:
  118. if name of player's held item contains "Tokens":
  119. set {_amount::*} to name of the player's held item split at "+"
  120. make console execute "/deposit tokens %player% %{_amount::2}%"
  121. remove 1 of held item from player
  122. if name of player's held item contains "Money":
  123. set {_amount::*} to name of the player's held item split at "+"
  124. make console execute "/deposit money %player% %{_amount::2}%"
  125. remove 1 of held item from player
  126.  
  127. command /deposit [<text>] [<offlineplayer>] [<number>]:
  128. permission: admin.use
  129. permission message: &e(!) &eYou cannot access this command
  130. usage: /deposit <money|tokens> <player> <amount>
  131. trigger:
  132. if arg 1 is not set:
  133. send "&e(!) &eUsage: /deposit <money|tokens> <player> <amount>"
  134. if arg 2 is not set:
  135. send "&e(!) &eUsage: /deposit <money|tokens> <player> <amount>"
  136. if arg 3 is not set:
  137. send "&e(!) &eUsage: /deposit <money|tokens> <player> <amount>"
  138. if arg 1 is "tokens":
  139. if arg 2 is set:
  140. if arg 3 is set:
  141. add arg 3 to {Tokens::%arg 2%}
  142. send "&e(!) You have claimed %arg 3% Tokens" to arg 2
  143. if arg 1 is "money":
  144. if arg 2 is set:
  145. if arg 3 is set:
  146. add arg 3 to balance of arg 2
  147. send "&e(!) You have claimed $%arg 3%" to arg 2
  148.  
  149. every second:
  150. loop all players:
  151. wipe loop-player's sidebar
  152. set name of sidebar of loop-player to "&e&lSKYLINE &7(%number of all players%)"
  153. set score "&7" in sidebar of loop-player to 13
  154. set score "&eName: &7%loop-player%" in sidebar of loop-player to 12
  155. set score "&eRank: &7%coloured loop-player's prefix%" in sidebar of loop-player to 11
  156. set score "&9" in sidebar of loop-player to 10
  157. set score "&eTokens: &7%{Tokens::%loop-player%}%" in sidebar of loop-player to 9
  158. set score "&eBalance: &7%balance of loop-player%" in sidebar of loop-player to 8
  159. set score "&b" in sidebar of loop-player to 7
  160. set score "&eLevel: &7%{level::%loop-player%}% ✯" in sidebar of loop-player to 6
  161. set score "&eEXP: &7%{exp::%loop-player%}% ❈" in sidebar of loop-player to 5
  162. set score "&eNeeded EXP: &7%{expneeded::%loop-player%}% ❈" in sidebar of loop-player to 4
  163. set score "&d" in sidebar of loop-player to 3
  164. set score "&eBooster: &7%{booster.scoreboard}%" in sidebar of loop-player to 2
  165. set score "&6" in sidebar of loop-player to 1
  166.  
  167. variables:
  168. {expneeded::%player%} = 100
  169. {exp::%player%} = 0
  170. {level::%player%} = 1
  171. {tokens::%player%} = 0
  172.  
  173. every 1 tick:
  174. loop all players:
  175. if {exp::%loop-player%} is greater than or equal to {expneeded::%loop-player%}:
  176. add 1 to {level::%loop-player%}
  177. add 1 to {tokens::%loop-player%}
  178. set {exp::%loop-player%} to 0
  179. send "&e(!) You have leveled up to level &6%{level::%loop-player%}%" to loop-player
  180. set {expneeded::%loop-player%} to (rounded down {expneeded::%loop-player%} * 1.07)
  181.  
  182. # Level Reset #
  183.  
  184. command /level [<text>] [<offlineplayer>]:
  185. permission: admin.use
  186. trigger:
  187. if arg 1 is not set:
  188. if arg 2 is not set:
  189. if arg 3 is not set:
  190. send "&e(!) Usage: /level <reset> <player>"
  191. if arg 1 is "reset":
  192. if arg 2 is set:
  193. send "&e(!) Your level was reset." to arg 2
  194. set {level::%arg 2%} to 1
  195. set {exp::%arg 2%} to 0
  196. set {expneeded::%arg 2%} to 100
  197.  
  198. on break:
  199. chance of 1%:
  200. if event-block is stone or coal ore:
  201. if "%lore of player's tool%" contains "&cExplosive 1":
  202. loop blocks in radius 2.0 around the targeted block:
  203. if loop-block is coal ore:
  204. give 1 coal ore to player
  205. add 1 to {exp::%player%}
  206. set loop-block to air
  207. if loop-block is stone:
  208. give 1 stone to player
  209. add 1 to {exp::%player%}
  210. set loop-block to air
  211. chance of 2%:
  212. if event-block is stone or coal ore:
  213. if "%lore of player's tool%" contains "&cExplosive 2":
  214. loop blocks in radius 2.0 around the targeted block:
  215. if loop-block is coal ore:
  216. give 1 coal ore to player
  217. add 1 to {exp::%player%}
  218. set loop-block to air
  219. if loop-block is stone:
  220. give 1 stone to player
  221. add 1 to {exp::%player%}
  222. set loop-block to air
  223. chance of 3%:
  224. if event-block is stone or coal ore:
  225. if "%lore of player's tool%" contains "&cExplosive 3":
  226. loop blocks in radius 2.0 around the targeted block:
  227. if loop-block is coal ore:
  228. give 1 coal ore to player
  229. add 1 to {exp::%player%}
  230. set loop-block to air
  231. if loop-block is stone:
  232. give 1 stone to player
  233. add 1 to {exp::%player%}
  234. set loop-block to air
  235. chance of 0.6%:
  236. if event-block is coal ore or stone:
  237. if "%lore of player's tool%" contains "&dMerchant 1":
  238. make console execute command "sell %player%"
  239. chance of 0.8%:
  240. if event-block is coal ore or stone:
  241. if "%lore of player's tool%" contains "&dMerchant 2":
  242. make console execute command "sell %player%"
  243. chance of 1%:
  244. if event-block is coal ore or stone:
  245. if "%lore of player's tool%" contains "&dMerchant 3":
  246. make console execute command "sell %player%"
  247.  
  248. command /explosive:
  249. trigger:
  250. if {explosive::%player%} is 0:
  251. if player is not holding diamond pickaxe:
  252. send "&e(!) You must be holding a diamond pickaxe"
  253. stop
  254. if {tokens::%player%} is less than 199:
  255. send "&e(!) You do not have enough tokens to buy explosive 1 you need 200 tokens"
  256. if {tokens::%player%} is more than 199:
  257. send "&e(!) Successfully add explosive 1 to your pickaxe"
  258. remove 200 from {tokens::%player%}
  259. set line 1 of lore of player's tool to "&cExplosive 1"
  260. add 1 to {explosive::%player%}
  261. stop
  262. if {explosive::%player%} is 1:
  263. if player is not holding diamond pickaxe:
  264. send "&e(!) You must be holding a diamond pickaxe"
  265. stop
  266. if {tokens::%player%} is less than 499:
  267. send "&e(!) You do not have enough tokens to buy explosive 2 you need 500 tokens"
  268. if {tokens::%player%} is more than 499:
  269. send "&e(!) Successfully add explosive 2 to your pickaxe"
  270. remove 500 from {tokens::%player%}
  271. set line 1 of lore of player's tool to "&cExplosive 2"
  272. add 1 to {explosive::%player%}
  273. stop
  274. if {explosive::%player%} is 2:
  275. if player is not holding diamond pickaxe:
  276. send "&e(!) You must be holding a diamond pickaxe"
  277. stop
  278. if {tokens::%player%} is less than 799:
  279. send "&e(!) You do not have enough tokens to buy explosive 3 you need 800 tokens"
  280. if {tokens::%player%} is more than 799:
  281. send "&e(!) Successfully add explosive 3 to your pickaxe"
  282. remove 800 from {tokens::%player%}
  283. set line 1 of lore of player's tool to "&cExplosive 3"
  284. add 1 to {explosive::%player%}
  285. stop
  286. else:
  287. send "&e(!) You have reached the max enchantment level"
  288.  
  289. command /merchant:
  290. trigger:
  291. if {merchant::%player%} is 0:
  292. if player is not holding diamond pickaxe:
  293. send "&e(!) You must be holding a diamond pickaxe"
  294. stop
  295. if {tokens::%player%} is less than 299:
  296. send "&e(!) You need 300 shards to buy merchant 1"
  297. if {tokens::%player%} is more than 299:
  298. send "&e(!) Successfully add merchant 1 to your pickaxe"
  299. remove 300 from {tokens::%player%}
  300. set line 2 of lore of player's tool to "&dMerchant 1"
  301. add 1 to {merchant::%player%}
  302. stop
  303. if {merchant::%player%} is 1:
  304. if player is not holding diamond pickaxe:
  305. send "&e(!) You must be holding a diamond pickaxe"
  306. stop
  307. if {tokens::%player%} is less than 499:
  308. send "&e(!) You need 500 shards to buy merchant 2"
  309. if {tokens::%player%} is more than 499:
  310. send "&e(!) Successfully add merchant 2 to your pickaxe"
  311. remove 500 from {tokens::%player%}
  312. set line 2 of lore of player's tool to "&dMerchant 2"
  313. add 1 to {merchant::%player%}
  314. stop
  315. if {merchant::%player%} is 2:
  316. if player is not holding diamond pickaxe:
  317. send "&e(!) You must be holding a diamond pickaxe"
  318. stop
  319. if {tokens::%player%} is less than 699:
  320. send "&e(!) You need 500 shards to buy merchant 3"
  321. if {tokens::%player%} is more than 699:
  322. send "&e(!) Successfully add merchant 3 to your pickaxe"
  323. remove 700 from {tokens::%player%}
  324. set line 2 of lore of player's tool to "&dMerchant 3"
  325. add 1 to {merchant::%player%}
  326. stop
  327. else:
  328. send "&e(!) You have reached the max enchantment level"
  329.  
  330. command /luck:
  331. trigger:
  332. if {luck::%player%} is 0:
  333. if player is not holding diamond pickaxe:
  334. send "&e(!) You must be holding a diamond pickaxe"
  335. stop
  336. if {tokens::%player%} is less than 499:
  337. send "&e(!) You need 500 shards to buy luck 1"
  338. if {tokens::%player%} is more than 499:
  339. send "&e(!) Successfully add luck 1 to your pickaxe"
  340. remove 500 from {tokens::%player%}
  341. set line 3 of lore of player's tool to "&eLuck 1"
  342. add 1 to {luck::%player%}
  343. stop
  344. if {luck::%player%} is 1:
  345. if player is not holding diamond pickaxe:
  346. send "&e(!) You must be holding a diamond pickaxe"
  347. stop
  348. if {tokens::%player%} is less than 899:
  349. send "&e(!) You need 900 shards to buy luck 2"
  350. if {tokens::%player%} is more than 899:
  351. send "&e(!) Successfully add luck 2 to your pickaxe"
  352. remove 900 from {tokens::%player%}
  353. set line 3 of lore of player's tool to "&eLuck 2"
  354. add 1 to {luck::%player%}
  355. stop
  356. if {luck::%player%} is 2:
  357. if player is not holding diamond pickaxe:
  358. send "&e(!) You must be holding a diamond pickaxe"
  359. stop
  360. if {tokens::%player%} is less than 1199:
  361. send "&e(!) You need 1200 shards to buy luck 3"
  362. if {tokens::%player%} is more than 1199:
  363. send "&e(!) Successfully add luck 3 to your pickaxe"
  364. remove 1200 from {tokens::%player%}
  365. set line 3 of lore of player's tool to "&eLuck 3"
  366. add 1 to {luck::%player%}
  367. stop
  368. else:
  369. send "&e(!) You have reached the max enchantment level"
  370.  
  371. command /efficiency:
  372. trigger:
  373. if level of efficiency of player's tool is equal to 200:
  374. send "&e(!) You have reached the max enchantment level"
  375. stop
  376. if player is not holding diamond pickaxe:
  377. send "&e(!) You must be holding a diamond pickaxe"
  378. stop
  379. if {tokens::%player%} is less than 74:
  380. send "&e(!) You need 75 shards to buy efficiency"
  381. stop
  382. if {tokens::%player%} is more than 74:
  383. remove 75 from {tokens::%player%}
  384. evaluate "enchant player's tool with efficiency %level of efficiency of player's tool + 1%"
  385. send "&e(!) Successfully add efficiency to your pickaxe"
  386. stop
  387.  
  388.  
  389. command /reset <text>:
  390. trigger:
  391. if arg 1 is "all":
  392. loop all players:
  393. if loop-player is offline:
  394. set {tokens::%loop-player%} to 0
  395. set {level::%loop-player%} to 1
  396. set loop-player's balance to 0
  397. set {exp::%loop-player%} to 0
  398. set {expneeded::%loop-player%} to 100
  399.  
  400.  
  401. command /token [<text>]:
  402. trigger:
  403. if arg 1 is "give":
  404. add 1000 to {tokens::%player%}
  405.  
  406. command /mines:
  407. trigger:
  408. open chest with 6 rows named " &0&nMines" to player
  409. format slot 0 of player with 1 black glass named "" to be unstealable
  410.  
  411. command /enchant:
  412. aliases: /enchants, /upgrade, /upgrades
  413. trigger:
  414. if player is not holding diamond pickaxe:
  415. send "&e(!) Please hold a pickaxe to enchant"
  416. if player is holding diamond pickaxe:
  417. open chest with 3 rows named " &0&nEnchants" to player
  418. format slot 10 of player with 1 emerald named "&e(!) &aEfficiency &6(Click to enchant)" with lore "||&eClick to enchant with efficiency||&7||&6Price: &e75 tokens||&7||&6Max Level: &e200" to run [make player execute "/efficiency"]
  419. format slot 11 of player with 1 tnt named "&e(!) &cExplosive &6(Click to enchant)" with lore "||&eClick to enchant with explosive||&7||&6Price: &eExplosive 1 = 200 tokens||&6Price: &eExplosive 2 = 500 tokens||&6Price: &eExplosive 3 = 800 tokens||&7||&6Max Level: &e3" to run [make player execute "/explosive"]
  420. format slot 12 of player with 1 book named "&e(!) &bLuck &6(Click to enchant)" with lore "||&eClick to enchant with luck||&7||&6Price: &eLuck 1 = 500 tokens||&6Price: &eLuck 2 = 900 tokens||&6Price: &eLuck 3 = 1200 tokens||&7||&6Max Level: &e3" to run [make player execute "/luck"]
  421.  
  422.  
  423. command /resetpickaxe:
  424. trigger:
  425. set {explosive::%player%} to 0
  426. set {merchant::%player%} to 0
  427. set {luck::%player%} to 0
  428.  
  429.  
  430. command /warp [<text>] [<text>]:
  431. trigger:
  432. if arg 1 is not set:
  433. if arg 2 is not set:
  434. send "&e(!) Warps: &6%{warps::*}%"
  435. if arg 1 is "set":
  436. if arg 2 is set:
  437. set {%arg 2%} to location of player
  438. add arg 2 to {warps::*}
  439. send "&e(!) Set warp location %arg 2%"
  440. if arg 1 is "teleport":
  441. if arg 2 is set:
  442. teleport player to {%arg 2%}
  443. send "&e(!) teleport to warp %arg 2%"
  444. if arg 1 is "remove":
  445. if arg 2 is set:
  446. delete {%arg 2%}
  447. remove arg 2 from {warps::*}
  448. send "&e(!) removed the warp %arg 2%"
Advertisement
Add Comment
Please, Sign In to add comment