Zeldaboy111

Skript #273 ]|[ Cosmetics (7)

Dec 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 76.31 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 setHeadType(p: Player, type: String, name: String):
  292. set {cosmetics.edit.%{_p}%} to "go_back"
  293. close {_p}'s inventory
  294. delete {cosmetics.edit.%{_p}%}
  295. set {cosmetics.edit.%{_p}%.helmet.player} to "%{_type}%"
  296. set {cosmetics.edit.%{_p}%.helmet.player.name} to "%{_name}%"
  297. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  298.  
  299. function editCosFormat(p: Player, piece: String, pieceText: String) :: item:
  300. set {_item} to ("barrier" parsed as an item)
  301.  
  302. if {cosmetics.edit.%{_p}%.%{_piece}%} is set:
  303.  
  304. set {_headType} to "%{cosmetics.edit.%{_p}%.%{_piece}%}%"
  305.  
  306. if {cosmetics.edit.%{_p}%.%{_piece}%} parsed as an item is set:
  307. set {_item} to ({cosmetics.edit.%{_p}%.%{_piece}%} parsed as an item)
  308.  
  309. else if contains(({_headType} split at " "), "head"):
  310. set {_item} to head
  311.  
  312. if {cosmetics.edit.%{_p}%.%{_piece}%.name} is set:
  313. set name of {_item} to "%{cosmetics.edit.%{_p}%.%{_piece}%.name}%"
  314. else:
  315. set name of {_item} to "&2%{_pieceText}%"
  316.  
  317. if {cosmetics.edit.%{_p}%.%{_piece}%.lore} is set:
  318. set lore of {_item} to {cosmetics.edit.%{_p}%.%{_piece}%.lore}
  319.  
  320. else:
  321. set name of {_item} to "&4%{_pieceText}%"
  322.  
  323. return {_item}
  324.  
  325. function setSkullType(p: Player):
  326. wait 2 tick
  327. open chest with 3 rows named "&8Choose Type" to {_p}
  328.  
  329. if {cosmetics.edit.%{_p}%.helmet.type} is "Player":
  330. set {_player} to skull of ("MHF_Steve" parsed as an offline player) named "&2Player"
  331. set {_mob} to skull of ("MHF_CaveSpider" parsed as an offline player) named "&4Mob"
  332.  
  333. else if {cosmetics.edit.%{_p}%.helmet.type} is "Mob":
  334. set {_player} to skull of ("MHF_Steve" parsed as an offline player) named "&4Player"
  335. set {_mob} to skull of ("MHF_CaveSpider" parsed as an offline player) named "&2Mob"
  336.  
  337. else:
  338. set {_player} to skull of ("MHF_Steve" parsed as an offline player) named "&4Player"
  339. set {_mob} to skull of ("MHF_CaveSpider" parsed as an offline player) named "&4Mob"
  340.  
  341.  
  342. format gui slot 12 of {_p} with {_player} to run:
  343. set {cosmetics.edit.%{_p}%} to "go_back"
  344. close {_p}'s inventory
  345. delete {cosmetics.edit.%{_p}%}
  346. set {cosmetics.edit.%{_p}%.helmet.type} to "Player"
  347. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  348.  
  349. format gui slot 14 of {_p} with {_mob} to run:
  350. set {cosmetics.edit.%{_p}%} to "go_back"
  351. close {_p}'s inventory
  352. delete {cosmetics.edit.%{_p}%}
  353. set {cosmetics.edit.%{_p}%.helmet.type} to "Mob"
  354. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  355.  
  356.  
  357.  
  358. format gui slot 18 of {_p} with arrow named "&c<< Go Back" to run:
  359. set {cosmetics.edit.%{_p}%} to "go_back"
  360. close {_p}'s inventory
  361. delete {cosmetics.edit.%{_p}%}
  362. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  363.  
  364.  
  365. function setSkullOwnerMob(p: Player, page: Integer):
  366. wait 1 tick
  367. open chest with 3 rows named "&8Edit SkullOwner" to {_p}
  368.  
  369. #/give @p skull 1 3 {SkullOwner:{Id:"cfdaf903-18cf-4a92-acf2-efa8626cf0b2",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWU5OWRlZWY5MTlkYjY2YWMyYmQyOGQ2MzAyNzU2Y2NkNTdjN2Y4YjEyYjlkY2E4ZjQxYzNlMGEwNGFjMWNjIn19fQ=="}]}}}
  370. #Page > 1 = Page Back
  371. #Page < 3 = Next Page
  372.  
  373. if {_page} is 1:
  374. format gui slot 26 of {_p} with an arrow named "&cNext Page >>" to run:
  375. set {cosmetics.edit.%{_p}%} to "go_back"
  376. close {_p}'s inventory
  377. delete {cosmetics.edit.%{_p}%}
  378. setSkullOwnerMob({_p}, 2)
  379.  
  380. format gui slot 0 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:cfdaf903-18cf-4a92-acf2-efa8626cf0b2,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWU5OWRlZWY5MTlkYjY2YWMyYmQyOGQ2MzAyNzU2Y2NkNTdjN2Y4YjEyYjlkY2E4ZjQxYzNlMGEwNGFjMWNjIn19fQ}]}}}" named "&eBat" to run function setHeadType({_p}, "{SkullOwner:{Id:cfdaf903-18cf-4a92-acf2-efa8626cf0b2,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWU5OWRlZWY5MTlkYjY2YWMyYmQyOGQ2MzAyNzU2Y2NkNTdjN2Y4YjEyYjlkY2E4ZjQxYzNlMGEwNGFjMWNjIn19fQ}]}}}", "Bat")
  381. format gui slot 1 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:7ceb88b2-7f5f-4399-abb9-7068251baa9d,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjc4ZWYyZTRjZjJjNDFhMmQxNGJmZGU5Y2FmZjEwMjE5ZjViMWJmNWIzNWE0OWViNTFjNjQ2Nzg4MmNiNWYwIn19fQ}]}}}" named "&eBlaze" to run function setHeadType({_p}, "{SkullOwner:{Id:7ceb88b2-7f5f-4399-abb9-7068251baa9d,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjc4ZWYyZTRjZjJjNDFhMmQxNGJmZGU5Y2FmZjEwMjE5ZjViMWJmNWIzNWE0OWViNTFjNjQ2Nzg4MmNiNWYwIn19fQ}]}}}", "Blaze")
  382. format gui slot 2 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:39173a7a-c957-4ec1-ac1a-43e5a64983df,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDE2NDVkZmQ3N2QwOTkyMzEwN2IzNDk2ZTk0ZWViNWMzMDMyOWY5N2VmYzk2ZWQ3NmUyMjZlOTgyMjQifX19}]}}}" named "&eCave Spider" to run function setHeadType({_p}, "{SkullOwner:{Id:39173a7a-c957-4ec1-ac1a-43e5a64983df,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDE2NDVkZmQ3N2QwOTkyMzEwN2IzNDk2ZTk0ZWViNWMzMDMyOWY5N2VmYzk2ZWQ3NmUyMjZlOTgyMjQifX19}]}}}", "Cave Spider")
  383. format gui slot 3 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:7d3a8ace-e045-4eba-ab71-71dbf525daf1,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTYzODQ2OWE1OTljZWVmNzIwNzUzNzYwMzI0OGE5YWIxMWZmNTkxZmQzNzhiZWE0NzM1YjM0NmE3ZmFlODkzIn19fQ}]}}}" named "&eChicken" to run function setHeadType({_p}, "{SkullOwner:{Id:7d3a8ace-e045-4eba-ab71-71dbf525daf1,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTYzODQ2OWE1OTljZWVmNzIwNzUzNzYwMzI0OGE5YWIxMWZmNTkxZmQzNzhiZWE0NzM1YjM0NmE3ZmFlODkzIn19fQ}]}}}", "Chicken")
  384. format gui slot 4 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:97ddf3b3-9dbe-4a3b-8a0f-1b19ddeac0bd,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWQ2YzZlZGE5NDJmN2Y1ZjcxYzMxNjFjNzMwNmY0YWVkMzA3ZDgyODk1ZjlkMmIwN2FiNDUyNTcxOGVkYzUifX19}]}}}" named "&eCow" to run function setHeadType({_p}, "{SkullOwner:{Id:97ddf3b3-9dbe-4a3b-8a0f-1b19ddeac0bd,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWQ2YzZlZGE5NDJmN2Y1ZjcxYzMxNjFjNzMwNmY0YWVkMzA3ZDgyODk1ZjlkMmIwN2FiNDUyNTcxOGVkYzUifX19}]}}}", "Cow")
  385. format gui slot 5 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:eed2d903-ca32-4cc7-b33b-ca3bdbe18da4,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQyNTQ4MzhjMzNlYTIyN2ZmY2EyMjNkZGRhYWJmZTBiMDIxNWY3MGRhNjQ5ZTk0NDQ3N2Y0NDM3MGNhNjk1MiJ9fX0}]}}}" named "&eCreeper" to run function setHeadType({_p}, "{SkullOwner:{Id:eed2d903-ca32-4cc7-b33b-ca3bdbe18da4,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQyNTQ4MzhjMzNlYTIyN2ZmY2EyMjNkZGRhYWJmZTBiMDIxNWY3MGRhNjQ5ZTk0NDQ3N2Y0NDM3MGNhNjk1MiJ9fX0}]}}}", "Creeper")
  386. format gui slot 6 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:26f49e8e-2414-40e4-be79-fcf921ad1d12,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjNhOTc2YzA0N2Y0MTJlYmM1Y2IxOTcxMzFlYmVmMzBjMDA0YzBmYWY0OWQ4ZGQ0MTA1ZmNhMTIwN2VkYWZmMyJ9fX0}]}}}" named "&eDonkey" to run function setHeadType({_p}, "{SkullOwner:{Id:26f49e8e-2414-40e4-be79-fcf921ad1d12,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjNhOTc2YzA0N2Y0MTJlYmM1Y2IxOTcxMzFlYmVmMzBjMDA0YzBmYWY0OWQ4ZGQ0MTA1ZmNhMTIwN2VkYWZmMyJ9fX0}]}}}", "Donkey")
  387. format gui slot 7 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:e56a8749-8a4a-40cc-9ded-3c90f8ae8c63,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWM3OTc0ODJhMTRiZmNiODc3MjU3Y2IyY2ZmMWI2ZTZhOGI4NDEzMzM2ZmZiNGMyOWE2MTM5Mjc4YjQzNmIifX19}]}}}" named "&eElder Guardian" to run function setHeadType({_p}, "{SkullOwner:{Id:e56a8749-8a4a-40cc-9ded-3c90f8ae8c63,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWM3OTc0ODJhMTRiZmNiODc3MjU3Y2IyY2ZmMWI2ZTZhOGI4NDEzMzM2ZmZiNGMyOWE2MTM5Mjc4YjQzNmIifX19}]}}}", "Elder Guardian")
  388. format gui slot 8 of {_p} with skull of "%{_p}%" parsed as an offline player with nbt "{SkullOwner:{Id:0de98464-1274-4dd6-bba8-370efa5d41a8,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2E1OWJiMGE3YTMyOTY1YjNkOTBkOGVhZmE4OTlkMTgzNWY0MjQ1MDllYWRkNGU2YjcwOWFkYTUwYjljZiJ9fX0}]}}}" named "&eEnderman" to run function setHeadType({_p}, "{SkullOwner:{Id:0de98464-1274-4dd6-bba8-370efa5d41a8,Properties:{textures:[{Value:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2E1OWJiMGE3YTMyOTY1YjNkOTBkOGVhZmE4OTlkMTgzNWY0MjQ1MDllYWRkNGU2YjcwOWFkYTUwYjljZiJ9fX0}]}}}", "Enderman")
  389.  
  390.  
  391. else if {_page} is 2:
  392. format gui slot 18 of {_p} with an arrow named "&c<< Page Back" to run:
  393. set {cosmetics.edit.%{_p}%} to "go_back"
  394. close {_p}'s inventory
  395. delete {cosmetics.edit.%{_p}%}
  396. setSkullOwnerMob({_p}, 1)
  397.  
  398. format gui slot 26 of {_p} with an arrow named "&cNext Page >>" to run:
  399. set {cosmetics.edit.%{_p}%} to "go_back"
  400. close {_p}'s inventory
  401. delete {cosmetics.edit.%{_p}%}
  402. setSkullOwnerMob({_p}, 3)
  403.  
  404. else if {_page} is 3:
  405. format gui slot 18 of {_p} with an arrow named "&c<< Page Back" to run:
  406. set {cosmetics.edit.%{_p}%} to "go_back"
  407. close {_p}'s inventory
  408. delete {cosmetics.edit.%{_p}%}
  409. setSkullOwnerMob({_p}, 2)
  410.  
  411. format gui slot 22 of {_p} with a barrier named "&4Go Back" to run:
  412. set {cosmetics.edit.%{_p}%} to "go_back"
  413. close {_p}'s inventory
  414. delete {cosmetics.edit.%{_p}%}
  415. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422. function editCos(p: Player, type: String):
  423. wait 2 tick
  424. set {cosmetics.edit.%{_p}%.type} to {_type}
  425. open chest with 1 rows named "&8Choose Category" to {_p}
  426.  
  427. set {_count} to 0
  428. if {@particles} is true:
  429. format gui slot {_count} of {_p} with redstone named "&cParticle" to do nothing
  430. add 1 to {_count}
  431.  
  432. if {@heads} is true:
  433. format gui slot {_count} of {_p} with skull of {_p} named "&2Heads" to do nothing
  434. add 1 to {_count}
  435.  
  436. if {@suits} is true:
  437. format gui slot {_count} of {_p} with golden helmet named "&5Suits" to close then run function editSuit({_p}, {_type})
  438. add 1 to {_count}
  439.  
  440. if {@gadgets} is true:
  441. format gui slot {_count} of {_p} with fire charge named "&bGadgets" to do nothing
  442. add 1 to {_count}
  443.  
  444. if {_count} is 0:
  445. format gui slot 0 of {_p} with barrier named "&4None Enabled" to close
  446.  
  447. function editSuit(p: Player, type: String):
  448. #=========== Variables ===========
  449. set {cosmetics.edit.%{_p}%.type} to {_type}
  450.  
  451. if {cosmetics.edit.%{_p}%.crate} is not set:
  452. set {cosmetics.edit.%{_p}%.crate} to ""
  453.  
  454. if {cosmetics.edit.%{_p}%.helmet} is not set:
  455. set {_helmet} to editCosFormat({_p}, "helmet", "Helmet")
  456.  
  457. else:
  458. set {_helmet} to {cosmetics.edit.%{_p}%.helmet}
  459.  
  460. if {cosmetics.edit.%{_p}%.chestplate} is not set:
  461. set {_chestplate} to editCosFormat({_p}, "chestplate", "Chestplate")
  462.  
  463. else:
  464. set {_chestplate} to {cosmetics.edit.%{_p}%.chestplate}
  465.  
  466. if {cosmetics.edit.%{_p}%.leggings} is not set:
  467. set {_leggings} to editCosFormat({_p}, "leggings", "Leggings")
  468.  
  469. else:
  470. set {_leggings} to {cosmetics.edit.%{_p}%.leggings}
  471.  
  472. if {cosmetics.edit.%{_p}%.boots} is not set:
  473. set {_boots} to editCosFormat({_p}, "boots", "Boots")
  474.  
  475. else:
  476. set {_boots} to {cosmetics.edit.%{_p}%.boots}
  477.  
  478.  
  479. set {_save} to true
  480. if {cosmetics.edit.%{_p}%.type} or {cosmetics.edit.%{_p}%.crate} is "":
  481. set {_save} to false
  482.  
  483. else if {_helmet} and {_chestplate} and {_leggings} and {_boots} is barrier:
  484. set {_save} to false
  485.  
  486. #=========== GUI ===========
  487. #Item doesn't show the proper name
  488.  
  489. open chest with 6 rows named "&8Edit" to {_p}
  490.  
  491. if {cosmetics.edit.%{_p}%.type} is "":
  492. format gui slot 22 of {_p} with a paper named "&7Type: &c<none>" to run:
  493. set {cosmetics.edit.%{_p}%} to "setType"
  494. close {_p}'s inventory
  495. send "{@lobby} Type the new type of your set in the chat" to {_p}
  496.  
  497. else:
  498. format gui slot 22 of {_p} with a paper named "&7Type: &e%{cosmetics.edit.%{_p}%.type}%" to run:
  499. close {_p}'s inventory
  500. set {cosmetics.edit.%{_p}%} to "setType"
  501. send "{@lobby} Type the new type of your set in the chat" to {_p}
  502.  
  503. if {cosmetics.edit.%{_p}%.crate} is "":
  504. format gui slot 31 of {_p} with a chest named "&7Crate: &c<none>" to run:
  505. set {cosmetics.edit.%{_p}%} to "setCrate"
  506. close {_p}'s inventory
  507. send "{@lobby} Type the new crate of your set in the chat" to {_p}
  508. else:
  509. format gui slot 31 of {_p} with a chest named "&7Crate: &e%{cosmetics.edit.%{_p}%.crate}%" to run:
  510. set {cosmetics.edit.%{_p}%} to "setCrate"
  511. close {_p}'s inventory
  512. send "{@lobby} Type the new crate of your set in the chat" to {_p}
  513.  
  514.  
  515.  
  516. format gui slot 10 of {_p} with {_helmet} to run:
  517. set {cosmetics.edit.%{_p}%} to "helmet"
  518. close {_p}'s inventory
  519. delete {cosmetics.edit.%{_p}%}
  520. editPiece({_p}, "helmet", "Helmet", {cosmetics.edit.%{_p}%.type})
  521.  
  522. format gui slot 19 of {_p} with {_chestplate} to run:
  523. set {cosmetics.edit.%{_p}%} to "chestplate"
  524. close {_p}'s inventory
  525. delete {cosmetics.edit.%{_p}%}
  526. editPiece({_p}, "chestplate", "Chestplate", {cosmetics.edit.%{_p}%.type})
  527.  
  528. format gui slot 28 of {_p} with {_leggings} to run:
  529. set {cosmetics.edit.%{_p}%} to "leggings"
  530. close {_p}'s inventory
  531. delete {cosmetics.edit.%{_p}%}
  532. editPiece({_p}, "leggings", "Leggings", {cosmetics.edit.%{_p}%.type})
  533.  
  534.  
  535. format gui slot 37 of {_p} with {_boots} to run:
  536. set {cosmetics.edit.%{_p}%} to "boots"
  537. close {_p}'s inventory
  538. delete {cosmetics.edit.%{_p}%}
  539. editPiece({_p}, "boots", "Boots", {cosmetics.edit.%{_p}%.type})
  540.  
  541. if {_save}:
  542. format gui slot 53 of {_p} with green wool named "&2Save" to run:
  543. close {_p}'s inventory
  544. #Save function
  545.  
  546. else:
  547. format gui slot 53 of {_p} with red wool named "&4Save not possible" to do nothing
  548.  
  549.  
  550.  
  551. function editPiece(p: Player, piece: String, pieceText: String, type: String):
  552. wait 2 tick
  553.  
  554. #=========== Variables ===========
  555. set {cosmetics.edit.%{_p}%.current} to "%{_piece}%"
  556. set {cosmetics.edit.%{_p}%.pieceText} to "%{_pieceText}%"
  557. set {_displayItem} to editCosFormat({_p}, "%{_piece}%", "%{_pieceText}%")
  558.  
  559. if {cosmetics.edit.%{_p}%.%{_piece}%} is not set:
  560. set {cosmetics.edit.%{_p}%.%{_piece}%} to ""
  561.  
  562. if {cosmetics.edit.%{_p}%.%{_piece}%} is "":
  563. set {_item} to an item frame named "&7Item: &c<none>"
  564.  
  565. else:
  566. set {_item} to an item frame named "&7Item: &2%{cosmetics.edit.%{_p}%.%{_piece}%}%"
  567.  
  568. if {cosmetics.edit.%{_p}%.%{_piece}%.name} is not set:
  569. set {cosmetics.edit.%{_p}%.%{_piece}%.displayName} to ""
  570.  
  571. if {cosmetics.edit.%{_p}%.%{_piece}%.name} is "":
  572. set {cosmetics.edit.%{_p}%.%{_piece}%.displayName} to ""
  573.  
  574. if {cosmetics.edit.%{_p}%.%{_piece}%.displayName} is "":
  575. if {_displayItem} is barrier:
  576. set {_itemName} to "&4%{_pieceText}%"
  577.  
  578. else:
  579. set {_itemName} to "&2%{_pieceText}%"
  580.  
  581. else:
  582. set {_itemName} to {cosmetics.edit.%{_p}%.%{_piece}%.name}
  583.  
  584. set name of {_displayItem} to {_itemName}
  585.  
  586. set {cosmetics.edit.%{_p}%.%{_piece}%} to {_displayItem}
  587.  
  588. #=========== GUI ===========
  589. open chest with 3 rows named "&8Edit %{_pieceText}%" to {_p}
  590.  
  591. #Display from your created item
  592. format gui slot 10 of {_p} with {_displayItem} to do nothing
  593. #item, name, enchantment and lore (lore || -> new line (also in message!!!))
  594.  
  595. if {_piece} is "helmet":
  596. set {_string} to "%{cosmetics.edit.%{_p}%.helmet}%"
  597. set {_split::*} to {_string} split at " "
  598.  
  599. if contains({_split::*}, "head"):
  600. if {cosmetics.edit.%{_p}%.helmet.type} is set:
  601. set {_changeType} to a redstone torch on named "&7Skull Type: &e%{cosmetics.edit.%{_p}%.helmet.type}%"
  602.  
  603. else:
  604. set {_changeType} to a redstone torch on named "&7Skull Type: &c<none>"
  605.  
  606. if {cosmetics.edit.%{_p}%.helmet.type} is "Player" or "Mob":
  607. if {cosmetics.edit.%{_p}%.helmet.player} is set:
  608. set {cosmetics.edit.%{_p}%.helmet.skull} to skull of "%{_p}%" parsed as an offline player with nbt "%{cosmetics.edit.%{_p}%.helmet.player}%" named "&7Skull Owner: &e%{cosmetics.edit.%{_p}%.helmet.player.name}%"
  609.  
  610. else:
  611. set {cosmetics.edit.%{_p}%.helmet.skull} to skull of ("MHF_Steve" parsed as an offline player) named "&7Skull Owner: &c<none>"
  612.  
  613. format gui slot 1 of {_p} with {_changeType} to run:
  614. set {cosmetics.edit.%{_p}%} to "go_back"
  615. close {_p}'s inventory
  616. delete {cosmetics.edit.%{_p}%}
  617. setSkullType({_p})
  618.  
  619. format gui slot 19 of {_p} with {cosmetics.edit.%{_p}%.helmet.skull} to run:
  620. if {cosmetics.edit.%{_p}%.helmet.type} is "Player":
  621. send "Player" to {_p}
  622. set {cosmetics.edit.%{_p}%} to "setSkullOwner"
  623. close {_p}'s inventory
  624. #Via message naam van de speler typen
  625.  
  626. else if {cosmetics.edit.%{_p}%.helmet.type} is "Mob":
  627. set {cosmetics.edit.%{_p}%} to "go_back"
  628. close {_p}'s inventory
  629. delete {cosmetics.edit.%{_p}%}
  630. setSkullOwnerMob({_p}, 1)
  631.  
  632.  
  633.  
  634. format gui slot 18 of {_p} with arrow named "&c<< Go Back" to run:
  635. set {cosmetics.edit.%{_p}%} to "go_back"
  636. close {_p}'s inventory
  637. delete {cosmetics.edit.%{_p}%}
  638. editSuit({_p}, {_type})
  639.  
  640.  
  641. format gui slot 12 of {_p} with {_item} to run:
  642. set {cosmetics.edit.%{_p}%} to "set%{_pieceText}%Item"
  643. close {_p}'s inventory
  644. send "{@lobby} Type the new crate of the %{_piece}% in the chat" to {_p}
  645.  
  646.  
  647.  
  648.  
  649.  
  650. #------------------- Periotic Events -------------------
  651.  
  652.  
  653.  
  654.  
  655.  
  656. #------------------- Events -------------------
  657. on enable:
  658. if file "{@config}" doesn't exist:
  659. create file "{@config}"
  660.  
  661. set yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml" to true
  662. set yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml" to true
  663. set yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml" to "Window1"
  664. set yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml" to true
  665. set yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml" to true
  666. set yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml" to true
  667. set yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml" to true
  668.  
  669. else:
  670. if yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml" is not set:
  671. set yml value "Lobby.Crates.Animations.Window1" of file "Files/Lobby/config.yml" to true
  672. if yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml" is not set:
  673. set yml value "Lobby.Crates.Animations.Random.Enabled" of file "Files/Lobby/config.yml" to true
  674. if yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml" is not set:
  675. set yml value "Lobby.Crates.Animations.Random.DisabledAnimation" of file "Files/Lobby/config.yml" to "Window1"
  676.  
  677. if yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml" is not set:
  678. set yml value "Lobby.Crates.Particles.Enabled" of file "Files/Lobby/config.yml" to true
  679. if yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml" is not set:
  680. set yml value "Lobby.Crates.Heads.Enabled" of file "Files/Lobby/config.yml" to true
  681. if yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml" is not set:
  682. set yml value "Lobby.Crates.Suits.Enabled" of file "Files/Lobby/config.yml" to true
  683. if yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml" is not set:
  684. set yml value "Lobby.Crates.Gadgets.Enabled" of file "Files/Lobby/config.yml" to true
  685.  
  686.  
  687. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  688.  
  689. loop {_list::*}:
  690. set {_world} to world of {lobby.location}
  691. loop {lobbycr.%loop-value%.location::*}:
  692. set {holo-crate-%{_world}%-%loop-value-2%} to a new hologram at block above loop-value-2
  693. add text "&a&l%loop-value-1%" to hologram {holo-crate-%{_world}%-%loop-value-2%}
  694.  
  695. on disable:
  696. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  697. set {_world} to world of {lobby.location}
  698.  
  699. loop {_list::*}:
  700. delete yml list "Locations" of file "{@path}/%loop-value%.yml"
  701. loop {lobbycr.%loop-value%.location::*}:
  702. add "%loop-value-2%" to yml list "Locations" of file "{@path}/%loop-value-1%.yml"
  703. unregister hologram {holo-crate-%{_world}%-%loop-value-2%}
  704.  
  705. loop {crates.openinglist::*}:
  706. clear {crates.opening.%loop-value%}
  707. clear {crates.%loop-value%.inv::*}
  708. clear {crates.%loop-value%.name}
  709. clear {crate.closed.%loop-value%}
  710.  
  711. clear {crates.openinglist::*}
  712.  
  713. on join:
  714. if {lobby.location} is set:
  715. teleport player to {lobby.location}
  716. set join message to ""
  717. wait 10 ticks
  718.  
  719. clear player's inventory
  720. send "{@lobby} &fThe player %player% has joined!" to all players in world of player
  721. set slot 4 of player to a compass named "{@lcompass}"
  722.  
  723. on quit:
  724. if {crates.opening.%player%} is set:
  725. clear {crates.opening.%player%}
  726. clear {crates.%player%.inv::*}
  727. clear {crates.%player%.name}
  728. clear {crates.closed.%player%}
  729. remove player from {crates.openinglist::*}
  730.  
  731. delete {cosmetics.edit.%player%.helmet}
  732. delete {cosmetics.edit.%player%.chestplate}
  733. delete {cosmetics.edit.%player%.leggings}
  734. delete {cosmetics.edit.%player%.boots}
  735.  
  736. delete {cosmetics.edit.%player%.type}
  737. delete {cosmetics.edit.%player%.current}
  738. delete {cosmetics.edit.%player%.crate}
  739. delete {cosmetics.edit.%player%.pieceText}
  740. delete {cosmetics.edit.%player%.helmet.name}
  741. delete {cosmetics.edit.%player%.helmet.lore::*}
  742. delete {cosmetics.edit.%player%.helmet.ench::*}
  743. delete {cosmetics.edit.%player%.chestplate.name}
  744. delete {cosmetics.edit.%player%.chestplate.lore::*}
  745. delete {cosmetics.edit.%player%.chestplate.ench::*}
  746. delete {cosmetics.edit.%player%.leggings.name}
  747. delete {cosmetics.edit.%player%.leggings.lore::*}
  748. delete {cosmetics.edit.%player%.leggings.ench::*}
  749. delete {cosmetics.edit.%player%.boots.name}
  750. delete {cosmetics.edit.%player%.boots.lore::*}
  751. delete {cosmetics.edit.%player%.boots.ench::*}
  752. delete {cosmetics.edit.%player%.helmet.helmet.type}
  753. delete {cosmetics.edit.%player%.helmet.player}
  754. delete {cosmetics.edit.%player%.helmet.type}
  755. delete {cosmetics.edit.%player%.helmet.skull}
  756.  
  757.  
  758. on command:
  759. command is "plugins" or "pl":
  760. cancel event
  761.  
  762. if player is not op:
  763. stop
  764.  
  765. else:
  766. set {_list::*} to list of plugins
  767. set {_count} to 0
  768. loop {_list::*}:
  769. add 1 to {_count}
  770. send "{@logo} Plugin list:%nl%&f(&a%{_count}%&f) &2%list of plugins%"
  771.  
  772. else:
  773. set {cmd} to "%command to lower case%"
  774.  
  775. on damage:
  776. if world of victim is world of {lobby.location}:
  777. if damage cause is "void" parsed as a damage cause:
  778. set victim's health to 0
  779.  
  780. else:
  781. cancel event
  782.  
  783. on death:
  784. if world of player is world of {lobby.location}:
  785. set death message to ""
  786.  
  787. on respawn:
  788. if world of player is world of {lobby.location}:
  789. set slot 4 of player to a compass named "{@lcompass}"
  790. teleport player to {lobby.location}
  791.  
  792. on inventory click:
  793. if player is in world of {lobby.location}:
  794. if clicked item is a compass named "{@lcompass}":
  795. cancel event
  796. close player's inventory
  797. openCompass(player)
  798.  
  799. on click:
  800. if player is in world of {lobby.location}:
  801. if player's held item is a compass named "{@lcompass}":
  802. cancel event
  803. openCompass(player)
  804.  
  805. on place of chest:
  806. set {_world} to world of event-block
  807. if {_world} is world of {lobby.location}:
  808. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  809. if contains({_list::*}, "%uncolored name of player's tool%"):
  810.  
  811. add location of block at event-block to {lobbycr.%uncolored name of player's tool%.location::*}
  812. add world of event-block to {lobbycr.%uncolored name of player's tool%.world::*}
  813.  
  814. set {holo-crate-%world of event-block%-%location of event-block%} to new hologram at location 1 meters above event-block
  815. add text "&a&l%uncolored name of player's tool%" to hologram {holo-crate-%world of event-block%-%location of event-block%}
  816. add "%location of block at event-block%" to yml list "Locations" of file "{@path}/%uncolored name of player's tool%.yml"
  817.  
  818. send "{@lobby} &2Succesfully created a &a%uncolored name of player's tool% &2Crate!"
  819.  
  820. on break of chest:
  821. set {_world} to world of event-block
  822. if {_world} is world of {lobby.location}:
  823. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  824. loop {_list::*}:
  825. loop {lobbycr.%loop-value-1%.location::*}:
  826. if loop-value-2 is location of event-block:
  827. remove location of block at event-block from {lobbycr.%loop-value-1%.location::*}
  828. remove world of event-block from {lobbycr.%loop-value-1%.world::*}
  829.  
  830. unregister hologram {holo-crate-%world of event-block%-%location of event-block%}
  831. delete {holo-crate-%world of event-block%-%location of event-block%}
  832. remove "%location of event-block%" from yml list "Locations" of file "{@path}/%loop-value-1%.yml"
  833.  
  834. send "{@lobby} &2Succesfully removed a &a%loop-value-1% &2Crate!"
  835.  
  836. on rightclick on a chest:
  837. set {_world} to world of clicked block
  838. if {_world} is "%world of {lobby.location}%":
  839.  
  840. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  841. loop {_list::*}:
  842.  
  843. loop {lobbycr.%loop-value-1%.location::*}:
  844. if "%loop-value-2%" is "%location of clicked block%":
  845. cancel event
  846. if "%uncolored {crate.%player%.name}%" = loop-value-1:
  847. if {crates.opening.%player%} is true:
  848. open chest with 3 rows named "&2%{crate.%player%.name}%" to player
  849.  
  850. set {crates.reopening.%player%} to true
  851. set {_count} to 0
  852. loop 27 times:
  853. if {crate.%player%.inv::%{_count}%} is set:
  854. set {_value} to "%{crate.%player%.inv::%{_count}%}%"
  855. set {_color::*} to {_value} split at " "
  856.  
  857. if contains({_color::*}, "glass") is true:
  858. if contains({_color::*}, "light") is true:
  859. format gui slot {_count} of player with ("light %{_color::2}% stained glass pane" parsed as an item) to do nothing
  860.  
  861. else if contains({_color::*}, "dark") is true:
  862. format gui slot {_count} of player with ("dark %{_color::2}% stained glass pane" parsed as an item) to do nothing
  863.  
  864. else:
  865. format gui slot {_count} of player with ("%{_color::1}% stained glass pane" parsed as an item) to do nothing
  866.  
  867. else:
  868. format gui slot {_count} of player with ({crate.%player%.inv::%{_count}%} parsed as an item) to do nothing
  869.  
  870.  
  871. add 1 to {_count}
  872.  
  873. delete {crates.closed.%player%}
  874. delete {crates.openinglist::*}
  875. delete {crate.%player%.inv::*}
  876. delete {crate.%player%.name}
  877.  
  878.  
  879. else:
  880. open chest with 3 rows named "&2%loop-value-1%" to player
  881. 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%")
  882. stop loop
  883. else:
  884. open chest with 3 rows named "&2%loop-value-1%" to player
  885. 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%")
  886. stop loop
  887.  
  888. on inventory close:
  889. if {crates.opening.%player%} is true:
  890. set {crates.closed.%player%} to true
  891. add player to {crates.openinglist::*}
  892. clear {crate.%player%.inv::*}
  893. set {crate.%player%.name} to name of player's current inventory
  894. set {_count} to 0
  895.  
  896.  
  897. loop 27 times:
  898. set {crate.%player%.inv::%{_count}%} to slot {_count} of player's current inventory
  899. add 1 to {_count}
  900.  
  901. else if {crates.opening.%player%} is set:
  902. delete {crates.opening.%player%}
  903.  
  904. if name of current inventory of player is "&8Edit" or "&8Edit Helmet" or "&8Edit Chestplate" or "&8Edit Leggings" or "&8Edit Boots" or "&8Choose Category" or "&8Choose Type" or "&8Edit SkullOwner":
  905. if {cosmetics.edit.%player%} is not set:
  906. delete {cosmetics.edit.%player%.helmet}
  907. delete {cosmetics.edit.%player%.chestplate}
  908. delete {cosmetics.edit.%player%.leggings}
  909. delete {cosmetics.edit.%player%.boots}
  910.  
  911. delete {cosmetics.edit.%player%.type}
  912. delete {cosmetics.edit.%player%.current}
  913. delete {cosmetics.edit.%player%.crate}
  914. delete {cosmetics.edit.%player%.pieceText}
  915. delete {cosmetics.edit.%player%.helmet.name}
  916. delete {cosmetics.edit.%player%.helmet.lore::*}
  917. delete {cosmetics.edit.%player%.helmet.ench::*}
  918. delete {cosmetics.edit.%player%.chestplate.name}
  919. delete {cosmetics.edit.%player%.chestplate.lore::*}
  920. delete {cosmetics.edit.%player%.chestplate.ench::*}
  921. delete {cosmetics.edit.%player%.leggings.name}
  922. delete {cosmetics.edit.%player%.leggings.lore::*}
  923. delete {cosmetics.edit.%player%.leggings.ench::*}
  924. delete {cosmetics.edit.%player%.boots.name}
  925. delete {cosmetics.edit.%player%.boots.lore::*}
  926. delete {cosmetics.edit.%player%.boots.ench::*}
  927. delete {cosmetics.edit.%player%.helmet.helmet.type}
  928. delete {cosmetics.edit.%player%.helmet.player}
  929. delete {cosmetics.edit.%player%.helmet.type}
  930. delete {cosmetics.edit.%player%.helmet.skull}
  931.  
  932.  
  933.  
  934. on chat:
  935. if {cosmetics.edit.%player%} is set:
  936. cancel event
  937.  
  938. if {cosmetics.edit.%player%} is "set%{cosmetics.edit.%player%.pieceText}%Item":
  939. if "%message%" is "cancel":
  940. send "{@lobby} Cancelled setting the %{cosmetics.edit.%player%.pieceText} to lower case%."
  941. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  942. delete {cosmetics.edit.%player%}
  943.  
  944. else if "%message%" parsed as an item type is not set:
  945. send "{@lobby} &c%message% &4is not a a %{cosmetics.edit.%player%.pieceText} to lower case%!"
  946.  
  947. else:
  948. if {cosmetics.edit.%player%.type} is not set:
  949. set {cosmetics.edit.%player%.type} to ""
  950.  
  951. set {_var} to "%message%"
  952. replace all " " in {_var} with "_"
  953.  
  954. if {_var} contains "_":
  955. set {_message::*} to {_var} split at "_"
  956.  
  957. if ({cosmetics.edit.%player%.pieceText} to lower case) is "helmet":
  958. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  959.  
  960. if contains({_message::*}, "helmet"):
  961. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  962.  
  963. else if "%message%" = "head":
  964. set {cosmetics.edit.%player%.%{_piece}%} to "head"
  965.  
  966. else if contains({_message::*}, "head"):
  967. set {cosmetics.edit.%player%.%{_piece}%} to "head"
  968.  
  969. else:
  970. send "{@lobby} &c%message% &4is not a helmet!"
  971. stop
  972.  
  973. send "{@lobby} Succesfully set helmet to &a%message%"
  974.  
  975. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  976. delete {cosmetics.edit.%player%}
  977.  
  978. else if ({cosmetics.edit.%player%.pieceText} to lower case) is "chestplate":
  979. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  980.  
  981. if contains({_message::*}, "chestplate") or contains({_message::*}, "tunic"):
  982. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  983.  
  984. else:
  985. send "{@lobby} &c%message% &4is not a chestplate!"
  986. stop
  987.  
  988. send "{@lobby} Succesfully set chestplate to &a%message%"
  989.  
  990. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  991. delete {cosmetics.edit.%player%}
  992.  
  993.  
  994. else if ({cosmetics.edit.%player%.pieceText} to lower case) is "leggings":
  995. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  996.  
  997. if contains({_message::*}, "leggings"):
  998. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  999.  
  1000. else:
  1001. send "{@lobby} &c%message% &4are no leggings!"
  1002. stop
  1003.  
  1004. send "{@lobby} Succesfully set leggings to &a%message%"
  1005.  
  1006. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  1007. delete {cosmetics.edit.%player%}
  1008.  
  1009. else if ({cosmetics.edit.%player%.pieceText} to lower case) is "boots":
  1010. set {_piece} to ("%{cosmetics.edit.%player%.pieceText}%" to lower case)
  1011.  
  1012. if contains({_message::*}, "boots"):
  1013. set {cosmetics.edit.%player%.%{_piece}%} to "%message to lower case%"
  1014.  
  1015. else:
  1016. send "{@lobby} &c%message% &4are no boots!"
  1017. stop
  1018.  
  1019. send "{@lobby} Succesfully set boots to &a%message%"
  1020.  
  1021. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  1022. delete {cosmetics.edit.%player%}
  1023.  
  1024.  
  1025. else:
  1026. send "{@lobby} &c%message% &4is not a %{cosmetics.edit.%player%.pieceText} to lower case%!"
  1027.  
  1028. else if {cosmetics.edit.%player%} is "setType":
  1029. if "%message%" is "cancel":
  1030. send "{@lobby} Cancelled setting the type."
  1031. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  1032. delete {cosmetics.edit.%player%}
  1033.  
  1034. set {cosmetics.edit.%player%.type} to "%message%"
  1035. delete {cosmetics.edit.%player%}
  1036.  
  1037. send "{@lobby} Succesfully set type to &a%message%"
  1038. editSuit(player, {cosmetics.edit.%player%.type})
  1039.  
  1040.  
  1041. else if {cosmetics.edit.%player%} is "setCrate":
  1042. if "%message%" is "cancel":
  1043. send "{@lobby} Cancelled setting the crate."
  1044. editPiece(player, {cosmetics.edit.%player%.current}, {cosmetics.edit.%player%.pieceText}, {cosmetics.edit.%player%.type})
  1045. delete {cosmetics.edit.%player%}
  1046.  
  1047. else:
  1048. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1049. if contains({_list::*}, "%message to lower case%"):
  1050. set {cosmetics.edit.%player%.crate} to "%message to lower case%"
  1051. editSuit(player, {cosmetics.edit.%player%.type})
  1052. delete {cosmetics.edit.%player%}
  1053. else:
  1054. send "{@lobby} &c%message% &4is not a valid crate!"
  1055.  
  1056. else if world of player is world of {lobby.location}:
  1057. cancel event
  1058. send "&7[&e%player%&7] &8>> &f%message%" to all players in world of player
  1059. send "&7[&eLobby&7][&e%player%&7] &f>> %message%" to console
  1060.  
  1061.  
  1062. #------------------- Commands -------------------
  1063. command /lobby [<text>] [<text>]:
  1064. aliases: /hub
  1065. trigger:
  1066. if player has permission "lobby.*":
  1067. if arg-1 is set:
  1068. if arg-1 is "help":
  1069. send "&2----------[ &a%{cmd}% &2]----------"
  1070. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1071. send "&e&o/%{cmd}% set &d→ &fSet the lobby"
  1072. send "&2----------[ &a%{cmd}% &2]----------"
  1073.  
  1074. else if arg-1 is "set":
  1075. send "{@logo} &2Succesfully set the &a%{cmd}% &2to your location!"
  1076. set {lobby.location} to location of player
  1077.  
  1078. else:
  1079. if {lobby.location} is set:
  1080. if world of player is not "%world of {lobby.location}%":
  1081. teleport player to {lobby.location}
  1082. send "{@lobby} &fThe player %player% went to the lobby!" to all players in world of player
  1083. clear player's inventory
  1084. set slot 4 of player to a compass named "{@lcompass}"
  1085.  
  1086. else:
  1087. teleport player to {lobby.location}
  1088.  
  1089. else:
  1090. send "{@lobby} &cThe %{cmd}% is not set yet!"
  1091.  
  1092.  
  1093. else if {lobby.location} is set:
  1094. if world of player is not "%world of {lobby.location}%":
  1095. teleport player to {lobby.location}
  1096. send "{@lobby} &fThe player %player% went to the lobby!" to all players in world of player
  1097. clear player's inventory
  1098. set slot 4 of player to a compass named "{@lcompass}"
  1099.  
  1100. else:
  1101. teleport player to {lobby.location}
  1102.  
  1103. else:
  1104. send "{@lobby} &cThe %{cmd}% is not set yet!"
  1105.  
  1106.  
  1107. command /lobbycompass [<text>] [<text>] [<text>]:
  1108. aliases: /lcomp, /lcompass
  1109. trigger:
  1110. if player has permission "lobbycompass.*":
  1111. if arg 1 is not set:
  1112. send "{@lobby} &4Do &c&o/%{cmd}% help &4for more info."
  1113.  
  1114. else if arg 1 is set:
  1115. if arg 1 is "help":
  1116. send "&2----------[ &a%{cmd}% &2]----------"
  1117. send "&e&o/%{cmd}% help &d→ &fKrijg help pagina"
  1118. send "&e&o/%{cmd}% create <minigame> &d→ &fCreate a minigame"
  1119. send "&e&o/%{cmd}% remove/delete <minigame> &d→ &fDelete a minigame"
  1120. send "&e&o/%{cmd}% setspawn <minigame> &d→ &fSet the spawn of a minigame"
  1121. send "&e&o/%{cmd}% slot <minigame> <number> &d→ &fSet the GUI slot of a minigame"
  1122.  
  1123. send "&e&o/%{cmd}% setname <minigame> <name> &d→ &fSet a name"
  1124. send "&e&o/%{cmd}% deletename <minigame> &d→ &fDelete the name of a minigame"
  1125. send "&e&o/%{cmd}% setlore <minigame> <lore> &d→ &fSet a lore"
  1126. send "&e&o/%{cmd}% deletelore <minigame> <minigame> &d→ &fDelete the lore of a minigame"
  1127. send "&e&o/%{cmd}% setitem <minigame> <item> &d→ &fSet the item of a minigame"
  1128. send "&e&o/%{cmd}% list &d→ &fGet a list of all the minigames"
  1129. send "&e&o/%{cmd}% setrows <number> &d→ &fSet the amount of rows in the GUI"
  1130. send "&e&o/%{cmd}% gui <minigame> &d→ &fOpen the config-GUI"
  1131. send "&2----------[ &a%{cmd}% &2]----------"
  1132.  
  1133. else if arg 1 is "create":
  1134. if arg 2 is set:
  1135. if {lobby.minigames.%arg 2%} is not set:
  1136. set {lobby.minigames.%arg 2%} to true
  1137. set {lobby.minigames.%arg 2%.name} to "&cNone"
  1138. set {lobby.minigames.%arg 2%.lore} to "&cNone"
  1139. set {lobby.minigames.%arg 2%.item} to "&cNone"
  1140. set {lobby.minigames.%arg 2%.slot} to "&cNone"
  1141. set {lobby.minigames.%arg 2%.spawn} to "&cNone"
  1142. add arg 2 to {lobby.minigames.list::*}
  1143.  
  1144. send "{@lobby} &2Succesfully made the minigame &a%arg 2%&2!"
  1145.  
  1146. else:
  1147. send "{@lobby} &4The minigame &c%arg 2% &4already exists!"
  1148. else:
  1149. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1% <minigame>&4."
  1150.  
  1151. else if arg 1 is "delete" or "remove":
  1152. if arg 2 is set:
  1153. if {lobby.minigames.%arg 2%} is set:
  1154. delete {lobby.minigames.%arg 2%}
  1155. delete {lobby.minigames.%arg 2%.name}
  1156. delete {lobby.minigames.%arg 2%.lore}
  1157. delete {lobby.minigames.%arg 2%.item}
  1158. delete {lobby.minigames.%arg 2%.slot}
  1159. delete {lobby.minigames.%arg 2%.spawn}
  1160. remove arg 2 from {lobby.minigames.list::*}
  1161.  
  1162. send "{@lobby} &2Succesfully removed the minigame &a%arg 2%&2!"
  1163.  
  1164. else:
  1165. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1166. else:
  1167. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1168.  
  1169.  
  1170. else if arg 1 is "setspawn":
  1171. if arg 2 is set:
  1172. if {lobby.minigames.%arg 2%} is set:
  1173. set {lobby.minigames.%arg 2%.spawn} to location of player
  1174. send "{@lobby} &2Succesfully set the spawn of the minigame%nl%&a%arg 2% &2arg &a%location of player%&2!"
  1175.  
  1176. else:
  1177. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1178. else:
  1179. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1180.  
  1181. else if arg 1 is "slot":
  1182. if arg 2 is set:
  1183. if {lobby.minigames.%arg 2%} is set:
  1184. if arg 3 is set:
  1185. if (arg 3 parsed as a number) is set:
  1186. if {lobby.compassRows} is not set:
  1187. set {lobby.compassRows} to 1
  1188.  
  1189. if {lobby.compassRows} < 1:
  1190. set {lobby.compassRows} to 1
  1191.  
  1192.  
  1193. if {lobby.compassRows}*9-1 < arg-3 parsed as a number:
  1194. send "{@lobby} &4The amount &c%arg 3% &4is to large bacause the max amount of slots is &c%{lobby.compassRows}*9+1%&4!"
  1195.  
  1196. else:
  1197. loop {lobby.minigames.list::*}:
  1198. if {lobby.minigames.%loop-value%.slot} is arg 3:
  1199. set {_set} to loop-value
  1200. stop loop
  1201.  
  1202. if {_set} is set:
  1203. send "{@lobby} &4The slot &c%arg 3% &4is already in use by the minigame &c%{_set}%&4!"
  1204. else:
  1205. set {lobby.minigames.%arg 2%.slot} to arg 3
  1206. send "{@lobby} &2Succesfully set the slot of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1207. else:
  1208. send "{@lobby} &c%arg 3% &4is not a number!"
  1209. else:
  1210. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <number>&4."
  1211. else:
  1212. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1213. else:
  1214. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <number>&4."
  1215.  
  1216.  
  1217. else if arg 1 is "setname":
  1218. if arg 2 is set:
  1219. if {lobby.minigames.%arg 2%} is set:
  1220. if arg 3 is set:
  1221. set {lobby.minigames.%arg 2%.name} to arg 3
  1222. send "{@lobby} &2Succesfully set the name of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1223.  
  1224. else:
  1225. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <name>&4."
  1226. else:
  1227. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1228. else:
  1229. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <name>&4."
  1230.  
  1231. else if arg 1 is "delname" or "deletename":
  1232. if arg 2 is set:
  1233. delete {lobby.minigames.%arg 2%.name}
  1234. send "{@lobby} &2Succesfully deleted the name from the minigame &a%arg 2%&2!"
  1235.  
  1236. else:
  1237. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1238.  
  1239. else if arg 1 is "setlore":
  1240. if arg 2 is set:
  1241. if {lobby.minigames.%arg 2%} is set:
  1242. if arg 3 is set:
  1243. set {lobby.minigames.%arg 2%.lore} to arg 3
  1244. send "{@lobby} &2Succesfully set the lore of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1245.  
  1246. else:
  1247. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <lore>&4."
  1248. else:
  1249. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1250. else:
  1251. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <lore>&4."
  1252.  
  1253. else if arg 1 is "dellore" or "deletelore":
  1254. if arg 2 is set:
  1255. if {lobby.minigames.%arg 2%} is set:
  1256. delete {lobby.minigames.%arg 2%.lore}
  1257. send "{@lobby} &2Succesfully deleted the lore from the minigame &a%arg 2%&2!"
  1258.  
  1259. else:
  1260. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1261. else:
  1262. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <name>&4."
  1263.  
  1264. else if arg 1 is "setitem":
  1265. if arg 2 is set:
  1266. if {lobby.minigames.%arg 2%} is set:
  1267. if arg 3 is set:
  1268. if (arg 3 parsed as an item) is set:
  1269. set {lobby.minigames.%arg 2%.item} to arg 3 parsed as an item
  1270. send "{@lobby} &2Succesfully set the item from the minigame &a%arg 2% &2to &a%arg 3%&2!"
  1271.  
  1272. else:
  1273. send "{@lobby} &c%arg 3% &4is not an item!"
  1274. else:
  1275. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <item>&4."
  1276. else:
  1277. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1278. else:
  1279. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <item>&4."
  1280.  
  1281.  
  1282. else if arg 1 is "list":
  1283. if {lobby.minigames.list::*} is not empty:
  1284. loop {lobby.minigames.list::*}:
  1285. if {_list} is set:
  1286. set {_list} to "%{_list}%&2, &a%loop-value%"
  1287. else:
  1288. set {_list} to "%loop-value%"
  1289.  
  1290. else:
  1291. set {_list} to "Geen"
  1292.  
  1293. send "{@lobby} &2This is the list of all the minigames:%nl%&a%{_list}%"
  1294.  
  1295.  
  1296. else if arg 1 is "setrows":
  1297. if arg 2 is set:
  1298. if (arg 2 parsed as a number) is set:
  1299. if (arg-2 parsed as a number) < 7:
  1300. set {lobby.compassRows} to (arg-2 parsed as a number)
  1301. send "{@lobby} &2Succesfully set the amount of rows to &a%arg 2%&2!"
  1302.  
  1303. else:
  1304. send "{@lobby} &4The max amount of rows is &c6&4!"
  1305. else:
  1306. send "{@lobby} &c%arg 2% &4is not a number!"
  1307. else:
  1308. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <number>&4."
  1309.  
  1310.  
  1311. else if arg 1 is "gui":
  1312. if arg 2 is set:
  1313. if {lobby.minigames.%arg 2%} is set:
  1314. open chest with 2 rows named "&7Config GUI" to player
  1315.  
  1316. set {_name} to {lobby.minigames.%arg 2%.name}
  1317. replace "&" in {_name} with "§"
  1318.  
  1319. set {_lore} to {lobby.minigames.%arg 2%.lore}
  1320. replace "&" in {_lore} with "§"
  1321.  
  1322. format gui slot 2 of player with a book named "&2Minigame: &a%arg-2%" to do nothing
  1323. 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)
  1324. 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)
  1325. 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)
  1326. 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)
  1327.  
  1328. 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)
  1329. format gui slot 13 of player with a barrier named "&cClose menu" to close
  1330. 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)
  1331.  
  1332. else:
  1333. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  1334. else:
  1335. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  1336. else:
  1337. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  1338.  
  1339. command /lobbycrate [<text>] [<text>]:
  1340. aliases: /lobbycr, /lcrate
  1341. trigger:
  1342. if player is in world of {lobby.location}:
  1343. if player has permission "votecrate.*":
  1344. if arg-1 is set:
  1345. if arg-1 is "help":
  1346. send "&2----------[ &a%{cmd}% &2]----------"
  1347. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1348. send "&e&o/%{cmd}% list &d→ &fGet a list with all crates"
  1349. send "&e&o/%{cmd}% create <crate> &d→ &fCreate a create"
  1350. send "&e&o/%{cmd}% delete/remove <crate> &d→ &fDelete a crate"
  1351. send "&e&o/%{cmd}% path <crate> &d→ &fGet the edit path of a crate"
  1352. send "&e&o/%{cmd}% get <crate> &d→ &fGet a crate"
  1353.  
  1354. send "&2----------[ &a%{cmd}% &2]----------"
  1355.  
  1356. else if arg-1 is "list":
  1357. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1358. if {_list::*} is not empty:
  1359. loop {_list::*}:
  1360. if {_list} is set:
  1361. set {_list} to "%{_list}%&2, &a%loop-value%"
  1362. else:
  1363. set {_list} to "%loop-value%"
  1364.  
  1365. send "{@lobby} &2There are the following crates:%nl%&a%{_list}%"
  1366.  
  1367. else:
  1368. send "{@lobby} &2There are no crates made yet."
  1369.  
  1370.  
  1371. else if arg-1 is "create":
  1372. if arg-2 is set:
  1373. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1374. set {_arg2} to "%arg-2 to lower case%"
  1375. if contains({_list::*}, {_arg2}):
  1376. send "{@lobby} &4The crate &c%{_arg2}% &4already exists!"
  1377.  
  1378.  
  1379. else:
  1380.  
  1381. send "{@lobby} &2Making the crate &a%{_arg2}%&2..."
  1382. add {_arg2} to yml list "Lobby.Crates.List" of file "{@config}"
  1383. create file "{@path}/%{_arg2}%.yml"
  1384. add "diamond_sword" to yml list "Item.List" of file "{@path}/%{_arg2}%.yml"
  1385. add "diamond_sword-1" to yml list "Item.ConfigName" of file "{@path}/%{_arg2}%.yml"
  1386.  
  1387. set yml value "Item.Chance.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to "100"
  1388. set yml value "Item.Name.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to "&aDiamond Sword"
  1389. set yml value "Item.Amount.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to 1
  1390.  
  1391. add "This is a lore" to yml list "Item.Lore.diamond_sword-1" of file "{@path}/%{_arg2}%.yml"
  1392.  
  1393. add "sharpness:1" to yml list "Item.Enchants.diamond_sword-1" of file "{@path}/%{_arg2}%.yml"
  1394.  
  1395. send "{@lobby} &2Succesfully made the crate &a%{_arg2}%&2!"
  1396.  
  1397.  
  1398. else:
  1399. send "{@lobby} &4You need to give up a &cname &4for the crate!"
  1400.  
  1401. else if arg-1 is "delete" or "remove":
  1402. if arg-2 is set:
  1403. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1404. set {_arg2} to "%arg-2 to lower case%"
  1405. if contains({_list::*}, {_arg2}):
  1406. send "{@lobby} &2Deleting the crate &a%{_arg2}%&2..."
  1407.  
  1408. remove "%{_arg2}%" from yml list "Lobby.Crates.List" of file "{@config}"
  1409. delete file "{@path}/%{_arg2}%.yml"
  1410.  
  1411. send "{@lobby} &2Succesfully deleted the crate &a%{_arg2}%&2!"
  1412.  
  1413. else:
  1414. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exist!"
  1415.  
  1416. else:
  1417. send "{@lobby} &4You need to give up a &cname &4of the crate you want to delete!"
  1418.  
  1419. else if arg-1 is "path":
  1420. if arg-2 is set:
  1421. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1422. set {_arg2} to "%arg-2 to lower case%"
  1423.  
  1424. if contains({_list::*}, {_arg2}):
  1425. send "{@lobby} &2Location of %{_arg2}%: &a{@path}/%{_arg2}%&2."
  1426.  
  1427.  
  1428. else:
  1429. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exists!"
  1430. else:
  1431. send "{@lobby} &4You need to give up a &cname &4of the crate you want to get the path of!"
  1432.  
  1433. else if arg-1 is "get":
  1434. if arg 2 is set:
  1435. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1436. set {_arg2} to "%arg-2 to lower case%"
  1437. if contains({_list::*}, {_arg2}):
  1438. send "{@lobby} &2Here you have the &a%{_arg2}% &2crate!%nl%&2Place it to create a chest."
  1439. give player 1 chest named "&e%{_arg2}%" with lore "&7Place to create a crate!"
  1440. else:
  1441. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exist!"
  1442. else:
  1443. send "{@lobby} &4You must give up a crate type!"
  1444.  
  1445. else:
  1446. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  1447. else:
  1448. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  1449.  
  1450.  
  1451. command /key [<text>] [<text>] [<text>] [<text>]:
  1452. trigger:
  1453. if player has permission "key.*":
  1454. if arg-1 is set:
  1455. if arg-1 is "help":
  1456. send "&2----------[ &a%{cmd}% &2]----------"
  1457. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1458. send "&e&o/%{cmd}% get <crate/all> [number] &d→ &fGet a crate"
  1459. send "&e&o/%{cmd}% give <player> <crate/all> [number] &d→ &fGive a key to open a crate to a player"
  1460. send "&e&o/%{cmd}% remove <all/crate> [number] [player] &d→ &fRemove a key from a player"
  1461. send "&e&o/%{cmd}% clear <all/crate> [player] &d→ &fClear the keys from a player"
  1462. send "&e&o/%{cmd}% keys <all/crate> [player] &d→ &fGet the amount of keys from a player"
  1463. send "&2----------[ &a%{cmd}% &2]----------"
  1464.  
  1465. else if arg-1 is "get":
  1466. if arg-2 is "all":
  1467. if arg-3 is set:
  1468. if (arg-3 parsed as a number) is set:
  1469. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1470. set {_num} to arg-3 parsed as a number
  1471. loop {_num} times:
  1472. loop {_list::*}:
  1473. add 1 to {keys.%player%.%loop-value-2%}
  1474.  
  1475. send "{@lobby} &2You have recieved all the &a%arg-3% &2times!"
  1476.  
  1477. else:
  1478. send "{@lobby} &c%arg-3% &4is not a number!"
  1479. else:
  1480. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1481. loop {_list::*}:
  1482. add 1 to {keys.%player%.%loop-value%}
  1483.  
  1484. send "{@lobby} &2You have recieved all keys!"
  1485.  
  1486. else if arg-2 is set:
  1487. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1488. if contains({_list::*}, "%arg-2 to lower case%"):
  1489. if arg-3 is set:
  1490. if (arg-3 parsed as a number) is set:
  1491. add (arg-3 parsed as a number) to {keys.%player%.%arg-2 to lower case%}
  1492. send "{@lobby} &2You have recieved &a%arg-2 to lower case% &2key &a%arg-3% &2times!"
  1493. else:
  1494. send "{@lobby} &c%arg-3% &4is not a number!"
  1495. else:
  1496. add 1 to {keys.%player%.%arg-2 to lower case%}
  1497.  
  1498. send "{@lobby} &2You have recieved a &a%arg-2 to lower case% &2key!"
  1499. else:
  1500. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist."
  1501. else:
  1502. send "{@lobby} &4You must give up a &ccrate&4!"
  1503.  
  1504. else if arg-1 is "give":
  1505. if arg-2 is set:
  1506. if (arg-2 parsed as a player) is set:
  1507. if arg-3 is set:
  1508. if arg-3 is "all":
  1509. if arg-4 is set:
  1510. if (arg-4 parsed as a number) is set:
  1511. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1512. set {_num} to arg-4 parsed as a number
  1513. loop {_num} times:
  1514. loop {_list::*}:
  1515. add 1 to {keys.%arg-2 parsed as a player%.%loop-value-2%}
  1516.  
  1517. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2all the keys &a%arg-4% &2times!"
  1518. send "{@lobby} &2You have recieved all the keys &a%arg-4% &2times!" to arg-2 parsed as a player
  1519.  
  1520. else:
  1521. send "{@lobby} &c%arg-3% &4is not a number!"
  1522. else:
  1523. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1524. loop {_list::*}:
  1525. add 1 to {keys.%arg-2 parsed as a player%.%loop-value%}
  1526.  
  1527. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2all the keys!"
  1528. send "{@lobby} &2You have recieved all the keys!" to arg-2 parsed as a player
  1529. else:
  1530. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1531. if contains({_list::*}, "%arg-3 to lower case%"):
  1532. if arg-4 is set:
  1533. if (arg-4 parsed as a number) is set:
  1534.  
  1535. add (arg-4 parsed as a number) to {keys.%arg-2%.%arg-3 to lower case%}
  1536.  
  1537. 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!"
  1538. send "{@lobby} &2You have recieved the &a%arg-3 to lower case% &2key &a%arg-4% &2times!" to arg-2 parsed as a player
  1539.  
  1540. else:
  1541. send "{@lobby} &c%arg-3% &4is not a number!"
  1542. else:
  1543. add 1 to {keys.%arg-2 parsed as a player%.%arg-3 to lower case%}
  1544.  
  1545. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2the &a%arg-3 to lower case% &2key!"
  1546. send "{@lobby} &2You have recieved the &a%arg-3 to lower case% &2key!" to arg-2 parsed as a player
  1547. else:
  1548. send "{@lobby} &4The crate &c%arg-3 to lower case% &4doesn't exist!"
  1549. else:
  1550. send "{@lobby} &4You must give up a &ccrate&4!"
  1551. else:
  1552. send "{@lobby} &4The player &c%arg-2% &4is not online!"
  1553. else:
  1554. send "{@lobby} &4You must give up a &cplayer&4!"
  1555.  
  1556.  
  1557.  
  1558. else if arg-1 is "remove":
  1559. if arg-2 is set:
  1560. if arg-2 is "all":
  1561. if arg-3 is set:
  1562. if (arg-3 parsed as a number) is set:
  1563. if arg-4 is set:
  1564. if (arg-4 parsed as a player) is set:
  1565. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1566. set {_num} to arg-3 parsed as a number
  1567. loop {_list::*}:
  1568. if {keys.%arg-4 parsed as a player%.%loop-value%}-{_num} >= 0:
  1569. remove {_num} from {keys.%name of arg-4 parsed as a player%.%loop-value%}
  1570. else:
  1571. set {keys.%arg-4 parsed as a player%.%loop-value%} to 0
  1572.  
  1573. send "{@lobby} &2Succesfully removed &a%arg-3% &2from all the keys of &a%name of arg-4 parsed as a player%&2!"
  1574. send "{@lobby} &2Removed &a%arg-3% &2from your keys!" to arg-4 parsed as a player
  1575.  
  1576. else:
  1577. send "{@lobby} &4The player &c%arg-4% &4is not online!"
  1578. else:
  1579. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1580. loop {_list::*}:
  1581. if {keys.%player%.%loop-value%}-(arg-3 parsed as a number) >= 0:
  1582. remove (arg-3 parsed as a number) from {keys.%player%.%loop-value%}
  1583. else:
  1584. set {keys.%player%.%loop-value%} to 0
  1585.  
  1586. send "{@lobby} &2Succesfully removed &a%arg-3% &2from all the keys!"
  1587.  
  1588. else:
  1589. send "{@lobby} &c%arg-3% &4is not a number!"
  1590. else:
  1591. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1592. loop {_list::*}:
  1593. if {keys.%player%.%loop-value%}-1 >= 0:
  1594. remove 1 from {keys.%player%.%loop-value%}
  1595.  
  1596. send "{@lobby} &2Succesfully removed &a1 &2from all the keys"
  1597. else:
  1598. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1599. if contains({_list::*}, "%arg-2 to lower case%"):
  1600. if arg-3 is set:
  1601. if (arg-3 parsed as a number) is set:
  1602. if arg-4 is set:
  1603. if (arg-4 parsed as a player) is set:
  1604. if {keys.%arg-4 parsed as a player%.%arg-2 to lower case%}-(arg-3 parsed as a number) >= 0:
  1605. remove (arg-3 parsed as a number) from {keys.%name of arg-4 parsed as a player%.%arg-2 to lower case%}
  1606. else:
  1607. set {keys.%arg-4 parsed as a player%.%arg-2 to lower case%} to 0
  1608.  
  1609. send "{@lobby} &2Succesfully removed &a%arg-3% %arg-2 to lower case% &2keys from &a%name of arg-4 parsed as a player%&2!"
  1610. send "{@lobby} &a%arg-3% %arg-2 to lower case% &2keys have been removed!" to arg-4 parsed as a player
  1611.  
  1612. else:
  1613. send "{@lobby} &4The player &c%arg-4% &4is not online!"
  1614. else:
  1615.  
  1616. if {keys.%player%.%arg-2 to lower case%}-(arg-3 parsed as a number) >= 0:
  1617. remove (arg-3 parsed as a number) from {keys.%player%.%arg-2 to lower case%}
  1618. send "{@lobby} &2Succesfully removed &a%arg-3% %arg-2 to lower case% &2keys!"
  1619.  
  1620. else:
  1621. send "{@lobby} &c%arg-3% &4is not a number!"
  1622.  
  1623. else:
  1624. if {keys.%player%.%arg-2 to lower case%}-1 >= 0:
  1625. remove 1 from {keys.%player%.%arg-2 to lower case%}
  1626. send "{@lobby} &2Succesfully removed &a1 %arg-2 to lower case% &2keys!"
  1627. else:
  1628. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist."
  1629. else:
  1630. send "{@lobby} &4You must give up a &ccrate&4!"
  1631.  
  1632. else if arg-1 is "clear":
  1633. if arg-2 is set:
  1634. if arg-2 is "all":
  1635. if arg-3 is set:
  1636. if (arg-3 parsed as a player) is set:
  1637. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1638. loop {_list::*}:
  1639. set {keys.%arg-3 parsed as a player%.%loop-value%} to 0
  1640.  
  1641. send "{@lobby} &2Succesfully cleared &aall keys &2of &a%name of arg-3 parsed as a player%&2!"
  1642. send "{@lobby} &aAll &2your &akeys &2have been cleared!" to arg-3 parsed as a player
  1643. else:
  1644. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1645. else:
  1646. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1647. loop {_list::*}:
  1648. set {keys.%player%.%loop-value%} to 0
  1649.  
  1650. send "{@lobby} &2You have cleared &aall &2your &akeys&2!"
  1651. else:
  1652. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1653. if contains({_list::*}, "%arg-2 to lower case%"):
  1654. if arg-3 is set:
  1655. if (arg-3 parsed as a player) is set:
  1656. set {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} to 0
  1657. send "{@lobby} &2You have cleared the &a%arg-2 to lower case% keys &2from &a%name of arg-3 parsed as a player%&2!"
  1658. send "{@lobby} &2Your &a%arg-2 to lower case% keys &2have been cleared!" to arg-3 parsed as a player
  1659.  
  1660. else:
  1661. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1662.  
  1663. else:
  1664. set {keys.%player%.%arg-2 to lower case%} to 0
  1665. send "{@lobby} &2Succesfully cleared the &a%arg-2 to lower case% keys&2!"
  1666.  
  1667. else:
  1668. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist!"
  1669. else:
  1670. send "{@lobby} &4You must give up a &ccrate&4!"
  1671.  
  1672. else if arg-1 is "keys":
  1673. if arg-2 is set:
  1674. if arg-2 is "all":
  1675. if arg-3 is set:
  1676. if (arg-3 parsed as a player) is set:
  1677. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1678. loop {_list::*}:
  1679. if {keys.%arg-3 parsed as a player%.%loop-value%} is not set:
  1680. set {keys.%arg-3 parsed as a player%.%loop-value%} to 0
  1681.  
  1682. if {_keys} is not set:
  1683. set {_keys} to "&2%loop-value%: &a%{keys.%name of arg-3 parsed as a player%.%loop-value%}%"
  1684. else:
  1685. set {_keys} to "%{_keys}%%nl%&2%loop-value%: &a%{keys.%name of arg-3 parsed as a player%.%loop-value%}%"
  1686.  
  1687. send "{@lobby} &2This is the list of keys from &a%name of arg-3 parsed as a player%&2:%nl%%{_keys}%"
  1688.  
  1689. else:
  1690. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1691. else:
  1692. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1693. loop {_list::*}:
  1694. if {keys.%player%.%loop-value%} is not set:
  1695. set {keys.%player%.%loop-value%} to 0
  1696. if {_keys} is not set:
  1697. set {_keys} to "&2%loop-value%: &a%{keys.%player%.%loop-value%}%"
  1698. else:
  1699. set {_keys} to "%{_keys}%%nl%&2%loop-value%: &a%{keys.%player%.%loop-value%}%"
  1700.  
  1701. send "{@lobby} &2This is your list of keys&2:%nl%%{_keys}%"
  1702. else:
  1703. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1704. if contains({_list::*}, "%arg-2 to lower case%"):
  1705. if arg-3 is set:
  1706. if (arg-3 parsed as a player) is set:
  1707. if {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} is not set:
  1708. set {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} to 0
  1709.  
  1710. 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."
  1711.  
  1712. else:
  1713. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1714. else:
  1715. if {keys.%player%.%arg-2 to lower case%} is not set:
  1716. set {keys.%player%.%arg-2 to lower case%} to 0
  1717.  
  1718. send "{@lobby} &2You have &a%{keys.%player%.%arg-2 to lower case%}% %arg-2 to lower case% &2keys."
  1719. else:
  1720. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist!"
  1721. else:
  1722. send "{@lobby} &4You need to give up a &ccrate&4!"
  1723. else:
  1724. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1725. else:
  1726. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1727.  
  1728.  
  1729. command /cosmetics [<text>] [<text>] [<text>]:
  1730. aliases: /cos
  1731. trigger:
  1732. if player has permission "cosmetics.*":
  1733. if arg-1 is not set:
  1734. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1735.  
  1736. else if arg-1 is "help":
  1737. send "&2----------[ &a%{cmd}% &2]----------"
  1738. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  1739. send "&e&o/%{cmd}% gui [player] &d→ &fGet the cosmetics (of a player)"
  1740. send "&e&o/%{cmd}% setup <type> &d→ &fCreate a cosmetic"
  1741. send "&e&o/%{cmd}% edit [type] &d→ &fEdit a cosmetic"
  1742. #send "&e&o/%{cmd}% delete [type] [name] &d→ &fDelete a cosmetic"
  1743. send "&e&o/%{cmd}% path &d→ &fCreate your own cosmetics"
  1744. send "&2----------[ &a%{cmd}% &2]----------"
  1745.  
  1746. #else if arg-1 is "gui":
  1747. # if arg-2 is set:
  1748. # if arg-2 parsed as a player is set:
  1749. #
  1750.  
  1751. # else:
  1752. # send "{@lobby} &4The player &c%arg-2% &4has never logged in."
  1753.  
  1754. # else:
  1755.  
  1756. else if arg-1 is "setup":
  1757. if arg-2 is set:
  1758. editCos(player, "%arg-2%")
  1759. #open chest with 1 rows named "&8Cosmetics %arg-2%" to player
  1760. #format gui slot 2 of player with nether star named "&fCreate" to close
  1761. #format gui slot 4 of player with redstone torch on named "&fEdit" to close
  1762. #format gui slot 6 of player with blaze powder named "&fDelete" to close
  1763.  
  1764. else:
  1765. editCos(player, "")
  1766. #open chest with 1 rows named "&8Edit Cosmetics" to player
  1767. #format gui slot 2 of player with nether star named "&fCreate" to close
  1768. #format gui slot 4 of player with redstone torch on named "&fEdit" to close
  1769. #format gui slot 6 of player with blaze powder named "&fDelete" to close
  1770.  
  1771. else if arg-1 is "path":
  1772. send "{@lobby} The path to edit your cosmetics is %nl%&a{@cosConfig} &2and to create cosmetics %nl%&a{@path}/Cosmetics/"
  1773.  
  1774. else:
  1775. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
Add Comment
Please, Sign In to add comment