Zeldaboy111

Skript #261 - Crate (1)

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