Zeldaboy111

Skript #269 ]|[ Cosmetics (3)

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