Advertisement
FlupMC

Untitled

Aug 8th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.08 KB | None | 0 0
  1. options:
  2. crate: &8[&eCrate&8]
  3.  
  4.  
  5. command /crate [<text>] [<text>] [<text>]:
  6. permission: *
  7. aliases: /cr
  8. trigger:
  9. if arg-1 is set:
  10. if arg-2 is set:
  11. if arg-1 is "key":
  12. if arg-2 is "diamond":
  13. give player 64 tripwire hook named "&bDiamond Key"
  14. if arg-2 is "gold":
  15. give player 64 tripwire hook named "&6Gold Key"
  16. if arg-2 is "bombe":
  17. give player 64 name tag of unbreaking 10 named "&cBombe Key"
  18. if arg-2 is "rankup":
  19. give player 64 name tag of unbreaking 10 named "&aRankup Key"
  20. if arg-1 is "set":
  21. if arg-2 is "diamond":
  22. set {crate.loc.diamond} to targeted block
  23. send "{@crate} &7Du satte &bDiamond Crate &7til %targeted block%" to player
  24. if arg-2 is "gold":
  25. set {crate.loc.gold} to targeted block
  26. send "{@crate} &7Du satte &6Gold Crate &7til %targeted block%" to player
  27. if arg-2 is "bombe":
  28. set {crate.loc.bombe} to targeted block
  29. send "{@crate} &7Du satte &cBombe Crate &7til %targeted block%" to player
  30. if arg-2 is "rankup":
  31. set {crate.loc.rankup} to targeted block
  32. send "{@crate} &7Du satte &aRankup Crate &7til %targeted block%" to player
  33. if arg-1 is "delete":
  34. if arg-2 is "diamond":
  35. delete {crate.loc.diamond}
  36. if arg-2 is "gold":
  37. delete {crate.loc.gold}
  38. if arg-2 is "bombe":
  39. delete {crate.loc.bombe}
  40. if arg-2 is "rankup":
  41. delete {crate.loc.rankup}
  42. else:
  43. send "&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&c( &eCrate Help &c)&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---"
  44. send " &eSæt en crate &8- &c/cr set <crate>"
  45. send " &eSlet en crate &8- &c/cr delete <crate>"
  46. send " &eGiv dig selv 64 keys &8- &c/cr key <crate>"
  47. send "&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---&8&m---&7&m---"
  48.  
  49. on right click on ender chest:
  50. if event-block is {crate.loc.diamond}:
  51. cancel event
  52. if player is holding a tripwire hook named "&bDiamond Key":
  53. wait 2 ticks
  54. set {crate.cooldown.diamond.%player%} to true
  55. remove 1 tripwire hook named "&bDiamond Key" from player's inventory
  56. set {_diamondcrate.%player%} to a random integer between 1 and 100
  57.  
  58. if {_diamondcrate.%player%} is between 1 and 34.99:
  59. send "{@crate} &7Du vandt &a11.000.000$" to player
  60. add 11000000 to player's balance
  61.  
  62. if {_diamondcrate.%player%} is between 35 and 54.99:
  63. send "{@crate} &7Du vandt &a13.500.000$" to player
  64. add 13500000 to player's balance
  65.  
  66. if {_diamondcrate.%player%} is between 55 and 69.99:
  67. send "{@crate} &7Du vandt &a15.000.000$" to player
  68. add 15000000 to player's balance
  69.  
  70. if {_diamondcrate.%player%} is between 70 and 80.99:
  71. send "{@crate} &7Du vandt &a17.000.000$" to player
  72. add 17000000 to player's balance
  73.  
  74. if {_diamondcrate.%player%} is between 81 and 81.5:
  75. send "{@crate} &7Du vandt &a10.000.000$" to player
  76. add 10000000 to player's balance
  77.  
  78. if {_diamondcrate.%player%} is between 81.51 and 89.49:
  79. send "{@crate} &7Du vandt &a18.500.000$" to player
  80. add 18500000 to player's balance
  81.  
  82. if {_diamondcrate.%player%} is between 89.50 and 95:
  83. send "{@crate} &7Du vandt &a27.500.000$" to player
  84. add 27500000 to player's balance
  85.  
  86. if {_diamondcrate.%player%} is between 95 and 99.60:
  87. send "{@crate} &7Du vandt &a32.500.000$" to player
  88. add 32500000 to player's balance
  89.  
  90. if {_diamondcrate.%player%} is between 99.61 and 100:
  91. broadcast "{@crate} &c%player% &7vandt &bDiamond &7jackpot på &a100.000.000$!"
  92. add 75000000 to player's balance
  93.  
  94. play "NOTE_PLING" to player at volume 0.3
  95. else:
  96. send "{@crate} &7Du skal holde en &bDiamond Key &7i hånden"
  97. stop
  98. if event-block is {crate.loc.gold}:
  99. cancel event
  100. if player is holding a tripwire hook named "&6Gold Key":
  101. wait 2 ticks
  102. set {crate.cooldown.gold.%player%} to true
  103. remove 1 tripwire hook named "&6Gold Key" from player's inventory
  104. set {_goldcrate.%player%} to a random integer between 1 and 100
  105. if {_goldcrate.%player%} is between 1 and 34.99:
  106. send "{@crate} &7Du vandt &a8.000.000$" to player
  107. add 8000000 to player's balance
  108.  
  109. if {_goldcrate.%player%} is between 35 and 54.99:
  110. send "{@crate} &7Du vandt &a9.500.000$" to player
  111. add 9500000 to player's balance
  112.  
  113. if {_goldcrate.%player%} is between 55 and 69.99:
  114. send "{@crate} &7Du vandt &a11.000.000$" to player
  115. add 11000000 to player's balance
  116.  
  117. if {_goldcrate.%player%} is between 70 and 80.99:
  118. send "{@crate} &7Du vandt &a12.500.000$" to player
  119. add 12500000 to player's balance
  120.  
  121. if {_goldcrate.%player%} is between 81 and 81.5:
  122. broadcast "{@crate} &c%player% &7vandt &6Gold &7jackpot på &a$75.000.000$!"
  123. add 75000000 to player's balance
  124.  
  125. if {_goldcrate.%player%} is between 81.51 and 89.49:
  126. send "{@crate} &7Du vandt &a14.000.000$" to player
  127. add 14000000 to player's balance
  128.  
  129. if {_diamondcrate.%player%} is between 89.50 and 95:
  130. send "{@crate} &7Du vandt &a20.000.000$" to player
  131. add 20000000 to player's balance
  132.  
  133. if {_goldcrate.%player%} is between 95 and 99.60:
  134. send "{@crate} &7Du vandt &a23.500.000$" to player
  135. add 23500000 to player's balance
  136.  
  137. if {_goldcrate.%player%} is between 99.61 and 100:
  138. broadcast "{@crate} &c%player% &7vandt &6Gold &7jackpot på &a75.000.000$!"
  139. add 50000000 to player's balance
  140. play "NOTE_PLING" to player at volume 0.3
  141. else:
  142. send "{@crate} &7Du skal holde en &6Gold Key &7i hånden"
  143. stop
  144. on left click on chest:
  145. if event-block is {crate.loc.rankup}:
  146. cancel event
  147. on right click on chest:
  148. if event-block is {crate.loc.rankup}:
  149. cancel event
  150. if player is holding a name tag of unbreaking 10 named "&aRankup Key":
  151. remove 1 name tag of unbreaking 10 named "&aRankup Key" from player's inventory
  152. set {_rankupcrate.%player%} to a random integer between 1 and 100
  153. if {_rankupcrate.%player%} is between 1 and 34.99:
  154. set {rankupcratewin.%player%} to "1"
  155. if {_rankupcrate.%player%} is between 35 and 59.99:
  156. set {rankupcratewin.%player%} to "2"
  157. if {_rankupcrate.%player%} is between 60 and 79.99:
  158. set {rankupcratewin.%player%} to "3"
  159. if {_rankupcrate.%player%} is between 80 and 80.99:
  160. set {rankupcratewin.%player%} to "4"
  161. if {_rankupcrate.%player%} is between 81 and 90.99:
  162. set {rankupcratewin.%player%} to "5"
  163. if {_rankupcrate.%player%} is between 91 and 96.99:
  164. set {rankupcratewin.%player%} to "6"
  165. if {_rankupcrate.%player%} is between 97 and 100:
  166. set {rankupcratewin.%player%} to "7"
  167. if {rankupcratewin.%player%} is "1":
  168. send "{@crate} &7Du vandt &a50.000$" to player
  169. add 50000 to player's balance
  170. if {rankupcratewin.%player%} is "2":
  171. send "{@crate} &7Du vandt &a70.000$" to player
  172. add 70000 to player's balance
  173. if {rankupcratewin.%player%} is "3":
  174. send "{@crate} &7Du vandt &a150.000$" to player
  175. add 150000 to player's balance
  176. if {rankupcratewin.%player%} is "4":
  177. send "{@crate} &7Du vandt &a10.000.000$" to player
  178. add 10000000 to player's balance
  179. if {rankupcratewin.%player%} is "5":
  180. send "{@crate} &7Du vandt &a1.300.000$" to player
  181. add 1300000 to player's balance
  182. if {rankupcratewin.%player%} is "6":
  183. send "{@crate} &7Du vandt &a3.000.000$" to player
  184. add 3000000 to player's balance
  185. if {rankupcratewin.%player%} is "7":
  186. send "{@crate} &7Du vandt &a4.000.000$" to player
  187. add 4000000 to player's balance
  188. play "LEVEL_UP" to player at volume 0.5
  189. else:
  190. send "{@crate} &7Du skal holde en &aRankup Key &7i hånden"
  191. stop
  192. else:
  193. stop
  194. on left click on ender chest:
  195. if event-block is {crate.loc.diamond}:
  196. cancel event
  197. if {crate.running.%player%} is not set:
  198. open chest with 3 rows named "&b&lDiamond Crate" to player
  199. wait 3 ticks
  200. if inventory name of player's current inventory is "&b&lDiamond Crate":
  201. format slot 9 of player with wait music disc named "&a11.000.000$" with lore "&eChance &c35%%" to be unstealable
  202. format slot 10 of player with wait music disc named "&a13.500.000$" with lore "&eChance &c20%%" to be unstealable
  203. format slot 11 of player with wait music disc named "&a15.000.000$" with lore "&eChance &c15%%" to be unstealable
  204. format slot 12 of player with wait music disc named "&a17.000.000$" with lore "&eChance &c11%%" to be unstealable
  205. format slot 13 of player with wait music disc named "&a18.500.000$" with lore "&eChance &c8%%" to be unstealable
  206. format slot 14 of player with wait music disc named "&a27.500.000$" with lore "&eChance &c5,5%%" to be unstealable
  207. format slot 15 of player with wait music disc named "&a32.500.000$" with lore "&eChance &c4%%" to be unstealable
  208. format slot 16 of player with nether star named "&a75.000.000$" with lore "&eChance &c1%%" to be unstealable
  209. format slot 17 of player with dragon egg named "&a100.000.000$" with lore "&eChance &c0,5%%" to be unstealable
  210. loop numbers between 0 and 26:
  211. set {_slot} to loop-value
  212. if slot {_slot} of player's current inventory is air:
  213. format slot {_slot} of player with 1 black stained glass pane named " " to be unstealable
  214. else:
  215. stop
  216. if event-block is {crate.loc.gold}:
  217. cancel event
  218. if {crate.running.%player%} is not set:
  219. open chest with 3 rows named "&6&lGold Crate" to player
  220. wait 3 ticks
  221. if inventory name of player's current inventory is "&6&lGold Crate":
  222. format slot 9 of player with gold music disc named "&a8.000.000$" with lore "&eChance &c35%%" to be unstealable
  223. format slot 10 of player with gold music disc named "&a9.500.000$" with lore "&eChance &c20%%" to be unstealable
  224. format slot 11 of player with gold music disc named "&a11.000.000$" with lore "&eChance &c15%%" to be unstealable
  225. format slot 12 of player with gold music disc named "&a12.500.000$" with lore "&eChance &c11%%" to be unstealable
  226. format slot 13 of player with gold music disc named "&a14.000.000$" with lore "&eChance &c8%%" to be unstealable
  227. format slot 14 of player with gold music disc named "&a20.000.000$" with lore "&eChance &c5,5%%" to be unstealable
  228. format slot 15 of player with gold music disc named "&a23.500.000$" with lore "&eChance &c4%%" to be unstealable
  229. format slot 16 of player with nether star named "&a50.000.000$" with lore "&eChance &c1%%" to be unstealable
  230. format slot 17 of player with dragon egg named "&a75.000.000$" with lore "&eChance &c0,5%%" to be unstealable
  231. loop numbers between 0 and 26:
  232. set {_slot} to loop-value
  233. if slot {_slot} of player's current inventory is air:
  234. format slot {_slot} of player with 1 black stained glass pane named " " to be unstealable
  235. else:
  236. stop
  237. on rightclick on entity:
  238. if name of clicked entity is "&6&lKeys":
  239. if {crate.running.%player%} is not set:
  240. open chest with 3 rows named "&8Key-Shop" to player
  241. wait 3 ticks
  242. if inventory name of player's current inventory is "&8Key-Shop":
  243. format slot 0 of player with 1 black stained glass pane named "&r" to be unstealable
  244. format slot 8 of player with 1 black stained glass pane named "&r" to be unstealable
  245. format slot 9 of player with 1 black stained glass pane named "&r" to be unstealable
  246. format slot 17 of player with 1 black stained glass pane named "&r" to be unstealable
  247. format slot 18 of player with 1 black stained glass pane named "&r" to be unstealable
  248. format slot 26 of player with 1 black stained glass pane named "&r" to be unstealable
  249. format slot 12 of player with 1 tripwire hook named "&6Gold Key" with lore "||&aBeskrivelse:|| &7Klik her for at købe || &71 gold key||&r||&aPris|| &7$65.000.000:||&r||" to run [execute console command "keyshop gold %player%"]
  250. format slot 14 of player with 1 tripwire hook named "&bDiamond Key" with lore "||&aBeskrivelse:|| &7Klik her for at købe || &71 diamond key||&r||&aPris|| &7$80.000.000:||&r||" to run [execute console command "keyshop diamond %player%"]
  251. loop numbers between 0 and 26:
  252. set {_slot} to loop-value
  253. if slot {_slot} of player's current inventory is air:
  254. format slot {_slot} of player with 1 green stained glass named "&r" to be unstealable
  255. else:
  256. stop
  257. command /keyshop [<text>] [<offline player>]:
  258. permission: *
  259. executable by: console
  260. trigger:
  261. if arg-1 is "gold":
  262. if arg-2's balance is greater than or equal to 65000000:
  263. remove 65000000 from arg-2's balance
  264. add 1 tripwire hook named "&6Gold Key" to arg-2's inventory
  265. send "&8[&eCrate&8] &7Du har købt 1 &6Gold Key"
  266. else:
  267. send "&8[&eCrate&8] &7Du har ikke penge nok til at købe en &6Gold &7Key" to arg-2
  268.  
  269. if arg-1 is "diamond":
  270. if arg-2's balance is greater than or equal to 80000000:
  271. remove 80000000 from arg-2's balance
  272. add 1 tripwire hook named "&bDiamond Key" to arg-2's inventory
  273. send "&8[&eCrate&8] &7Du har købt 1 &bDiamond Key"
  274. else:
  275. send "&8[&eCrate&8] &7Du har ikke penge nok til at købe en &bDiamond Key" to arg-2
  276. on inventory close:
  277. if {crate.running.bombe.%player%} is set:
  278. wait 0.25 second
  279. open chest with 5 rows named "&cBombe Crate" to player
  280. on right click on chest:
  281. if event-block is {crate.loc.bombe}:
  282. cancel event
  283. if player is holding a name tag of unbreaking 10 named "&cBombe Key":
  284. if {crate.running.%player%} is not set:
  285. remove 1 name tag of unbreaking 10 named "&cBombe Key" from player's inventory
  286. open chest with 5 rows named "&cBombe Crate" to player
  287. wait 3 ticks
  288. set {crate.running.bombe.%player%} to true
  289. set {crate.running.%player%} to true
  290. loop 18 times:
  291. wait 3 ticks
  292. if inventory name of player's current inventory is "&cBombe Crate":
  293. format slot 0 of player with Green stained glass pane named " " to be unstealable
  294. format slot 8 of player with Green stained glass pane named " " to be unstealable
  295. format slot 9 of player with Green stained glass pane named " " to be unstealable
  296. format slot 17 of player with Green stained glass pane named " " to be unstealable
  297. format slot 18 of player with Green stained glass pane named " " to be unstealable
  298. format slot 26 of player with Green stained glass pane named " " to be unstealable
  299. format slot 27 of player with Green stained glass pane named " " to be unstealable
  300. format slot 35 of player with Green stained glass pane named " " to be unstealable
  301. format slot 36 of player with Green stained glass pane named " " to be unstealable
  302. format slot 44 of player with Green stained glass pane named " " to be unstealable
  303. loop numbers between 0 and 44:
  304. set {_slot} to loop-value-2
  305. if slot {_slot} of player's current inventory is air:
  306. format slot {_slot} of player with 1 black stained glass named " " to be unstealable
  307. set {_bombecrateslot.%player%} to a random integer between 1 and 8
  308. if {_bombecrateslot.%player%} is 1:
  309. format slot 13 of player with orange stained glass pane named " " to be unstealable
  310. format slot 21 of player with orange stained glass pane named " " to be unstealable
  311. format slot 23 of player with orange stained glass pane named " " to be unstealable
  312. format slot 31 of player with orange stained glass pane named " " to be unstealable
  313. if {_bombecrateslot.%player%} is 2:
  314. format slot 13 of player with magenta stained glass pane named " " to be unstealable
  315. format slot 21 of player with magenta stained glass pane named " " to be unstealable
  316. format slot 23 of player with magenta stained glass pane named " " to be unstealable
  317. format slot 31 of player with magenta stained glass pane named " " to be unstealable
  318. if {_bombecrateslot.%player%} is 3:
  319. format slot 13 of player with red stained glass pane named " " to be unstealable
  320. format slot 21 of player with red stained glass pane named " " to be unstealable
  321. format slot 23 of player with red stained glass pane named " " to be unstealable
  322. format slot 31 of player with red stained glass pane named " " to be unstealable
  323. if {_bombecrateslot.%player%} is 4:
  324. format slot 13 of player with yellow stained glass pane named " " to be unstealable
  325. format slot 21 of player with yellow stained glass pane named " " to be unstealable
  326. format slot 23 of player with yellow stained glass pane named " " to be unstealable
  327. format slot 31 of player with yellow stained glass pane named " " to be unstealable
  328. if {_bombecrateslot.%player%} is 5:
  329. format slot 13 of player with purple stained glass pane named " " to be unstealable
  330. format slot 21 of player with purple stained glass pane named " " to be unstealable
  331. format slot 23 of player with purple stained glass pane named " " to be unstealable
  332. format slot 31 of player with purple stained glass pane named " " to be unstealable
  333. if {_bombecrateslot.%player%} is 6:
  334. format slot 13 of player with blue stained glass pane named " " to be unstealable
  335. format slot 21 of player with blue stained glass pane named " " to be unstealable
  336. format slot 23 of player with blue stained glass pane named " " to be unstealable
  337. format slot 31 of player with blue stained glass pane named " " to be unstealable
  338. if {_bombecrateslot.%player%} is 7:
  339. format slot 13 of player with pink stained glass pane named " " to be unstealable
  340. format slot 21 of player with pink stained glass pane named " " to be unstealable
  341. format slot 23 of player with pink stained glass pane named " " to be unstealable
  342. format slot 31 of player with pink stained glass pane named " " to be unstealable
  343. if {_bombecrateslot.%player%} is 8:
  344. format slot 13 of player with white stained glass pane named " " to be unstealable
  345. format slot 21 of player with white stained glass pane named " " to be unstealable
  346. format slot 23 of player with white stained glass pane named " " to be unstealable
  347. format slot 31 of player with white stained glass pane named " " to be unstealable
  348. set {_bombecrateprize.%player%} to a random integer between 1 and 100
  349. if {_bombecrateprize.%player%} is between 1 and 40:
  350. format slot 22 of player with 8 eye of ender named "&4&lLille Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  351. set {_bombecratewin.%player%} to "lillebombe"
  352. if {_bombecrateprize.%player%} is between 40 and 70:
  353. format slot 22 of player with 6 eye of ender named "&4&lMellem Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  354. set {_bombecratewin.%player%} to "mellembombe"
  355. if {_bombecrateprize.%player%} is between 70 and 90:
  356. format slot 22 of player with 4 eye of ender named "&4&lStor Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  357. set {_bombecratewin.%player%} to "storbombe"
  358. if {_bombecrateprize.%player%} is between 90 and 100:
  359. format slot 22 of player with 2 eye of ender named "&4&lNuke Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  360. set {_bombecratewin.%player%} to "nukebombe"
  361. play "NOTE_PLING" to player at volume 0.5
  362. wait 8 ticks
  363. wait 3 ticks
  364. if {_bombecratewin.%player%} is "lillebombe":
  365. make console execute command "/bomb give %player% lille 8"
  366. if {_bombecratewin.%player%} is "mellembombe":
  367. make console execute command "/bomb give %player% mellem 6"
  368. if {_bombecratewin.%player%} is "storbombe":
  369. make console execute command "/bomb give %player% stor 4"
  370. if {_bombecratewin.%player%} is "nukebombe":
  371. make console execute command "/bomb give %player% nuke 2"
  372. play "LEVEL_UP" to player at volume 0.5
  373. wait 2 seconds
  374. delete {bombecratewin.%player%}
  375. wait 3 ticks
  376. delete {crate.running.%player%}
  377. delete {crate.running.bombe.%player%}
  378. close player's inventory
  379. else:
  380. send "{@crate} &7Du er allerede i gang med at åbne en &eCrate!"
  381. else:
  382. send "{@crate} &7Du skal holde en &cBombe Key &7i hånden"
  383. stop
  384. on left click on chest:
  385. if event-block is {crate.loc.bombe}:
  386. cancel event
  387. if {crate.running.%player%} is not set:
  388. open chest with 4 rows named "&c&lBombe Crate" to player
  389. wait 3 ticks
  390. if inventory name of player's current inventory is "&c&lBombe Crate":
  391. format slot 10 of player with a book named "&4&lLille Bombe" with lore "&eChance &c40%%" to be unstealable
  392. format slot 19 of player with 8 eye of ender named "&4&lLille Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  393. format slot 12 of player with a book named "&4&lMellem Bombe" with lore "&eChance &c30%%" to be unstealable
  394. format slot 21 of player with 6 eye of ender named "&4&lMellem Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  395. format slot 14 of player with a book named "&4&lStor Bombe" with lore "&eChance &c20%%" to be unstealable
  396. format slot 23 of player with 4 eye of ender named "&4&lStor Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  397. format slot 16 of player with a book named "&4&lNuke Bombe" with lore "&eChance &c10%%" to be unstealable
  398. format slot 25 of player with 2 eye of ender named "&4&lNuke Bombe" with lore "&7(Højreklik for at kaste)" to be unstealable
  399. loop numbers between 0 and 35:
  400. set {_slot} to loop-value
  401. if slot {_slot} of player's current inventory is air:
  402. format slot {_slot} of player with 1 black stained glass named " " to be unstealable
  403. else:
  404. stop
  405. on inventory click:
  406. if {crate.running.bombe.%player%} is set:
  407. cancel event
  408.  
  409. on place:
  410. if event-block is a tripwire hook named "&bDiamond Key":
  411. cancel the event
  412. if event-block is a tripwire hook named "&6Gold Key":
  413. cancel the event
  414.  
  415. on quit:
  416. delete {crate.running.%player%}
  417. #bombe
  418. delete {crate.running.bombe.%player%}
  419. delete {bombecratewin.%player%}
  420. #rankup
  421. delete {crate.running.rankup.%player%}
  422. delete {rankupcratewin.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement