#(YameWitch) How do I make a interaction gui in a container?

1 messages · Page 1 of 1 (latest)

supple galleon
#

I am very new to Denizen plz help me

fossil plumeBOT
#

(YameWitch) How do I make a interaction gui in a container?

#

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>

fossil plumeBOT
stoic nacelle
#

!guide

kindred roverBOT
stoic nacelle
#

!language inventory script containers

kindred roverBOT
# stoic nacelle !language inventory script containers

Inventory script containers are an easy way to pre-define custom inventories for use within scripts.
Inventory scripts work with the InventoryTag object, and can be fetched with the Object Fetcher by using the
InventoryTag constructor InventoryTag_script_name.

Example: - inventory open d:MyInventoryScript

The following is the format for the container.

The 'inventory:' key is required, other keys vary based on the type.
Some types will require you define either 'size:' or 'slots:' (or both).
'Procedural items:' and 'definitions:' are optional, and should only be defined if needed.

<code>

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

InventoryTag based on this inventory script. For example, an inventory script named 'Super_Cool_Inventory'

can be referr...

Group

Script Container System

kindred roverBOT
#
Group

Player

Event Lines

player (<click_type>) clicks (<item>) in <inventory>

Switches

with:<item> to only process the event if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event.
action:<action> to only process the event if a specified action occurred.
slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see !language Slot Inputs.

Triggers

when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.item> returns the ItemTag the player has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: <@link url...
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot ty...
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See <@link language Inventory Actions>.
... and 1 more.

Determine

ItemTag to set the current item for the event.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

chrome delta
#

^ If you're new to Denizen the very first step is to follow the guide

#

Should read through the entire thing and try out the examples, it's the best way to learn and get a good understanding of it

#

!guide

kindred roverBOT
chrome delta
#

There's also a specific guide page about inventory GUIs

#

Feel free to ask any questions you may have here ofc, or after you're done with the guide if you need help with the GUI you'd like to make then we'd love to help as well

chrome delta
#

If you have any more questions feel free to ask here / in a different post and we'd love to help, otherwise -

tawny sunBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> 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.)

#

@supple galleon