Hi guys, I'm trying to sell an item based on it's lore, yet it doesnt work. I only get error with the sell-all part "%number% %text% is not valid item data"
Not sure what it means.
Yet first sell script doesnt work, yet no errors. Any ideas why? Thank you.
Skript:
Not sure what it means.
Yet first sell script doesnt work, yet no errors. Any ideas why? Thank you.
Skript:
code_language.skript:
on right click on player:
if name of clicked player is "&a&lTrader":#12
set {_lore::*} to lore of player's tool split by "||"
if "%{_lore::*}%" contains "Sell Price:":
loop {_lore::*}:
set {_price::*} to uncolored loop-value parsed as "Sell Price: %number% Gold"
play "BLOCK_NOTE_XYLOPHONE" to player at volume 1
remove 1 of item from player's inventory
add {_price::1} to player's balance
send "&6You sold your item for: &e%{_price::1}% %{_price::*}% %{_lore::*}% Gold" to player
send "&6You now have: &e%player's balance% Gold" to player
exit loop
stop
else:
send "&cYou cant sell this item" to player
command /sellall:
trigger:
loop all items in player's inventory:
set {_lore::*} to lore of loop-item split by "||"
loop {_lore::*}:
set {_test::*} to uncolored loop-value parsed as "Sell Price: %number% %text%"
play "BLOCK_NOTE_XYLOPHONE" to player at volume 1
remove 1 of loop-item from player's inventory
add {_test::1} to player's balance
send "&6You sold your item for: &e%{_test::1}% Gold" to player
send "&6You now have: &e%player's balance% Gold" to player
exit loop
stop