Zeldaboy111

Skript #265 ]|[ Compression (1)

Nov 25th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.28 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. path: Files/Lobby
  15. config: Files/Lobby/config.yml
  16.  
  17.  
  18. #alt + 15 = ☼
  19. #alt + 26 = →
  20. #alt + 16 = ►
  21. #alt + 22 = ▬
  22.  
  23. #------------------- Functions -------------------
  24. function contains(list: objects, check: object) :: boolean:
  25. loop {_list::*}:
  26. if loop-value is {_check}:
  27. return true
  28. return false
  29.  
  30. function openCompass(p: Player):
  31. if {lobby.compassRows} is not set:
  32. set {lobby.compassRows} to 1
  33.  
  34. open chest with {lobby.compassRows} rows named "{@cGuiName}" to {_p}
  35.  
  36. loop {lobby.minigames.list::*}:
  37. if {lobby.minigames.%loop-value%.slot} starts with "-":
  38. stop
  39.  
  40. else:
  41. if ({lobby.minigames.%loop-value%.slot} parsed as a number) is set:
  42. if {lobby.minigames.%loop-value%.item} is "&cNone":
  43. set {_item} to paper
  44.  
  45. else if ({lobby.minigames.%loop-value%.item} parsed as an item) is not set:
  46. set {_item} to paper
  47.  
  48. else:
  49. set {_item} to {lobby.minigames.%loop-value%.item}
  50.  
  51. set {_slot} to ({lobby.minigames.%loop-value%.slot} parsed as a number)
  52.  
  53. if {lobby.minigames.%loop-value%.name} is set:
  54. if {lobby.minigames.%loop-value%.name} is not "&cNone":
  55. set {_name} to {lobby.minigames.%loop-value%.name}
  56. replace "&" in {_name} with "§"
  57. if {lobby.minigames.%loop-value%.lore} is set:
  58. if {lobby.minigames.%loop-value%.lore} is not "&cNone":
  59. set {_lore} to {lobby.minigames.%loop-value%.lore}
  60. replace "&" in {_lore} with "§"
  61. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" with lore "%{_lore}%" to do nothing
  62. else:
  63. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" to do nothing
  64. else:
  65. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "%{_name}%" to do nothing
  66. else:
  67. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item to do nothing
  68. else:
  69. format gui slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item to do nothing
  70.  
  71.  
  72. 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):
  73. open chest with {_rows} rows named {_gname} to {_p}
  74.  
  75. set name of {_item1} to {_i1name}
  76. set name of {_item2} to {_i2name}
  77.  
  78. format gui slot {_slot1} of {_p} with {_item1} to run:
  79. close {_p}'s inventory
  80. if {_command} is true:
  81. execute player command {_accept}
  82. else:
  83. send {_accept} to {_p}
  84.  
  85. format gui slot {_slot2} of {_p} with {_item2} to run:
  86. close {_p}'s inventory
  87. send {_deny} to {_p}
  88.  
  89.  
  90. function randomReward(crate: String) :: Item:
  91. set {_rewards1::*} to yml list "Item.List" of file "{@path}/%{_crate}%.yml"
  92. set {_rewardsNames::*} to yml list "Item.ConfigName" of file "{@path}/%{_crate}%.yml"
  93.  
  94. set {_count} to 1
  95. loop {_rewards1::*}:
  96. if yml value "Item.Chance.%{_rewardsNames::%{_count}%}%" of file "{@path}/%{_crate}%.yml" is set:
  97. set {_chance} to yml value "Item.Chance.%{_rewardsNames::%{_count}%}%" of file "{@path}/%{_crate}%.yml" parsed as a string
  98.  
  99. if ({_chance} parsed as a number) is set:
  100. loop ({_chance} parsed as a number) times:
  101. add "%loop-value-1% [{$^^$}] %{_rewardsNames::%{_count}%}%" to {_rewards::*}
  102.  
  103. else:
  104. send "%nl%{@lobby} &c%{_chance}% &4is not a number!%nl%" to console
  105.  
  106. add 1 to {_count}
  107.  
  108. set {_length} to size of {_rewards::*}
  109. set {_prizeCount} to a random integer between 0 and {_length}
  110. set {_splitPrize::*} to {_rewards::%{_prizeCount}%} split at " [{$^^$}] "
  111.  
  112. set {_prize} to {_splitPrize::1}
  113. set {_prizeCName} to {_splitPrize::2}
  114.  
  115. if ({_prize} parsed as an item) is not set:
  116. send "{@lobby} &c%{_prize}% &4is not an item! Stopping opening the crate!" to console
  117.  
  118. else:
  119. set {_prize} to {_prize} parsed as an item
  120.  
  121. if yml value "Item.Name.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  122. set {_prizeName} to yml value "Item.Name.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  123. set {_prizeName} to "%colored {_prizeName}%"
  124. set name of {_prize} to "&f%{_prizeName}%"
  125.  
  126. if yml value "Item.Amount.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  127. set {_prizeAmount} to yml value "Item.Amount.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  128. set {_prizeAmount} to ({_prizeAmount} parsed as a number)
  129. if {_prizeAmount} is set:
  130. set {_prize} to ("%{_prizeAmount}% %{_prize}%" parsed as an item)
  131.  
  132. else:
  133. send "{@lobby} &c%{_prizeAmount}% &4is not a number!" to console
  134. set {_prize} to ("1 %{_prize}%" parsed as an item)
  135.  
  136. if yml value "Item.Lore.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  137. set {_loreList::*} to yml list "Item.Lore.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  138. loop {_loreList::*}:
  139. if {_lore} is not set:
  140. set {_lore} to "%loop-value%"
  141. else:
  142. set {_lore} to "%{_lore}%||%loop-value%"
  143.  
  144. set lore of {_prize} to {_lore}
  145.  
  146.  
  147. if yml value "Item.Enchants.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml" is set:
  148. set {_enchantList::*} to yml list "Item.Enchants.%{_prizeCName}%" of file "{@path}/%{_crate}%.yml"
  149. loop {_enchantList::*}:
  150. set {_ench} to "%loop-value%"
  151. set {_split::*} to {_ench} split at ""
  152.  
  153. if contains({_split::*}, ":") is true:
  154. set {_eSplit::*} to {_ench} split at ":"
  155. set {_ench1} to {_eSplit::1}
  156. set {_ench2} to {_eSplit::2}
  157.  
  158. if ({_ench1} parsed as an enchantment type) is set:
  159. if ({_ench2} parsed as a number) is set:
  160. enchant {_prize} with "%{_ench1}% %{_ench2}%" parsed as an enchantment type
  161. set name of {_prize} to "&b%{_prizeName}%"
  162. else:
  163. send "%nl%{@lobby} &c%{_s2}% &4is not a number!%nl%" to console
  164. else:
  165. send "%nl%{@lobby} &c%{_s1}% &4is not an enchantment type!%nl%" to console
  166.  
  167. else:
  168. if (loop-value parsed as an enchantment type) is set:
  169. enchant {_prize} with "%loop-value% 1" parsed as an enchantment type
  170.  
  171. else:
  172. send "{@lobby} &c%loop-value% &4is not an enchantment type!" to console
  173.  
  174. return {_prize}
  175.  
  176. function animation1(p: Player, count: Integer, count2: Integer) :: boolean:
  177.  
  178. loop 9 times:
  179. if {crates.reopening.%{_p}%} is true:
  180. delete {crates.reopening.%{_p}%}
  181. clear {crate.%{_p}%.inv::*}
  182. clear {crate.%{_p}%.name}
  183.  
  184.  
  185. if {crates.closed.%{_p}%} is true:
  186. if {_count} = {_count2}-18:
  187. set {crate.%{_p}%.inv::%{_count}%} to "light green glass"
  188. set {crate.%{_p}%.inv::%{_count2}%} to "light green glass"
  189. else:
  190. set {crate.%{_p}%.inv::%{_count}%} to "gray glass"
  191. set {crate.%{_p}%.inv::%{_count2}%} to "gray glass"
  192.  
  193. else:
  194. if {_count} = {_count2}-18:
  195. format gui slot {_count} of {_p} with light green stained glass pane to do nothing
  196. format gui slot {_count2} of {_p} with light green stained glass pane to do nothing
  197.  
  198. else:
  199. format gui slot {_count} of {_p} with gray stained glass pane to do nothing
  200. format gui slot {_count2} of {_p} with gray stained glass pane to do nothing
  201.  
  202. add 1 to {_count}
  203. remove 1 from {_count2}
  204. wait 5 ticks
  205.  
  206. set {opening.%{_p}%} to true
  207.  
  208.  
  209. function openCrate(p: Player, crate: String):
  210. if {keys.%{_p}%.%{_crate}%} > 0:
  211. open chest with 3 rows named "&2%{_crate}%" to {_p}
  212.  
  213. set {crates.opening.%{_p}%} to true
  214. set {_count} to 0
  215. set {_count2} to 26
  216. set {opening.%{_p}%} to false
  217.  
  218. #Animations
  219. set {opening.%{_p}%} to animation1({_p}, {_count}, {_count2})
  220.  
  221.  
  222. while {opening.%{_p}%} is false:
  223. wait 1 tick
  224.  
  225.  
  226.  
  227. delete {opening.%{_p}%}
  228. set {_random} to randomReward({_crate})
  229.  
  230. format gui slot 13 of {_p} with {_random} to do nothing
  231. play sound "entity.experience_orb.pickup" with volume 10 and pitch 5 at {_p} for all players
  232.  
  233. delete {crates.closed.%{_p}%}
  234. remove {_p} from {crates.openinglist::*}
  235. delete {crate.%{_p}%.inv::*}
  236. delete {crate.%{_p}%.name}
  237. delete {crates.opening.%{_p}%}
  238. give {_p} {_random}
  239. remove 1 from {keys.%{_p}%.%{_crate}%}
  240. launch ball coloured aqua and blue at {_p}'s location timed 0.9
  241.  
  242.  
  243. set {_name} to name of {_random}
  244. send "{@lobby} You've won &a%{_name}%&2!" to {_p}
  245.  
  246.  
  247.  
  248. else:
  249. send "{@lobby} &4You don't have anough keys to do this!" to {_p}
  250. play sound "entity.item.break" with volume 10 and pitch 1 at {_p} for {_p}
  251.  
  252. #------------------- Periotic Events -------------------
  253.  
  254.  
  255.  
  256.  
  257.  
  258. #------------------- Events -------------------
  259. on enable:
  260. if file "{@config}" doesn't exist:
  261. create file "{@config}"
  262.  
  263. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  264.  
  265. loop {_list::*}:
  266. set {_world} to world of {lobby.location}
  267. loop {lobbycr.%loop-value%.location::*}:
  268. set {holo-crate-%{_world}%-%loop-value-2%} to a new hologram at block above loop-value-2
  269. add text "&a&l%loop-value-1%" to hologram {holo-crate-%{_world}%-%loop-value-2%}
  270.  
  271. on disable:
  272. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  273. set {_world} to world of {lobby.location}
  274.  
  275. loop {_list::*}:
  276. delete yml list "Locations" of file "{@path}/%loop-value%.yml"
  277. loop {lobbycr.%loop-value%.location::*}:
  278. add "%loop-value-2%" to yml list "Locations" of file "{@path}/%loop-value-1%.yml"
  279. unregister hologram {holo-crate-%{_world}%-%loop-value-2%}
  280.  
  281. loop {crates.openinglist::*}:
  282. clear {crates.opening.%loop-value%}
  283. clear {crates.%loop-value%.inv::*}
  284. clear {crates.%loop-value%.name}
  285. clear {crate.closed.%loop-value%}
  286.  
  287. clear {crates.openinglist::*}
  288.  
  289. on join:
  290. if {lobby.location} is set:
  291. teleport player to {lobby.location}
  292. set join message to ""
  293. wait 10 ticks
  294.  
  295. clear player's inventory
  296. send "{@lobby} &fThe player %player% has joined!" to all players in world of player
  297. set slot 4 of player to a compass named "{@lcompass}"
  298.  
  299. on quit:
  300. if {crates.opening.%player%} is set:
  301. clear {crates.opening.%player%}
  302. clear {crates.%player%.inv::*}
  303. clear {crates.%player%.name}
  304. clear {crates.closed.%player%}
  305. remove player from {crates.openinglist::*}
  306.  
  307.  
  308. on inventory click:
  309. if player is in world of {lobby.location}:
  310. if clicked item is a compass named "{@lcompass}":
  311. cancel event
  312. close player's inventory
  313. openCompass(player)
  314.  
  315. on click:
  316. if player is in world of {lobby.location}:
  317. if player's held item is a compass named "{@lcompass}":
  318. cancel event
  319. openCompass(player)
  320.  
  321.  
  322. on command:
  323. command is "plugins" or "pl":
  324. cancel event
  325.  
  326. if player is not op:
  327. stop
  328.  
  329. else:
  330. set {_list::*} to list of plugins
  331. set {_count} to 0
  332. loop {_list::*}:
  333. add 1 to {_count}
  334. send "{@logo} Plugin list:%nl%&f(&a%{_count}%&f) &2%list of plugins%"
  335.  
  336. else:
  337. set {cmd} to "%command to lower case%"
  338.  
  339. on place of chest:
  340. set {_world} to world of event-block
  341. if {_world} is world of {lobby.location}:
  342. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  343. if contains({_list::*}, "%uncolored name of player's tool%"):
  344.  
  345. add location of block at event-block to {lobbycr.%uncolored name of player's tool%.location::*}
  346. add world of event-block to {lobbycr.%uncolored name of player's tool%.world::*}
  347. send "{@lobby} &2Succesfully created a &a%uncolored name of player's tool% &2Crate!"
  348.  
  349. set {holo-crate-%world of event-block%-%location of event-block%} to new hologram at location 1 meters above event-block
  350.  
  351. add text "&a&l%uncolored name of player's tool%" to hologram {holo-crate-%world of event-block%-%location of event-block%}
  352. add "%location of block at event-block%" to yml list "Locations" of file "{@path}/%uncolored name of player's tool%.yml"
  353.  
  354. on break of chest:
  355. set {_world} to world of event-block
  356. if {_world} is world of {lobby.location}:
  357. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  358. loop {_list::*}:
  359. loop {lobbycr.%loop-value-1%.location::*}:
  360. if loop-value-2 is location of event-block:
  361. unregister hologram {holo-crate-%world of event-block%-%location of event-block%}
  362. #unregister hologram at location above of event-block
  363. #clear {lobbycr.%loop-value-1%.location::*}
  364. remove location of block at event-block from {lobbycr.%loop-value-1%.location::*}
  365. send "%{lobbycr.%loop-value-1%.location::*}%"
  366. remove world of event-block from {lobbycr.%loop-value-1%.world::*}
  367.  
  368.  
  369. delete {holo-crate-%world of event-block%-%location of event-block%}
  370. remove "%location of event-block%" from yml list "Locations" of file "{@path}/%loop-value-1%.yml"
  371.  
  372. send "{@lobby} &2Succesfully removed a &a%loop-value-1% &2Crate!"
  373.  
  374.  
  375.  
  376. on rightclick on a chest:
  377. set {_world} to world of clicked block
  378. if {_world} is "%world of {lobby.location}%":
  379.  
  380. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  381. loop {_list::*}:
  382.  
  383. loop {lobbycr.%loop-value-1%.location::*}:
  384. if "%loop-value-2%" is "%location of clicked block%":
  385. cancel event
  386. if "%uncolored {crate.%player%.name}%" = loop-value-1:
  387. if {crates.opening.%player%} is true:
  388. open chest with 3 rows named "&2%{crate.%player%.name}%" to player
  389.  
  390. set {crates.reopening.%player%} to true
  391. set {_count} to 0
  392. loop 27 times:
  393. if {crate.%player%.inv::%{_count}%} is set:
  394. set {_value} to "%{crate.%player%.inv::%{_count}%}%"
  395. set {_color::*} to {_value} split at " "
  396.  
  397. if contains({_color::*}, "glass") is true:
  398. if contains({_color::*}, "light") is true:
  399. format gui slot {_count} of player with ("light %{_color::2}% stained glass pane" parsed as an item) to do nothing
  400.  
  401. else if contains({_color::*}, "dark") is true:
  402. format gui slot {_count} of player with ("dark %{_color::2}% stained glass pane" parsed as an item) to do nothing
  403.  
  404. else:
  405. format gui slot {_count} of player with ("%{_color::1}% stained glass pane" parsed as an item) to do nothing
  406.  
  407. else:
  408. format gui slot {_count} of player with ({crate.%player%.inv::%{_count}%} parsed as an item) to do nothing
  409.  
  410.  
  411. add 1 to {_count}
  412.  
  413. delete {crates.closed.%player%}
  414. delete {crates.openinglist::*}
  415. delete {crate.%player%.inv::*}
  416. delete {crate.%player%.name}
  417.  
  418.  
  419. else:
  420. open chest with 3 rows named "&2%loop-value-1%" to player
  421. format gui slot 13 of player with a tripwire hook named "&7Open crate" to close then run function openCrate(player, "%loop-value-1%")
  422. stop loop
  423. else:
  424. open chest with 3 rows named "&2%loop-value-1%" to player
  425. format gui slot 13 of player with a tripwire hook named "&7Open crate" to close then run function openCrate(player, "%loop-value-1%")
  426. stop loop
  427.  
  428.  
  429. on inventory close:
  430. if {crates.opening.%player%} is true:
  431. set {crates.closed.%player%} to true
  432. add player to {crates.openinglist::*}
  433. clear {crate.%player%.inv::*}
  434. set {crate.%player%.name} to name of player's current inventory
  435. set {_count} to 0
  436.  
  437.  
  438. loop 27 times:
  439. set {crate.%player%.inv::%{_count}%} to slot {_count} of player's current inventory
  440. add 1 to {_count}
  441.  
  442. else if {crates.opening.%player%} is set:
  443. delete {crates.opening.%player%}
  444.  
  445. on chat:
  446. if world of player is world of {lobby.location}:
  447. cancel event
  448. send "&7[&e%player%&7] &8>> &f%message%" to all players in world of player
  449. send "&7[&eLobby&7][&e%player%&7] &f>> %message%" to console
  450.  
  451. #------------------- Commands -------------------
  452. command /lobby [<text>] [<text>]:
  453. aliases: /hub
  454. trigger:
  455. if player has permission "lobby.*":
  456. if arg-1 is set:
  457. if arg-1 is "help":
  458. send "&2----------[ &a%{cmd}% &2]----------"
  459. send "&e&o/%{cmd}% help &d→ &fGet the help page"
  460. send "&e&o/%{cmd}% set &d→ &fSet the lobby"
  461. send "&2----------[ &a%{cmd}% &2]----------"
  462.  
  463. else if arg-1 is "set":
  464. send "{@logo} &2Succesfully set the &a%{cmd}% &2to your location!"
  465. set {lobby.location} to location of player
  466.  
  467. else:
  468. if {lobby.location} is set:
  469. if world of player is not "%world of {lobby.location}%":
  470. teleport player to {lobby.location}
  471. send "{@lobby} &fThe player %player% went to the lobby!" to all players in world of player
  472. clear player's inventory
  473. set slot 4 of player to a compass named "{@lcompass}"
  474.  
  475. else:
  476. teleport player to {lobby.location}
  477.  
  478.  
  479. else:
  480. send "{@lobby} &cThe %{cmd}% is not set yet!"
  481.  
  482.  
  483. else if {lobby.location} is set:
  484. if world of player is not "%world of {lobby.location}%":
  485. teleport player to {lobby.location}
  486. send "{@lobby} &fThe player %player% went to the lobby!" to all players in world of player
  487. clear player's inventory
  488. set slot 4 of player to a compass named "{@lcompass}"
  489.  
  490. else:
  491. teleport player to {lobby.location}
  492.  
  493. else:
  494. send "{@lobby} &cThe %{cmd}% is not set yet!"
  495.  
  496.  
  497. command /lobbycompass [<text>] [<text>] [<text>]:
  498. aliases: /lcomp, /lcompass
  499. trigger:
  500. if player has permission "lobbycompass.*":
  501. if arg 1 is not set:
  502. send "{@lobby} &4Do &c&o/%{cmd}% help &4for more info."
  503.  
  504. else if arg 1 is set:
  505. if arg 1 is "help":
  506. send "&2----------[ &a%{cmd}% &2]----------"
  507. send "&e&o/%{cmd}% help &d→ &fKrijg help pagina"
  508. send "&e&o/%{cmd}% create <minigame> &d→ &fCreate a minigame"
  509. send "&e&o/%{cmd}% remove/delete <minigame> &d→ &fDelete a minigame"
  510. send "&e&o/%{cmd}% setspawn <minigame> &d→ &fSet the spawn of a minigame"
  511. send "&e&o/%{cmd}% slot <minigame> <number> &d→ &fSet the GUI slot of a minigame"
  512.  
  513. send "&e&o/%{cmd}% setname <minigame> <name> &d→ &fSet a name"
  514. send "&e&o/%{cmd}% deletename <minigame> &d→ &fDelete the name of a minigame"
  515. send "&e&o/%{cmd}% setlore <minigame> <lore> &d→ &fSet a lore"
  516. send "&e&o/%{cmd}% deletelore <minigame> <minigame> &d→ &fDelete the lore of a minigame"
  517. send "&e&o/%{cmd}% setitem <minigame> <item> &d→ &fSet the item of a minigame"
  518. send "&e&o/%{cmd}% list &d→ &fGet a list of all the minigames"
  519. send "&e&o/%{cmd}% setrows <number> &d→ &fSet the amount of rows in the GUI"
  520. send "&e&o/%{cmd}% gui <minigame> &d→ &fOpen the config-GUI"
  521. send "&2----------[ &a%{cmd}% &2]----------"
  522.  
  523. else if arg 1 is "create":
  524. if arg 2 is set:
  525. if {lobby.minigames.%arg 2%} is not set:
  526. set {lobby.minigames.%arg 2%} to true
  527. set {lobby.minigames.%arg 2%.name} to "&cNone"
  528. set {lobby.minigames.%arg 2%.lore} to "&cNone"
  529. set {lobby.minigames.%arg 2%.item} to "&cNone"
  530. set {lobby.minigames.%arg 2%.slot} to "&cNone"
  531. set {lobby.minigames.%arg 2%.spawn} to "&cNone"
  532. add arg 2 to {lobby.minigames.list::*}
  533.  
  534. send "{@lobby} &2Succesfully made the minigame &a%arg 2%&2!"
  535.  
  536. else:
  537. send "{@lobby} &4The minigame &c%arg 2% &4already exists!"
  538. else:
  539. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1% <minigame>&4."
  540.  
  541. else if arg 1 is "delete" or "remove":
  542. if arg 2 is set:
  543. if {lobby.minigames.%arg 2%} is set:
  544. delete {lobby.minigames.%arg 2%}
  545. delete {lobby.minigames.%arg 2%.name}
  546. delete {lobby.minigames.%arg 2%.lore}
  547. delete {lobby.minigames.%arg 2%.item}
  548. delete {lobby.minigames.%arg 2%.slot}
  549. delete {lobby.minigames.%arg 2%.spawn}
  550. remove arg 2 from {lobby.minigames.list::*}
  551.  
  552. send "{@lobby} &2Succesfully removed the minigame &a%arg 2%&2!"
  553.  
  554. else:
  555. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  556. else:
  557. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  558.  
  559.  
  560. else if arg 1 is "setspawn":
  561. if arg 2 is set:
  562. if {lobby.minigames.%arg 2%} is set:
  563. set {lobby.minigames.%arg 2%.spawn} to location of player
  564. send "{@lobby} &2Succesfully set the spawn of the minigame%nl%&a%arg 2% &2arg &a%location of player%&2!"
  565.  
  566. else:
  567. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  568. else:
  569. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  570.  
  571. else if arg 1 is "slot":
  572. if arg 2 is set:
  573. if {lobby.minigames.%arg 2%} is set:
  574. if arg 3 is set:
  575. if (arg 3 parsed as a number) is set:
  576. if {lobby.compassRows} is not set:
  577. set {lobby.compassRows} to 1
  578.  
  579. if {lobby.compassRows} < 1:
  580. set {lobby.compassRows} to 1
  581.  
  582.  
  583. if {lobby.compassRows}*9-1 < arg-3 parsed as a number:
  584. send "{@lobby} &4The amount &c%arg 3% &4is to large bacause the max amount of slots is &c%{lobby.compassRows}*9+1%&4!"
  585.  
  586. else:
  587. loop {lobby.minigames.list::*}:
  588. if {lobby.minigames.%loop-value%.slot} is arg 3:
  589. set {_set} to loop-value
  590. stop loop
  591.  
  592. if {_set} is set:
  593. send "{@lobby} &4The slot &c%arg 3% &4is already in use by the minigame &c%{_set}%&4!"
  594. else:
  595. set {lobby.minigames.%arg 2%.slot} to arg 3
  596. send "{@lobby} &2Succesfully set the slot of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  597. else:
  598. send "{@lobby} &c%arg 3% &4is not a number!"
  599. else:
  600. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <number>&4."
  601. else:
  602. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  603. else:
  604. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <number>&4."
  605.  
  606.  
  607. else if arg 1 is "setname":
  608. if arg 2 is set:
  609. if {lobby.minigames.%arg 2%} is set:
  610. if arg 3 is set:
  611. set {lobby.minigames.%arg 2%.name} to arg 3
  612. send "{@lobby} &2Succesfully set the name of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  613.  
  614. else:
  615. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <name>&4."
  616. else:
  617. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  618. else:
  619. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <name>&4."
  620.  
  621. else if arg 1 is "delname" or "deletename":
  622. if arg 2 is set:
  623. delete {lobby.minigames.%arg 2%.name}
  624. send "{@lobby} &2Succesfully deleted the name from the minigame &a%arg 2%&2!"
  625.  
  626. else:
  627. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  628.  
  629. else if arg 1 is "setlore":
  630. if arg 2 is set:
  631. if {lobby.minigames.%arg 2%} is set:
  632. if arg 3 is set:
  633. set {lobby.minigames.%arg 2%.lore} to arg 3
  634. send "{@lobby} &2Succesfully set the lore of the minigame &a%arg 2% &2to &a%arg 3%&2!"
  635.  
  636. else:
  637. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <lore>&4."
  638. else:
  639. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  640. else:
  641. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <lore>&4."
  642.  
  643. else if arg 1 is "dellore" or "deletelore":
  644. if arg 2 is set:
  645. if {lobby.minigames.%arg 2%} is set:
  646. delete {lobby.minigames.%arg 2%.lore}
  647. send "{@lobby} &2Succesfully deleted the lore from the minigame &a%arg 2%&2!"
  648.  
  649. else:
  650. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  651. else:
  652. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <name>&4."
  653.  
  654. else if arg 1 is "setitem":
  655. if arg 2 is set:
  656. if {lobby.minigames.%arg 2%} is set:
  657. if arg 3 is set:
  658. if (arg 3 parsed as an item) is set:
  659. set {lobby.minigames.%arg 2%.item} to arg 3 parsed as an item
  660. send "{@lobby} &2Succesfully set the item from the minigame &a%arg 2% &2to &a%arg 3%&2!"
  661.  
  662. else:
  663. send "{@lobby} &c%arg 3% &4is not an item!"
  664. else:
  665. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% %arg 2% <item>&4."
  666. else:
  667. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  668. else:
  669. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame> <item>&4."
  670.  
  671.  
  672. else if arg 1 is "list":
  673.  
  674.  
  675.  
  676. if {lobby.minigames.list::*} is not empty:
  677. loop {lobby.minigames.list::*}:
  678. if {_list} is set:
  679. set {_list} to "%{_list}%&2, &a%loop-value%"
  680. else:
  681. set {_list} to "%loop-value%"
  682.  
  683.  
  684. else:
  685. set {_list} to "Geen"
  686.  
  687. send "{@lobby} &2This is the list of all the minigames:%nl%&a%{_list}%"
  688.  
  689.  
  690. else if arg 1 is "setrows":
  691. if arg 2 is set:
  692. if (arg 2 parsed as a number) is set:
  693. if (arg-2 parsed as a number) < 7:
  694. set {lobby.compassRows} to (arg-2 parsed as a number)
  695. send "{@lobby} &2Succesfully set the amount of rows to &a%arg 2%&2!"
  696.  
  697. else:
  698. send "{@lobby} &4The max amount of rows is &c6&4!"
  699. else:
  700. send "{@lobby} &c%arg 2% &4is not a number!"
  701. else:
  702. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <number>&4."
  703.  
  704.  
  705. else if arg 1 is "gui":
  706. if arg 2 is set:
  707. if {lobby.minigames.%arg 2%} is set:
  708. open chest with 2 rows named "&7Config GUI" to player
  709.  
  710. set {_name} to {lobby.minigames.%arg 2%.name}
  711. replace "&" in {_name} with "§"
  712.  
  713. set {_lore} to {lobby.minigames.%arg 2%.lore}
  714. replace "&" in {_lore} with "§"
  715.  
  716. format gui slot 2 of player with a book named "&2Minigame: &a%arg-2%" to do nothing
  717. 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)
  718. 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)
  719. 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)
  720. 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)
  721.  
  722. 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)
  723. format gui slot 13 of player with a barrier named "&cClose menu" to close
  724. 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)
  725.  
  726. else:
  727. send "{@lobby} &4The minigame &c%arg 2% &4doesn't exist!"
  728. else:
  729. send "{@lobby} &4Command not used correct! &c&o/%{cmd}% %arg 1 to lower case% <minigame>&4."
  730. else:
  731. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  732.  
  733. command /lobbycrate [<text>] [<text>]:
  734. aliases: /lobbycr, /lcrate
  735. trigger:
  736. if player is in world of {lobby.location}:
  737. if player has permission "votecrate.*":
  738. if arg-1 is set:
  739. if arg-1 is "help":
  740. send "&2----------[ &a%{cmd}% &2]----------"
  741. send "&e&o/%{cmd}% help &d→ &fGet the halp page"
  742. send "&e&o/%{cmd}% list &d→ &fGet a list with all crates"
  743. send "&e&o/%{cmd}% create <crate> &d→ &fCreate a create"
  744. send "&e&o/%{cmd}% delete/remove <crate> &d→ &fDelete a crate"
  745. send "&e&o/%{cmd}% path <crate> &d→ &fGet the edit path of a crate"
  746. send "&e&o/%{cmd}% get <crate> &d→ &fGet a crate"
  747. send "&2----------[ &a%{cmd}% &2]----------"
  748.  
  749. else if arg-1 is "list":
  750. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  751. if {_list::*} is not empty:
  752. loop {_list::*}:
  753. if {_list} is set:
  754. set {_list} to "%{_list}%&2, &a%loop-value%"
  755. else:
  756. set {_list} to "%loop-value%"
  757.  
  758. send "{@lobby} &2There are the following crates:%nl%&a%{_list}%"
  759.  
  760. else:
  761. send "{@lobby} &2There are no crates made yet."
  762.  
  763.  
  764. else if arg-1 is "create":
  765. if arg-2 is set:
  766. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  767. set {_arg2} to "%arg-2 to lower case%"
  768. if contains({_list::*}, {_arg2}):
  769. send "{@lobby} &4The crate &c%{_arg2}% &4already exists!"
  770.  
  771.  
  772. else:
  773.  
  774. send "{@lobby} &2Making the crate &a%{_arg2}%&2..."
  775. add {_arg2} to yml list "Lobby.Crates.List" of file "{@config}"
  776. create file "{@path}/%{_arg2}%.yml"
  777. add "diamond_sword" to yml list "Item.List" of file "{@path}/%{_arg2}%.yml"
  778. add "diamond_sword-1" to yml list "Item.ConfigName" of file "{@path}/%{_arg2}%.yml"
  779.  
  780. set yml value "Item.Chance.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to "100"
  781. set yml value "Item.Name.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to "Diamond Sword"
  782. set yml value "Item.Amount.diamond_sword-1" of file "{@path}/%{_arg2}%.yml" to 1
  783.  
  784. add "This is a lore" to yml list "Item.Lore.diamond_sword-1" of file "{@path}/%{_arg2}%.yml"
  785.  
  786. add "sharpness:1" to yml list "Item.Enchants.diamond_sword-1" of file "{@path}/%{_arg2}%.yml"
  787.  
  788. send "{@lobby} &2Succesfully made the crate &a%{_arg2}%&2!"
  789.  
  790.  
  791. else:
  792. send "{@lobby} &4You need to give up a &cname &4for the crate!"
  793.  
  794. else if arg-1 is "delete" or "remove":
  795. if arg-2 is set:
  796. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  797. set {_arg2} to "%arg-2 to lower case%"
  798. if contains({_list::*}, {_arg2}):
  799. send "{@lobby} &2Deleting the crate &a%{_arg2}%&2..."
  800.  
  801. remove "%{_arg2}%" from yml list "Lobby.Crates.List" of file "{@config}"
  802. delete file "{@path}/%{_arg2}%.yml"
  803.  
  804. send "{@lobby} &2Succesfully deleted the crate &a%{_arg2}%&2!"
  805.  
  806. else:
  807. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exist!"
  808.  
  809.  
  810.  
  811.  
  812. else:
  813. send "{@lobby} &4You need to give up a &cname &4of the crate you want to delete!"
  814.  
  815. else if arg-1 is "path":
  816. if arg-2 is set:
  817. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  818. set {_arg2} to "%arg-2 to lower case%"
  819. #if {_list::*} contains not {_arg2}:
  820. if contains({_list::*}, {_arg2}):
  821. send "{@lobby} &2Location of %{_arg2}%: &a{@path}/%{_arg2}%&2."
  822.  
  823.  
  824. else:
  825. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exists!"
  826. else:
  827. send "{@lobby} &4You need to give up a &cname &4of the crate you want to get the path of!"
  828.  
  829. else if arg-1 is "get":
  830. if arg 2 is set:
  831. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  832. set {_arg2} to "%arg-2 to lower case%"
  833. if contains({_list::*}, {_arg2}):
  834. send "{@lobby} &2Here you have the &a%{_arg2}% &2crate!%nl%&2Place it to create a chest."
  835. give player 1 chest named "&e%{_arg2}%" with lore "&7Place to create a crate!"
  836. else:
  837. send "{@lobby} &4The crate &c%{_arg2}% &4doesn't exist!"
  838. else:
  839. send "{@lobby} &4You must give up a crate type!"
  840.  
  841. else:
  842. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  843. else:
  844. send "{@lobby} &4Do &c/%{cmd}% help &4for more info."
  845.  
  846.  
  847. command /key [<text>] [<text>] [<text>] [<text>]:
  848. trigger:
  849. if player has permission "key.*":
  850. if arg-1 is set:
  851. if arg-1 is "help":
  852. send "&2----------[ &a%{cmd}% &2]----------"
  853. send "&e&o/%{cmd}% help &d→ &fGet the halp page"
  854. send "&e&o/%{cmd}% get <crate/all> [number] &d→ &fGet a crate"
  855. send "&e&o/%{cmd}% give <player> <crate/all> [number] &d→ &fGive a key to open a crate to a player"
  856. send "&e&o/%{cmd}% remove <all/crate> [number] [player] &d→ &fRemove a key from a player"
  857. send "&e&o/%{cmd}% clear <all/crate> [player] &d→ &fClear the keys from a player"
  858. send "&e&o/%{cmd}% keys <all/crate> [player] &d→ &fGet the amount of keys from a player"
  859. send "&2----------[ &a%{cmd}% &2]----------"
  860.  
  861. else if arg-1 is "get":
  862. if arg-2 is "all":
  863. if arg-3 is set:
  864. if (arg-3 parsed as a number) is set:
  865. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  866. set {_num} to arg-3 parsed as a number
  867. loop {_num} times:
  868. loop {_list::*}:
  869. add 1 to {keys.%player%.%loop-value-2%}
  870.  
  871. send "{@lobby} &2You have recieved all the &a%arg-3% &2times!"
  872.  
  873. else:
  874. send "{@lobby} &c%arg-3% &4is not a number!"
  875. else:
  876. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  877. loop {_list::*}:
  878. add 1 to {keys.%player%.%loop-value%}
  879.  
  880. send "{@lobby} &2You have recieved all keys!"
  881.  
  882. else if arg-2 is set:
  883. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  884. if contains({_list::*}, "%arg-2 to lower case%"):
  885. if arg-3 is set:
  886. if (arg-3 parsed as a number) is set:
  887. add (arg-3 parsed as a number) to {keys.%player%.%arg-2 to lower case%}
  888. send "{@lobby} &2You have recieved &a%arg-2 to lower case% &2key &a%arg-3% &2times!"
  889. else:
  890. send "{@lobby} &c%arg-3% &4is not a number!"
  891. else:
  892. add 1 to {keys.%player%.%arg-2 to lower case%}
  893.  
  894. send "{@lobby} &2You have recieved a &a%arg-2 to lower case% &2key!"
  895. else:
  896. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist."
  897. else:
  898. send "{@lobby} &4You must give up a &ccrate&4!"
  899.  
  900. else if arg-1 is "give":
  901. if arg-2 is set:
  902. if (arg-2 parsed as a player) is set:
  903. if arg-3 is set:
  904. if arg-3 is "all":
  905. if arg-4 is set:
  906. if (arg-4 parsed as a number) is set:
  907. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  908. set {_num} to arg-4 parsed as a number
  909. loop {_num} times:
  910. loop {_list::*}:
  911. add 1 to {keys.%arg-2 parsed as a player%.%loop-value-2%}
  912.  
  913. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2all the keys &a%arg-4% &2times!"
  914. send "{@lobby} &2You have recieved all the keys &a%arg-4% &2times!" to arg-2 parsed as a player
  915.  
  916. else:
  917. send "{@lobby} &c%arg-3% &4is not a number!"
  918. else:
  919. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  920. loop {_list::*}:
  921. add 1 to {keys.%arg-2 parsed as a player%.%loop-value%}
  922.  
  923. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2all the keys!"
  924. send "{@lobby} &2You have recieved all the keys!" to arg-2 parsed as a player
  925. else:
  926. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  927. if contains({_list::*}, "%arg-3 to lower case%"):
  928. if arg-4 is set:
  929. if (arg-4 parsed as a number) is set:
  930.  
  931. add (arg-4 parsed as a number) to {keys.%arg-2%.%arg-3 to lower case%}
  932.  
  933. 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!"
  934. send "{@lobby} &2You have recieved the &a%arg-3 to lower case% &2key &a%arg-4% &2times!" to arg-2 parsed as a player
  935.  
  936. else:
  937. send "{@lobby} &c%arg-3% &4is not a number!"
  938. else:
  939. add 1 to {keys.%arg-2 parsed as a player%.%arg-3 to lower case%}
  940.  
  941. send "{@lobby} &2Succesfully given &a%name of arg-2 parsed as a player% &2the &a%arg-3 to lower case% &2key!"
  942. send "{@lobby} &2You have recieved the &a%arg-3 to lower case% &2key!" to arg-2 parsed as a player
  943. else:
  944. send "{@lobby} &4The crate &c%arg-3 to lower case% &4doesn't exist!"
  945. else:
  946. send "{@lobby} &4You must give up a &ccrate&4!"
  947. else:
  948. send "{@lobby} &4The player &c%arg-2% &4is not online!"
  949. else:
  950. send "{@lobby} &4You must give up a &cplayer&4!"
  951.  
  952.  
  953.  
  954. else if arg-1 is "remove":
  955. if arg-2 is set:
  956. if arg-2 is "all":
  957. if arg-3 is set:
  958. if (arg-3 parsed as a number) is set:
  959. if arg-4 is set:
  960. if (arg-4 parsed as a player) is set:
  961. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  962. set {_num} to arg-3 parsed as a number
  963. loop {_list::*}:
  964. if {keys.%arg-4 parsed as a player%.%loop-value%}-{_num} >= 0:
  965. remove {_num} from {keys.%name of arg-4 parsed as a player%.%loop-value%}
  966. else:
  967. set {keys.%arg-4 parsed as a player%.%loop-value%} to 0
  968.  
  969. send "{@lobby} &2Succesfully removed &a%arg-3% &2from all the keys of &a%name of arg-4 parsed as a player%&2!"
  970. send "{@lobby} &2Removed &a%arg-3% &2from your keys!" to arg-4 parsed as a player
  971.  
  972. else:
  973. send "{@lobby} &4The player &c%arg-4% &4is not online!"
  974. else:
  975. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  976. loop {_list::*}:
  977. if {keys.%player%.%loop-value%}-(arg-3 parsed as a number) >= 0:
  978. remove (arg-3 parsed as a number) from {keys.%player%.%loop-value%}
  979. else:
  980. set {keys.%player%.%loop-value%} to 0
  981.  
  982. send "{@lobby} &2Succesfully removed &a%arg-3% &2from all the keys!"
  983.  
  984. else:
  985. send "{@lobby} &c%arg-3% &4is not a number!"
  986. else:
  987. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  988. loop {_list::*}:
  989. if {keys.%player%.%loop-value%}-1 >= 0:
  990. remove 1 from {keys.%player%.%loop-value%}
  991.  
  992. send "{@lobby} &2Succesfully removed &a1 &2from all the keys"
  993. else:
  994. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  995. if contains({_list::*}, "%arg-2 to lower case%"):
  996. if arg-3 is set:
  997. if (arg-3 parsed as a number) is set:
  998. if arg-4 is set:
  999. if (arg-4 parsed as a player) is set:
  1000. if {keys.%arg-4 parsed as a player%.%arg-2 to lower case%}-(arg-3 parsed as a number) >= 0:
  1001. remove (arg-3 parsed as a number) from {keys.%name of arg-4 parsed as a player%.%arg-2 to lower case%}
  1002. else:
  1003. set {keys.%arg-4 parsed as a player%.%arg-2 to lower case%} to 0
  1004.  
  1005. send "{@lobby} &2Succesfully removed &a%arg-3% %arg-2 to lower case% &2keys from &a%name of arg-4 parsed as a player%&2!"
  1006. send "{@lobby} &a%arg-3% %arg-2 to lower case% &2keys have been removed!" to arg-4 parsed as a player
  1007.  
  1008. else:
  1009. send "{@lobby} &4The player &c%arg-4% &4is not online!"
  1010. else:
  1011.  
  1012. if {keys.%player%.%arg-2 to lower case%}-(arg-3 parsed as a number) >= 0:
  1013. remove (arg-3 parsed as a number) from {keys.%player%.%arg-2 to lower case%}
  1014. send "{@lobby} &2Succesfully removed &a%arg-3% %arg-2 to lower case% &2keys!"
  1015.  
  1016. else:
  1017. send "{@lobby} &c%arg-3% &4is not a number!"
  1018.  
  1019. else:
  1020. if {keys.%player%.%arg-2 to lower case%}-1 >= 0:
  1021. remove 1 from {keys.%player%.%arg-2 to lower case%}
  1022. send "{@lobby} &2Succesfully removed &a1 %arg-2 to lower case% &2keys!"
  1023. else:
  1024. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist."
  1025. else:
  1026. send "{@lobby} &4You must give up a &ccrate&4!"
  1027.  
  1028. #send "&e&o/%{cmd}% clear <all/crate> [player] &d→ &fClear the keys from a player"
  1029. else if arg-1 is "clear":
  1030. if arg-2 is set:
  1031. if arg-2 is "all":
  1032. if arg-3 is set:
  1033. if (arg-3 parsed as a player) is set:
  1034. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1035. loop {_list::*}:
  1036. set {keys.%arg-3 parsed as a player%.%loop-value%} to 0
  1037.  
  1038. send "{@lobby} &2Succesfully cleared &aall keys &2of &a%name of arg-3 parsed as a player%&2!"
  1039. send "{@lobby} &aAll &2your &akeys &2have been cleared!" to arg-3 parsed as a player
  1040. else:
  1041. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1042. else:
  1043. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1044. loop {_list::*}:
  1045. set {keys.%player%.%loop-value%} to 0
  1046.  
  1047. send "{@lobby} &2You have cleared &aall &2your &akeys&2!"
  1048. else:
  1049. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1050. if contains({_list::*}, "%arg-2 to lower case%"):
  1051. if arg-3 is set:
  1052. if (arg-3 parsed as a player) is set:
  1053. set {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} to 0
  1054. send "{@lobby} &2You have cleared the &a%arg-2 to lower case% keys &2from &a%name of arg-3 parsed as a player%&2!"
  1055. send "{@lobby} &2Your &a%arg-2 to lower case% keys &2have been cleared!" to arg-3 parsed as a player
  1056.  
  1057. else:
  1058. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1059.  
  1060. else:
  1061. set {keys.%player%.%arg-2 to lower case%} to 0
  1062. send "{@lobby} &2Succesfully cleared the &a%arg-2 to lower case% keys&2!"
  1063.  
  1064. else:
  1065. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist!"
  1066. else:
  1067. send "{@lobby} &4You must give up a &ccrate&4!"
  1068.  
  1069. else if arg-1 is "keys":
  1070. if arg-2 is set:
  1071. if arg-2 is "all":
  1072. if arg-3 is set:
  1073. if (arg-3 parsed as a player) is set:
  1074. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1075. loop {_list::*}:
  1076. if {keys.%arg-3 parsed as a player%.%loop-value%} is not set:
  1077. set {keys.%arg-3 parsed as a player%.%loop-value%} to 0
  1078.  
  1079. if {_keys} is not set:
  1080. set {_keys} to "&2%loop-value%: &a%{keys.%name of arg-3 parsed as a player%.%loop-value%}%"
  1081. else:
  1082. set {_keys} to "%{_keys}%%nl%&2%loop-value%: &a%{keys.%name of arg-3 parsed as a player%.%loop-value%}%"
  1083.  
  1084. send "{@lobby} &2This is the list of keys from &a%name of arg-3 parsed as a player%&2:%nl%%{_keys}%"
  1085.  
  1086. else:
  1087. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1088. else:
  1089. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1090. loop {_list::*}:
  1091. if {keys.%player%.%loop-value%} is not set:
  1092. set {keys.%player%.%loop-value%} to 0
  1093. if {_keys} is not set:
  1094. set {_keys} to "&2%loop-value%: &a%{keys.%player%.%loop-value%}%"
  1095. else:
  1096. set {_keys} to "%{_keys}%%nl%&2%loop-value%: &a%{keys.%player%.%loop-value%}%"
  1097.  
  1098. send "{@lobby} &2This is your list of keys&2:%nl%%{_keys}%"
  1099. else:
  1100. set {_list::*} to yml list "Lobby.Crates.List" of file "{@config}"
  1101. if contains({_list::*}, "%arg-2 to lower case%"):
  1102. if arg-3 is set:
  1103. if (arg-3 parsed as a player) is set:
  1104. if {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} is not set:
  1105. set {keys.%arg-3 parsed as a player%.%arg-2 to lower case%} to 0
  1106.  
  1107. 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."
  1108.  
  1109. else:
  1110. send "{@lobby} &4The player &c%arg-3% &4is not online!"
  1111. else:
  1112. if {keys.%player%.%arg-2 to lower case%} is not set:
  1113. set {keys.%player%.%arg-2 to lower case%} to 0
  1114.  
  1115. send "{@lobby} &2You have &a%{keys.%player%.%arg-2 to lower case%}% %arg-2 to lower case% &2keys."
  1116. else:
  1117. send "{@lobby} &4The crate &c%arg-2 to lower case% &4doesn't exist!"
  1118. else:
  1119. send "{@lobby} &4You need to give up a &ccrate&4!"
  1120. else:
  1121. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
  1122. else:
  1123. send "{@lobby} &4Do &c/%{cmd}% help &4for more info!"
Add Comment
Please, Sign In to add comment