on damage:
if attacker is a player:
if victim is a player:
if {antylogout::%victim%} is not set:
send "&cJestes podczas walki! Nie logaj!" to victim
set {antylogout::%victim%} to 20
if {antylogout::%attacker%} is not set:
send "&cJestes podczas walki! Nie logaj!" to attacker
set {antylogout::%attacker%} to 20
every 1 seconds:
loop all players:
if {antylogout::%loop-player%} is set:
if {antylogout::%loop-player%} is greater than 0:
remove 1 from {antylogout::%loop-player%}
set action bar of loop-player to "&c&lAntyLogout &7&l(&4%{antylogout::%loop-player%}%&7&l)"
else:
clear {antylogout::%loop-player%}
send "&aSkonczyles walczyc." to loop-player
set action bar of loop-player to "&a&lAntyLogout"
on quit:
if {antylogout::%player%} is set:
set {_x} to random integer between 2000 and -2000
set {_y} to 256
set {_z} to random integer between 2000 and -2000
set {_xyz} to location at {_x}, {_y}, {_z}
clear {antylogout::%player%}
teleport player to {_xyz}
loop 256 times:
if block under player is air:
teleport player under player
send "&aPrzeteleportowano w losowe kordynaty &c( &9%player's location% &c)"
stop
broadcast "&cGracz %player% wylogowal sie podczas walki!"
on death:
clear {antylogout::%victim%}