Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ZROBIONE#
- # - zakladanie /do ulepszenia duzo
- # - usuwanie /do ulepszenia
- # - else if usuwanie ;c*
- #ogien sojusznicy
- #zakladanie gildii
- #tagi nad glowa
- #zapisy do plikow...
- #narazie tyle
- #tworzenie gildii zapis do pliku .yml
- options:
- folder: plugins/Skript/scripts/foxGuilds
- wiad: plugins/Skript/scripts/foxGuilds/messages.yml
- cfg: plugins/Skript/scripts/foxGuilds/config.yml
- gildie: plugins/Skript/scripts/foxGuilds/gildie.yml
- users: plugins/Skript/scripts/foxGuilds/user.yml
- invited: plugins/Skript/scripts/foxGuilds/invited.yml
- urank: plugins/Skript/scripts/foxGuilds/urank.yml
- on script load:
- if folder "{@folder}" doesn't exists:
- create folder "{@folder}"
- create file "{@cfg}"
- create file "{@gildie}"
- create file "{@wiad}"
- create file "{@users}"
- create file "{@invited}"
- create file "{@urank}"
- set "permissionVip" to "guilds.Vip" in yaml file "{@cfg}"
- set "startRank" to "1000" in yaml file "{@cfg}"
- set "bc.wGCreate" to "" in yaml file "{@wiad}"
- set "w.wGHelp" to "" in yaml file "{@wiad}"
- set "cfg.guildItems.1" to "32 diamond" in yaml file "{@cfg}"
- set "cfg.guildItems.2" to "64 stone" in yaml file "{@cfg}"
- set "cfg.guildItemsVip.1" to "16 diamond" in yaml file "{@cfg}"
- set "cfg.guildItemsVip.2" to "32 stone" in yaml file "{@cfg}"
- command /gildia [<text>] [<text>] [<text>] [<text>]:
- aliases: g
- trigger:
- if arg 1 is not set:
- send "&e/gildia zaloz <tag> <nazwa> &7- zaklada gildie%nl%&e/gildia usun <tag> &7- usuwa gildie"
- stop
- if arg 1 is "zaloz":
- if arg 2 is set:
- if arg 2's length is bigger than 2:
- if arg 2's length is smaller than 5:
- if arg 3 is set:
- if arg 3's length is smaller or equal to 16:
- if arg 3's length is bigger than 6:
- if yaml path "users.%player%" in file "{@users}" doesn't exist:
- set {_g::*} to configuration section "gildia" get of "{@gildie}"
- loop {_g::*}:
- set {_tag} to single value "gildia.%loop-value%.tag" get of "{@gildie}"
- if "%{_tag}%" is "%arg 2%":
- send "&c* &7Gildia z podanym tagiem juz istnieje."
- stop
- loop {_g::*}:
- set {_nazwa} to single value "gildia.%loop-value%.nazwa" get of "{@gildie}"
- if "%{_nazwa}%" is "%arg 3%":
- send "&c* &7Taka nazwa gildi juz istnieje."
- stop
- set {_perm} to single value "permissionVip" get of "{@cfg}"
- if player doesn't have permission "%{_perm}%":
- set {_p::*} to configuration section "cfg.guildItems" get of "{@cfg}"
- loop {_p::*}:
- set {_i} to single value "cfg.guildItems.%loop-index%" get of "{@cfg}" parsed as item type
- if player doesn't have {_i}:
- send "&cNie posiadasz: &6%{_i}%"
- set {_error} to true
- else:
- set {_p::*} to configuration section "cfg.guildItemsVip" get of "{@cfg}"
- loop {_p::*}:
- set {_i} to single value "cfg.guildItemsVip.%loop-index%" get of "{@cfg}" parsed as item type
- if player doesn't have {_i}:
- send "&cNie posiadasz: &6%{_i}%"
- set {_error} to true
- if {_error} is set:
- stop
- stop
- wait 10 tick
- set "gildia.%arg 2%.tag" to "%arg 2%" in yaml file "{@gildie}"
- set "gildia.%arg 2%.nazwa" to "%arg 3%" in yaml file "{@gildie}"
- set "gildia.%arg 2%.zalozyciel" to "%player%" in yaml file "{@gildie}"
- set "gildia.%arg 2%.lider" to "%player%" in yaml file "{@gildie}"
- set "users.%player%.nick" to "%player%" in yaml file "{@users}"
- set "users.%player%.gildia" to "%arg 2%" in yaml file "{@users}"
- add "%player%" to yaml list "gildia.%arg 2%.czlonkowie" from "foxGuilds/gildie.yml"
- broadcast "&aGracz &7%player% &astworzyl gildie o nazwie &7%arg 3% &a i tagu &7%arg 2%"
- else:
- send "&8>> &cPosiadasz juz gildie."
- stop
- else:
- send "&8>> &cNazwa gildii musi zawierac od 6 do 16 znakow."
- stop
- else:
- send "&8>> &cNazwa gildii musi zawierac od 6 do 16 znakow."
- stop
- else:
- send "&8>> &cPoprawne uzycie: &7/gildia zaloz <tag> <nazwa>"
- stop
- else:
- send "&8>> &cTag gildii musi zawierac od 3 do 4 znakow."
- stop
- else:
- send "&8>> &cTag gildii musi zawierac od 3 do 4 znakow."
- stop
- else:
- send "&8>> &cPoprawne uzycie: &7/gildia zaloz <tag> <nazwa>"
- stop
- if arg 1 is "usun":
- if arg 2 is set:
- set {_g::*} to configuration section "gildia" get of "{@gildie}"
- loop {_g::*}:
- set {_tag} to single value "gildia.%loop-value%.tag" get of "{@gildie}"
- if yaml path "gildia.%arg 2%" in file "{@gildie}" exists:
- if "%arg 2%" is "%{_tag}%":
- set {_zal} to single value "gildia.%loop-value%.zalozyciel" get of "{@gildie}"
- set {_lid} to single value "gildia.%loop-value%.lider" get of "{@gildie}"
- if "%player%" is "%{_lid}%" or "%{_zal}%":
- send "&8>> &aUsunales swoja gildie!"
- delete yaml value "gildia.%arg 2%" from file "foxGuilds/guilds.yml"
- delete yaml value "users.%player%" from file "foxGuilds/user.yml"
- stop
- else:
- send "&8>> &cNie masz uprawnien lidera/zalozyciela"
- stop
- else:
- send "&8>> &cPodana gildia nie instnieje."
- stop
- else:
- send "&8>> &cPodana gildia nie istnieje."
- stop
- else:
- send "&8>> &cPoprawne uzycie: &7/gildia usun <tag>"
- stop
- if arg 1 is "zapros":
- if arg 2 is set:
- set {_c} to arg 2 parsed as player
- if {_c} is online:
- if true is true: #Huehuehuehuehuehue Knugi To Chuj i Chuj Ci do Tego <3
- if yaml path "users.%{_c}%" in file "{@users}" doesn't exist:
- send "&aZapraszalny"
- #TODO cale zaproszenie
- else:
- send "7cma gildie"
- else:
- send "&8>> &cTen gracz nie jest online."
- stop
- else:
- send "&8>> &cMusisz podac nick gracza ktorego chcesz zaprosic."
- stop
- #EVENTY RANKINGOWE
- on join:
- if yaml path "ranking.%player%" in file "{@urank}" doesn't exist:
- set {_dt} to single value "startRank" get of "{@cfg}"
- set "ranking.%player%" to "%{_dt}%" in yaml file "{@urank}"
- send "&7Domyslny ranking ustawiony!"
Advertisement
Add Comment
Please, Sign In to add comment