1
0

20 lines
684 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: HasItem(Player, ItemID, IncludeBank)
**Description:**
Determines whether a given player possesses an item with the specified Item ID.
**Parameters:**
- `Player`: Spawn The player or NPC to check for the item. (Typically a Player.)
- `ItemID`: Int32 The unique ID of the item to check for.
- `IncudeBank`: Boolean If we should check the bank also
**Returns:** Boolean true (1) if the spawns inventory contains at least one of the specified item; false (0) if the item is not present.
**Example:**
```lua
-- Example usage from: ItemScripts/GeldranisVial.lua
if HasItem(Player, FilledVial) == false then
SummonItem(Player, FilledVial, 1)
end
```