#Converting Ingots to Blocks in bulk

1 messages · Page 1 of 1 (latest)

fossil dove
#
command /compress:
    trigger:
        while player is online:
            if player has 9 lapis:
                remove 9 lapis from player's inventory
                give player 1 lapis block
            else:
                exit 1 loop
            wait 3 ticks```

this will compress al ingots, don't remove wait 3 ticks or you will crash the server
dire gull
#

is it necessary to check if the player is online

#

?

left olive
#

It’s not checking, it’s just running while the player is online

dire gull
#

well, while is an if that just runs until it doesn't meet the req

left olive
#

While is a section, if is a condition, two different things

left olive
graceful gull
#

just check if they have 9 lapis in the while loop

hearty mortar
#

Or just do some quick math, no need for a loop

dim laurel
#

Thanks