Files
items.sk
Code
1 122
items.sk
options:
prefix: &8[&dHide&8]&r
on script load:
delete {jb::round::active}
delete {jb::role::*}
command /jebackurwy:
permission: hideandseek.items
permission message: &cNie masz uprawnień do tej komendy.
trigger:
set {_wand} to blaze rod named "&cKurewska różdżka"
set {_slime} to slime ball named "&dPizda"
set {_potion} to splash potion named "&5Eliksir frajera"
give {_wand} to player
give {_slime} to player
give {_potion} to player
send "{@prefix} &aOtrzymałeś wszystkie trzy itemy." to player
command /jbrunda <text>:
permission: hideandseek.admin
permission message: &cNie masz uprawnień do tej komendy.
trigger:
if arg-1 is "start":
set {jb::round::active} to true
send "{@prefix} &aRunda została uruchomiona." to player
else if arg-1 is "stop":
delete {jb::round::active}
delete {jb::role::*}
send "{@prefix} &cRunda została zakończona, role wyczyszczone." to player
else:
send "&cUżycie: /jbrunda <start|stop>" to player
command /jbrola <player> <text>:
permission: hideandseek.admin
permission message: &cNie masz uprawnień do tej komendy.
trigger:
if {jb::round::active} is not true:
send "{@prefix} &cNajpierw uruchom rundę: /jbrunda start" to player
stop
if arg-2 is "szukajacy":
set {jb::role::%uuid of arg-1%} to "szukajacy"
send "{@prefix} &aGracz &e%arg-1% &ajest szukającym." to player
else if arg-2 is "chowajacy":
set {jb::role::%uuid of arg-1%} to "chowajacy"
send "{@prefix} &aGracz &e%arg-1% &ajest chowającym." to player
else if arg-2 is "usun":
delete {jb::role::%uuid of arg-1%}
send "{@prefix} &aUsunięto rolę gracza &e%arg-1%&a." to player
else:
send "&cUżycie: /jbrola <gracz> <szukajacy|chowajacy|usun>" to player
on right click:
if player's tool is air:
stop
set {_itemName} to uncolored name of player's tool
if {_itemName} is "Kurewska różdżka":
cancel event
if {jb::round::active} is not true:
send "{@prefix} &cNie trwa żadna runda." to player
stop
if {jb::role::%uuid of player%} is not "szukajacy":
send "{@prefix} &cTen item jest przeznaczony dla szukających." to player
stop
loop all players:
if loop-player is not player:
if {jb::role::%uuid of loop-player%} is "chowajacy":
if gamemode of loop-player is not spectator:
add loop-player to {_targets::*}
if {_targets::*} is not set:
send "{@prefix} &cNie ma aktywnego chowającego się gracza do namierzenia." to player
stop
if {jb::cooldown::wand::%uuid of player%} is set:
if difference between now and {jb::cooldown::wand::%uuid of player%} is less than 3 minutes:
send "{@prefix} &cRóżdżka jest jeszcze na cooldownie." to player
stop
set {_target} to random element out of {_targets::*}
set {jb::cooldown::wand::%uuid of player%} to now
apply potion of glowing 1 to {_target} for 3 seconds
send "{@prefix} &aNamierzyłeś gracza &e%{_target}%&a!" to player
send "{@prefix} &cZostałeś namierzony na 3 sekundy!" to {_target}
stop
if {_itemName} is "Pizda":
cancel event
if {jb::round::active} is not true:
send "{@prefix} &cNie trwa żadna runda." to player
stop
if {jb::role::%uuid of player%} is not "szukajacy":
send "{@prefix} &cTen item jest przeznaczony dla szukających." to player
stop
if {jb::cooldown::speed::%uuid of player%} is set:
if difference between now and {jb::cooldown::speed::%uuid of player%} is less than 1 minute:
send "{@prefix} &cItem jest jeszcze na cooldownie." to player
stop
set {jb::cooldown::speed::%uuid of player%} to now
apply potion of speed 2 to player for 10 seconds
send "{@prefix} &aOtrzymałeś Speed II na 10 sekund." to player
stop
if {_itemName} is "Eliksir frajera":
cancel event
if {jb::round::active} is not true:
send "{@prefix} &cNiewidzialność działa tylko podczas aktywnej rundy." to player
stop
if {jb::role::%uuid of player%} is not "chowajacy":
send "{@prefix} &cTen item jest przeznaczony dla chowających się." to player
stop
if {jb::cooldown::invisibility::%uuid of player%} is set:
if difference between now and {jb::cooldown::invisibility::%uuid of player%} is less than 90 seconds:
send "{@prefix} &cEliksir jest jeszcze na cooldownie." to player
stop
set {jb::cooldown::invisibility::%uuid of player%} to now
apply potion of invisibility 1 to player for 5 seconds
send "{@prefix} &aJesteś niewidzialny przez 5 sekund. Zbroja i przedmioty w rękach nadal mogą zdradzić Twoją pozycję." to player