Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

X2Bank

Globals

X2Bank

X2Bank

Classes

Class: X2Bank

Method: Capacity

(method) X2Bank:Capacity()
  -> capacity: number

Returns the total capacity of the player’s bank.

@return capacity — The maximum number of items the bank can hold.

Method: ItemStack

(method) X2Bank:ItemStack(slot: number)
  -> itemStack: number

Returns the current stack size of the item in the specified bank slot.

@param slot — The bank slot index. (min: 1)

@return itemStack — The number of items in the stack.

Method: GetBagItemInfo

(method) X2Bank:GetBagItemInfo(slot: number, neededInfo?: `IIK_CATEGORY`|`IIK_CONSUME_ITEM`|`IIK_GRADE_STR`|`IIK_GRADE`|`IIK_IMPL`...(+5))
  -> bankItemInfo: ItemInfo|nil

Retrieves item information for the specified slot if it exists.

@param slot — The slot to query. (min: 1)

@param neededInfo — Optional additional information for the item.

@return bankItemInfo — The item information, or nil if the slot is empty or doesn’t exist.

-- api/X2Item
-- Values can be added together to get more information.
neededInfo:
    | `IIK_CATEGORY`
    | `IIK_CONSUME_ITEM`
    | `IIK_GRADE`
    | `IIK_GRADE_STR`
    | `IIK_IMPL`
    | `IIK_NAME`
    | `IIK_SELL`
    | `IIK_SOCKET_MODIFIER`
    | `IIK_STACK`
    | `IIK_TYPE`

See: ItemInfo

Method: CountItems

(method) X2Bank:CountItems()
  -> itemCount: number

Returns the total number of items in the player’s bank.

@return itemCount — The total count of items currently in the bank.

Method: MoveToEmptyBagSlot

(method) X2Bank:MoveToEmptyBagSlot(slotIdx: number)

Moves an item from the bank to an empty bag slot. Cooldown 200ms.

@param slotIdx — The bank slot index to move from. (min: 1, max: 150)