Drops
Properties
Section titled “Properties”Type: Bot
dropCounts Getter
Section titled “dropCounts ”Retrieves the drop stack as is.
Type: Readonly<Map<number, number>>
itemData Getter
Section titled “itemData ”Retrieves the item data store.
Type: ReadonlyMap<number, ItemData>
Methods
Section titled “Methods”addDrop
Section titled “addDrop”Adds an item to the internal store and the stack as visible to the client.
| Parameter | Type | Description |
|---|---|---|
| item | ItemData | The item that was dropped. |
Returns: void
addDrops
Section titled “addDrops”Adds multiple items to the drop stack at once.
| Parameter | Type | Description |
|---|---|---|
| items | ItemData[] | Array of ItemData to add. |
Returns: void
getDropCount
Section titled “getDropCount”Retrieves the count of an item in the drop stack.
| Parameter | Type | Description |
|---|---|---|
| itemId | number | The ID of the item. |
Returns: number
getItemFromId
Section titled “getItemFromId”Retrieves item data using its ID.
| Parameter | Type | Description |
|---|---|---|
| itemId | number | The ID of the item. |
Returns: ItemData | null
getItemFromName
Section titled “getItemFromName”Retrieves item data using its name (case-insensitive).
| Parameter | Type | Description |
|---|---|---|
| itemName | string | The name of the item. |
Returns: ItemData | null
getItemId
Section titled “getItemId”Retrieves the ID of an item using its name.
| Parameter | Type | Description |
|---|---|---|
| itemName | string | The name of the item. |
Returns: number | null
getItemName
Section titled “getItemName”Retrieves the name of an item using its ID.
| Parameter | Type | Description |
|---|---|---|
| itemId | number | The ID of the item. |
Returns: string | null
hasDrop
Section titled “hasDrop”Checks if an item exists in the drop stack.
| Parameter | Type | Description |
|---|---|---|
| itemKey | string | number | The name or ID of the item. |
Returns: boolean
pickup
Section titled “pickup”Accepts the drop for an item in the stack.
| Parameter | Type | Description |
|---|---|---|
| item | string | number | The name or ID of the item. |
Returns: Promise<boolean>
reject
Section titled “reject”Rejects a drop from the stack.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| itemKey | string | number | The name or ID of the item. | ||
| removeFromStore | boolean | ✓ | false | Whether to delete the item entry from the store. |
Returns: Promise<boolean>
toString
Section titled “toString”String representation of the drop stack.
Returns: string