User Inventory (add and use items in chat)

User Inventory Extension

inventory

Description

Users in chat are able to store items in their own inventory. They can either loot a random item or have an item added manually. Upon usage, specific items can trigger specific actions and allow for funny interactions!

(Examples: a VIP-Voucher that grants a user VIP or a Potion Of Silence that mutes the streamer’s mic)

Import Code

User Inventory Extension.sb (8.3 KB)

Installation

  1. Download the import file and import the content
    (either drag & drop the file into the import string or open it with a text editor and copy & paste the content in there)

  2. Move to the “Commands” tab and enable the imported commands
    (Rightclick, “Enable”)

  3. Done

Commands

Commands Description
!add item [User] [Item] Add an item of your choice to a user’s inventory. The items can contain spaces and can have a set amount before them (e. g. 10x Health Potion).
!remove item [User] [Item] Remove a specific item from a user’s inventory (case-sensitive, can only remove a single item at once).
!use [Item] Use an item in your inventory.
!items See the content of your inventory.

Configuration

  1. On the action Use Item, a variable called %usedItem% is being populated that can then be used in an if/else-subaction to trigger another action off of it. An example would be:

    if usedItem equals Health Potion do Action X, else continue"

  2. On the action Loot (Channel Point Reward) you can duplicate a Set Argument subaction inside the “Random Item” group and add any items you want to be in the loot pool. By rightclicking the subactions, you can change the “Weight” and therefore its loot probabilites. The item is picked randomly and will be added to the user’s inventory.

    1

3 Likes

Checked and All seems to work,

2 Likes