#worth display

1 messages · Page 1 of 1 (latest)

simple comet
#

i dont know how to set lore to all of an item

#

and make the lore change depending on the amount

lilac kiln
#

send_code or a coherent explanation of what you are trying to do

spark path
lilac kiln
simple comet
simple comet
lilac kiln
#

set lore of {_i} to "$5"

simple comet
#

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}"```
lilac kiln
#

lore of loop-value

#

and use loop (items in player's inventory) where [1 of input = plain sugar cane]:

simple comet
#

i have no idea on how to make it

#

the code does not work at all

#

how do i fix this

lilac kiln
#

just define the list on load

#

why is there a : at the end of the line?

simple comet
#

i dont understand

spark path
#

You should load a list with a number/value for all sellable items

lilac kiln
still heart
simple comet
lilac kiln
#
simple comet
#

Oh

#

%itemstack/itemtype%'[s] lore

#

%sugar cane%'s lore

lilac kiln
#

no

simple comet
#

Uh

lilac kiln
#

you can use the loop-value expression there if you are looping over items

simple comet
#

Ok

#

set the 1st line of the sugar cane's lore to "&8Worth: &a$3"

simple comet
lilac kiln
#

try something

simple comet
#

Ok lemme try smth

#

%loop-value%'s lore set the 1st line of the sugar cane's lore to "&8Worth: &a$3"

lilac kiln
#

set lore of {_item} to "..."

#

replace {_item} with an expression

simple comet
#

Ok

simple comet
#

Set lore of sugar cane to "&8Worth: &a$3"

simple comet
#

Sugar cane's lore Set lore of loop-value to "&8Worth: &a$3"

simple comet
#

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

spark path
#

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

simple comet
#

but the code was outdated

lilac kiln
#

I would just check the item amount when they sell it

still heart