Skript Version:2.2-dev29
Skript Author: bensku
Minecraft Version: 1.12.1
---
Full Code:
So I'm trying to make a Skript that can tell how much a player's item is worth by rightclicking an NPC. I'm just getting 2 errors, %number% and %text% is not valid item data. I haven't used parsing before, and I'm not sure how Subtext works, the wiki doesn't tell me much.
The forums seem empty on this subject, and the ones who have something regarding this, have code that doesn't work either.
I wonder if this is possible?
Thank you,
Zwac
Skript Author: bensku
Minecraft Version: 1.12.1
---
Full Code:
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 "||"
loop {_lore::*}:
set {parsed::*} to loop-text parsed as "Sell Price: %number%"
set {_price::*} to uncolored loop-text parsed as "Sell Price: %text%"
set {_price} to {parsed::1}
play "BLOCK_NOTE_XYLOPHONE" to player at volume 1
broadcast "&6Item is worth: &e%{_price}% Gold"
exit loop
stop
So I'm trying to make a Skript that can tell how much a player's item is worth by rightclicking an NPC. I'm just getting 2 errors, %number% and %text% is not valid item data. I haven't used parsing before, and I'm not sure how Subtext works, the wiki doesn't tell me much.
The forums seem empty on this subject, and the ones who have something regarding this, have code that doesn't work either.
I wonder if this is possible?
Thank you,
Zwac