on join: if file "plugins/Skript/scripts/Statistics/Players/%player%.yml" doesn't exists: create file "plugins/Skript/scripts/Statistics/Players/%player%.yml" wf "Str: '0'" to "plugins/Skript/scripts/Statistics/Players/%player%.yml" wf "Hp: '0'" to "plugins/Skript/scripts/Statistics/Players/%player%.yml" wf "Dex: '0'" to "plugins/Skript/scripts/Statistics/Players/%player%.yml" wf "Points: '10'" to "plugins/Skript/scripts/Statistics/Players/%player%.yml" command /Statistics: aliases: statystyki, stats trigger: if player don't have permission "statistics": send "&cNie masz do tego uprawnien." stop set {_Str} to single value "Str" get of "plugins/Skript/scripts/Statistics/Players/%player%.yml" set {_Hp} to single value "Hp" get of "plugins/Skript/scripts/Statistics/Players/%player%.yml" set {_Dex} to single value "Dex" get of "plugins/Skript/scripts/Statistics/Players/%player%.yml" set {_Points} to single value "Points" get of "plugins/Skript/scripts/Statistics/Players/%player%.yml" open chest with 1 rows named "Statistics" to player wait 3 ticks format slot 3 of player with diamond sword named "&cSila" with lore "&fDodaje 0.15 do obrazen." to close then run "skills str %player%" format slot 4 of player with golden apple:1 named "&4Zdrowie" with lore "&fDodaje 0.3 do zdrowia." to close then run "skills hp %player%" format slot 5 of player with feather named "&aZrecznosc" with lore "&fDodaje 0.2 do szansy na unik." to close then run "skills dex %player%" format slot 8 of player with book named "&bStatystyki" with lore "&cSila - &6%{_Str}%&f.||&4Zdrowie - &6%{_Hp}%&f.||&aZrecznosc - &6%{_Dex}%&f.||&bPunkty do rozdania - &2%{_Points}%&f." to close stop command /skills [] []: executable by: console trigger: wait 1 ticks set {_p} to arg 2 set {_Points} to single value "Points" get of "plugins/Skript/scripts/Statistics/Players/%{_p}%.yml" parsed as integer if {_Points} is smaller or equal to 0: send "&cNie masz punktow do rozdania." to {_p} stop if arg 1 is "str": set {_Str} to single value "Str" get of "plugins/Skript/scripts/Statistics/Players/%{_p}%.yml" parsed as integer add 1 to {_Str} remove 1 from {_Points} set yaml value "Str" from "Statistics/Players/%{_p}%.yml" to "%{_Str}%" set yaml value "Points" from "Statistics/Players/%{_p}%.yml" to "%{_Points}%" send "&2Dodano &61 pkt&2. dla Sila." to {_p} stop if arg 1 is "dex": set {_Dex} to single value "Dex" get of "plugins/Skript/scripts/Statistics/Players/%{_p}%.yml" parsed as integer add 1 to {_Dex} remove 1 from {_Points} set yaml value "Dex" from "Statistics/Players/%{_p}%.yml" to "%{_Dex}%" set yaml value "Points" from "Statistics/Players/%{_p}%.yml" to "%{_Points}%" send "&2Dodano &61 pkt&2. dla Zrecznosc." to {_p} stop if arg 1 is "hp": set {_Hp} to single value "Hp" get of "plugins/Skript/scripts/Statistics/Players/%{_p}%.yml" parsed as integer add 1 to {_Hp} remove 1 from {_Points} set yaml value "Hp" from "Statistics/Players/%{_p}%.yml" to "%{_Hp}%" set yaml value "Points" from "Statistics/Players/%{_p}%.yml" to "%{_Points}%" send "&2Dodano &61 pkt&2. dla Zdrowie." to {_p} set the maximum health of {_p} to maximum health of {_p}+0.3 stop stop on damage: if attacker is a player: set {_Str} to single value "Str" get of "plugins/Skript/scripts/Statistics/Players/%attacker%.yml" parsed as integer set damage to damage + {_Str}*0.15 if victim is a player: set {_Dex} to single value "Dex" get of "plugins/Skript/scripts/Statistics/Players/%victim%.yml" parsed as integer set {_Dex} to {_Dex}*0.2 chance of {_Dex}%: set damage to 0 send "Unik!" to victim stop on death: if victim is a player: if attacker is a player: chance of 13.5%: set {_Points} to single value "Points" get of "plugins/Skript/scripts/Statistics/Players/%attacker%.yml" parsed as integer add 1 to {_Points} set yaml value "Points" from "Statistics/Players/%attacker%.yml" to "%{_Points}%" send "&2Otrzymales &61 pkt&2. do statystyk." to attacker stop if victim isn't a player: if attacker is a player: chance of 6.5%: set {_Points} to single value "Points" get of "plugins/Skript/scripts/Statistics/Players/%attacker%.yml" parsed as integer add 1 to {_Points} set yaml value "Points" from "Statistics/Players/%attacker%.yml" to "%{_Points}%" send "&2Otrzymales &61 pkt&2. do statystyk." to attacker stop stop