Retrieves information about an item in the bag queue.

local itemName, iconPath, stackAmount, unknown = GetItemQueueInfo(itemQueueIndex)

Parameters Edit

Arguments Edit

number - The index of the item in the queue {1 to ?}. See the example below on how to determine the number of entries in the queue.

Returns Edit

string - The name of the item.
string - Path to icon to be shown for this queue entry.
number - The amount of items in this item stack or 1 if there's not a stack.
? - testing has shown value 0 all the time.

Example Edit

-- Checking the number of entries in the item queue and compare with free slots in the bag.
local occupiedSlots, totalSlots = GetBagCount();
local freeSlots = totalSlots - occupiedSlots;

local queuedItems = 0;
local itemName, iconPath, stackAmount, unknown = GetItemQueueInfo(1);
while (itemName ~= nil) do
  queuedItems = queuedItems + 1;
  itemName, iconPath, stackAmount, unknown = GetItemQueueInfo(queuedItems + 1);

if (freeSlots <= queuedItems) then
  -- stop filling queue with more items
  -- i.e. by taking item attachments from inbox messages

Notes Edit

  • The event ITEMQUEUE_INSERT is called when a new entry was added to the item queue (item or itemstack).
  • The event ITEMQUEUE_UPDATE is usually called when a queue entry was placed in the bag. But it is also called if only some items of the item stack in the first queue entry were added to an existing item stack in the bag which is full afterwards.
    • Example: you buy 100 water from the store. Your bag item stack for water contains 210 items. The event ITEMQUEUE_UPDATE will be called two times. At first, when 40 items of the bought stack are added to the existing stack in the bag. Secondly, for the remaining 60 items when they are placed into a free slot in your bag.

Related Functions Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.