#=-=-=-=-=-=-=-=-=-=-=-=-=-=- # 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 "KParty" from file "{@fileVer}Version.yml" to "1.0" command /Party [] []: trigger: if arg 1 is not set: send "&7┌───────────────" send "&7│" send "&7│ &8[&e!&8] &eKomendy Lidera" send "&7│" send json "&7│ &8/&e&lParty &eZaloz" tooltip " &8» &eZaloz Party" run "/Party Zaloz" to player send json "&7│ &8/&e&lParty &eUsun" tooltip " &8» &eUsun Party" run "/Party Usun" to player send json "&7│ &8/&e&lParty &eDodaj &8[&eNick&8]" tooltip " &8» &eZaprosz Gracza do Party" to player send json "&7│ &8/&e&lParty &eWyrzuc &8[&eNick&8]" tooltip " &8» &eWyrzuc Gracza z Party" to player send "&7│" send "&7│ &8[&e!&8] &eKomendy Czlonka" send "&7│" send json "&7│ &8/&e&lParty &eWyjdz" tooltip " &8» &eWyjdz Z Party" to player send json "&7│ &8/&e&lParty &eInfo &8[&eNazwa&8]" tooltip " &8» &eWyjdz Z Party" to player send "&7│" send "&7└───────────────" if arg 1 is "Zaloz": if file "{@fileKPCG}%player%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cMasz juz Party!" send "&7│" send "&7└───────────────" stop else: create file "{@fileKPCP}%player%.yml" create file "{@fileKPCG}%player%.yml" set yaml value "Lider" from file "{@fileKPZG}%player%.yml" to "%player%" set yaml value "Nazwa" from file "{@fileKPZP}%player%.yml" to "%player%" add "%player%" to yaml list "Gracze" from file "{@fileKPZP}%player%.yml" send "&7┌───────────────" send "&7│" send "&7│ &8[&2!&8] &2Party zostal stworzony!" send "&7│" send "&7└───────────────" if arg 1 is "Dodaj": if arg 2 is set: set {_nick} to arg 2 if file "{@fileKPCG}%{_nick}%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTen gracz ma juz Party!" send "&7│" send "&7└───────────────" stop else: if file "{@fileKPCG}%player%.yml" exists: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%player%.yml" set {_online} to arg 2 set {_online} to {_online} parsed as player set {_nick} to player if {_online} is online: set {_Lider} to yaml value "Nazwa" from file "{@fileKPZP}%{_Nazwa}%.yml" if {_Lider} is not {_Nazwa}: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie jestes Liderem party, tylko Lider moze dodawac do party" send "&7│" send "&7└───────────────" stop set {_lista::*} to yaml list "Gracze" from file "{@fileKPZP}%{_Nazwa}%.yml" set {_num} to size of {_lista::*} if {_num} = 3: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTwoje party ma max czlonkow!" send "&7│" send "&7└───────────────" stop add "%{_online}%" to yaml list "Zapro" from file "{@fileKPZP}%player%.yml" send "&7┌───────────────" send "&7│" send "&7│ &eZaproszenie zostalo wyslane!" send "&7│" send "&7└───────────────" send "&7┌───────────────" to {_online} send "&7│" to {_online} send "&7│ &6%player% &eZaprasza cie do Party &6%player%&e!" to {_online} send json "&7│ &6Klinkij &eLub &6Wpisz &8/&e&lParty &eDolacz %Player% !" tooltip " &8» &eDolacz do Party!" run "/Party Dolacz %Player%" to {_online} send "&7│" to {_online} send "&7└───────────────" to {_online} 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] &cNie masz party!" 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 "{@fileKPCG}%player%.yml" exists: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cMasz juz party!" send "&7│" send "&7└───────────────" stop set {_Nazwa} to arg 2 set {_lista2::*} to yaml list "Zapro" from file "{@fileKPZP}%{_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 "{@fileKPZP}%{_Nazwa}%.yml" set {_num} to size of {_lista::*} if {_num} = 3: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cTo party ma max czlonkow!" send "&7│" send "&7└───────────────" stop else: remove "%player%" from yaml list "Zapro" from file "{@fileKPZP}%{_Nazwa}%.yml" add "%player%" to yaml list "Gracze" from file "{@fileKPZP}%{_Nazwa}%.yml" create file "{@fileKPCG}%player%.yml" set yaml value "Lider" from file "{@fileKPZG}%player%.yml" to "%{_Nazwa}%" send "&7┌───────────────" send "&7│" send "&7│ &eDolaczyles do party &6%{_Nazwa}%!" send "&7│" send "&7└───────────────" send "&7┌───────────────" to {_Nazwa} send "&7│" to {_Nazwa} send "&7│ &eGracz %player% dolaczyl do twojego party!" to {_Nazwa} send "&7│" to {_Nazwa} send "&7└───────────────" to {_Nazwa} stop send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie masz zaproszenia od tego party!" send "&7│" send "&7└───────────────" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cPodaj nick Gracza!" send "&7│" send "&7└───────────────" if arg 1 is "Usun": if file "{@fileKPCG}%player%.yml" exists: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%player%.yml" set {_spr} to player if {_Nazwa} is {_spr}: set {_lista::*} to yaml list "Gracze" from file "{@fileKPZP}%player%.yml" set {_num} to size of {_lista::*} loop {_num} times: delete file "{@fileKPCG}%{_lista::%loop-number%}%.yml" 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│ &cParty zostalo usuniete przez lidera!" to {_lista::%loop-number%} send "&7│" to {_lista::%loop-number%} send "&7└───────────────" to {_lista::%loop-number%} delete file "{@fileKPCP}%player%.yml" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie jestes liderem tego party!" send "&7│" send "&7└───────────────" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie Masz party!" send "&7│" send "&7└───────────────" if arg 1 is "Wyjdz": if file "{@fileKPCG}%player%.yml" exists: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%player%.yml" set {_spr} to player if {_Nazwa} is {_spr}: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cJestes liderem tego party, musisz go usunac /party usun !" send "&7│" send "&7└───────────────" else: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%player%.yml" delete file "{@fileKPCG}%player%.yml" send "&7┌───────────────" send "&7│" send "&7│ &cOd teraz nie masz juz party!" send "&7│" send "&7└───────────────" remove "%player%" from yaml list "Gracze" from file "{@fileKPZP}%{_Nazwa}%.yml" stop else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie Masz party!" send "&7│" send "&7└───────────────" if arg 1 is "info": if arg 2 is not set: if file "{@fileKPCG}%player%.yml" exists: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%player%.yml" set {_lista::*} to yaml list "Gracze" from file "{@fileKPZP}%{_Nazwa}%.yml" send "&7┌───────────────" send "&7│" send "&7│ &eNazwa Teamu: &6%{_Nazwa}%" send "&7│" send "&7│ &eLiczba ludzi z Teamu Lidera:" if file "{@fileKTCG}%{_Nazwa}%.yml" exists: set {_lzt} to 0 set {_num} to size of {_lista::*} set {_NazwaTeamu} to yaml value "Team" from file "{@fileKTZG}%{_Nazwa}%.yml" loop {_num} times: set {_NazwaTeamuGracza} to yaml value "Team" from file "{@fileKTZG}%{_lista::%loop-number%}%.yml" if {_NazwaTeamu} is {_NazwaTeamuGracza}: add 1 to {_lzt} delete {_NazwaTeamuGracza} send "&7│ &eTeam &6%{_NazwaTeamu}%:" send "&7│ &eLiczba graczy z tego teamu w party: &8(&6%{_lzt}%&8)" else: send "&7│ &eLider nie ma teamu &8(&60&8)" send "&7│" send "&7│ &eLista Czlonkow:" send "&7│ &eLider: &6%{_Nazwa}%" send "&7│" send "&7│" set {_num} to size of {_lista::*} loop {_num} times: set {_gracz} to {_lista::%loop-number%} set {_gracz} to {_gracz} parsed as player send "&7│ &e%loop-number%: &a%{_gracz}%" send "&7│" send "&7└───────────────" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie Masz party!" send "&7│" send "&7└───────────────" if arg 2 is set: if file "{@fileKPCP}%arg 2%.yml" exists: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%arg 2%.yml" set {_lista::*} to yaml list "Gracze" from file "{@fileKPZP}%{_Nazwa}%.yml" send "&7┌───────────────" send "&7│" send "&7│ &eNazwa Teamu: &6%{_Nazwa}%" send "&7│" send "&7│ &eLista Czlonkow:" send "&7│ &eLider: &6%{_Nazwa}%" send "&7│" set {_num} to size of {_lista::*} loop {_num} times: set {_gracz} to {_lista::%loop-number%} set {_gracz} to {_gracz} parsed as player send "&7│ &e%loop-number%: &a%{_gracz}%" send "&7│" send "&7└───────────────" else: send "&7┌───────────────" send "&7│" send "&7│ &8[&c!&8] &cNie ma takiego party!" send "&7│" send "&7└───────────────" on quit: if file "{@fileKPCG}%player%.yml" exists: set {_Nazwa} to yaml value "Lider" from file "{@fileKPZG}%player%.yml" set {_spr} to player if {_Nazwa} is {_spr}: execute player command "Party usun" else: execute player command "Party wyjdz"