FANDOM


Verifies the item inventory (= Bag) for the number of occupied bag item slots.

local occupiedSlots, totalSlots = GetBagCount()

Parameters Edit

Arguments Edit

none
nil - No input required.

Returns Edit

occupiedSlots
number - The number of bag item slots that currently are occupied by an item.
totalSlots
number - The total number of bag item slots available in the bag.

Example Edit

function BackPackState()
   local used, total = GetBagCount();
   if ( (total - used) ~= 0 ) then
	return true;
   else
	return false;
   end;
end;
if ( BackPackState() ) then
 // Loot All
end;

Notes Edit

  • activatedBagPages = totalSlots / 30
  • freeSlots = totalSlots - occupiedSlots
  • The bag is filled with items from the inbox or from loot via the bag queue. Make sure the bag queue is not overloaded. It seems it can hold up to 20 items. If you grab more items, the elder entries in the queue will get lost! You may want to check the event Event:BAG_ITEM_UPDATE or Event:PLAYER_BAG_CHANGED.

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.