Skip to main content

Execute_RemoveObjectTemplateInBag

Description

Removes a random item matching the specified ObjectTemplate group from the bag.

Note

If the removal fails, a toast message is displayed: "No stored items available."

Parameters

ParameterDescription
BaseObjectThe inventory owner from which the item will be removed
S1The ObjectTemplateId from Object.json for the template group to remove from
F1The number of items to remove (minimum: 1)

Examples

DescriptionBaseObjectCommand
Remove 1 random item from a food template group in Self's bagSelfRemoveObjectTemplateInBag
Remove 1 random item from a food template group in Target's bagTargetRemoveObjectTemplateInBag
Remove 2 random items from a template group in Self's bagSelfRemoveObjectTemplateInBag