Hello. I'm trying to create skript that checks if line of the item's lore with given text exists and then uses the number from this line to increase max player's health, but for some reason i can't get this number. Can someone help me? Here's the code:
Variable {_gethealth::1} returns <none> every time, don't know how to fix this.
Code:
on armor equip:
wait a tick
if {health.%player%} is not set:
set {health.%player%} to player's max health
set {_item} to player's helmet
set {_l} to "%lore of {_item}%"
set {_lore::*} to {_l} split at ","
set {_counter} to 1
loop {_lore::*}:
set {_2} to loop-value
if {_2} contains "&7Health&f&l:":
set {_gethealth::*} to uncolored loop-value parsed as "&7Health&f&l: &a%num%&f&l"
send "%{_lore::%{_counter}%}%" to player
send "%{_gethealth::1}%" to player
add 1 to {_counter}
add {_gethealth::1} to {health.%player%}
send "Health is increased on %{_gethealth::1}%." to player