Zeldaboy111

Skript #271 ]|[ Cosmetics (5)

Dec 15th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.04 KB | None | 0 0
  1. #© This Skript reselling/reuploading and claiming as it is yours is not allowed! ©
  2. #© Using this Skript in a video is no problem, only mention the things below this ©
  3. #
  4. #Skript made by Zeldaboy111
  5. #YouTube creator: https://www.youtube.com/channel/UClmeX0PpxrQd9q-4kRaBefg?view_as=subscriber
  6. #More content of the creator: https://forums.skunity.com/search/26443679/
  7.  
  8.  
  9. options:
  10. logo: &6Server &7▬ &2
  11. lobby: &cLobby &7► &2
  12. lcompass: &9C&3ompass
  13. cGuiName: &9M&3inigames
  14.  
  15. path: Files/Lobby
  16. config: Files/Lobby/config.yml
  17. cosConfig: Files/Lobby/Cosmetics/config.yml
  18. suitPath: Files/Lobby/Cosmetics/Suits
  19. helmetPath: Files/Lobby/Cosmetics/Helmets
  20.  
  21. window1: yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml"
  22. randomAnimation: yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml"
  23. animation: yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml"
  24. particles: yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml"
  25. heads: yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml"
  26. suits: yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml"
  27. gadgets: yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml"
  28.  
  29.  
  30.  
  31. #alt + 15 = ☼
  32. #alt + 26 = →
  33. #alt + 16 = ►
  34. #alt + 22 = ▬
  35.  
  36. #------------------- Functions -------------------
  37. function contains(list: objects, check: object) :: boolean:
  38. loop {_list::*}:
  39. if loop-value is {_check}:
  40. return true
  41. return false
  42.  
  43. function lcompGui(p: Player, gname: String, rows: Integer, slot1: Integer, slot2: Integer, item1: Item, item2: Item, i1name: String, i2name: String, accept: String, deny: String, command: Boolean):
  44. open chest with {_rows} rows named {_gname} to {_p}
  45.  
  46. set name of {_item1} to {_i1name}
  47. set name of {_item2} to {_i2name}
  48.  
  49. format gui slot {_slot1} of {_p} with {_item1} to run:
  50. close {_p}'s inventory
  51. if {_command} is true:
  52. execute player command {_accept}
  53. else:
  54. send {_accept} to {_p}
  55.  
  56. format gui slot {_slot2} of {_p} with {_item2} to run:
  57. close {_p}'s inventory
  58. send {_deny} to {_p}
  59.  
  60.  
  61.  
  62. function openCompass(p: Player):
  63. if {lobby.compassRows} is not set:
  64. set {lobby.compassRows} to 1
  65.  
  66. open chest with {lobby.compassRows} rows named "{@cGuiName}" to {_p}
  67.  
  68. loop {lobby.minigames.list::*}:
  69. if {lobby.minigames.%loop-value%.slot} starts with "-":
  70. stop
  71.  
  72. else:
  73. if ({lobby.minigames.%loop-value%.slot} parsed as a number) is set:
  74. if {lobby.minigames.%loop-value%.item} is "&cNone":
  75. set {_item} to paper
  76.  
  77. else if ({lobby.minigames.%loop-value%.item} parsed as an item) is not set:
  78. set {_item} to paper
  79.  
  80. else:
  81. set {_item} to {lobby.minigames.%loop-value%.item}
  82.  
  83. set {_slot} to ({lobby.minigames.%loop-value%.slot} parsed as a number)
  84.  
  85. if {lobby.minigames.%loop-value%.name} is set:
  86. if {lobby.minigames.%loop-value%.name} is not "&cNone":
  87. set {_name} to {lobby.minigames.%loop-value%.name}
  88. replace "&" in {_name} with "§"
  89. if {lobby.minigames.%loop-value%.lore} is set:
  90. if {lobby.minigames.%loop-value%.lore} is not "&cNone":
  91. set {_lore} to {lobby.minigames.%loop-value%.lore}
  92. replace "&" in {_lore} with "§"
  93. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" with lore "%{_lore}%" to do nothing
  94. else:
  95. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" to do nothing
  96. else:
  97. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" to do nothing
  98. else:
  99. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item to do nothing
  100. else:
  101. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item to do nothing
  102.  
  103. function randomReward(crate: String) :: Item:
  104. set {_rewards1::*} to yml list "Item.List" of file "{@path}/%{_crate}%.yml"
  105. set {_rewardsNames::*} to yml list "Item.ConfigName" of file "{@path}/%{_crate}%.yml"
  106.  
  107. set {_count} to 1
  108. loop {_rewards1::*}:
  109. if yml value "Item.Chance.%{_rewardsNames::%{_count}%}%" of file "{@path}/%{_crate}%.yml" is set:
  110. set {_chance} to yml value "Item.Chance.%{_rewardsNames::%{_count}%}%" of file "{@path}/%{_crate}%.yml" parsed as a string
  111.  
  112. if ({_chance} parsed as a number) is set:
  113. loop ({_chance} parsed as a number) times:
  114. add "%loop-value-1% [{$^^$}] %{_rewardsNames::%{_count}%}%" to {_rewards::*}
  115.  
  116. else:
  117. send "%nl%{@lobby} &c%{_chance}% &4is not a number!%nl%" to console
  118.  
  119. add 1 to {_count}
  120.  
  121. set {_length} to size of {_rewards::*}
  122. set {_prizeCount} to a random integer between 0 and {_length}
  123. set {_splitPrize::*} to {_rewards::%{_prizeCount}%} split at " [{$^^$}] "
  124.  
  125. set {_prize} to {_splitPrize::1}
  126. set {_prizeCName} to {_splitPrize::2}
  127.  
  128. if ({_prize} parsed as an item) is not set:
  129. send "{@lobby} &c%{_prize}% &4is not an item! Stopping opening the crate!" to console
  130.  
  131. else:
  132. set {_prize} to {_prize} parsed as an item
  133.  
  134. if yml value "Item.Name.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  135. set {_prizeName} to yml value "Item.Name.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  136. set {_prizeName} to "%colored {_prizeName}%"
  137. set name of {_prize} to "&f%{_prizeName}%"
  138.  
  139. if yml value "Item.Amount.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  140. set {_prizeAmount} to yml value "Item.Amount.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  141. set {_prizeAmount} to ({_prizeAmount} parsed as a number)
  142. if {_prizeAmount} is set:
  143. set {_prize} to ("%{_prizeAmount}% %{_prize}%" parsed as an item)
  144.  
  145. else:
  146. send "{@lobby} &c%{_prizeAmount}% &4is not a number!" to console
  147. set {_prize} to ("1 %{_prize}%" parsed as an item)
  148.  
  149. if yml value "Item.Lore.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  150. set {_loreList::*} to yml list "Item.Lore.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  151. loop {_loreList::*}:
  152. if {_lore} is not set:
  153. set {_lore} to "%loop-value%"
  154. else:
  155. set {_lore} to "%{_lore}%||%loop-value%"
  156.  
  157. set lore of {_prize} to {_lore}
  158.  
  159.  
  160. if yml value "Item.Enchants.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  161. set {_enchantList::*} to yml list "Item.Enchants.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  162. loop {_enchantList::*}:
  163. set {_ench} to "%loop-value%"
  164. set {_split::*} to {_ench} split at ""
  165.  
  166. if contains({_split::*}, ":") is true:
  167. set {_eSplit::*} to {_ench} split at ":"
  168. set {_ench1} to {_eSplit::1}
  169. set {_ench2} to {_eSplit::2}
  170.  
  171. if ({_ench1} parsed as an enchantment type) is set:
  172. if ({_ench2} parsed as a number) is set:
  173. enchant {_prize} with "%{_ench1}% %{_ench2}%" parsed as an enchantment type
  174. set name of {_prize} to "&b%{_prizeName}%"
  175. else:
  176. send "%nl%{@lobby} &c%{_s2}% &4is not a number!%nl%" to console
  177. else:
  178. send "%nl%{@lobby} &c%{_s1}% &4is not an enchantment type!%nl%" to console
  179.  
  180. else:
  181. if (loop-value parsed as an enchantment type) is set:
  182. enchant {_prize} with "%loop-value% 1" parsed as an enchantment type
  183.  
  184. else:
  185. send "{@lobby} &c%loop-value% &4is not an enchantment type!" to console
  186.  
  187. return {_prize}
  188.  
  189. function animation1(p: Player, count: Integer, count2: Integer) :: boolean:
  190.  
  191. loop 9 times:
  192. if {crates.reopening.%{_p}%} is true:
  193. delete {crates.reopening.%{_p}%}
  194. clear {crate.%{_p}%.inv::*}
  195. clear {crate.%{_p}%.name}
  196.  
  197.  
  198. if {crates.closed.%{_p}%} is true:
  199. if {_count} = {_count2}-18:
  200. set {crate.%{_p}%.inv::%{_count}%} to "light green glass"
  201. set {crate.%{_p}%.inv::%{_count2}%} to "light green glass"
  202. else:
  203. set {crate.%{_p}%.inv::%{_count}%} to "gray glass"
  204. set {crate.%{_p}%.inv::%{_count2}%} to "gray glass"
  205.  
  206. else:
  207. if {_count} = {_count2}-18:
  208. format gui slot {_count} of {_p} with light green stained glass pane to do nothing
  209. format gui slot {_count2} of {_p} with light green stained glass pane to do nothing
  210.  
  211. else:
  212. format gui slot {_count} of {_p} with gray stained glass pane to do nothing
  213. format gui slot {_count2} of {_p} with gray stained glass pane to do nothing
  214.  
  215. add 1 to {_count}
  216. remove 1 from {_count2}
  217. wait 5 ticks
  218.  
  219. set {animation.%{_p}%} to false
  220.  
  221. function runAnimation(p: Player, animation: Integer, count: Integer, count2: Integer, forced: Boolean):
  222. if {_animation} is 1:
  223. if {_forced} is false:
  224. if {@window1} is true:
  225. animation1({_p}, {_count}, {_count2})
  226. set {animation.%{_p}%} to true
  227. else:
  228. animation1({_p}, {_count}, {_count2})
  229. set {animation.%{_p}%} to true
  230.  
  231.  
  232. function openCrate(p: Player, crate: String):
  233. if {keys.%{_p}%.%{_crate}%} > 0:
  234. open chest with 3 rows named "&2%{_crate}%" to {_p}
  235.  
  236.  
  237. set {crates.opening.%{_p}%} to true
  238. #Value to wait for animation
  239. set {animation.%{_p}%} to false
  240. set {_count} to 0
  241. set {_count2} to 26
  242.  
  243.  
  244. #Animations
  245. set {_random} to randomReward({_crate})
  246.  
  247. if {@randomAnimation} is true:
  248. set {_animationNumber} to a random integer between 0 and 1
  249. else:
  250. set {_animation} to yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "{@config}"
  251.  
  252. if {_animation} is "Window1":
  253. set {_animationNumber} to 1
  254.  
  255. else:
  256. send "{@lobby} &4The animation &c%{_animation}% &4doesn't exist! Running Window1 as animation!" to console
  257. set {_animationNumber} to 1
  258.  
  259.  
  260. runAnimation({_p}, {_animationNumber}, {_count}, {_count2}, false)
  261.  
  262. if {animation.%{_p}%} is false:
  263. runAnimation({_p}, 1, {_count}, {_count2}, true)
  264.  
  265. while {animation.%{_p}%} is true:
  266. wait 1 tick
  267.  
  268.  
  269.  
  270. delete {animation.%{_p}%}
  271.  
  272. format gui slot 13 of {_p} with {_random} to do nothing
  273. play sound "entity.experience_orb.pickup" with volume 10 and pitch 5 at {_p} for all players
  274.  
  275. delete {crates.closed.%{_p}%}
  276. remove {_p} from {crates.openinglist::*}
  277. delete {crate.%{_p}%.inv::*}
  278. delete {crate.%{_p}%.name}
  279. delete {crates.opening.%{_p}%}
  280. remove 1 from {keys.%{_p}%.%{_crate}%}
  281. set {_name} to name of {_random}
  282.  
  283. launch ball coloured aqua and blue at {_p}'s location timed 0.9
  284. give {_p} {_random}
  285. send "{@lobby} You've won &a%{_name}%&2!" to {_p}
  286.  
  287. else:
  288. send "{@lobby} &4You don't have anough keys to do this!" to {_p}
  289. play sound "entity.item.break" with volume 10 and pitch 1 at {_p} for {_p}
  290.  
  291. function editCosFormat(p: Player, piece: String, pieceText: String) :: item:
  292. set {_item} to ("barrier" parsed as an item)
  293.  
  294. if {cosmetics.edit.%{_p}%.%{_piece}%} is set:
  295. if {cosmetics.edit.%{_p}%.%{_piece}%} parsed as an item is set:
  296. set {_item} to ({cosmetics.edit.%{_p}%.%{_piece}%} parsed as an item)
  297.  
  298. if {cosmetics.edit.%{_p}%.%{_piece}%.name} is set:
  299. set name of {_item} to "%{cosmetics.edit.%{_p}%.%{_piece}%.name}%"
  300. else:
  301. set name of {_item} to "&2%{_pieceText}%"
  302.  
  303. if {cosmetics.edit.%{_p}%.%{_piece}%.lore} is set:
  304. set lore of {_item} to {cosmetics.edit.%{_p}%.%{_piece}%.lore}
  305.  
  306. else:
  307. set name of {_item} to "&4%{_pieceText}%"
  308.  
  309. return {_item}
  310.  
  311. function editCos(p: Player, type: String):
  312. set {cosmetics.edit.%{_p}%.type} to {_type}
  313. open chest with 1 rows named "&8Choose Category" to {_p}
  314.  
  315. set {_count} to 0
  316. if {@particles} is true:
  317. format gui slot {_count} of {_p} with redstone named "&cParticle" to do nothing
  318. add 1 to {_count}
  319.  
  320. if {@heads} is true:
  321. format gui slot {_count} of {_p} with skull of {_p} named "&2Heads" to do nothing
  322. add 1 to {_count}
  323.  
  324. if {@suits} is true:
  325. format gui slot {_count} of {_p} with golden helmet named "&5Suits" to close then run function editSuit({_p}, {_type})
  326. add 1 to {_count}
  327.  
  328. if {@gadgets} is true:
  329. format gui slot {_count} of {_p} with fire charge named "&bGadgets" to do nothing
  330. add 1 to {_count}
  331.  
  332. if {_count} is 0:
  333. format gui slot 0 of {_p} with barrier named "&4None Enabled" to close
  334.  
  335. function editSuit(p: Player, type: String):
  336. #=========== Variables ===========
  337. set {cosmetics.edit.%{_p}%.type} to {_type}
  338.  
  339. if {cosmetics.edit.%{_p}%.crate} is not set:
  340. set {cosmetics.edit.%{_p}%.crate} to ""
  341.  
  342. if {cosmetics.edit.%{_p}%.helmet} is not set:
  343. set {_helmet} to editCosFormat({_p}, "helmet", "Helmet")
  344.  
  345. else:
  346. set {_helmet} to {cosmetics.edit.%{_p}%.helmet}
  347.  
  348. if {cosmetics.edit.%{_p}%.chestplate} is not set:
  349. set {_chestplate} to editCosFormat({_p}, "chestplate", "Chestplate")
  350.  
  351. else:
  352. set {_chestplate} to {cosmetics.edit.%{_p}%.chestplate}
  353.  
  354. if {cosmetics.edit.%{_p}%.leggings} is not set:
  355. set {_leggings} to editCosFormat({_p}, "leggings", "Leggings")
  356.  
  357. else:
  358. set {_leggings} to {cosmetics.edit.%{_p}%.leggings}
  359.  
  360. if {cosmetics.edit.%{_p}%.boots} is not set:
  361. set {_boots} to editCosFormat({_p}, "boots", "Boots")
  362.  
  363. else:
  364. set {_boots} to {cosmetics.edit.%{_p}%.boots}
  365.  
  366.  
  367. set {_save} to true
  368. if {cosmetics.edit.%{_p}%.type} or {cosmetics.edit.%{_p}%.crate} is "":
  369. set {_save} to false
  370.  
  371. #send "%{_helmet}%" to {_p}
  372. else if {_helmet} and {_chestplate} and {_leggings} and {_boots} is barrier:
  373. set {_save} to false
  374.  
  375. #=========== GUI ===========
  376. #Item doesn't show the proper name
  377.  
  378. open chest with 6 rows named "&8Edit" to {_p}
  379.  
  380. if {cosmetics.edit.%{_p}%.type} is "":
  381. format gui slot 22 of {_p} with a paper named "&7Type: &c<none>" to run:
  382. set {cosmetics.edit.%{_p}%} to "setType"
  383. close {_p}'s inventory
  384. send "{@lobby} Type the new type of your set in the chat" to {_p}
  385.  
  386. else:
  387. format gui slot 22 of {_p} with a paper named "&7Type: &e%{cosmetics.edit.%{_p}%.type}%" to run:
  388. close {_p}'s inventory
  389. set {cosmetics.edit.%{_p}%} to "setType"
  390. send "{@lobby} Type the new type of your set in the chat" to {_p}
  391.  
  392. if {cosmetics.edit.%{_p}%.crate} is "":
  393. format gui slot 31 of {_p} with a chest named "&7Crate: &c<none>" to run:
  394. set {cosmetics.edit.%{_p}%} to "setCrate"
  395. close {_p}'s inventory
  396. send "{@lobby} Type the new crate of your set in the chat" to {_p}
  397. else:
  398. format gui slot 31 of {_p} with a chest named "&7Crate: &e%{cosmetics.edit.%{_p}%.crate}%" to run:
  399. set {cosmetics.edit.%{_p}%} to "setCrate"
  400. close {_p}'s inventory
  401. send "{@lobby} Type the new crate of your set in the chat" to {_p}
  402.  
  403.  
  404.  
  405. format gui slot 10 of {_p} with {_helmet} to run:
  406. set {cosmetics.edit.%{_p}%} to "helmet"
  407. close {_p}'s inventory
  408. delete {cosmetics.edit.%{_p}%}
  409. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  410.  
  411. format gui slot 19 of {_p} with {_chestplate} to run:
  412. set {cosmetics.edit.%{_p}%} to "chestplate"
  413. close {_p}'s inventory
  414. delete {cosmetics.edit.%{_p}%}
  415. editPiece({_p}, "chestplate", "Chestplate", {cosmetics.edit.%{_p}%.type})
  416.  
  417. format gui slot 28 of {_p} with {_leggings} to run:
  418. set {cosmetics.edit.%{_p}%} to "leggings"
  419. close {_p}'s inventory
  420. delete {cosmetics.edit.%{_p}%}
  421. editPiece({_p}, "leggings", "Leggings", {cosmetics.edit.%{_p}%.type})
  422.  
  423.  
  424. format gui slot 37 of {_p} with {_boots} to run:
  425. set {cosmetics.edit.%{_p}%} to "boots"
  426. close {_p}'s inventory
  427. delete {cosmetics.edit.%{_p}%}
  428. editPiece({_p}, "boots", "Boots", {cosmetics.edit.%{_p}%.type})
  429.  
  430.  
  431.  
  432. if {_save}:
  433. format gui slot 53 of {_p} with green wool named "&2Save" to run:
  434. close {_p}'s inventory
  435. #Save function
  436.  
  437. else:
  438. format gui slot 53 of {_p} with red wool named "&4Save not possible" to do nothing
  439.  
  440.  
  441. function editPiece(p: Player, piece: String, pieceText: String, type: String):
  442. wait 3 ticks
  443.  
  444. #=========== Variables ===========
  445. set {cosmetics.edit.%{_p}%.current} to "%{_piece}%"
  446. set {cosmetics.edit.%{_p}%.pieceText} to "%{_pieceText}%"
  447. set {_displayItem} to editCosFormat({_p}, "%{_piece}%", "%{_pieceText}%")
  448.  
  449. if {cosmetics.edit.%{_p}%.%{_piece}%} is not set:
  450. set {cosmetics.edit.%{_p}%.%{_piece}%} to ""
  451.  
  452. if {cosmetics.edit.%{_p}%.%{_piece}%} is "":
  453. set {_item} to an item frame named "&7Item: &c<none>"
  454.  
  455. else:
  456. set {_item} to an item frame named "&7Item: &2%{cosmetics.edit.%{_p}%.%{_piece}%}%"
  457.  
  458. if {cosmetics.edit.%{_p}%.%{_piece}%.name} is not set:
  459. set {cosmetics.edit.%{_p}%.%{_piece}%.displayName} to ""
  460.  
  461. if {cosmetics.edit.%{_p}%.%{_piece}%.name} is "":
  462. set {cosmetics.edit.%{_p}%.%{_piece}%.displayName} to ""
  463.  
  464. if {cosmetics.edit.%{_p}%.%{_piece}%.displayName} is "":
  465. if {_displayItem} is barrier:
  466. set {_itemName} to "&4%{_pieceText}%"
  467.  
  468. else:
  469. set {_itemName} to "&2%{_pieceText}%"
  470.  
  471. else:
  472. set {_itemName} to {cosmetics.edit.%{_p}%.%{_piece}%.name}
  473.  
  474. set name of {_displayItem} to {_itemName}
  475.  
  476. set {cosmetics.edit.%{_p}%.%{_piece}%} to {_displayItem}
  477.  
  478. #=========== GUI ===========
  479. open chest with 3 rows named "&8Edit %{_pieceText}%" to {_p}
  480.  
  481. #Display from your created item
  482. format gui slot 10 of {_p} with {_displayItem} to do nothing
  483. #item, name, enchantment and lore (lore || -> new line (also in message!!!))
  484.  
  485. if {_piece} is "helmet":
  486. set {_string} to "%{cosmetics.edit.%{_p}%.helmet}%"
  487. set {_split::*} to {_string} split at " "
  488. if contains({_split::*}, "head"):
  489. if {cosmetics.edit.%{_p}%.helmet.type} is set:
  490. set {_changeType} to a redstone torch on named "&7Skull Type: &e%{cosmetics.edit.%{_p}%.%{_piece}%.helmet.type}%"
  491. #Types available:
  492. #Mob head
  493. #Player head
  494.  
  495. else:
  496. set {_changeType} to a redstone torch on named "&7Skull Type: &c<none>"
  497.  
  498. if {cosmetics.edit.%{_p}%.helmet.type} is "player":
  499. if {cosmetics.edit.%{_p}%.helmet.player} is set:
  500. set {cosmetics.edit.%{_p}%.helmet.skull} to skull of ("%{cosmetics.edit.%{_p}%.helmet.player}%" parsed as an offline player) named "&7Skull Owner: &e%{cosmetics.edit.%{_p}%.helmet.player}%"
  501.  
  502. else:
  503. set {cosmetics.edit.%{_p}%.helmet.skull} to skull of ("Steve" parsed as an offline player) named "&7Skull Owner: &c<none>"
  504.  
  505. format gui slot 1 of {_p} with {_changeType} to do nothing
  506. format gui slot 19 of {_p} with {cosmetics.edit.%{_p}%.helmet.skull} to do nothing
  507.  
  508.  
  509. format gui slot 18 of {_p} with arrow named "&c<< Go Back" to run:
  510. set {cosmetics.edit.%{_p}%} to "go_back"
  511. close {_p}'s inventory
  512. delete {cosmetics.edit.%{_p}%}
  513. editSuit({_p}, {_type})
  514.  
  515.  
  516. format gui slot 12 of {_p} with {_item} to run:
  517. set {cosmetics.edit.%{_p}%} to "set%{_pieceText}%Item"
  518. close {_p}'s inventory
  519. send "{@lobby} Type the new crate of the %{_piece}% in the chat" to {_p}
  520.  
  521. #if {cosmetics.edit.}
  522.  
  523.  
  524.  
  525.  
  526.  
  527. #------------------- Periotic Events -------------------
  528.  
  529.  
  530.  
  531.  
  532.  
  533. #------------------- Events -------------------
  534. on enable:
  535. if file "{@config}" doesn't exist:
  536. create file "{@config}"
  537.  
  538. set yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml" to true
  539. set yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml" to true
  540. set yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml" to "Window1"
  541. set yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml" to true
  542. set yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml" to true
  543. set yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml" to true
  544. set yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml" to true
  545.  
  546. else:
  547. if yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml" is not set:
  548. set yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml" to true
  549. if yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml" is not set:
  550. set yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml" to true
  551. if yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml" is not set:
  552. set yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml" to "Window1"
  553.  
  554. if yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml" is not set:
  555. set yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml" to true
  556. if yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml" is not set:
  557. set yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml" to true
  558. if yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml" is not set:
  559. set yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml" to true
  560. if yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml" is not set:
  561. set yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml" to true
  562.  
  563.  
  564. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  565.  
  566. loop {_list::*}:
  567. set {_world} to world of {lobby.location}
  568. loop {lobbycr.%loop-value%.location::*}:
  569. set {holo-crate-%{_world}%-%loop-value-2%} to a new hologram at block above loop-value-2
  570. add text "&a&l%loop-value-1%" to hologram {holo-crate-%{_world}%-%loop-value-2%}
  571.  
  572. on disable:
  573. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  574. set {_world} to world of {lobby.location}
  575.  
  576. loop {_list::*}:
  577. delete yml list "Locations" of file "{@path}/%loop-value%.yml"
  578. loop {lobbycr.%loop-value%.location::*}:
  579. add "%loop-value-2%" to yml list "Locations" of file "{@path}/%loop-value-1%.yml"
  580. unregister hologram {holo-crate-%{_world}%-%loop-value-2%}
  581.  
  582. loop {crates.openinglist::*}:
  583. clear {crates.opening.%loop-value%}
  584. clear {crates.%loop-value%.inv::*}
  585. clear {crates.%loop-value%.name}
  586. clear {crate.closed.%loop-value%}
  587.  
  588. clear {crates.openinglist::*}
  589.  
  590. on join:
  591. if {lobby.location} is set:
  592. teleport player to {lobby.location}
  593. set join message to ""
  594. wait 10 ticks
  595.  
  596. clear player's inventory
  597. send "{@lobby} &fThe player %player% has joined!" to all players in world of player
  598. set slot 4 of player to a compass named "{@lcompass}"
  599.  
  600. on quit:
  601. if {crates.opening.%player%} is set:
  602. clear {crates.opening.%player%}
  603. clear {crates.%player%.inv::*}
  604. clear {crates.%player%.name}
  605. clear {crates.closed.%player%}
  606. remove player from {crates.openinglist::*}
  607.  
  608. delete {cosmetics.edit.%player%.helmet}
  609. delete {cosmetics.edit.%player%.chestplate}
  610. delete {cosmetics.edit.%player%.leggings}
  611. delete {cosmetics.edit.%player%.boots}
  612.  
  613. delete {cosmetics.edit.%player%.type}
  614. delete {cosmetics.edit.%player%.current}
  615. delete {cosmetics.edit.%player%.crate}
  616. delete {cosmetics.edit.%player%.pieceText}
  617. delete {cosmetics.edit.%player%.helmet.name}
  618. delete {cosmetics.edit.%player%.helmet.lore::*}
  619. delete {cosmetics.edit.%player%.helmet.ench::*}
  620. delete {cosmetics.edit.%player%.chestplate.name}
  621. delete {cosmetics.edit.%player%.chestplate.lore::*}
  622. delete {cosmetics.edit.%player%.chestplate.ench::*}
  623. delete {cosmetics.edit.%player%.leggings.name}
  624. delete {cosmetics.edit.%player%.leggings.lore::*}
  625. delete {cosmetics.edit.%player%.leggings.ench::*}
  626. delete {cosmetics.edit.%player%.boots.name}
  627. delete {cosmetics.edit.%player%.boots.lore::*}
  628. delete {cosmetics.edit.%player%.boots.ench::*}
  629. delete {cosmetics.edit.%player%.helmet.helmet.type}
  630. delete {cosmetics.edit.%player%.helmet.player}
  631. delete {cosmetics.edit.%player%.helmet.skull}
  632.  
  633.  
  634. on command:
  635. command is "plugins" or "pl":
  636. cancel event
  637.  
  638. if player is not op:
  639. stop
  640.  
  641. else:
  642. set {_list::*} to list of plugins
  643. set {_count} to 0
  644. loop {_list::*}:
  645. add 1 to {_count}
  646. send "{@logo} Plugin list:%nl%&f(&a%{_count}%&f) &2%list of plugins%"
  647.  
  648. else:
  649. set {cmd} to "%command to lower case%"
  650.  
  651. on damage:
  652. if world of victim is world of {lobby.location}:
  653. if damage cause is "void" parsed as a damage cause:
  654. set victim's health to 0
  655.  
  656. else:
  657. cancel event
  658.  
  659. on death:
  660. if world of player is world of {lobby.location}:
  661. set death message to ""
  662.  
  663. on respawn:
  664. if world of player is world of {lobby.location}:
  665. set slot 4 of player to a compass named "{@lcompass}"
  666. teleport player to {lobby.location}
  667.  
  668. on inventory click:
  669. if player is in world of {lobby.location}:
  670. if clicked item is a compass named "{@lcompass}":
  671. cancel event
  672. close player's inventory
  673. openCompass(player)
  674.  
  675. on click:
  676. if player is in world of {lobby.location}:
  677. if player's held item is a compass named "{@lcompass}":
  678. cancel event
  679. openCompass(player)
  680.  
  681. on place of chest:
  682. set {_world} to world of event-block
  683. if {_world} is world of {lobby.location}:
  684. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  685. if contains({_list::*}, "%uncolored name of player's tool%"):
  686.  
  687. add location of block at event-block to {lobbycr.%uncolored name of player's tool%.location::*}
  688. add world of event-block to {lobbycr.%uncolored name of player's tool%.world::*}
  689.  
  690. set {holo-crate-%world of event-block%-%location of event-block%} to new hologram at location 1 meters above event-block
  691. add text "&a&l%uncolored name of player's tool%" to hologram {holo-crate-%world of event-block%-%location of event-block%}
  692. add "%location of block at event-block%" to yml list "Locations" of file "{@path}/%uncolored name of player's tool%.yml"
  693.  
  694. send "{@lobby} &2Succesfully created a &a%uncolored name of player's tool% &2Crate!"
  695.  
  696. on break of chest:
  697. set {_world} to world of event-block
  698. if {_world} is world of {lobby.location}:
  699. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  700. loop {_list::*}:
  701. loop {lobbycr.%loop-value-1%.location::*}:
  702. if loop-value-2 is location of event-block:
  703. remove location of block at event-block from {lobbycr.%loop-value-1%.location::*}
  704. remove world of event-block from {lobbycr.%loop-value-1%.world::*}
  705.  
  706. unregister hologram {holo-crate-%world of event-block%-%location of event-block%}
  707. delete {holo-crate-%world of event-block%-%location of event-block%}
  708. remove "%location of event-block%" from yml list "Locations" of file "{@path}/%loop-value-1%.yml"
  709.  
  710. send "{@lobby} &2Succesfully removed a &a%loop-value-1% &2Crate!"
  711.  
  712. on rightclick on a chest:
  713. set {_world} to world of clicked block
  714. if {_world} is "%world of {lobby.location}%":
  715.  
  716. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  717. loop {_list::*}:
  718.  
  719. loop {lobbycr.%loop-value-1%.location::*}:
  720. if "%loop-value-2%" is "%location of clicked block%":
  721. cancel event
  722. if "%uncolored {crate.%player%.name}%" = loop-value-1:
  723. if {crates.opening.%player%} is true:
  724. open chest with 3 rows named "&2%{crate.%player%.name}%" to player
  725.  
  726. set {crates.reopening.%player%} to true
  727. set {_count} to 0
  728. loop 27 times:
  729. if {crate.%player%.inv::%{_count}%} is set:
  730. set {_value} to "%{crate.%player%.inv::%{_count}%}%"
  731. set {_color::*} to {_value} split at " "
  732.  
  733. if contains({_color::*}, "glass") is true:
  734. if contains({_color::*}, "light") is true:
  735. format gui slot {_count} of player with ("light %{_color::2}% stained glass pane" parsed as an item) to do nothing
  736.  
  737. else if contains({_color::*}, "dark") is true:
  738. format gui slot {_count} of player with ("dark %{_color::2}% stained glass pane" parsed as an item) to do nothing
  739.  
  740. else:
  741. format gui slot {_count} of player with ("%{_color::1}% stained glass pane" parsed as an item) to do nothing
  742.  
  743. else:
  744. format gui slot {_count} of player with ({crate.%player%.inv::%{_count}%} parsed as an item) to do nothing
  745.  
  746.  
  747. add 1 to {_count}
  748.  
  749. delete {crates.closed.%player%}
  750. delete {crates.openinglist::*}
  751. delete {crate.%player%.inv::*}
  752. delete {crate.%player%.name}
  753.  
  754.  
  755. else:
  756. open chest with 3 rows named "&2%loop-value-1%" to player
  757. format gui slot 13 of player with a tripwire hook named "&7Open crate" with lore "&7Keys left: %{keys.%player%.%loop-value-1%}%" to close then run function openCrate(player, "%loop-value-1%")
  758. stop loop
  759. else:
  760. open chest with 3 rows named "&2%loop-value-1%" to player
  761. format gui slot 13 of player with a tripwire hook named "&7Open crate" with lore "&7Keys left: %{keys.%player%.%loop-value-1%}%" to close then run function openCrate(player, "%loop-value-1%")
  762. stop loop
  763.  
  764. on inventory close:
  765. if {crates.opening.%player%} is true:
  766. set {crates.closed.%player%} to true
  767. add player to {crates.openinglist::*}
  768. clear {crate.%player%.inv::*}
  769. set {crate.%player%.name} to name of player's current inventory
  770. set {_count} to 0
  771.  
  772.  
  773. loop 27 times:
  774. set {crate.%player%.inv::%{_count}%} to slot {_count} of player's current inventory
  775. add 1 to {_count}
  776.  
  777. else if {crates.opening.%player%} is set:
  778. delete {crates.opening.%player%}
  779.  
  780. if name of current inventory of player is "&8Edit" or "&8Edit Helmet" or "&8Edit Chestplate" or "&8Edit Leggings" or "&8Edit Boots" or "&8Choose Category":
  781. if {cosmetics.edit.%player%} is not set:
  782. delete {cosmetics.edit.%player%.helmet}
  783. delete {cosmetics.edit.%player%.chestplate}
  784. delete {cosmetics.edit.%player%.leggings}
  785. delete {cosmetics.edit.%player%.boots}
  786.  
  787. delete {cosmetics.edit.%player%.type}
  788. delete {cosmetics.edit.%player%.current}
  789. delete {cosmetics.edit.%player%.crate}
  790. delete {cosmetics.edit.%player%.pieceText}
  791. delete {cosmetics.edit.%player%.helmet.name}
  792. delete {cosmetics.edit.%player%.helmet.lore::*}
  793. delete {cosmetics.edit.%player%.helmet.ench::*}
  794. delete {cosmetics.edit.%player%.chestplate.name}
  795. delete {cosmetics.edit.%player%.chestplate.lore::*}
  796. delete {cosmetics.edit.%player%.chestplate.ench::*}
  797. delete {cosmetics.edit.%player%.leggings.name}
  798. delete {cosmetics.edit.%player%.leggings.lore::*}
  799. delete {cosmetics.edit.%player%.leggings.ench::*}
  800. delete {cosmetics.edit.%player%.boots.name}
  801. delete {cosmetics.edit.%player%.boots.lore::*}
  802. delete {cosmetics.edit.%player%.boots.ench::*}
  803. delete {cosmetics.edit.%player%.helmet.helmet.type}
  804. delete {cosmetics.edit.%player%.helmet.player}
  805. delete {cosmetics.edit.%player%.helmet.skull}
  806.  
  807.  
  808.  
  809. on chat:
  810. if {cosmetics.edit.%player%} is set:
  811. cancel event
  812.  
  813. if {cosmetics.edit.%player%} is "set%{cosmetics.edit.%player%.pieceText}%Item":
  814. if "%message%" is "cancel":
  815. send "{@lobby} Cancelled setting the %{cosmetics.edit.%player%.pieceText} to lower case%."
  816. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  817. delete {cosmetics.edit.%player%}
  818.  
  819. else if "%message%" parsed as an item type is not set:
  820. send "{@lobby} &c%message% &4is not a a %{cosmetics.edit.%player%.pieceText} to lower case%!"
  821.  
  822. else:
  823. if {cosmetics.edit.%player%.type} is not set:
  824. set {cosmetics.edit.%player%.type} to ""
  825.  
  826. set {_var} to "%message%"
  827. replace all " " in {_var} with "_"
  828.  
  829. if {_var} contains "_":
  830. set {_message::*} to {_var} split at "_"
  831.  
  832. if ({cosmetics.edit.%player%.pieceText} to lower case) is "helmet":
  833. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  834.  
  835. if contains({_message::*}, "helmet"):
  836. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  837.  
  838. else if "%message%" = "head":
  839. set {cosmetics.edit.%player%.%{_piece}%} to "head"
  840.  
  841. else if contains({_message::*}, "head"):
  842. set {cosmetics.edit.%player%.%{_piece}%} to "head"
  843.  
  844. else:
  845. send "{@lobby} &c%message% &4is not a helmet!"
  846. stop
  847.  
  848. send "{@lobby} Succesfully set helmet to &a%message%"
  849.  
  850. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  851. delete {cosmetics.edit.%player%}
  852.  
  853. else if ({cosmetics.edit.%player%.pieceText} to lower case) is "chestplate":
  854. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  855.  
  856. if contains({_message::*}, "chestplate") or contains({_message::*}, "tunic"):
  857. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  858.  
  859. else:
  860. send "{@lobby} &c%message% &4is not a chestplate!"
  861. stop
  862.  
  863. send "{@lobby} Succesfully set chestplate to &a%message%"
  864.  
  865. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  866. delete {cosmetics.edit.%player%}
  867.  
  868.  
  869. else if ({cosmetics.edit.%player%.pieceText} to lower case) is "leggings":
  870. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  871.  
  872. if contains({_message::*}, "leggings"):
  873. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  874.  
  875. else:
  876. send "{@lobby} &c%message% &4are no leggings!"
  877. stop
  878.  
  879. send "{@lobby} Succesfully set leggings to &a%message%"
  880.  
  881. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  882. delete {cosmetics.edit.%player%}
  883.  
  884. else if ({cosmetics.edit.%player%.pieceText} to lower case) is "boots":
  885. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  886.  
  887. if contains({_message::*}, "boots"):
  888. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  889.  
  890. else:
  891. send "{@lobby} &c%message% &4are no boots!"
  892. stop
  893.  
  894. send "{@lobby} Succesfully set boots to &a%message%"
  895.  
  896. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  897. delete {cosmetics.edit.%player%}
  898.  
  899.  
  900. else:
  901. send "{@lobby} &c%message% &4is not a %{cosmetics.edit.%player%.pieceText} to lower case%!"
  902.  
  903. else if {cosmetics.edit.%player%} is "setType":
  904. if "%message%" is "cancel":
  905. send "{@lobby} Cancelled setting the type."
  906. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  907. delete {cosmetics.edit.%player%}
  908.  
  909. set {cosmetics.edit.%player%.type} to "%message%"
  910. delete {cosmetics.edit.%player%}
  911.  
  912. send "{@lobby} Succesfully set type to &a%message%"
  913. editSuit(player, {cosmetics.edit.%player%.type})
  914.  
  915.  
  916. else if {cosmetics.edit.%player%} is "setCrate":
  917. if "%message%" is "cancel":
  918. send "{@lobby} Cancelled setting the crate."
  919. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  920. delete {cosmetics.edit.%player%}
  921.  
  922. else:
  923. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  924. if contains({_list::*}, "%message to lower case%"):
  925. set {cosmetics.edit.%player%.crate} to "%message to lower case%"
  926. editSuit(player, {cosmetics.edit.%player%.type})
  927. delete {cosmetics.edit.%player%}
  928. else:
  929. send "{@lobby} &c%message% &4is not a valid crate!"
  930.  
  931. else if world of player is world of {lobby.location}:
  932. cancel event
  933. send "&7[&e%player%&7] &8>> &f%message%" to all players in world of player
  934. send "&7[&eLobby&7][&e%player%&7] &f>> %message%" to console
  935.  
  936.  
  937. #------------------- Commands -------------------
  938. command /lobby [<text>] [<text>]:
  939. aliases: /hub
  940. trigger:
  941. if player has permission "lobby.*":
  942. if arg-1 is set:
  943. if arg-1 is "help":
  944. send "&2----------[ &a%{cmd}% &2]----------"
  945. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  946. send "&e&o/%{cmd}% set &d→ &fSet the lobby"
  947. send "&2----------[ &a%{cmd}% &2]----------"
  948.  
  949. else if arg-1 is "set":
  950. send "{@logo} &2Succesfully set the &a%{cmd}% &2to your location!"
  951. set {lobby.location} to location of player
  952.  
  953. else:
  954. if {lobby.location} is set:
  955. if world of player is not "%world of {lobby.location}%":
  956. teleport player to {lobby.location}
  957. send "{@lobby} &fThe player %player% went to the lobby!" to all players in world of player
  958. clear player's inventory
  959. set slot 4 of player to a compass named "{@lcompass}"
  960.  
  961. else:
  962. teleport player to {lobby.location}
  963.  
  964. else:
  965. send "{@lobby} &cThe %{cmd}% is not set yet!"
  966.  
  967.  
  968. else if {lobby.location} is set:
  969. if world of player is not "%world of {lobby.location}%":
  970. teleport player to {lobby.location}
  971. send "{@lobby} &fThe player %player% went to the lobby!" to all players in world of player
  972. clear player's inventory
  973. set slot 4 of player to a compass named "{@lcompass}"
  974.  
  975. else:
  976. teleport player to {lobby.location}
  977.  
  978. else:
  979. send "{@lobby} &cThe %{cmd}% is not set yet!"
  980.  
  981.  
  982. command /lobbycompass [<text>] [<text>] [<text>]:
  983. aliases: /lcomp, /lcompass
  984. trigger:
  985. if player has permission "lobbycompass.*":
  986. if arg 1 is not set:
  987. send "{@lobby} &4Do &c&o/%{cmd}% help &4for more info."
  988.  
  989. else if arg 1 is set:
  990. if arg 1 is "help":
  991. send "&2----------[ &a%{cmd}% &2]----------"
  992. send "&e&o/%{cmd}% help &d→ &fKrijg help pagina"
  993. send "&e&o/%{cmd}% create <minigame> &d→ &fCreate a minigame"
  994. send "&e&o/%{cmd}% remove/delete <minigame> &d→ &fDelete a minigame"
  995. send "&e&o/%{cmd}% setspawn <minigame> &d→ &fSet the spawn of a minigame"
  996. send "&e&o/%{cmd}% slot <minigame> <number> &d→ &fSet the GUI slot of a minigame"
  997.  
  998. send "&e&o/%{cmd}% setname <minigame> <name> &d→ &fSet a name"
  999. send "&e&o/%{cmd}% deletename <minigame> &d→ &fDelete the name of a minigame"
  1000. send "&e&o/%{cmd}% setlore <minigame> <lore> &d→ &fSet a lore"
  1001. send "&e&o/%{cmd}% deletelore <minigame> <minigame> &d→ &fDelete the lore of a minigame"
  1002. send "&e&o/%{cmd}% setitem <minigame> <item> &d→ &fSet the item of a minigame"
  1003. send "&e&o/%{cmd}% list &d→ &fGet a list of all the minigames"
  1004. send "&e&o/%{cmd}% setrows <number> &d→ &fSet the amount of rows in the GUI"
  1005. send "&e&o/%{cmd}% gui <minigame> &d→ &fOpen the config-GUI"
  1006. send "&2----------[ &a%{cmd}% &2]----------"
  1007.  
  1008. else if arg 1 is "create":
  1009. if arg 2 is set:
  1010. if {lobby.minigames.%arg 2%} is not set:
  1011. set {lobby.minigames.%arg 2%} to true
  1012. set {lobby.minigames.%arg 2%.name} to "&cNone"
  1013. set {lobby.minigames.%arg 2%.lore} to "&cNone"
  1014. set {lobby.minigames.%arg 2%.item} to "&cNone"
  1015. set {lobby.minigames.%arg 2%.slot} to "&cNone"
  1016. set {lobby.minigames.%arg 2%.spawn} to "&cNone"
  1017. add arg 2 to {lobby.minigames.list::*}
  1018.  
  1019. send "{@lobby} &2Succesfully made the minigame &a%arg 2%&2!"
  1020.  
  1021. else:
  1022. send "{@lobby} &4The minigame &c%arg 2% &4already exists!"
  1023. else:
  1024. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1% <minigame>&4."
  1025.  
  1026. else if arg 1 is "delete" or "remove":
  1027. if arg 2 is set:
  1028. if {lobby.minigames.%arg 2%} is set:
  1029. delete {lobby.minigames.%arg 2%}
  1030. delete {lobby.minigames.%arg 2%.name}
  1031. delete {lobby.minigames.%arg 2%.lore}
  1032. delete {lobby.minigames.%arg 2%.item}
  1033. delete {lobby.minigames.%arg 2%.slot}
  1034. delete {lobby.minigames.%arg 2%.spawn}
  1035. remove arg 2 from {lobby.minigames.list::*}
  1036.  
  1037. send "{@lobby} &2Succesfully removed the minigame &a%arg 2%&2!"
  1038.  
  1039. else:
  1040. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1041. else:
  1042. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1043.  
  1044.  
  1045. else if arg 1 is "setspawn":
  1046. if arg 2 is set:
  1047. if {lobby.minigames.%arg 2%} is set:
  1048. set {lobby.minigames.%arg 2%.spawn} to location of player
  1049. send "{@lobby} &2Succesfully set the spawn of the minigame%nl%&a%arg 2% &2arg &a%location of player%&2!"
  1050.  
  1051. else:
  1052. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1053. else:
  1054. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1055.  
  1056. else if arg 1 is "slot":
  1057. if arg 2 is set:
  1058. if {lobby.minigames.%arg 2%} is set:
  1059. if arg 3 is set:
  1060. if (arg 3 parsed as a number) is set:
  1061. if {lobby.compassRows} is not set:
  1062. set {lobby.compassRows} to 1
  1063.  
  1064. if {lobby.compassRows} < 1:
  1065. set {lobby.compassRows} to 1
  1066.  
  1067.  
  1068. if {lobby.compassRows}*9-1 < arg-3 parsed as a number:
  1069. send "{@lobby} &4The amount &c%arg 3% &4is to large bacause the max amount of slots is &c%{lobby.compassRows}*9+1%&4!"
  1070.  
  1071. else:
  1072. loop {lobby.minigames.list::*}:
  1073. if {lobby.minigames.%loop-value%.slot} is arg 3:
  1074. set {_set} to loop-value
  1075. stop loop
  1076.  
  1077. if {_set} is set:
  1078. send "{@lobby} &4The slot &c%arg 3% &4is already in use by the minigame &c%{_set}%&4!"
  1079. else:
  1080. set {lobby.minigames.%arg 2%.slot} to arg 3
  1081. send "{@lobby} &2Succesfully set the slot of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1082. else:
  1083. send "{@lobby} &c%arg 3% &4is not a number!"
  1084. else:
  1085. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <number>&4."
  1086. else:
  1087. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1088. else:
  1089. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <number>&4."
  1090.  
  1091.  
  1092. else if arg 1 is "setname":
  1093. if arg 2 is set:
  1094. if {lobby.minigames.%arg 2%} is set:
  1095. if arg 3 is set:
  1096. set {lobby.minigames.%arg 2%.name} to arg 3
  1097. send "{@lobby} &2Succesfully set the name of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1098.  
  1099. else:
  1100. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <name>&4."
  1101. else:
  1102. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1103. else:
  1104. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <name>&4."
  1105.  
  1106. else if arg 1 is "delname" or "deletename":
  1107. if arg 2 is set:
  1108. delete {lobby.minigames.%arg 2%.name}
  1109. send "{@lobby} &2Succesfully deleted the name from the minigame &a%arg 2%&2!"
  1110.  
  1111. else:
  1112. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1113.  
  1114. else if arg 1 is "setlore":
  1115. if arg 2 is set:
  1116. if {lobby.minigames.%arg 2%} is set:
  1117. if arg 3 is set:
  1118. set {lobby.minigames.%arg 2%.lore} to arg 3
  1119. send "{@lobby} &2Succesfully set the lore of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1120.  
  1121. else:
  1122. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <lore>&4."
  1123. else:
  1124. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1125. else:
  1126. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <lore>&4."
  1127.  
  1128. else if arg 1 is "dellore" or "deletelore":
  1129. if arg 2 is set:
  1130. if {lobby.minigames.%arg 2%} is set:
  1131. delete {lobby.minigames.%arg 2%.lore}
  1132. send "{@lobby} &2Succesfully deleted the lore from the minigame &a%arg 2%&2!"
  1133.  
  1134. else:
  1135. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1136. else:
  1137. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <name>&4."
  1138.  
  1139. else if arg 1 is "setitem":
  1140. if arg 2 is set:
  1141. if {lobby.minigames.%arg 2%} is set:
  1142. if arg 3 is set:
  1143. if (arg 3 parsed as an item) is set:
  1144. set {lobby.minigames.%arg 2%.item} to arg 3 parsed as an item
  1145. send "{@lobby} &2Succesfully set the item from the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1146.  
  1147. else:
  1148. send "{@lobby} &c%arg 3% &4is not an item!"
  1149. else:
  1150. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <item>&4."
  1151. else:
  1152. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1153. else:
  1154. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <item>&4."
  1155.  
  1156.  
  1157. else if arg 1 is "list":
  1158. if {lobby.minigames.list::*} is not empty:
  1159. loop {lobby.minigames.list::*}:
  1160. if {_list} is set:
  1161. set {_list} to "%{_list}%&2, &a%loop-value%"
  1162. else:
  1163. set {_list} to "%loop-value%"
  1164.  
  1165. else:
  1166. set {_list} to "Geen"
  1167.  
  1168. send "{@lobby} &2This is the list of all the minigames:%nl%&a%{_list}%"
  1169.  
  1170.  
  1171. else if arg 1 is "setrows":
  1172. if arg 2 is set:
  1173. if (arg 2 parsed as a number) is set:
  1174. if (arg-2 parsed as a number) < 7:
  1175. set {lobby.compassRows} to (arg-2 parsed as a number)
  1176. send "{@lobby} &2Succesfully set the amount of rows to &a%arg 2%&2!"
  1177.  
  1178. else:
  1179. send "{@lobby} &4The max amount of rows is &c6&4!"
  1180. else:
  1181. send "{@lobby} &c%arg 2% &4is not a number!"
  1182. else:
  1183. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <number>&4."
  1184.  
  1185.  
  1186. else if arg 1 is "gui":
  1187. if arg 2 is set:
  1188. if {lobby.minigames.%arg 2%} is set:
  1189. open chest with 2 rows named "&7Config GUI" to player
  1190.  
  1191. set {_name} to {lobby.minigames.%arg 2%.name}
  1192. replace "&" in {_name} with "§"
  1193.  
  1194. set {_lore} to {lobby.minigames.%arg 2%.lore}
  1195. replace "&" in {_lore} with "§"
  1196.  
  1197. format gui slot 2 of player with a book named "&2Minigame: &a%arg-2%" to do nothing
  1198. format gui slot 3 of player with a name tag named "&2Name: &f%{_name}%" to close then run function lcompGui(player, "&7Name &8%arg-2%", 3, 12, 14, green_wool, red_wool, "&aChange", "&cDeny", "{@lobby} &2Click <suggest command:/lcomp setname %arg-2% [naam]>&ahere&r &2to edit the name.", "{@lobby} &4You have chosen to give the minigame%nl%&c%arg-2% &4not an other name.", false)
  1199. format gui slot 4 of player with a paper named "&2Lore: &f%{_lore}%" to close then run function lcompGui(player, "&7Lore &8%arg-2%", 3, 12, 14, green_wool, red_wool, "&aChange", "&cDeny", "{@lobby} &2Click <suggest command:/lcomp setlore %arg-2% [lore]>&ahere&r &2to edit the lore.", "{@lobby} &4You have chosen to give the minigame%nl%&c%arg-2% &4not an other lore.", false)
  1200. format gui slot 5 of player with an item frame named "&2Item: &a%{lobby.minigames.%arg-2%.item}%" to close then run function lcompGui(player, "&7Item &8%arg-2%", 3, 12, 14, green_wool, red_wool, "&aChange", "&cDeny", "{@lobby} &2Click <suggest command:/lcompass setitem %arg-2% [item]>&ahere<reset> &2to edit the item.", "{@lobby} &4You have chosen to give the minigame%nl%&c%arg-2% &4not an other item.", false)
  1201. format gui slot 6 of player with a clock named "&2Slot: &a%{lobby.minigames.%arg-2%.slot}%" to close then run function lcompGui(player, "&7Slot &8%arg-2%", 3, 12, 14, green_wool, red_wool, "&aChange", "&cDeny", "{@lobby} &2Click <suggest command:/lcompass slot %arg-2% [slot]>&ahere<reset> &2to edit the slot.", "{@lobby} &4You have chosen to give the minigame%nl%&c%arg-2% &4not an other slot.", false)
  1202.  
  1203. format gui slot 12 of player with a paper named "&2Spawn: &a%{lobby.minigames.%arg-2%.spawn}%" to close then run function lcompGui(player, "&7Spawn &8%arg-2%", 3, 12, 14, green_wool, red_wool, "&aSet", "&cDeny", "{@lobby} &2Click <command:/lcompass setspawn %arg-2%>&ahere<reset> &2to set the spawn.", "{@lobby} &4You have chosen to give the minigame%nl%&c%arg-2% &4not an other spawn.", false)
  1204. format gui slot 13 of player with a barrier named "&cClose menu" to close
  1205. format gui slot 14 of player with a redstone named "&4Delete" to close then run function lcompGui(player, "&7Delete &8%arg-2%", 3, 12, 14, green_wool, red_wool, "&aDelete", "&cDeny", "/lcompass delete %arg-2%", "{@lobby} &4You have chosen to delete the minigame%nl%&c%arg-2% &4not.", true)
  1206.  
  1207. else:
  1208. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1209. else:
  1210. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1211. else:
  1212. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  1213.  
  1214. command /lobbycrate [<text>] [<text>]:
  1215. aliases: /lobbycr, /lcrate
  1216. trigger:
  1217. if player is in world of {lobby.location}:
  1218. if player has permission "votecrate.*":
  1219. if arg-1 is set:
  1220. if arg-1 is "help":
  1221. send "&2----------[ &a%{cmd}% &2]----------"
  1222. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1223. send "&e&o/%{cmd}% list &d→ &fGet a list with all crates"
  1224. send "&e&o/%{cmd}% create <crate> &d→ &fCreate a create"
  1225. send "&e&o/%{cmd}% delete/remove <crate> &d→ &fDelete a crate"
  1226. send "&e&o/%{cmd}% path <crate> &d→ &fGet the edit path of a crate"
  1227. send "&e&o/%{cmd}% get <crate> &d→ &fGet a crate"
  1228.  
  1229. send "&2----------[ &a%{cmd}% &2]----------"
  1230.  
  1231. else if arg-1 is "list":
  1232. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1233. if {_list::*} is not empty:
  1234. loop {_list::*}:
  1235. if {_list} is set:
  1236. set {_list} to "%{_list}%&2, &a%loop-value%"
  1237. else:
  1238. set {_list} to "%loop-value%"
  1239.  
  1240. send "{@lobby} &2There are the following crates:%nl%&a%{_list}%"
  1241.  
  1242. else:
  1243. send "{@lobby} &2There are no crates made yet."
  1244.  
  1245.  
  1246. else if arg-1 is "create":
  1247. if arg-2 is set:
  1248. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1249. set {_arg2} to "%arg-2 to lower case%"
  1250. if contains({_list::*}, {_arg2}):
  1251. send "{@lobby} &4The crate &c%{_arg2}% &4already exists!"
  1252.  
  1253.  
  1254. else:
  1255.  
  1256. send "{@lobby} &2Making the crate &a%{_arg2}%&2..."
  1257. add {_arg2} to yml list "Lobby.Crates.List" of file "{@config}"
  1258. create file "{@path}/%{_arg2}%.yml"
  1259. add "diamond_sword" to yml list "Item.List" of file "{@path}/%{_arg2}%.yml"
  1260. add "diamond_sword-1" to yml list "Item.ConfigName" of file "{@path}/%{_arg2}%.yml"
  1261.  
  1262. set yml value "Item.Chance.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to "100"
  1263. set yml value "Item.Name.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to "&aDiamond Sword"
  1264. set yml value "Item.Amount.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to 1
  1265.  
  1266. add "This is a lore" to yml list "Item.Lore.diamond_sword-1" of file "{@path}/%{_arg2}%.yml"
  1267.  
  1268. add "sharpness:1" to yml list "Item.Enchants.diamond_sword-1" of file "{@path}/%{_arg2}%.yml"
  1269.  
  1270. send "{@lobby} &2Succesfully made the crate &a%{_arg2}%&2!"
  1271.  
  1272.  
  1273. else:
  1274. send "{@lobby} &4You need to give up a &cname &4for the crate!"
  1275.  
  1276. else if arg-1 is "delete" or "remove":
  1277. if arg-2 is set:
  1278. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1279. set {_arg2} to "%arg-2 to lower case%"
  1280. if contains({_list::*}, {_arg2}):
  1281. send "{@lobby} &2Deleting the crate &a%{_arg2}%&2..."
  1282.  
  1283. remove "%{_arg2}%" from yml list "Lobby.Crates.List" of file "{@config}"
  1284. delete file "{@path}/%{_arg2}%.yml"
  1285.  
  1286. send "{@lobby} &2Succesfully deleted the crate &a%{_arg2}%&2!"
  1287.  
  1288. else:
  1289. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exist!"
  1290.  
  1291. else:
  1292. send "{@lobby} &4You need to give up a &cname &4of the crate you want to delete!"
  1293.  
  1294. else if arg-1 is "path":
  1295. if arg-2 is set:
  1296. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1297. set {_arg2} to "%arg-2 to lower case%"
  1298.  
  1299. if contains({_list::*}, {_arg2}):
  1300. send "{@lobby} &2Location of %{_arg2}%: &a{@path}/%{_arg2}%&2."
  1301.  
  1302.  
  1303. else:
  1304. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exists!"
  1305. else:
  1306. send "{@lobby} &4You need to give up a &cname &4of the crate you want to get the path of!"
  1307.  
  1308. else if arg-1 is "get":
  1309. if arg 2 is set:
  1310. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1311. set {_arg2} to "%arg-2 to lower case%"
  1312. if contains({_list::*}, {_arg2}):
  1313. send "{@lobby} &2Here you have the &a%{_arg2}% &2crate!%nl%&2Place it to create a chest."
  1314. give player 1 chest named "&e%{_arg2}%" with lore "&7Place to create a crate!"
  1315. else:
  1316. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exist!"
  1317. else:
  1318. send "{@lobby} &4You must give up a crate type!"
  1319.  
  1320. else:
  1321. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  1322. else:
  1323. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  1324.  
  1325.  
  1326. command /key [<text>] [<text>] [<text>] [<text>]:
  1327. trigger:
  1328. if player has permission "key.*":
  1329. if arg-1 is set:
  1330. if arg-1 is "help":
  1331. send "&2----------[ &a%{cmd}% &2]----------"
  1332. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1333. send "&e&o/%{cmd}% get <crate/all> [number] &d→ &fGet a crate"
  1334. send "&e&o/%{cmd}% give <player> <crate/all> [number] &d→ &fGive a key to open a crate to a player"
  1335. send "&e&o/%{cmd}% remove <all/crate> [number] [player] &d→ &fRemove a key from a player"
  1336. send "&e&o/%{cmd}% clear <all/crate> [player] &d→ &fClear the keys from a player"
  1337. send "&e&o/%{cmd}% keys <all/crate> [player] &d→ &fGet the amount of keys from a player"
  1338. send "&2----------[ &a%{cmd}% &2]----------"
  1339.  
  1340. else if arg-1 is "get":
  1341. if arg-2 is "all":
  1342. if arg-3 is set:
  1343. if (arg-3 parsed as a number) is set:
  1344. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1345. set {_num} to arg-3 parsed as a number
  1346. loop {_num} times:
  1347. loop {_list::*}:
  1348. add 1 to {keys.%player%.%loop-value-2%}
  1349.  
  1350. send "{@lobby} &2You have recieved all the &a%arg-3% &2times!"
  1351.  
  1352. else:
  1353. send "{@lobby} &c%arg-3% &4is not a number!"
  1354. else:
  1355. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1356. loop {_list::*}:
  1357. add 1 to {keys.%player%.%loop-value%}
  1358.  
  1359. send "{@lobby} &2You have recieved all keys!"
  1360.  
  1361. else if arg-2 is set:
  1362. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1363. if contains({_list::*}, "%arg-2 to lower case%"):
  1364. if arg-3 is set:
  1365. if (arg-3 parsed as a number) is set:
  1366. add (arg-3 parsed as a number) to {keys.%player%.%arg-2 to lower case%}
  1367. send "{@lobby} &2You have recieved &a%arg-2 to lower case% &2key &a%arg-3% &2times!"
  1368. else:
  1369. send "{@lobby} &c%arg-3% &4is not a number!"
  1370. else:
  1371. add 1 to {keys.%player%.%arg-2 to lower case%}
  1372.  
  1373. send "{@lobby} &2You have recieved a &a%arg-2 to lower case% &2key!"
  1374. else:
  1375. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist."
  1376. else:
  1377. send "{@lobby} &4You must give up a &ccrate&4!"
  1378.  
  1379. else if arg-1 is "give":
  1380. if arg-2 is set:
  1381. if (arg-2 parsed as a player) is set:
  1382. if arg-3 is set:
  1383. if arg-3 is "all":
  1384. if arg-4 is set:
  1385. if (arg-4 parsed as a number) is set:
  1386. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1387. set {_num} to arg-4 parsed as a number
  1388. loop {_num} times:
  1389. loop {_list::*}:
  1390. add 1 to {keys.%arg-2 parsed as a player%.%loop-value-2%}
  1391.  
  1392. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2all the keys &a%arg-4% &2times!"
  1393. send "{@lobby} &2You have recieved all the keys &a%arg-4% &2times!" to arg-2 parsed as a player
  1394.  
  1395. else:
  1396. send "{@lobby} &c%arg-3% &4is not a number!"
  1397. else:
  1398. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1399. loop {_list::*}:
  1400. add 1 to {keys.%arg-2 parsed as a player%.%loop-value%}
  1401.  
  1402. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2all the keys!"
  1403. send "{@lobby} &2You have recieved all the keys!" to arg-2 parsed as a player
  1404. else:
  1405. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1406. if contains({_list::*}, "%arg-3 to lower case%"):
  1407. if arg-4 is set:
  1408. if (arg-4 parsed as a number) is set:
  1409.  
  1410. add (arg-4 parsed as a number) to {keys.%arg-2%.%arg-3 to lower case%}
  1411.  
  1412. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2the &a%arg-3 to lower case% &2key &a%arg-4% &2times!"
  1413. send "{@lobby} &2You have recieved the &a%arg-3 to lower case% &2key &a%arg-4% &2times!" to arg-2 parsed as a player
  1414.  
  1415. else:
  1416. send "{@lobby} &c%arg-3% &4is not a number!"
  1417. else:
  1418. add 1 to {keys.%arg-2 parsed as a player%.%arg-3 to lower case%}
  1419.  
  1420. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2the &a%arg-3 to lower case% &2key!"
  1421. send "{@lobby} &2You have recieved the &a%arg-3 to lower case% &2key!" to arg-2 parsed as a player
  1422. else:
  1423. send "{@lobby} &4The crate &c%arg-3 to lower case% &4doesn't exist!"
  1424. else:
  1425. send "{@lobby} &4You must give up a &ccrate&4!"
  1426. else:
  1427. send "{@lobby} &4The player &c%arg-2% &4is not online!"
  1428. else:
  1429. send "{@lobby} &4You must give up a &cplayer&4!"
  1430.  
  1431.  
  1432.  
  1433. else if arg-1 is "remove":
  1434. if arg-2 is set:
  1435. if arg-2 is "all":
  1436. if arg-3 is set:
  1437. if (arg-3 parsed as a number) is set:
  1438. if arg-4 is set:
  1439. if (arg-4 parsed as a player) is set:
  1440. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1441. set {_num} to arg-3 parsed as a number
  1442. loop {_list::*}:
  1443. if {keys.%arg-4 parsed as a player%.%loop-value%}-{_num} >= 0:
  1444. remove {_num} from {keys.%name of arg-4 parsed as a player%.%loop-value%}
  1445. else:
  1446. set {keys.%arg-4 parsed as a player%.%loop-value%} to 0
  1447.  
  1448. send "{@lobby} &2Succesfully removed &a%arg-3% &2from all the keys of &a%name of arg-4 parsed as a player%&2!"
  1449. send "{@lobby} &2Removed &a%arg-3% &2from your keys!" to arg-4 parsed as a player
  1450.  
  1451. else:
  1452. send "{@lobby} &4The player &c%arg-4% &4is not online!"
  1453. else:
  1454. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1455. loop {_list::*}:
  1456. if {keys.%player%.%loop-value%}-(arg-3 parsed as a number) >= 0:
  1457. remove (arg-3 parsed as a number) from {keys.%player%.%loop-value%}
  1458. else:
  1459. set {keys.%player%.%loop-value%} to 0
  1460.  
  1461. send "{@lobby} &2Succesfully removed &a%arg-3% &2from all the keys!"
  1462.  
  1463. else:
  1464. send "{@lobby} &c%arg-3% &4is not a number!"
  1465. else:
  1466. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1467. loop {_list::*}:
  1468. if {keys.%player%.%loop-value%}-1 >= 0:
  1469. remove 1 from {keys.%player%.%loop-value%}
  1470.  
  1471. send "{@lobby} &2Succesfully removed &a1 &2from all the keys"
  1472. else:
  1473. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1474. if contains({_list::*}, "%arg-2 to lower case%"):
  1475. if arg-3 is set:
  1476. if (arg-3 parsed as a number) is set:
  1477. if arg-4 is set:
  1478. if (arg-4 parsed as a player) is set:
  1479. if {keys.%arg-4 parsed as a player%.%arg-2 to lower case%}-(arg-3 parsed as a number) >= 0:
  1480. remove (arg-3 parsed as a number) from {keys.%name of arg-4 parsed as a player%.%arg-2 to lower case%}
  1481. else:
  1482. set {keys.%arg-4 parsed as a player%.%arg-2 to lower case%} to 0
  1483.  
  1484. send "{@lobby} &2Succesfully removed &a%arg-3% %arg-2 to lower case% &2keys from &a%name of arg-4 parsed as a player%&2!"
  1485. send "{@lobby} &a%arg-3% %arg-2 to lower case% &2keys have been removed!" to arg-4 parsed as a player
  1486.  
  1487. else:
  1488. send "{@lobby} &4The player &c%arg-4% &4is not online!"
  1489. else:
  1490.  
  1491. if {keys.%player%.%arg-2 to lower case%}-(arg-3 parsed as a number) >= 0:
  1492. remove (arg-3 parsed as a number) from {keys.%player%.%arg-2 to lower case%}
  1493. send "{@lobby} &2Succesfully removed &a%arg-3% %arg-2 to lower case% &2keys!"
  1494.  
  1495. else:
  1496. send "{@lobby} &c%arg-3% &4is not a number!"
  1497.  
  1498. else:
  1499. if {keys.%player%.%arg-2 to lower case%}-1 >= 0:
  1500. remove 1 from {keys.%player%.%arg-2 to lower case%}
  1501. send "{@lobby} &2Succesfully removed &a1 %arg-2 to lower case% &2keys!"
  1502. else:
  1503. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist."
  1504. else:
  1505. send "{@lobby} &4You must give up a &ccrate&4!"
  1506.  
  1507. else if arg-1 is "clear":
  1508. if arg-2 is set:
  1509. if arg-2 is "all":
  1510. if arg-3 is set:
  1511. if (arg-3 parsed as a player) is set:
  1512. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1513. loop {_list::*}:
  1514. set {keys.%arg-3 parsed as a player%.%loop-value%} to 0
  1515.  
  1516. send "{@lobby} &2Succesfully cleared &aall keys &2of &a%name of arg-3 parsed as a player%&2!"
  1517. send "{@lobby} &aAll &2your &akeys &2have been cleared!" to arg-3 parsed as a player
  1518. else:
  1519. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1520. else:
  1521. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1522. loop {_list::*}:
  1523. set {keys.%player%.%loop-value%} to 0
  1524.  
  1525. send "{@lobby} &2You have cleared &aall &2your &akeys&2!"
  1526. else:
  1527. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1528. if contains({_list::*}, "%arg-2 to lower case%"):
  1529. if arg-3 is set:
  1530. if (arg-3 parsed as a player) is set:
  1531. set {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} to 0
  1532. send "{@lobby} &2You have cleared the &a%arg-2 to lower case% keys &2from &a%name of arg-3 parsed as a player%&2!"
  1533. send "{@lobby} &2Your &a%arg-2 to lower case% keys &2have been cleared!" to arg-3 parsed as a player
  1534.  
  1535. else:
  1536. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1537.  
  1538. else:
  1539. set {keys.%player%.%arg-2 to lower case%} to 0
  1540. send "{@lobby} &2Succesfully cleared the &a%arg-2 to lower case% keys&2!"
  1541.  
  1542. else:
  1543. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist!"
  1544. else:
  1545. send "{@lobby} &4You must give up a &ccrate&4!"
  1546.  
  1547. else if arg-1 is "keys":
  1548. if arg-2 is set:
  1549. if arg-2 is "all":
  1550. if arg-3 is set:
  1551. if (arg-3 parsed as a player) is set:
  1552. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1553. loop {_list::*}:
  1554. if {keys.%arg-3 parsed as a player%.%loop-value%} is not set:
  1555. set {keys.%arg-3 parsed as a player%.%loop-value%} to 0
  1556.  
  1557. if {_keys} is not set:
  1558. set {_keys} to "&2%loop-value%: &a%{keys.%name of arg-3 parsed as a player%.%loop-value%}%"
  1559. else:
  1560. set {_keys} to "%{_keys}%%nl%&2%loop-value%: &a%{keys.%name of arg-3 parsed as a player%.%loop-value%}%"
  1561.  
  1562. send "{@lobby} &2This is the list of keys from &a%name of arg-3 parsed as a player%&2:%nl%%{_keys}%"
  1563.  
  1564. else:
  1565. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1566. else:
  1567. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1568. loop {_list::*}:
  1569. if {keys.%player%.%loop-value%} is not set:
  1570. set {keys.%player%.%loop-value%} to 0
  1571. if {_keys} is not set:
  1572. set {_keys} to "&2%loop-value%: &a%{keys.%player%.%loop-value%}%"
  1573. else:
  1574. set {_keys} to "%{_keys}%%nl%&2%loop-value%: &a%{keys.%player%.%loop-value%}%"
  1575.  
  1576. send "{@lobby} &2This is your list of keys&2:%nl%%{_keys}%"
  1577. else:
  1578. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1579. if contains({_list::*}, "%arg-2 to lower case%"):
  1580. if arg-3 is set:
  1581. if (arg-3 parsed as a player) is set:
  1582. if {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} is not set:
  1583. set {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} to 0
  1584.  
  1585. send "{@lobby} &a%name of arg-3 parsed as a player% &2has &a%{keys.%arg-3%.%arg-2 to lower case%}% %arg-2 to lower case% &2keys."
  1586.  
  1587. else:
  1588. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1589. else:
  1590. if {keys.%player%.%arg-2 to lower case%} is not set:
  1591. set {keys.%player%.%arg-2 to lower case%} to 0
  1592.  
  1593. send "{@lobby} &2You have &a%{keys.%player%.%arg-2 to lower case%}% %arg-2 to lower case% &2keys."
  1594. else:
  1595. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist!"
  1596. else:
  1597. send "{@lobby} &4You need to give up a &ccrate&4!"
  1598. else:
  1599. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1600. else:
  1601. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1602.  
  1603.  
  1604. command /cosmetics [<text>] [<text>] [<text>]:
  1605. aliases: /cos
  1606. trigger:
  1607. if player has permission "cosmetics.*":
  1608. if arg-1 is not set:
  1609. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1610.  
  1611. else if arg-1 is "help":
  1612. send "&2----------[ &a%{cmd}% &2]----------"
  1613. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1614. send "&e&o/%{cmd}% gui [player] &d→ &fGet the cosmetics (of a player)"
  1615. send "&e&o/%{cmd}% setup <type> &d→ &fCreate a cosmetic"
  1616. send "&e&o/%{cmd}% edit [type] &d→ &fEdit a cosmetic"
  1617. #send "&e&o/%{cmd}% delete [type] [name] &d→ &fDelete a cosmetic"
  1618. send "&e&o/%{cmd}% path &d→ &fCreate your own cosmetics"
  1619. send "&2----------[ &a%{cmd}% &2]----------"
  1620.  
  1621. #else if arg-1 is "gui":
  1622. # if arg-2 is set:
  1623. # if arg-2 parsed as a player is set:
  1624. #
  1625.  
  1626. # else:
  1627. # send "{@lobby} &4The player &c%arg-2% &4has never logged in."
  1628.  
  1629. # else:
  1630.  
  1631. else if arg-1 is "setup":
  1632. if arg-2 is set:
  1633. editCos(player, "%arg-2%")
  1634. #open chest with 1 rows named "&8Cosmetics %arg-2%" to player
  1635. #format gui slot 2 of player with nether star named "&fCreate" to close
  1636. #format gui slot 4 of player with redstone torch on named "&fEdit" to close
  1637. #format gui slot 6 of player with blaze powder named "&fDelete" to close
  1638.  
  1639. else:
  1640. editCos(player, "")
  1641. #open chest with 1 rows named "&8Edit Cosmetics" to player
  1642. #format gui slot 2 of player with nether star named "&fCreate" to close
  1643. #format gui slot 4 of player with redstone torch on named "&fEdit" to close
  1644. #format gui slot 6 of player with blaze powder named "&fDelete" to close
  1645.  
  1646. else if arg-1 is "path":
  1647. send "{@lobby} The path to edit your cosmetics is %nl%&a{@cosConfig} &2and to create cosmetics %nl%&a{@path}/Cosmetics/"
  1648.  
  1649. else:
  1650. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
Add Comment
Please, Sign In to add comment