Witam. Mam problem ze skryptem na excalibur a dokładnie na diamentowy miecz który nalicza zabójstwa ma podpis i przy uderzaniu daje efekt "nausea". Problem oplega na tym, że gdy zabiję 1 raz to się naliczy 1 zabójstwo na "lore", ale następne już się nie naliczają. Skrypt jest z internetu i tylko trochę go przerobiłem.
KOD:
# 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&oOpis&e&o: &rWlasnosc %display name of {_p}%"
set the 2nd line of lore of {_i} to "&6Zabojstwa: 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})
add 1 to {_k}
set {_k} to {_k} parsed as number
set the 2nd line of lore of attacker's tool to "&6Zabojstwa: %{_k}%"
# efekt nudności po uderzeniu
on damage:
name of attacker's tool is "&e&oExcalibur"
apply nausea 3 to victim for 3 seconds