Condition_HasItemObjectTemplateToInventory
Description
Checks whether the inventory contains the specified number of objects belonging to a TemplateObject group.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The inventory owner to check |
| CompareType | Equal, NotEqual, Greater, Less, GreaterOrEqual, LessOrEqual, InRange, OutRange |
| S1 | The ObjectTemplateId from Object.json to match against |
| F1 | The quantity threshold to compare against (must be 0 or greater) |
| F2 | Upper quantity threshold (InRange, OutRange only) |
Examples
| Description | BaseObject | Command | CompareType |
|---|---|---|---|
| Check if Self’s inventory has 2 or more items from a template group | Self | HasItemObjectTemplateToInventory | GreaterOrEqual |
| Check if Self’s inventory has between 3 and 5 items from a template | Self | HasItemObjectTemplateToInventory | InRange |
| Check if Target’s inventory has at least 1 item from a template group | Target | HasItemObjectTemplateToInventory | GreaterOrEqual |
| Check if Self’s inventory has none of a specific template group | Self | HasItemObjectTemplateToInventory | Equal |
Back to Command FinderSearch and filter all 491 Script Condition documents