#=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Autor: Kusko321 # Version: 1.0 # Website: Kusko321.pl | 178.33.45.181 # Skrypt Wymaga: AutoIn, Skript, WildSkript, SkQuery # Dodatek: Dodatek do KXvsx.sk #=-=-=-=-=-=-=-=-=-=-=-=-=-=- options: fileKTCT: plugins/Skript/scripts/YML/KTeam/Teamy/ fileKTZT: YML/KTeam/Teamy/ fileKTCG: plugins/Skript/scripts/YML/KTeam/Gracze/ fileKTZG: YML/KTeam/Gracze/ fileKTC: YML/KTeam/Config.yml fileKPC: YML/KParty/Config.yml fileKPCP: plugins/Skript/scripts/YML/KParty/Party/ fileKPZP: YML/KParty/Party/ fileKPCG: plugins/Skript/scripts/YML/KParty/Gracze/ fileKPZG: YML/KParty/Gracze/ fileKRCG: plugins/Skript/scripts/YML/KRanking/Gracze/ fileKRZG: YML/KRanking/Gracze/ fileKXCK: plugins/Skript/scripts/YML/KXvsx/Kolejka/ fileKXZK: YML/KXvsx/Kolejka/ fileKXCG: plugins/Skript/scripts/YML/KXvsx/Gry/ fileKXZG: YML/KXvsx/Gry/ fileKXCA: plugins/Skript/scripts/YML/KXvsx/Areny/ fileKXZA: YML/KXvsx/Areny/ fileKXCC: plugins/Skript/scripts/YML/KXvsx/Config/ fileKXZC: YML/KXvsx/Config/ fileVer: YML/Version/ on load: set yaml value "KTeam" from file "{@fileVer}Version.yml" to "1.0" command /Team [] [] []: executable by: players trigger: if arg 1 is not set: send "&7┌───────────────" send "&7│" send json "&7│ &8/&e&lTeam &eZaloz &8[&eNazwa&8]" tooltip " &8» &eZaloz swoj team!" to player send json "&7│ &8/&e&lTeam &eDolacz &8[&eNazwa&8]" tooltip " &8» &eDolacz do teamu!" to player send "&7│" send "&7│ &8[&e!&8] &eKomendy Lidera" send "&7│" send json "&7│ &8/&e&lTeam &eUsun" tooltip " &8» &eUstaw Teleport!" run "/Team Usun" to player send json "&7│ &8/&e&lTeam &eLider &eDodaj &8[&eNick&8]" tooltip " &8» &eDodaj Gracza do Temu" to player send json "&7│ &8/&e&lTeam &eLider &eWyrzuc &8[&eNick&8]" tooltip " &8» &eWyrzuca Czlonka z Teamu" to player send "&7│" send "&7│ &8[&e!&8] &eKomendy Czlonka" send "&7│" send json "&7│ &8/&e&lTeam &eInfo &8[&eNazwa&8]" tooltip " &8» &eSprawdza informacje o Teamie" to player send json "&7│ &8/&e&lTeam &eWyjdz " tooltip " &8» &eWyjdz z swojego teamu" run "/Team Wyjdz" to player send "&7│" send "&7└───────────────" if arg 1 is "Zaloz": if arg 2 is set: if length of arg 2 is less than 3: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNazwa musi miec minimum 3 liter!" send "&7│" send "&7└───────────────" stop if length of arg 2 is greater than 10: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNazwa musi miec maximum 10 liter!" send "&7│" send "&7└───────────────" stop if file "{@fileKTCT}%arg 2%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTaka nazwa jest juz zajeta!" send "&7│" send "&7└───────────────" stop if file "{@fileKTCG}%player%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cMasz juz Team!" send "&7│" send "&7└───────────────" stop else: set {_Nazwa} to arg 2 set {_Lider} to player set {_Ranking} to 1500 create file "{@fileKTCT}%arg 2%.yml" create file "{@fileKTCG}%player%.yml" set yaml value "Team" from file "{@fileKTZG}%player%.yml" to "%{_Nazwa}%" set yaml value "Nazwa" from file "{@fileKTZT}%arg 2%.yml" to "%{_Nazwa}%" set yaml value "Lider" from file "{@fileKTZT}%arg 2%.yml" to "%{_Lider}%" set yaml value "Ranking" from file "{@fileKTZT}%arg 2%.yml" to "%{_Ranking}%" add "%player%" to yaml list "Gracze" from file "{@fileKTZT}%arg 2%.yml" send "&7┌───────────────" send "&7│" send "&7│ &8[&2!&8] &2Team zostal stworzony!" send "&7│" send "&7└───────────────" stop else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cPodaj nazwe Teamu!" send "&7│" send "&7└───────────────" if arg 1 is "Usun": set {_spr} to yaml value "Team" from file "{@fileKTZG}%player%.yml" if {_spr} is not set: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie masz Teamu!" send "&7│" send "&7└───────────────" stop set {_Nazwa} to {_spr} set {_spr} to yaml value "Lider" from file "{@fileKTZT}%{_Nazwa}%.yml" if {_spr} is not player: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie jestes Liderem teamu. Tylko Lider moze usunac Team!" send "&7│" send "&7└───────────────" stop if {_spr} is player: set {_lista::*} to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_num} to size of {_lista::*} loop {_num} times: set {_lista::%loop-number%} to {_lista::%loop-number%} parsed as player send "&7┌───────────────" to {_lista::%loop-number%} send "&7│" to {_lista::%loop-number%} send "&7│ &8[&c!&8] &cTeam zostal usuniety przez Lidera!" to {_lista::%loop-number%} send "&7│" to {_lista::%loop-number%} send "&7└───────────────" to {_lista::%loop-number%} delete file "{@fileKTCG}%{_lista::%loop-number%}%.yml" delete file "{@fileKTCT}%{_Nazwa}%.yml" if arg 1 is "Lider": if arg 2 is "Dodaj": if arg 3 is set: set {_nick} to player set {_Nazwa} to yaml value "Team" from file "{@fileKTZG}%player%.yml" set {_online} to arg 3 set {_online} to {_online} parsed as player if {_online} is online: if {_Nazwa} is not set: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie masz Teamu!" send "&7│" send "&7└───────────────" stop set {_Lider} to yaml value "Lider" from file "{@fileKTZT}%{_Nazwa}%.yml" if {_Lider} is not {_nick}: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie jestes Liderem teamu, tylko Lider moze dodawac do teamu" send "&7│" send "&7└───────────────" stop if {_Lider} is {_nick}: set {_lista::*} to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_num} to size of {_lista::*} if {_num} = 3: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTwoj team ma max czlonkow!" send "&7│" send "&7└───────────────" stop if file "{@fileKTCG}%arg 3%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTen Gracz ma juz Team!" send "&7│" send "&7└───────────────" stop else: set {_inv} to arg 3 set {_inv} to {_inv} parsed as player send "&7┌───────────────" send "&7│" send "&7│ &eZaproszenie zostalo wyslane!" send "&7│" send "&7└───────────────" add "%arg 3%" to yaml list "Zapro" from file "{@fileKTZT}%{_Nazwa}%.yml" send "&7┌───────────────" to {_inv} send "&7│" to {_inv} send "&7│ &6%player% &eZaprasza cie do Teamu &6%{_Nazwa}%&e!" to {_inv} send json "&7│ &6Klinkij &eLub &6Wpisz &8/&e&lTeam &eDolacz %{_Nazwa}% !" tooltip " &8» &eDolacz do Teamu!" run "/Team Dolacz %{_Nazwa}%" to {_inv} send "&7│" to {_inv} send "&7└───────────────" to {_inv} else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTen Gracz nie jest online!" send "&7│" send "&7└───────────────" stop else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cPodaj nick!" send "&7│" send "&7└───────────────" stop if arg 2 is "wyrzuc": if arg 3 is set: set {_nick} to player set {_Nazwa} to yaml value "Team" from file "{@fileKTZG}%player%.yml" set {_online} to arg 3 set {_online} to {_online} parsed as player if {_online} is online: if {_Nazwa} is not set: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie masz Teamu!" send "&7│" send "&7└───────────────" stop set {_Lider} to yaml value "Lider" from file "{@fileKTZT}%{_Nazwa}%.yml" if {_Lider} is not {_nick}: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie jestes Liderem teamu, tylko Lider moze wyrzucac z teamu!" send "&7│" send "&7└───────────────" stop if {_Lider} is {_nick}: if {_Lider} is arg 3: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cJestes Liderem, nie mozesz sie sam wywalic z teamu!" send "&7│" send "&7└───────────────" stop else: set {_lista::*} to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_num} to size of {_lista::*} loop {_num} times: set {_spr} to {_lista::%loop-number%} if {_spr} is arg 3: remove "%arg 3%" from yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" delete file "{@fileKTCT}%arg 3%.yml" set {_re} to arg 3 set {_re} to {_re} parsed as player send "&7┌───────────────" send "&7│" send "&7│ &eGracz zostal wywalony z teamu!" send "&7│" send "&7└───────────────" send "&7┌───────────────" to {_re} send "&7│" to {_re} send "&7│ &8[&c!&8] &cTen gracz nie jest w twoim Teamie!" to {_re} send "&7│" to {_re} send "&7└───────────────" to {_re} stop send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTen gracz nie jest w twoim Teamie!" send "&7│" send "&7└───────────────" stop else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTen Gracz nie jest online!" send "&7│" send "&7└───────────────" stop else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cPodaj Nick!" send "&7│" send "&7└───────────────" stop if arg 1 is "Dolacz": if arg 2 is set: if file "{@fileKTCG}%player%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cMasz juz Team!" send "&7│" send "&7└───────────────" stop set {_Nazwa} to arg 2 set {_lista2::*} to yaml list "Zapro" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_num} to size of {_lista2::*} loop {_num} times: set {_spr} to {_lista2::%loop-number%} if {_spr} is player: set {_lista::*} to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_num} to size of {_lista::*} if {_num} = 3: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTen team ma max czlonkow!" send "&7│" send "&7└───────────────" stop else: remove "%player%" from yaml list "Zapro" from file "{@fileKTZT}%{_Nazwa}%.yml" add "%player%" to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" create file "{@fileKTCG}%player%.yml" set yaml value "Team" from file "{@fileKTZG}%player%.yml" to "%{_Nazwa}%" send "&7┌───────────────" send "&7│" send "&7│ &eDolaczyles do teamu &6%{_Nazwa}%!" send "&7│" send "&7└───────────────" stop send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie masz zaproszenia od tego teamu!" send "&7│" send "&7└───────────────" if arg 1 is "wyjdz": if file "{@fileKTCG}%player%.yml" exists: set {_Nazwa} to yaml value "Team" from file "{@fileKTZG}%player%.yml" set {_Lider} to yaml value "Lider" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_Lider} to {_Lider} parsed as text set {_nick} to player set {_nick} to {_nick} parsed as text if {_Lider} is {_nick}: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cJestes Liderem teamu, musisz usunac team!" send "&7│" send "&7└───────────────" stop else: set {_Nazwa} to yaml value "Team" from file "{@fileKTZG}%player%.yml" delete file "{@fileKTCG}%player%.yml" send "&7┌───────────────" send "&7│" send "&7│ &eOd teraz nie masz juz teamu!" send "&7│" send "&7└───────────────" remove "%player%" from yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" stop else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cMasz juz Team!" send "&7│" send "&7└───────────────" stop if arg 1 is "info": if arg 2 is not set: if file "{@fileKTCG}%player%.yml" exists: set {_Nazwa} to yaml value "Team" from file "{@fileKTZG}%player%.yml" set {_Ranking} to yaml value "Ranking" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_Lider} to yaml value "Lider" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_lista::*} to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" send "&7┌───────────────" send "&7│" send "&7│ &eNazwa Teamu: &6%{_Nazwa}%" send "&7│" send "&7│ &eRanking: &6%{_Ranking}%" send "&7│" send "&7│ &eLista Czlonkow:" send "&7│ &eLider: &6%{_Lider}%" send "&7│" set {_num} to size of {_lista::*} loop {_num} times: set {_gracz} to {_lista::%loop-number%} set {_gracz} to {_gracz} parsed as player if {_gracz} is online: send "&7│ &e%loop-number%: &a%{_gracz}%" else: send "&7│ &e%loop-number%: &c%{_gracz}%" send "&7│" send "&7└───────────────" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cPodaj nazwe teamu!" send "&7│" send "&7└───────────────" stop else: set {_Nazwa} to arg 2 set {_Ranking} to yaml value "Ranking" from file "{@fileKTZT}%{_Nazwa}%.yml" if {_Ranking} is set: set {_Lider} to yaml value "Lider" from file "{@fileKTZT}%{_Nazwa}%.yml" set {_lista::*} to yaml list "Gracze" from file "{@fileKTZT}%{_Nazwa}%.yml" send "&7┌───────────────" send "&7│" send "&7│ &eNazwa Teamu: &6%{_Nazwa}%" send "&7│" send "&7│ &eRanking: &6%{_Ranking}%" send "&7│" send "&7│ &eLista Czlonkow:" send "&7│ &eLider: &6%{_Lider}%" send "&7│" set {_num} to size of {_lista::*} loop {_num} times: set {_gracz} to {_lista::%loop-number%} set {_gracz} to {_gracz} parsed as player if {_gracz} is online: send "&7│ &e%loop-number%: &a%{_gracz}%" else: send "&7│ &e%loop-number%: &c%{_gracz}%" send "&7│" send "&7└───────────────" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie ma takiego teamu!" send "&7│" send "&7└───────────────" stop