options:
czas: 30 #czas antylogouta w sekundach
komendy: "tp" or "tpa" or "tpahere" or "spawn" or "tpaccept" #lista zablokowanych komend
on damage:
if victim is player:
if attacker is player:
set {pvp::%attacker%} to {@czas}
set {pvp::%victim%} to {@czas}
set {osoba::%attacker%} to victim
set {osoba::%victim%} to attacker
on command:
if {pvp::%player%} is set:
if command is {@komendy}:
cancel event
send "&cJestes podczas walki!"
on quit:
if {pvp::%player%} is set:
kill player
send action bar "&aZwyciezyles &6%player%" to {osoba::%player%}
clear {pvp::%{osoba::%player%}%}
clear {osoba::%{osoba::%player%}%}
clear {pvp::%player%}
clear {osoba::%player%}
every 1 second:
loop all players:
if {pvp::%loop-player%} is set:
if {pvp::%loop-player%} > 0:
send action bar "&aJestes w walce! Pozostalo &7%{pvp::%loop-player%}% sekund" to loop-player
add -1 to {pvp::%loop-player%}
else:
send acrion bar "&aNie jestes juz w walce!" to loop-player
clear {osoba::%loop-player%}
clear {pvp::%loop-player%}
on death:
if "%victim%" is "%{osoba::%attacker%}%":
send action bar "&aZwyciezyles &6%victim%" to attacker
clear {osoba::%victim%}
clear {osoba::%attacker%}
clear {pvp::%victim%}
clear {pvp::%attacker%}
juz, dwukropek zgubilem
on join:
if {rep::%player%} is not set:
set {rep::%player%} to 0
command /rep [<text>] [<offlineplayer>]:
aliases: reputacja
trigger:
if arg 1 is not "+" or "-" or "dodaj" or "zabierz" or "top" or "gracz":
send ""
send " &7/rep +/dodaj <nick> &6&o- dodaje reputacje"
send " &7/rep -/zabierz <nick> &6&o- zebiera reputacje"
send " &7/rep top &6&o- topka reputacji"
send " &7/rep gracz [nick] &6&o- reputacja gracza"
send ""
stop
if arg 2 is not set:
if arg 1 is not "top" or "gracz":
execute player command "rep help"
stop
if arg 1 is "+" or "dodaj":
if {rep::%arg 2%} is set:
if {lastrep::%player%} is not set:
add 1 to {rep::%arg 2%}
send " &aPrzyznano reputacje graczowi &6%arg 2%&a! Nastepna repke mozesz przyznac za &612 godzin"
set {lastrep::%player%} to now
else:
if difference between now and {lastrep::%player%} is greater than ("12 hours" parsed as timespan):
add 1 to {rep::%arg 2%}
send " &aPrzyznano reputacje graczowi &6%arg 2%&a! Nastepna repke mozesz przyznac za &612 godzin"
set {lastrep::%player%} to now
else:
send " &cRepki mozesz dawac lub zebierac co &612 godzin"
else:
send " &cNie znaleziono gracza w bazie."
if arg 1 is "-" or "zabierz":
if {rep::%arg 2%} is set:
if {lastrep::%player%} is not set:
add -1 to {rep::%arg 2%}
send " &aZabrano reputacje graczowi &6%arg 2%&a! Nastepna repke mozesz przyznac za &612 godzin"
set {lastrep::%player%} to now
else:
if difference between now and {lastrep::%player%} is greater than ("12 hours" parsed as timespan):
add -1 to {rep::%arg 2%}
send " &aZabrano reputacje graczowi &6%arg 2%&a! Nastepna repke mozesz przyznac za &612 godzin"
set {lastrep::%player%} to now
else:
send " &cRepki mozesz dawac lub zebierac co &612 godzin"
else:
send " &cNie znaleziono gracza w bazie."
if arg 1 is "gracz":
if arg 2 is not set:
send ""
send " &6Twoja reputacja: &7&o%{rep::%player%} rep"
send ""
else:
if {rep::%arg 2%} is set:
send ""
send " &6Reputacja %arg 2%: &7&o%{rep::%arg 2%}%"
send ""
else:
send " &cNie znaleziono gracza w bazie."
if arg 1 is "top":
set {_s} to 0
loop {rep::*}:
add 1 to {_s}
if {_lista::%loop-value%} is not set:
set {_lista::%loop-value%} to loop-index
else:
set {_x} to 0
loop {_s} times:
add 1 to {_x}
if {_lista::%loop-value-1%.%{_x}%} is not set:
set {_lista::%loop-value-1%.%{_x}%} to loop-index
stop loop
set {_y} to size of {_lista::*}
loop {_lista::*}:
set {_topka::%{_y}%} to loop-value
add -1 to {_y}
send ""
send " &6&olTOPKA REPUTACJI"
set {_msc} to 1
loop {_topka::*}:
send " &6%{_msc}%. %loop-value% &7&o- %{rep::%loop-value%}% rep"
add 1 to {_msc}
if {_msc} > 5:
stop loop
send ""
@xaxaxaxa @Parczik macie repki razem z topka
Tak, są to armor standy, czyli entity, czyli są tworzone, i wysyłane przez serwer. Jeżeli więc serwer nie wyśle graczowi informacji o istnieniu danego amor standa z nazwą, to ten gracz go nie zobaczy. Bum, hologramy dla wybranych graczy.
Wymaga ProtocolLib.
create client side holo object %string% with id %string% at %location% to %player%
create interactive client side holo object %string% with id %string% at %location% to %player%
every 5 ticks in world "world":
loop all players:
if loop-player has enchanted book of mending:
remove 1 of enchanted book of mending from loop-player's inventory
add 1 of stone to loop-player's inventory