# DataType:invslot

Data related to an inventory slot.

### Members

| **Type**                                                                                         | **Member**    | **Description**                                                                                                        |
| ------------------------------------------------------------------------------------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)                 | **ID**        | ID of this item slot (usable directly by [/itemnotify](/macroquest/commands/slash-commands/itemnotify.md))             |
| [*item*](/macroquest/data-types-and-top-level-objects/data-types/datatype-item.md)               | **Item**      | Item data for the item in this slot                                                                                    |
| \_\_[*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md)\_\_   | **Name**      | For inventory slots not inside packs, the slot name, otherwise NULL                                                    |
| \_\_[*invslot*](/macroquest/data-types-and-top-level-objects/data-types/datatype-invslot.md)\_\_ | **Pack**      | Container that must be opened to access the slot with [/itemnotify](/macroquest/commands/slash-commands/itemnotify.md) |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)                 | **Slot**      | Slot number inside the pack which holds the item, otherwise NULL                                                       |
| \_\_[*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md)\_\_   | **To String** | Same as **ID**                                                                                                         |

## Example

Bag is a defined variable in a for loop in this case:

```
/if (${InvSlot[pack${Bag}].Item.Item[${Slot}].NoDrop}) {
    /echo I found a No Drop Item: \ag${InvSlot[pack${Bag}].Item.Item[${Slot}].Name}
    /return
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/data-types-and-top-level-objects/data-types/datatype-invslot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
