# miecz function excalibur(p: player, d: boolean): set {_i} to 1 diamond sword named "&e&oExcalibur" set the 1st line of lore of {_i} to "&6&oDecription&e&o: &rWlasnosc %display name of {_p}%" set the 2nd line of lore of {_i} to "&rPlayers Killed: 0" set the 3rd line of lore of {_i} to "&rStrange Weapon ##17" {_d} is true: {_p} can't hold {_i}: drop {_i} at {_p} stop give {_i} to {_p} # licznik zabitych graczy on death: name of attacker's tool is "&e&oExcalibur" victim is a player set {_s} to 2nd line of lore of attacker's tool set {_k} to subtext of {_s} from character 18 to (the length of {_s}) set {_k} to {_k} parsed as number add 1 to {_k} set the 2nd line of lore of attacker's tool to "&rPlayers Killed: %{_k}%" # efekt siły po uderzeniu on damage: name of attacker's tool is "&e&oExcalibur" apply strength 6 to attacker for 3 seconds # przykładowe użycie funkcji command /dajmiecz: trigger: excalibur(player, true)