#(YameWitch) How do I make a interaction gui in a container?
1 messages · Page 1 of 1 (latest)
(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>
!guide
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
!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...
Script Container System
Player
player (<click_type>) clicks (<item>) in <inventory>
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.
when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<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.
ItemTag to set the current item for the event.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
^ 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
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
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
If you have any more questions feel free to ask here / in a different post and we'd love to help, otherwise -
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