Zeldaboy111

Skript #266 ]|[ Compression (2)

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