Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /rodzina [<text="pomoc">] [<text>]:
- trigger:
- if arg 1 is "pomoc":
- send "&6Komendy rodzinki by Knugi:"
- send "&a/rodzina stworz <nazwa> &8- &7tworzy rodzine"
- send "&a/rodzina dodaj <nick> &8- &7dodaje gracza do rodziny"
- send "&a/rodzina wyrzuc <nick> &8- &7wyrzuca gracza z rodziny"
- send "&a/rodzina akceptuj &8- &7akceptuje dodanie do rodziny"
- send "&a/rodzina opusc &8- &7opuszczasz rodzine"
- send "&a/rodzina usun &8- &7usuwa rodzine"
- send "&a/rodzina lista &8- &7wyswietla liste dodanych do rodziny"
- send "&a/rodzina przekaz <nick> &8- &7przekazujesz glowe rodziny na kogos innego"
- send "&a/rodzina chat &8- &7wlacza/wylacza chat rodzinny"
- stop
- if arg 1 is "stworz":
- if arg 2 is not set:
- send "&c* &6Podaj nazwe rodziny jaka chcesz zalozyc."
- stop
- if arg 2 contains "##" or "*" or "?":
- send "&c* &6Nazwa zawiera niedozwolone znaki."
- stop
- if length of arg 2 is larger than 16:
- send "&c* &6Nazwa jest za dluga."
- stop
- if {family.%player%} is set:
- send "&c* &6Posiadasz juz rodzine."
- stop
- if {family::%arg 2%} is set:
- send "&c* &6Taka rodzina juz istnieje"
- stop
- set {family.%player%} to arg 2
- set {family::%arg 2%} to player
- add player to {family::%arg 2%::members::*}
- broadcast "&c* &6Powstala nowa rodzinie o nazwie &3%arg 2%"
- stop
- if arg 1 is "dodaj":
- if {family.%player%} is not set:
- send "&c* &6Nie posiadasz rodziny."
- stop
- if player is not {family::%{family.%player%}%}:
- send "&c* &6Nie jestes zalozycielem rodziny."
- stop
- if arg 2 is not set:
- send "&c* &6Podaj nazwe gracza, ktorego chcesz dodac do rodziny."
- stop
- set {_arg2} to "%arg 2%" parsed as offlineplayer
- if {_arg2} is online:
- if {family.%{_arg2}%} is not set:
- if {familyr.%{_arg2}%.time} is not set:
- set {familyr.%{_arg2}%.request} to {family.%player%}
- set {familyr.%{_arg2}%.time} to 20
- send "&c* &6Rodzina &3%{family.%player%}% &6zaprasza cie do grona. Wpisz &c/rodzina akceptuj&6, by akceptowac." to {_arg2}
- stop
- send "&c* &6Ten gracz ma juz zaproszenie do rodziny. &8(&7%{familyr.%{_arg2}%.time}%&8)"
- stop
- send "&c* &6Ten gracz nalezy juz do rodziny."
- stop
- send "&c* &6Nie ma takiego gracza na serwerze."
- stop
- if arg 1 is "akceptuj":
- if {family.%player%} is set:
- send "&c* &6Juz posiadasz rodzine."
- stop
- if {familyr.%player%.request} is set:
- add player to {family::%{familyr.%player%.request}%::members::*}
- set {family.%player%} to {familyr.%player%.request}
- clear {familyr.%player%.request}
- clear {familyr.%player%.time}
- send "&c* &6Dolaczyles do rodziny &3%{family.%player%}%."
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- if {_p} is not player:
- send "&c* &6Gracz &3%player% &6dolaczyl twojej rodziny." to {_p}
- stop
- send "&c* &6Nie masz co akceptowac."
- stop
- if arg 1 is "wyrzuc":
- if {family.%player%} is not set:
- send "&c* &6Nie posiadasz rodziny."
- stop
- if {family::%{family.%player%}%} is player:
- if arg 2 is not set:
- send "&c* &6Podaj nick gracza ktorego chcesz wyrzucic z rodziny."
- stop
- set {_arg2} to "%arg 2%" parsed as offlineplayer
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- if {_p} is {_arg2}:
- remove loop-value from {family::%{family.%player%}%::members::*}
- clear {family.%{_arg2}%}
- clear {family.%{_arg2}%.chat}
- send "&c* &6Wyrzucono cie z rodziny." to {_arg2}
- if {_p} is not {_arg2}:
- send "&c* &6Wyrzucono gracza &c%arg 2% &6z twojej rodziny." to {_p}
- stop
- send "&c* &6Nie jestes zalozycielem rodziny."
- stop
- if arg 1 is "opusc":
- if {family.%player%} is not set:
- send "&c* &6Nie jestes w zadnej rodzinie."
- stop
- if player is {family::%{family.%player%}%}:
- send "&c* &6Nie mozesz opuscic rodziny, gdy jestes jej zalozycielem."
- stop
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- if {_p} is not player:
- send "&c* &6Gracz &3%player% &6opuscil twoja rodzine." to {_p}
- remove player from {family::%{family.%player%}%::members::*}
- clear {family.%player%}
- clear {family.%player%.chat}
- send "&c* &6Opusciles rodzine."
- stop
- if arg 1 is "usun":
- if {family.%player%} is not set:
- send "&c* &6Nie posiadasz rodziny."
- stop
- if player is not {family::%{family.%player%}%}:
- send "&c* &6Nie jestes zalozycielem rodziny."
- stop
- set {_f} to {family.%player%}
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- send "&c* &6Twoja rodzina zostala usunieta." to {_p}
- clear {family.%{_p}%}
- clear {family.%{_p}%.chat}
- clear {family::%{_f}%::members::*}
- clear {family::%{_f}%}
- stop
- if arg 1 is "przekaz":
- if {family.%player%} is not set:
- send "&c* &6Nie posiadasz rodziny."
- stop
- if player is not {family::%{family.%player%}%}:
- send "&c* &6Nie jestes zalozycielem rodziny."
- stop
- if arg 2 is not set:
- send "&c* &6Podaj nick na kogo chcesz przekazac rodzine."
- stop
- set {_arg2} to "%arg 2%" parsed as offlineplayer
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- if {_p} is {_arg2}:
- set {family::%{family.%player%}%} to {_arg2}
- send "&c* &6Przekazales rodzine na: &3%{_arg2}%"
- send "&c* &6Jestes teraz zalozycielem rodziny" to {_arg2}
- stop
- send "&c* &6Tego gracza nie ma u Ciebie w rodzinie."
- stop
- stop
- if arg 1 is "lista":
- if {family.%player%} is not set:
- send "&c* &6Nie posiadasz rodziny."
- stop
- send "&c* &6Czlonkowie twojej rodziny: &7(%{family.%player%}%)"
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- set {_x} to "&cOffline"
- if {_p} is online:
- set {_x} to "&aOnline"
- send "&c%loop-value% &8(%{_x}%&8)"
- stop
- if arg 1 is "list":
- send "&c* &6Lista rodzin:"
- loop {family::*}:
- send "&a%{family.%loop-value%}%"
- stop
- if arg 1 is "chat":
- if {family.%player%} is not set:
- send "&c* &6Nie posiadasz rodziny."
- stop
- if {family.%player%.chat} is not set:
- set {family.%player%.chat} to true
- send "&c* &6Wlaczyles chat rodzinny."
- stop
- clear {family.%player%.chat}
- send "&c* &6Wylaczyles chat rodzinny."
- stop
- send "&c* &6Nie ma takiej komendy."
- stop
- on chat:
- if {family.%player%.chat} is set:
- cancel event
- loop {family::%{family.%player%}%::members::*}:
- set {_p} to "%loop-value%" parsed as offlineplayer
- send "&8[&a%{family.%player%}%&8] &6%display name of player%&7: &a%message%" to {_p}
- every 1 second:
- loop all players:
- if {familyr.%loop-player%.time} is 0:
- send "&c* &6Nie akceptowales dodania do rodziny." to loop-player
- clear {familyr.%loop-player%.request}
- clear {familyr.%loop-player%.time}
- if {familyr.%loop-player%.time} is larger than 0:
- remove 1 from {familyr.%loop-player%.time}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement