# Skrypt był testowany na serwerze w wersji: 1.16.5. # W razie problemów z interpretowaniem go, sprawdź czy posiadasz nastepujące pluginy: # Skript, SkQuery, SkRayFall. # Zmienne: variables: {chat} = 1 # Wiadomość powitalna i pożegnalna: on join: set join message to "&b• %player% - Dołączył do gry. •" on quit: set quit message to "&b• %player% - Wyszedł z gry. •" # Kolorowanie wiadomości w zależności od uprawnień: on chat: if player is op: set message format to "&c[player]&f: [message]" else: set message format to "&b[player]&f: [message]" # Blokada kilku znanych komend: on command: if command is "bukkit:help" or "bukkit:pl" or "bukkit:plugins" or "bukkit:ver" or "bukkit:version" or "bukkit:?" or "help" or "pl" or "plugins" or "ver" or "version" or "?": cancel event # Komenda na włączanie i wyłączanie vanish'a: command /vanish []: executable by: player trigger: if player is op: if arg-1 is "wlacz": hide player from all players broadcast "&b• %player% - Wyszedł/Wyszła z gry. •" send "&b• Gotowe. •" else if arg-1 is "wylacz": reveal player to all players send "&b• Gotowe. •" else: send "&c• Coś poszło nie tak. •" else: send "&c• Nie posiadasz odpowiednich uprawnień. •" # Komenda na wysyłanie wiadomości do gracza, który jest online: command /msg [] []: executable by: player trigger: if arg-1 is set: if arg-2 is set: if arg-1 isn't player: send "&eJa -> %arg-1%&e: &e%arg-2%" send "&e%player% &e-> Ja: &e%arg-2%" to arg-1 else: send "&c• Nie możesz wysłać wiadomości do siebie. •" else: send "&c• Coś poszło nie tak. •" else: send "&c• Coś poszło nie tak. •" # Komenda, która umożliwia latanie wyznaczonym graczom: command /fly []: executable by: player trigger: if player is op: if arg-1 is set: if {latanie.%arg-1%} is 0: set {latanie.%arg-1%} to 1 force arg-1 to start flying send "&b• Włączyłeś/aś możliwość latania. •" send "&b• Od teraz posiadasz możliwość latania. •" to arg-1 else: set {latanie.%arg-1%} to 0 force arg-1 to stop flying send "&b• Wyłączyłeś/aś możliwość latania. •" send "&b• Od teraz nie posiadasz możliwości latania. •" to arg-1 else: send "&c• Coś poszło nie tak. •" else: send "&c• Coś poszło nie tak. •" # Komenda na wysyłanie wiadomości do wszystkich graczy na serwerze: command /broadcast []: executable by: player trigger: if player is op: broadcast "&b• Wiadomość od: &c%player%&b: %arg-1% &b•" else: send "&c• Coś poszło nie tak. •" # Komenda, która pozwala na podglądanie ekwipunków jak i Ender Chestów graczy: command /see [] []: executable by: player trigger: if player is op: if arg-1 is "inv": if arg-2 is set: open arg-2's inventory for player else: send "&c• Coś poszło nie tak. •" else if arg-1 is "e-chest": if arg-2 is set: open arg-2's ender chest for player else: send "&c• Coś poszło nie tak. •" else: send "&c• Coś poszło nie tak. •" else: send "&c• Nie posiadasz odpowiednich uprawnień. •" # Komenda, która pozwala na ustawianie wielu lokacji i teleportowanie się do nich: command /location [] []: executable by: player trigger: if arg-1 is "set": if arg-2 is set: set {dom.%arg-2%.%player%} to location of player send "&b• Pomyślnie ustawiono lokację. •" else: send "&c• Coś poszło nie tak. •" else if arg-1 is "tp": if arg-2 is set: if {dom.%arg-2%.%player%} is set: teleport player to {dom.%arg-2%.%player%} send "&b• Przeteleportowano. •" else: send "&c• Na tym miejscu nie masz ustawionej lokacji! •" else: send "&c• Coś poszło nie tak. •" else: send "&c• Coś poszło nie tak. •" # Komendy umożliwiające teleportacje do wyznaczonego gracza (za jego zgodą): command /tp_r []: executable by: player trigger: if arg-1 is set: set {teleport.%arg-1%} to player send "&b• Gracz: %player%&b próbuje się do Ciebie teleportować. •" to arg-1 send "&b• Wpisz: /TPAccept lub /TPDeny. •" to arg-1 send "&b• Wysłano prośbę o teleportacje. •" else: send "&c• Coś poszło nie tak. •" command /tp_a: executable by: player trigger: if {teleport.%player%} is not 0: execute console command "teleport %{teleport.%player%}% %player%" send "&b• Zaakceptowano teleportacje dla: %{teleport.%player%}%&b. •" to player send "&b• Gracz: %player%&b zaakceptował teleportacje. •" to {teleport.%player%} set {teleport.%player%} to 0 else: send "&c• Nikt nie chce się do Ciebie teleportować! •" command /tp_d: executable by: player trigger: if {teleport.%player%} is not 0: send "&b• Prośba o teleportacje została odrzucona. •" to player send "&b• Prośba o teleportacje została odrzucona. •" to {teleport.%player%} set {teleport.%player%} to 0 else: send "&c• Nikt nie wysłał do Ciebie prośby o teleportacje! •" # System obsługi czatu: command /chat []: executable by: player trigger: if player is op: if arg-1 is "wlacz": set {chat} to 1 send "&b• Czat został włączony. •" else if arg-1 is "wylacz": set {chat} to 0 send "&b• Czat został wyłączony. •" else if arg-1 is "wyczysc": loop 100 times: broadcast "" broadcast "&b• Czat został wyczyszczony przez: %player%&b. •" else: send "&c• Coś poszło nie tak. •" else: send "&c• Nie posiadasz odpowiednich uprawnień. •" on chat: if player isn't op: if {czat} is not 0: set {_czas} to difference between {czat.%player%} and now if {_czas} < 3 real seconds: send "&c• Wiadomości możesz wysyłać co 3 sekundy. •" cancel event else: if message contains "pl" or "com" or "eu" or "net" or "csrv" or "us" or "de" or "serv.nu" or "ench" or "tsrv" or "mc." or "www" or "gg" or "ts" or "aternos" or "zapraszam na serwer": send "&c• Wiadomość nie została wysłana. •" cancel event else: set {czat.%player%} to now else: send "&c• Czat został wyłączony, nie posiadasz możliwości pisania. •" cancel event