Niech no ja to tylko zobaczę
command /sz:
trigger:
spawn zombie at player
set name of last spawned zombie to "&2[Lvl. 5] Zombie"
on rightclick on entity:
if name of clicked entity contains "[Lvl.":
set {_lvl} to uncoloured name of clicked entity
replace all "[Lvl. " and "] Zombie" with "" in {_lvl}
set {_lvl} to {_lvl} parsed as integer
add 5 to {_lvl}
broadcast "Nowy level: %{_lvl}%"
Taki kod mi działa, pokazuje: "Nowy level: 10"
Spigot 1.12.2, Skript2.2-dev37c