Runes of Magic Wiki
Advertisement

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

local occupiedSlots, totalSlots = GetBagCount()

Parameters[]

Arguments[]

none
nil - No input required.

Returns[]

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[]

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[]

  • 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[]

Advertisement