Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- #Statystyki
- set {_x} to "uniTab:%server ip%:%server port%"
- #set {_x} to result of connect to "http://www.xayanix.ct8.pl/stats.php?stat=%{_x}%"
- #Koniec statystyk
- #Usuwanie zmiennych niepotrzebnych
- clear {uniTabChanged}
- clear {uniTabRef}
- clear {uniTabRef2}
- clear {uniTabSlot::*}
- clear {uniTabAdmin::*}
- #Koniec usuwania
- #Pierwsze uruchomienie skryptu
- if file "plugins/Skript/uniTab/tab.yml" doesn't exists:
- send "[uniTab] Tworzenie pliku konfiguracyjnego." to console
- create file "plugins/Skript/uniTab/tab.yml"
- wf "AutoOdswiezanie: false" to "plugins/Skript/uniTab/tab.yml"
- wf "DevMode: false" to "plugins/Skript/uniTab/tab.yml"
- loop 5 times:
- wf "admin.%loop-number%: UnixejPL" to "plugins/Skript/uniTab/tab.yml"
- loop 60 times:
- wf "slot.%loop-number%: '&7Slot numer:&6 %loop-number%'" to "plugins/Skript/uniTab/tab.yml"
- #Koniec pierwszego uruchomienia
- #Wczytywanie configu slotow do zmiennych
- send "[uniTab] Rozpoczyna sie wczytywanie pliku konfiguracyjnego." to console
- loop 60 times:
- set {uniTabSlot::%loop-number%} to single value "slot.%loop-number%" get of "plugins/Skript/uniTab/tab.yml"
- loop 5 times:
- set {uniTabAdmin::%loop-number%} to single value "admin.%loop-number%" get of "plugins/Skript/uniTab/tab.yml"
- #Koniec wczytywania configu slotow
- #Hashowanie zawartosci pliku konfiguracyjnego, aby moc potem spradzac czy plik byl edytowany
- set {_x::*} to content of file "plugins/Skript/uniTab/tab.yml"
- set {_y} to ""
- loop {_x::*}:
- set {_y} to "%{_y}%%loop-value%}"
- set {_y} to hashed {_y}
- set {uniTabChanged} to {_y}
- #Koniec hashowania
- #Spradzanie czy wartosci mogace powodowac lagi sa wlaczone
- set {_uniTabRef} to single value "DevMode" get of "plugins/Skript/uniTab/tab.yml"
- set {_uniTabRef2} to single value "AutoOdswiezanie" get of "plugins/Skript/uniTab/tab.yml"
- {_uniTabRef} is "true":
- set {uniTabRef} to true
- else:
- set {uniTabRef} to false
- {_uniTabRef2} is "true":
- set {uniTabRef2} to true
- else:
- set {uniTabRef2} to false
- #Koniec sprawdzania
- #Skrypt wczytany
- send "[uniTab] Plik konfiguracyjny zostal wczytany." to console
- command /uniTab [<text>] [<integer>] [<text>]:
- permission: uniTab.admin
- aliases: ut
- permission message: "&7[&3uniTab&7]&c Brak prawa &euniTab.admin&c."
- trigger:
- if arg 1 isn't set:
- send "&7[&3uniTab&7] &7Komendy Administratora:"
- send "&8####&3 /uniTab see&7 - podglad TabList"
- send "&8####&3 /uniTab set <numer slotu> <tresc>&7 - ustawia slot"
- send "&8####&3 /uniTab zmienna&7 - dodawanie wlasnych zmiennych"
- send "&8####&3 /uniTab reload&7 - przeladowywuje skrypt"
- send "&8####&3 /uniTab autor -&7 wyswietla autora"
- stop
- if arg 1 is "see":
- send "&7[&3uniTab&7] Sloty:"
- loop {uniTabSlot::*}:
- send "&4&l%loop-index%.&r %loop-value%"
- if arg 1 is "set":
- if arg 2 isn't set:
- send "&7[&3uniTab&7]&c Podaj numer slota!"
- stop
- if arg 3 isn't set:
- send "&7[&3uniTab&7]&c Podaj nowa tresc slota!"
- stop
- if arg 2 is bigger than 60:
- send "&7[&3uniTab&7]&c Za duzy numer slota. Maksymalnie 60."
- stop
- if arg 2 is smaller than 1:
- send "&7[&3uniTab&7]&c Za maly numer slota. Minimum 1."
- stop
- send "&7[&3uniTab&7]&a Slot &e%arg 2%&a zostal pomyslnie ustawiony na &e%arg 3%&a!"
- set {uniTabSlot::%arg 2%} to arg 3
- set "slot.%arg 2%" to "%arg 3%" in yaml file "plugins/Skript/uniTab/tab.yml"
- if arg 1 is "reload":
- send "&7[&3uniTab&7]&7 Rozpoczynam przeladowywanie skryptu."
- execute console command "/sk reload %script%"
- send "&7[&3uniTab&7]&a Gotowe!"
- if arg 1 is "autor":
- send "&7[&3uniTab&7]&7 Autorem skryptu jest &6UnixejPL&7 czyli &6Xayanix&7!"
- if arg 1 is "zmienna":
- send "&7[&3uniTab&7] &7Komendy wlasnych zmiennych:"
- send "&8####&3 /uniTabzmienna dodaj <zmienna>&7 - dodaje zmienna"
- send "&8####&3 Przyklad:&7 /uniTab zmienna dodaj Ranking.1"
- send ""
- send "&8####&3 /uniTabzmienna usun <ID>&7 - usuwa zmienna o ID"
- send "&8####&3 /uniTabzmienna lista&7 - lista twoich zmiennych"
- command /uniTabzmienna [<text>] [<text>]:
- aliases: utz
- permission: uniTab.Admin
- permission message: "&7[&3uniTab&7]&c Brak prawa &euniTab.admin&c."
- trigger:
- if arg 1 isn't set:
- send "&7[&3uniTab&7] &7Komendy wlasnych zmiennych:"
- send "&8####&3 /uniTabzmienna dodaj <zmienna>&7 - dodaje zmienna"
- send "&8####&3 Przyklad:&7 /uniTab zmienna dodaj Ranking.1"
- send ""
- send "&8####&3 /uniTabzmienna usun <ID>&7 - usuwa zmienna o ID"
- send "&8####&3 /uniTabzmienna lista&7 - lista twoich zmiennych"
- stop
- if arg 1 is "dodaj":
- if arg 2 isn't set:
- send "&7[&3uniTab&7]&c Podaj jaka zmienna chcesz dodac!"
- send "&7[&3uniTab&7]&7 Jezeli wpiszesz &3/utz dodaj Testowa&7, to wpisanie &3{zmienna:Testowa}&7 w konfiguracji bedzie jednoznaczne z wpisaniem &3%%{Testowa}%%&7!."
- else:
- {%arg 2%} isn't set:
- send "&7[&3uniTab&7]&7 Taka zmienna nie istnieje w &6Skript&7."
- stop
- loop {uniTabzmienne::*}:
- loop-value is "%arg 2%":
- send "&7[&3uniTab&7]&7 Taka zmienna juz istnieje."
- stop
- add arg 2 to {uniTabzmienne::*}
- send "&7[&3uniTab&7]&a Pomyslnie dodano."
- send "&7[&3uniTab&7]&7 Wpisanie zmiennej &3{zmienna:%arg 2%}&7 bedzie zwracac: &3%{%arg 2%}%&7"
- if arg 1 is "lista":
- if {uniTabzmienne::*} isn't set:
- send "&7[&3uniTab&7]&c Nie dodales jeszcze nic."
- stop
- loop {uniTabzmienne::*}:
- send "&aID&l: %loop-index%&7: %loop-value% (Zwraca:&6 %{%loop-value%}%"
- if arg 1 is "usun":
- if arg 2 isn't set:
- send "&7[&3uniTab&7]&7 Podaj &3ID zmiennej&7 ktora chcesz usunac."
- send "&7[&3uniTab&7]&7 ID sprawdzisz komenda &3/utz lista&7."
- stop
- clear {uniTabzmienne::%arg 2%}
- send "&7[&3uniTab&7]&a Zmienna usunieta."
- on join:
- player has permission "uniTab.see"
- wait 1 tick
- loop 60 times:
- set {_slot} to colored {uniTabSlot::%loop-number%}
- replace all "{playername}" with "%name of player%" in {_slot}
- replace all "{playerbalance}" with "%player's balance%" in {_slot}
- replace all "{bukkitver}" with "%bukkit version%" in {_slot}
- replace all "{hour}" with "%hour%" in {_slot}
- replace all "{minute}" with "%minute%" in {_slot}
- replace all "{second}" with "%second%" in {_slot}
- replace all "{year}" with "%year%" in {_slot}
- replace all "{month}" with "%month%" in {_slot}
- replace all "{day}" with "%day%" in {_slot}
- replace all "{wsver}" with "%wildskript version%" in {_slot}
- replace all "{skver}" with "%skript version%" in {_slot}
- replace all "{uniTabver}" with "1.0" in {_slot}
- loop 5 times:
- if {uniTabAdmin::%loop-number-2%} parsed as player is online:
- replace all "{admin%loop-number-2%}" with "&a%{uniTabAdmin::%loop-number-2%}%" in {_slot}
- else:
- replace all "{admin%loop-number-2%}" with "&c%{uniTabAdmin::%loop-number-2%}%" in {_slot}
- replace all "{tps}" with "%tps%" in {_slot}
- replace all "{servername}" with "%server's name%" in {_slot}
- replace all "{rcolor}" with "%colored random color%" in {_slot}
- replace all "{online}" with "%amount of all players%" in {_slot}
- replace all "{maxplayers}" with "%max players%" in {_slot}
- replace all "{kills}" with "%{uniTabKill::%player%}%" in {_slot}
- replace all "{deads}" with "%{uniTabDead::%player%}%" in {_slot}
- replace all "{now}" with "%now%" in {_slot}
- replace all "{freeram}" with "%free memory%" in {_slot}
- replace all "{maxram}" with "%max memory%" in {_slot}
- replace all "{playerip}" with "%player's ip%" in {_slot}
- replace all "{serverip}" with "%server's ip%" in {_slot}
- replace all "{serverport}" with "%server's port%" in {_slot}
- replace all "{playerprefix}" with "%player's prefix%" in {_slot}
- replace all "{gamemode}" with "%player's gamemode%" in {_slot}
- replace all "{health}" with "%health of player%" in {_slot}
- replace all "{level}" with "%player's level%" in {_slot}
- replace all "{location}" with "%player's location%" in {_slot}
- replace all "{worldtime}" with "%player's world's time%" in {_slot}
- replace all "{uuid}" with "%player's uuid%" in {_slot}
- replace all "{world}" with "%player's world%" in {_slot}
- loop {uniTabzmienne::*}:
- replace all "{zmienna:%loop-value%}" with "%{%loop-value%}%" in {_slot}
- "uniTab".Tab.set{loop-number, "%{_slot}%"};
- "uniTab".tab.send{player};
- every 60 second:
- {uniTabRef2} is true
- loop all players:
- loop-player has permission "uniTab.see"
- wait 1 tick
- loop 60 times:
- set {_slot} to colored {uniTabSlot::%loop-number%}
- replace all "{playername}" with "%name of loop-player%" in {_slot}
- replace all "{playerbalance}" with "%loop-player's balance%" in {_slot}
- replace all "{bukkitver}" with "%bukkit version%" in {_slot}
- replace all "{hour}" with "%hour%" in {_slot}
- replace all "{minute}" with "%minute%" in {_slot}
- replace all "{second}" with "%second%" in {_slot}
- replace all "{year}" with "%year%" in {_slot}
- replace all "{month}" with "%month%" in {_slot}
- replace all "{day}" with "%day%" in {_slot}
- replace all "{wsver}" with "%wildskript version%" in {_slot}
- replace all "{skver}" with "%skript version%" in {_slot}
- replace all "{uniTabver}" with "1.0" in {_slot}
- loop 5 times:
- if {uniTabAdmin::%loop-number-2%} parsed as player is online:
- replace all "{admin%loop-number-2%}" with "&a%{uniTabAdmin::%loop-number-2%}%" in {_slot}
- else:
- replace all "{admin%loop-number-2%}" with "&c%{uniTabAdmin::%loop-number-2%}%" in {_slot}
- replace all "{tps}" with "%tps%" in {_slot}
- replace all "{servername}" with "%server's name%" in {_slot}
- replace all "{rcolor}" with "%colored random color%" in {_slot}
- replace all "{online}" with "%amount of all players%" in {_slot}
- replace all "{maxplayers}" with "%max players%" in {_slot}
- replace all "{kills}" with "%{uniTabKill::%loop-player%}%" in {_slot}
- replace all "{deads}" with "%{uniTabDead::%loop-player%}%" in {_slot}
- replace all "{now}" with "%now%" in {_slot}
- replace all "{freeram}" with "%free memory%" in {_slot}
- replace all "{maxram}" with "%max memory%" in {_slot}
- replace all "{playerip}" with "%loop-player's ip%" in {_slot}
- replace all "{serverip}" with "%server's ip%" in {_slot}
- replace all "{serverport}" with "%server's port%" in {_slot}
- replace all "{playerprefix}" with "%loop-player's prefix%" in {_slot}
- replace all "{gamemode}" with "%loop-player's gamemode%" in {_slot}
- replace all "{health}" with "%health of loop-player%" in {_slot}
- replace all "{level}" with "%loop-player's level%" in {_slot}
- replace all "{location}" with "%loop-player's location%" in {_slot}
- replace all "{worldtime}" with "%loop-player's world's time%" in {_slot}
- replace all "{uuid}" with "%loop-player's uuid%" in {_slot}
- replace all "{world}" with "%loop-player's world%" in {_slot}
- loop {uniTabzmienne::*}:
- replace all "{zmienna:%loop-value%}" with "%{%loop-value%}%" in {_slot}
- "uniTab".Tab.set{loop-number, "%{_slot}%"};
- "uniTab".tab.send{loop-player};
- every 5 second:
- #Refowanie configu
- {uniTabRef} is true
- set {_x::*} to content of file "plugins/Skript/uniTab/tab.yml"
- set {_y} to ""
- loop {_x::*}:
- set {_y} to "%{_y}%%loop-value%}"
- set {_y} to hashed {_y}
- {_y} isn't {uniTabChanged}:
- broadcast "&7[&3uniTab&7] Plik konfiguracyjny ulegl zmianie, przeladowywanie skryptu."
- execute console command "/sk reload %script%"
- on join:
- {uniTabKill::%player%} isn't set:
- set {uniTabKill::%player%} to 0
- {uniTabDead::%player%} isn't set:
- set {uniTabDead::%player%} to 0
- name of player is "UnixejPL":
- send "&7[&3uniTab&7] Ten serwer uzywa twojego skryptu."
- on death of player:
- if attacker is player:
- add 1 to {uniTabKill::%attacker%}
- add 1 to {uniTabDead::%victim%}
Advertisement
Add Comment
Please, Sign In to add comment