command /f [] []: trigger: if arg 1 is not set: send "&a/f dodaj &8- &7dodajesz przyjaciela." send "&a/f usun &8- &7usuwasz przyjaciela." send "&a/f accept &8- &7akceptujesz zaproszenie." send "&a/f deny &8- &7odrzycasz zaproszenie." send "&a/f lista &8- &7lista przyjaciół." stop if arg 1 is "dodaj": if arg 2 is not set: send "&c* &7Wpisz nazwe gracza. &a/f dodaj " stop set {_player} to "%arg 2%" parsed as offlineplayer if {_player} is online: if {_player} is player: send "&c* &7Nie mozesz dodac samego siebie." stop if {przyjaciel::%player%.list::*} contains "%{_player}%": send "&c* &7Juz masz go jako przyjaciela." stop if {przyjaciel::%player%.status} is not set: set {przyjaciel::%player%.status} to "wz" set {przyjaciel::%{_player}%.status} to player set {przyjaciel::%player%.status.expire} to 15 set {przyjaciel::%{_player}%.status.expire} to 15 send "&c* &7Gracz &6%player% &7wyslal tobie zaproszenie do przyjaciol.%nl%Wpisz: &6/f accept" to {_player} send "&c* &7Wyslales zaproszenie dla &6%{_player}% &7do przyjaciol" stop send "&c* &7Ten gracz juz ma zaproszenie" stop send "&c* &7Tego gracza nie ma na serwerze." stop if arg 1 is "usun": if arg 2 is not set: send "&c* &7Wpisz nazwe gracza. &a/f usun " stop if {przyjaciel::%player%.lista::*} contains "%arg 2%": remove arg 2 from {przyjaciel::%player%.lista::*} remove player from {przyjaciel::%arg 2%.lista::*} send "&c* &7Usunales &6%arg 2% &7z listy przyjaciol." if "%arg 2%" parsed as offlineplayer is online: send "&c* &7Gracz &6%player% &7usunal cie z przyjaciol." to "%arg 2%" parsed as offlineplayer stop send "&c* &7Ten gracz nie jest twoim przyjacielem." stop if arg 1 is "accept": if {przyjaciel::%player%.status} is not set: send "&c* &7Nie otrzymales zadnego zaproszenia." stop if {przyjaciel::%player%.status} is "wz": send "&c* &7Nie mozesz chwilowo uzyc tej komendy. Sprobuj za: %{przyjaciel::%player%.status.expire}%" stop set {_player} to {przyjaciel::%player%.status} clear {przyjaciel::%player%.status.expire} clear {przyjaciel::%player%.status} clear {przyjaciel::%{_player}%.status.expire} clear {przyjaciel::%{_player}%.status} add player to {przyjaciel::%{_player}%.lista::*} add {_player} to {przyjaciel::%player%.lista::*} send "&c* &7Dodales &6%player% &7jako przyjaciela." to {_player} send "&c* &7Dodales &6%{_player}% &7jako przyjaciela." stop if arg 1 is "deny": if {przyjaciel::%player%.status} is not set: send "&c* &7Nie otrzymales zadnego zaproszenia." stop if {przyjaciel::%player%.status} is "wz": send "&c* &7Nie mozesz chwilowo uzyc tej komendy. Sprobuj za: %{przyjaciel::%player%.status.expire}%" stop set {_player} to {przyjaciel::%player%.status} clear {przyjaciel::%player%.status.expire} clear {przyjaciel::%player%.status} clear {przyjaciel::%{_player}%.status.expire} clear {przyjaciel::%{_player}%.status} send "&c* &7Odrzuciles zaproszenie od gracza &6%{_player}%" send "&c* &6%player% &7odrzucil twoje zaproszenie." stop if arg 1 is "lista": if size of {przyjaciel::%player%.lista::*} is larger than 0: if arg 2 is not set: set {_arg} to 1 if arg 2 is set: set {_arg} to "%arg 2%" parsed as integer if {_arg} is not integer: send "&c* &7Podaj liczbe calkowita." stop if {_arg} is smaller than 1: send "&c* &7Liczba nie moze byc mniejsza od 1" stop set {_strony} to rounded up (size of {przyjaciel::%player%.lista::*} / 54) if {_arg} is between 1 and {_strony}: open chest with 6 rows named "&6Twoi przyjaciele" to player wait 2 tick set {_num} to size of {przyjaciel::%player%.lista::*} set {_max} to {_arg} * 53 set {_min} to {_max} - 52 if ({_arg} + 1) is smaller than or equal to {_strony}: set player's current inventory's slot 53 to paper named "&6Nastepna strona" with lore "&aPrzejdz na strone: &c%{_arg} + 1%" set {_i} to 0 loop {_max} times: loop-number is between {_min} and {_max} loop-number <= {_num}: set player's current inventory's slot {_i} to {przyjaciel::%player%.lista::%loop-number%}'s skull named "&6%{przyjaciel::%player%.lista::%loop-number%}%" add 1 to {_i} stop send "&c* &7Twoi przyjaciele mieszcza sie na: %{_strony}% stronach." stop send "&c* &7Nie masz przyjaciol" stop every 1 second: loop all players: if {przyjaciel::%loop-player%.status.expire} is larger than 0: remove 1 from {przyjaciel::%loop-player%.status.expire} if {przyjaciel::%loop-player%.status.expire} is smaller than or equal to 0: clear {przyjaciel::%loop-player%.status.expire} clear {przyjaciel::%loop-player%.status} on inventory click: if "%inventory name of player's current inventory%" contains "Twoi przyjaciele": if slot is smaller than 0: stop cancel event if player's current inventory's slot slot is paper: if name of player's current inventory's slot slot is "&6Nastepna strona": set {_s} to uncoloured lore of player's current inventory's slot slot replace all "Przejdz na strone: " in {_s} with "" #set {_s} to {_s} parsed as integer close player's inventory wait 1 tick execute player command "f lista %{_s}%"