Skip to content

invslot

Data related to an inventory slot.

Members

int ID

ID of this item slot (usable directly by /itemnotify)

item Item

Item data for the item in this slot

string Name

For inventory slots not inside packs, the slot name, otherwise NULL

invslot Pack

Container that must be opened to access the slot with /itemnotify

int Slot

Slot number inside the pack which holds the item, otherwise NULL

string To String

Same as ID

Example

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
}
local item = mq.TLO.InvSlot("pack" .. Bag).Item.Item(Slot)
if item.NoDrop() then
    printf("I found a No Drop Item: \ag%s\ax", item.Name())
    return
end