So I'm making a custom shop with fish, I'm really close, but I'm now stuck. The fish have lengths, and I am able to get the numbers I need, but they are in quotes and so, can't be used to do math (to give the money) I'm new to Skript, and would appreciate any help!!! Thx. Here's my code.
Code:
on right click:
set {_SellMultiplier} to 1
if lore of held item contains "&7Caught":
set {_Money1} to 10
if lore of held item contains "&7Caught":
if held item's lore contains "cm":
delete line 2 of held item's lore
set line 1 of held item's lore to regex replace all "cm" with "" in held item's lore
set {_lore} to line 1 of held item's lore
send line 1 of held item's lore to player
set {_Money2} to line 1 of held item's lore
set {_Money3} to "%{_SellMultiplier}*{_Money2}+{_Money1}%"
if player's held item is cod:
add 10 to balance of player