Skip to content

Drops

Type: Bot

Retrieves the drop stack as is.

Type: Readonly<Map<number, number>>

Retrieves the item data store.

Type: ReadonlyMap<number, ItemData>

Adds an item to the internal store and the stack as visible to the client.

ParameterTypeDescription
itemItemDataThe item that was dropped.

Returns: void

Adds multiple items to the drop stack at once.

ParameterTypeDescription
itemsItemData[]Array of ItemData to add.

Returns: void

Retrieves the count of an item in the drop stack.

ParameterTypeDescription
itemIdnumberThe ID of the item.

Returns: number

Retrieves item data using its ID.

ParameterTypeDescription
itemIdnumberThe ID of the item.

Returns: ItemData | null

Retrieves item data using its name (case-insensitive).

ParameterTypeDescription
itemNamestringThe name of the item.

Returns: ItemData | null

Retrieves the ID of an item using its name.

ParameterTypeDescription
itemNamestringThe name of the item.

Returns: number | null

Retrieves the name of an item using its ID.

ParameterTypeDescription
itemIdnumberThe ID of the item.

Returns: string | null

Checks if an item exists in the drop stack.

ParameterTypeDescription
itemKeystring | numberThe name or ID of the item.

Returns: boolean

Accepts the drop for an item in the stack.

ParameterTypeDescription
itemstring | numberThe name or ID of the item.

Returns: Promise<boolean>

Rejects a drop from the stack.

ParameterTypeOptionalDefaultDescription
itemKeystring | numberThe name or ID of the item.
removeFromStorebooleanfalseWhether to delete the item entry from the store.

Returns: Promise<boolean>

String representation of the drop stack.

Returns: string