# # # # # # # # # # # # # # # # # Script by PatisonPlayGames # # Name: Friend # # Version: Beta 1.0 # # Skript: 2.0.2/2.1 # # # # # # # # # # # # # # # # # #=============================================# # Licencja Friend by PatisonPlayGames! # # + Nie zezwalam na: # # - Usuwanie tresci o autorze! # # - Udostepnaniu skryptu innym! # # - Podszywanie sie pod autora! # # - Uzywanie kodu skryptu w swoich skryptach! # # - Zarabianie na skrypcie! # # + Zezwalam na: # # - Dodawanie kodu na swoja potrzebe! # # - Modyfikowanie wiadomosci! # #=============================================# command /friend [] [] []: aliases: f, trigger: if arg 1 is not set: send "&eKomendy &cFriend:" send "&e/friend pomoc - &7Wszystkie dostepne komendy." send "&e/friend add (player) - &7Dodaje przyjaciela." send "&e/friend remove (player) - &7Usuwa przyjaciela." send "&e/friend accept (player) - &7Akceptuje zaproszenie do przyjaciol." send "&e/friend deny (player) - &7Odrzuca zaproszenie do przyjaciol." send "&e/friend list (strona) - &7Lista przyjaciol." stop if arg 1 is "pomoc": send "&eKomendy &cFriend:" send "&e/friend pomoc - &7Wszystkie dostepne komendy." send "&e/friend add (player) - &7Dodaje przyjaciela." send "&e/friend remove (player) - &7Usuwa przyjaciela." send "&e/friend accept (player) - &7Akceptuje zaproszenie do przyjaciol." send "&e/friend deny (player) - &7Odrzuca zaproszenie do przyjaciol." send "&e/friend list (strona) - &7Lista przyjaciol." stop if arg 1 is "add" or "dodaj": if arg 2 is set: if player has permission "friend.add" or "friend.admin" or "friend.player": if arg 2 parsed as player is online: if {friend.%player%.%argument 2%} is not set: set {friend.%player%.%argument 2%} to false if {friend.%player%.%argument 2%} is false: set {invite.%player%.%argument 2%} to true send "&7- - - - - - - - - - - - - - - - - - - - - - - - - - - - -" to argument 2 parsed as player send "&e Gracz &a%player% &e wyslal ci zaproszenie do przyjaciol." to argument 2 parsed as player send "&e Wpisz &a/f accept %player% &E lub &a/f deny %player%" to argument 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - - - - - - -" to argument 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&e Zaproszenie zostalo wyslane do &a%argument 2%" send "&7- - - - - - - - - - - - - - - - - - - - - - - " wait 2 minutes if {friend.%player%.%argument 2%} is false: set {invite.%player%.%argument 2%} to false send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&e Czas oczekiwania na akceptacje minal" to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&e Czas oczekiwania na akceptacje minal" send "&7- - - - - - - - - - - - - - - - - - - - - - - " stop send "&7[&cFriend&7] &eTo jest juz twoj przyjaciel!" stop set {invite.%player%.%argument 2%} to true set {offline.%argument 2%} to true set {inviter.%argument 2%} to the player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&e Zaproszenie zostalo wyslane do &a%argument 2%" send "&7- - - - - - - - - - - - - - - - - - - - - - - " stop send "&7[&cFriend&7] Nie masz uprawnien do tej komendy!" stop send "&7[&cFriend&7] &ePodaj nick gracza!" stop if arg 1 is "accept" or "akceptuj": if arg 2 is set: if player has permission "friend.accept" or "friend.admin" or "friend.player": if {invite.%argument 2%.%player%} is true: set {friend.%argument 2%.%player%} to true set {invite.%argument 2%.%player%} to false add player to {friend.%argument 2%::*} add argument 2 to {friend.%player%::*} set {offline.%player%} to false send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&e &a%player% &ejest teraz twoim przyjacielem" to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&a%argument 2% &ejest teraz twoim przyjacielem." send "&7- - - - - - - - - - - - - - - - - - - - - - - " stop send "&7[&cFriend&7] &eBrak zaproszenia!" stop send "&7[&cFriend&7] Nie masz uprawnien do tej komendy!" stop send "&7[&cFriend&7] &ePodaj nick gracza!" stop if arg 1 is "deny" or "odrzuc": if arg 2 is set: if player has permission "friend.deny" or "friend.admin" or "friend.player": if {invite.%argument 2%.%player%} is true: set {invite.%argument 2%.%player%} to false set {offline.%player%} to false send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&e &a%player% &eodrzucil twoje zaproszenie" to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&a &eOdrzuciles zaprosze od &a%argument 2%" send "&7- - - - - - - - - - - - - - - - - - - - - - - " stop send "&7[&cFriend&7] &eBrak zaproszenia!" stop send "&7[&cFriend&7] Nie masz uprawnien do tej komendy!" stop send "&7[&cFriend&7] &ePodaj nick gracza!" stop if arg 1 is "remove" or "usun": if arg 2 parsed as offline player is set: if player has permission "friend.remove" or "friend.admin" or "friend.player": if {friend.%player%.%argument 2%} is true: set {friend.%player%.%argument 2%} to false remove offline player from {friend.%argument 2%::*} remove argument 2 parsed as offline player from {friend.%player%::*} send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&e &a%player% &enie jest juz twoim przyjacielem" to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&a%argument 2% &enie jest juz twoim przyjacielem." send "&7- - - - - - - - - - - - - - - - - - - - - - - " stop if {friend.%argument 2%.%player%} is true: set {friend.%argument 2%.%player%} to false send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&e &a%player% &enie jest juz twoim przyjacielem" to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " to arg 2 parsed as player send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&a%argument 2% &enie jest juz twoim przyjacielem." send "&7- - - - - - - - - - - - - - - - - - - - - - - " remove offline player from {friend.%argument 2%::*} remove argument 2 parsed as offline player from {friend.%player%::*} stop send "&7[&cFriend&7] &eNie masz takiego przyjaciela." stop send "&7[&cFriend&7] Nie masz uprawnien do tej komendy!" stop send "&7[&cFriend&7] &ePodaj nick gracza!" stop if arg 1 is "chat": if arg 2 is set: if size of {friend.%player%::*} is greater than 0: send "&2Friend > &7%player%: &f%coloured argument 2%" to {friend.%player%::*} send "&2Friend > &7%player%: &f%coloured argument 2%" to the player stop send "&7[&cFriend&7] &eNie masz zadnych przyjaciol!" stop send "&7[&cFriend&7] &ePodaj wiadomosc!" stop if arg 1 is "lista" or "list": set {_strona} to arg 2 parsed as number if {_strona} is not set: set {_strona} to 1 set {_liczbafriend} to size of {friend.%player%::*} set {_liczba-stron} to ceil({_liczbafriend}/10) if {_liczba-stron} is smaller than 1: set {_liczba-stron} to 1 if {_strona} is smaller than 1: send "&7[&cFriend&7] &eNie ma takiej strony!" stop if {_strona} is greater than {_liczba-stron}: send "&7[&cFriend&7] &eNie ma takiej strony!" stop if size of {friend.%player%::*} is smaller than 1: send "&7[&cFriend&7] &eNie masz zadnych przyjaciol!" stop clear {_friend.%player%::*} loop {friend.%player%::*}: add loop-value to {_friend.%player%::*} send "&eLista przyjaciol &eStrona: &a%{_strona}%&e/&a%{_liczba-stron}%" loop {_liczbafriend} times: set {_lista} to ({_strona}-1)*10 add loop-number to {_lista} if {_friend.%player%::%{_lista}%} is not set: stop if loop-number is 11: stop if {_friend.%player%::%{_lista}%} is online: send "&6%{_lista}%. &7%{_friend.%player%::%{_lista}%}% &aAktualnie Online!" if {_friend.%player%::%{_lista}%} is offline: send "&6%{_lista}%. &7%{_friend.%player%::%{_lista}%}% &cAktualnie Offline!" if arg 1 is "reload" or "przeladuj": if player has permission "friend.reload" or "friend.admin": execute console command "/sk reload %script%" send "&7[&cFriend&7] &ePrzeladowano!" stop send "&7[&cFriend&7] Nie masz uprawnien do tej komendy!" stop on join: if {offline.%player%} is true: wait 2 seconds send "&7- - - - - - - - - - - - - - - - - - - - - - - - - - - - -" send "&e Gracz &a%{inviter.%player%}% &e wyslal ci zaproszenie do przyjaciol." send "&e Wpisz &a/f accept %{inviter.%player%}% &E lub &a/f deny %{inviter.%player%}%" send "&7- - - - - - - - - - - - - - - - - - - - - - - - - - - - -" wait 2 minutes if {friend.%{inviter.%player%}%.%player%} is false: set {invite.%{inviter.%player%}%.%player%} to false send "&7- - - - - - - - - - - - - - - - - - - - - - - " to {inviter.%player%} send "&e Czas oczekiwania na akceptacje minal" to {inviter.%player%} send "&7- - - - - - - - - - - - - - - - - - - - - - - " to {inviter.%player%} send "&7- - - - - - - - - - - - - - - - - - - - - - - " send "&e Czas oczekiwania na akceptacje minal" send "&7- - - - - - - - - - - - - - - - - - - - - - - " stop