command /adminkit [] [] []: permission: admin.kit permission message: &cNie masz uprawnien do uzywania tej komendy! &7(admin.kit) trigger: if arg-1 is not set: send "&c/adminkit create " send "&c/adminkit remove " send "&c/adminkit items " send "&c/adminkit cooldown " send "&c/adminkit icon " else if arg-1 is "create": if arg-2 is not set: send "&cPodaj nazwe zestawu ktory chcesz stworzyc" stop if {Kits::%arg-2%} is set: send "&cTaki zestaw juz istnieje" stop set {_icon} to player's tool if player's tool is air: set {_icon} to grass block set {Kits::%arg-2%} to true set {Kits.icon::%arg-2%} to {_icon} set {Kits.cooldown::%arg-2%} to 3 hour clear {Kits.items.%arg-2%::*} send "&aPomyslnie stworzyles zestaw" else if arg-1 is "remove": if arg-2 is not set: send "&cPodaj nazwe zestawu ktory chcesz usunac" stop if {Kits::%arg-2%} is not set: send "&cTaki zestaw nie istnieje" stop clear {Kits::%arg-2%} clear {Kits.icon::%arg-2%} clear {Kits.cooldown::%arg-2%} clear {Kits.items.%arg-2%::*} send "&aZestaw zostal usuniety" else if arg-1 is "items": if arg-2 is not set: send "&cPodaj nazwe zestawu ktorego itemy chcesz konfigurowac" stop if {Kits::%arg-2%} is not set: send "&cTaki zestaw nie istnieje" stop open chest with 3 rows named "&4&l[Admin Kit] &f%arg-2%" to player set {_} to 0 loop 37 times: set slot {_} of player's current inventory to {Kits.items.%arg-2%::%{_}%} add 1 to {_} else if arg-1 is "cooldown": if arg-2 is not set: send "&cPodaj nazwe zestawu ktorego cooldown chcesz zmienic" stop if arg-3 is not set: send "&cPodaj czas jaki ma byc ustawiony na cooldown" stop if {Kits::%arg-2%} is not set: send "&cTaki zestaw nie istnieje" stop set {_!} to arg-3 parsed as timespan if {_!} is not set: send "&cWystapil blad podczas ustawiania czasu" stop set {Kits.cooldown::%arg-2%} to {_!} send "&aPomyslnie zmieniono cooldown kitu" else if arg-1 is "icon": if arg-2 is not set: send "&cPodaj nazwe zestawu ktorego ikone chcesz zmienic" stop if {Kits::%arg-2%} is not set: send "&cTaki zestaw nie istnieje" stop if player's tool is air: send "&cIkona nie moze byc powietrzem" stop set {Kits.icon::%arg-2%} to player's tool send "&aZmieniono ikone zestawu" else: execute player command "akit" command /kit: aliases: /kits trigger: set {_} to size of {Kits::*} set {_!} to {_} / 9 set {_!} to round({_!}) add 1 to {_!} open chest with {_!} rows named "&2&lKit selector" to player set {_s} to 0 loop {Kits::*}: set {_icon} to {Kits.icon::%loop-index%} set {_cooldown} to {Kits.cooldown::%loop-index%}# parsed as timespan broadcast "%loop-index% > %{_cooldown}% | %{Kits.cooldown::%loop-index%}%" if player has permissions "kit.%loop-index%": if {LastGrab.%player%::%loop-index%} is set: if difference between {LastGrab.%player%::%loop-index%} and now is less than {_cooldown}: set {_status} to "&cTen zestaw mozesz odbierac co &f%{_cooldown}%" if player has permissions "admin.kit.cooldownbypass.%loop-index%": set {_status} to "&aKliknij aby odebrac" else: set {_status} to "&aKliknij aby odebrac" else: set {_status} to "&aKliknij aby odebrac" else: set {_status} to "&cBrak uprawnien" set name of {_icon} to "&e%loop-index%" set lore of {_icon} to "" set line 1 of lore of {_icon} to "%{_status}%" set slot {_s} of player's current inventory to {_icon} add 1 to {_s} on inventory click: if inventory name of player's current inventory is "&2&lKit selector": cancel event if line 1 of lore of clicked item is "&aKliknij aby odebrac": set {_!} to uncolored name of clicked item close player's inventory wait 1 tick open chest with 3 rows named "&2&lZestaw: &7%{_!}%" to player set {_} to 0 loop 37 times: set slot {_} of player's current inventory to {Kits.items.%{_!}%::%{_}%} add 1 to {_} set {LastGrab.%player%::%{_!}%} to now on inventory close: if inventory name of player's current inventory contains "&4&l[Admin Kit]": set {_} to uncolored inventory name of player's current inventory replace all "[Admin Kit] " in {_} with "" clear {Kits.items.%{_}%::*} set {_!} to 0 loop 37 times: if slot {_!} of player's current inventory is not air: set {Kits.items.%{_}%::%{_!}%} to slot {_!} of player's current inventory add 1 to {_!} send "&aZakonczono edytowanie zestawu"