#(idyllicx) How do I check if a player has full inventory / has no more inventory slots?

35 messages · Page 1 of 1 (latest)

ripe talonBOT
#

(idyllicx) How do I check if a player has full inventory / has no more inventory slots?

#

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>

slender nimbus
#

I have tried using <player.inventory.is_full> but I don't think it is working, I have my inventory full at the moment

hushed tigerBOT
# agile mason !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

agile mason
#

Post a debug and a screenshot of the inventory

slender nimbus
#

And here is my code:

vouchertestuse:
  type: world
  debug: false
  events:
    on player right clicks block with:vouchertest:
    - if <player.inventory.is_full>:
      - narrate "You cannot use this when your inventory is full." targets:<player>
    - else:
      - narrate "Inventory not full."
agile mason
#

I mean, your offhand slot isn't full - it can still have 2 more items

slender nimbus
#

I don'

#

I don't know if this is true but it might be because of my slot 1 only having 1 nametag:

#

Is there a way around that?

jagged spear
#

!t inventorytag.empty_slots

hushed tigerBOT
jagged spear
#

probably this could help

agile mason
#

Assuming that item is going to give you items, what you actually want is probably

#

!t can_fit

hushed tigerBOT
# agile mason !t can_fit
Cannot Specify Searched Tag

Multiple possible tags: <InventoryTag.can_fit[<item>|...]>, <InventoryTag.can_fit[<item>].count>, <InventoryTag.can_fit[<item>].quantity[<#>]>.

agile mason
#

!t InventoryTag.can_fit

hushed tigerBOT
slender nimbus
placid ventureBOT
#
Resolved

Thread closed as resolved.

#
Thread Reopened

Thread was manually reopened by @slender nimbus.

#
Resolved

Thread closed as resolved.

lavish wyvern
#

!l item

hushed tigerBOT
# lavish wyvern !l item

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.


# 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

placid ventureBOT
#
Thread Reopened

Thread was manually reopened by @lavish wyvern.

agile mason
#

@lavish wyvern Don't reopen random threads, use #bot-spam