#() Inventory quantity of items

1 messages · Page 1 of 1 (latest)

manic crane
#

Hello I cannot find any materials on how to create an inventory with more item quantity in one slot, I tried to use definitions but it was not working I also tried to adjust inventory when inventory is opened and still not working only 1 item per slot is showing 😦

daring sableBOT
simple carbonBOT
#

() Inventory quantity of items

simple carbonBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

left marten
#

!mechanism itemtag.quantity

fierce orchidBOT
# left marten !mechanism itemtag.quantity

Changes the number of items in this stack.

Object

ItemTag

Input

ElementTag(Number)

Tags

<ItemTag.quantity> Returns the number of items in the ItemTag's itemstack.
<ItemTag.max_stack> Returns the max number of this item possible in a single stack of this type. F...

left marten
#

stone[5] would be five stone

manic crane
#

Oh, I will try it thanks for fast response that should do the job, maybe I'm just a blind man

#

Ok so I tried this:

treasure_1_inventory:
type: inventory
inventory: CHEST
title: Treasure n.1
size: 27
gui: false
slots:
- [] [] [] [] [] [] [] [] []
- [] [] [] [bread] [] [] [] [] []
- [] [] [] [] [] [] [] [] []

treasure_1_inventory_script:
type: world
debug: false
events:
on player opens treasure_1_inventory:
- inventory adjust slot:13 quantity:5

and it's not working, and I also tried this which also not works:

treasure_1_inventory:
type: inventory
inventory: CHEST
title: Treasure n.1
size: 27
gui: false
slots:
- [] [] [] [] [] [] [] [] []
- [] [] [] [bread[5]] [] [] [] [] []
- [] [] [] [] [] [] [] [] []

left marten
#

quantity=5

#

it'd be bread[quantity=5] if you used it in the slot like you tried with my bad example

#

the event didnt work the way you expected because you used on instead of after

manic crane
#

Oh yes I think now it should work properly but currently I'm out of my server so later today I will try it again thank you for help so far and don't worry everyone makes mistakes, main thing is that it will work after all, you can now consider it as solved thats probably all I wanted thanks again!

flint dirge
#

Also note that this is called property syntax, where you can specify mechanisms on objects, e.g. in this case you're using

#

!m ItemTag.quantity

fierce orchidBOT
# flint dirge !m ItemTag.quantity

Changes the number of items in this stack.

Object

ItemTag

Input

ElementTag(Number)

Tags

<ItemTag.quantity> Returns the number of items in the ItemTag's itemstack.
<ItemTag.max_stack> Returns the max number of this item possible in a single stack of this type. F...

flint dirge
#

bread is the item, and you're applying [quantity=5] to it
Mainly showing this so that you know how to search the meta for these in the future - can also specify multiple like [quantity=5;color=red], although if they get really complex should consider item scripts

#

!l Item Script

fierce orchidBOT
# flint dirge !l Item Script

Item script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the
ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond

The following is the format for the container. Except for the 'material' key (and the dScript
required 'type' key), all other keys are optional.

<code>

The name of the item script is the same name that you can use to construct a new

ItemTag based on this item script. For example, an item script named 'sword_of_swiftness'

can be referred to as simply 'sword_of_swiftness'.

Item_Script_Name:

type\: item

# Must be a valid ItemTag. See 'ItemTag' for more information.
# \| All item scripts MUST h...
Group

Script Container System

pine furnaceBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@manic crane