#(Doxa) Modifying virtual inventory

28 messages · Page 1 of 1 (latest)

lyric elm
#

How would I go about creating an inventory in which the player can interact with and it would expire?

this is kind of what im looking for

  • inventory open d:generic[size=54;title=<red>LootBag;contents=<player.flag[bag_loot]>] expire:10s
knotty mangoBOT
#

(Doxa) Modifying virtual inventory

knotty mangoBOT
#

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>

wanton heron
#

kind of depends on what you mean by expire...
if you want the contents to exist for only 10 seconds you can just set a timer and then wipe it?
or have that conents flag have an experation?

lyric elm
#

the contents flag expire after 10 seconds

#

"if you want the contents to exist for only 10 seconds you can just set a timer and then wipe it?"
how would i do this

#

but since the player can put items in the virtual inventory i want that to be tracked and say if the player closes that inventory, they can open it back with the same item contents, until the 10 seconds has passed

#

===================================
OR what I could do is:
Save the inventory's contents each time its closed ( through a flag/definition whatever is better )
then when open up the inventory with the specific flags items

split carbon
#

so, you want only items with x flag disappear from the inventory once the flag expires, while keeping items with y flag that hasnt expired yet?

lyric elm
#

yes

lofty wigeon
lyric elm
#

yea

lofty wigeon
lyric elm
#

but until than it can be modified

lofty wigeon
#

!lang inventory script

white stoneBOT
# lofty wigeon !lang inventory script

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

lofty wigeon
#

Should use an inventory script, so its easier for you generating it and referencing it in events

lyric elm
#

ight

#

btw whats the tag to get a players inventory contents, also im hopping i can just use it straight for the flag
e.g - flag <player> lootbag_loot:<context.inventory.contents>

#

nvm finally found it
<context.inventory.list_contents>