#worth display
1 messages · Page 1 of 1 (latest)
or a coherent explanation of what you are trying to do
I think they want all the items in the game to show their "worth", a custom price set and if they pick up/hover over an item it would display it as lore.
this is probably not worth doing, just display how much one is worth
ye
how do you do this
set lore of {_i} to "$5"
um
{lore::*} = "a" or "b" or "c" or "d" or "e" or "f" or "g" or "h" or "i" or "j" or "k" or "l" or "m" or "n" or "o" or "p" or "q" or "s" or "t" or "u" or "v" or "w" or "x" or "y" or "z":
options:
Text: &7Worth: &a$2
on pickup:
wait 1 tick
loop all items in player's inventory:
if loop-item is a sugar cane:
loop {lore::*}:
if lore of tool of player does contain "%loop-value%":
stop
set lore of sugar cane to "{@Text}"```
lore of loop-value
and use loop (items in player's inventory) where [1 of input = plain sugar cane]:
i copied the code from web and changed some stuff
i have no idea on how to make it
the code does not work at all
how do i fix this
i dont understand
You should load a list with a number/value for all sellable items
This should not be there

?
no
Uh
you can use the loop-value expression there if you are looping over items
Where do u put it in the code
try something
Ok lemme try smth
%loop-value%'s lore set the 1st line of the sugar cane's lore to "&8Worth: &a$3"
Ok
So {_sugarcane}
Set lore of sugar cane to "&8Worth: &a$3"
.
Sugar cane's lore Set lore of loop-value to "&8Worth: &a$3"
alr i try some stuff and here what i have
wait 1 tick
loop all items in player's inventory:
if loop-item is sugar cane:
set lore of loop-value to "&8Worth: &a$3"```
it works but idk how to make the lore change depending on the item amount
for example
1 sugar cane is $3 but if i have 2 sugar cane so it will be $6
do some math
check the amount of sugar cane in each item stack, then multiply a variable with the price of your sugar cane
I don't have experience with NBTs but I feel like there would be a better solution by assigning an nbt value to all items for the price number, instead of looping through the player's inventory every time they interact with an item
i copied the code from the skunity web
but the code was outdated
how do i do that ;-;
as I said before, thats not worth doing
I would just check the item amount when they sell it
Do you even know Skript?