function obrona(p: player): if {staty.punkty::%player%} is greater than or equals to 1: remove 1 from {staty. punkty::%player%} add 1 to {obrona::%player%} make {_p} execute "statystyki" else: send "&cNie masz juz punktow!" to {_p} function sila(p: player): if {staty.punkty::%player%} is greater than or equals to 1: remove 1 from {staty. punkty::%player%} add 1 to {sila::%player%} make {_p} execute "statystyki" else: send "&cNie masz juz punktow!" to {_p} function szczescie(p: player): if {staty.punkty::%player%} is greater than or equals to 1: remove 1 from {staty. punkty::%player%} add 1 to {szczescie::%player%} make {_p} execute "statystyki" else: send "&cNie masz juz punktow!" to {_p} function krytyk(p: player): if {staty.punkty::%player%} is greater than or equals to 1: remove 1 from {staty. punkty::%player%} add 1 to {krytyk::%player%} execute {_p} command "statystyki" else: send "&cNie masz juz punktow!" to {_p} command /statystyki []: permission: statystyki.use aliases: staty trigger: if {staty.punkty::%player%} is not set: set {staty.punkty::%player%} to 0 if {sila::%player%} is not set: set {sila::%player%} to 0 if {obrona::%player%} is not set: set {obrona::%player%} to 0 if {szczescie::%player%} is not set: set {szczescie::%player%} to 0 if {krytyk::%player%} is not set: set {krytyk::%player%} to 0 open virtual chest with 1 rows named "&a&lPosiadasz %{staty.punkty::%player%}% punktow" to player format gui slot 1 of player with diamond sword named "&cSila" with lore "&eRozdane punkty: &6%{sila::%player%}%" to close then run function [sila] format gui slot 3 of player with diamond sword named "&cObrona" with lore "&eRozdane punkty: &6%{obrona::%player%}%" to close then run function [obrona] format gui slot 3 of player with diamond sword named "&cSzczescie" with lore "&eRozdane punkty: &6%{szczescie::%player%}%" to close then run function [szczescie] format gui slot 3 of player with diamond sword named "&cKrytyk" with lore "&eRozdane punkty: &6%{krytyk::%player%}%" to close then run function [krytyk] on damage: if atacker is player: if {sila::%attacker%} is greater than 0: set damage to {_dmg} set {_var} to 101 - {sila::%attacker%} set {_damage} to {_dmg} / {_var} set damage to damage+{_damage} on damage: if victim is player: if {obrona::%victim%} is greater than 0: set damage to {_dmg} set {_var} to 101 - {obrona::%victim%} set {_damage} to {_dmg} / {_var} set damage to damage-{_damage} on damage: if attacker is player: if {krytyk::%attacker%} is greater than 0: set {_per} to 50 + {krytyk::%attacker%} chance of {_per}: set {_idmg} to damage / 2 set damage to damage+{_idmg} every tick: loop all players: if {lvl::%loop-player%} is not set: set {lvl::%loop-player%} to {lv::%loop-player%} if {lv::%loop-player%} is greater than {lvl::%loop-player%} set {lvl::%loop-player%} to {lv::%loop-player%} add 1 to {staty.punkty::%loop-player%}