Inventory actions
client:drop(blockType, invType, amount)
| Field | Type |
|---|---|
| Signature | (self: Client, blockType: number, invType: number, amount: number) → string? |
| Returns | string? — nil on success |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:trash(blockType, invType, amount)
| Field | Type |
|---|---|
| Signature | (self: Client, blockType: number, invType: number, amount: number) → string? |
| Returns | string? — nil on success |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:wear(blockId)
| Field | Type |
|---|---|
| Signature | (self: Client, blockId: number) → string? |
| Returns | string? — nil on success |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:unwear(blockId)
| Field | Type |
|---|---|
| Signature | (self: Client, blockId: number) → string? |
| Returns | string? — nil on success |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:wearing(blockId)
| Field | Type |
|---|---|
| Signature | (self: Client, blockId: number) → boolean |
| Returns | boolean — true when the bot is currently wearing that block |
| Async | yes |
client:expandInventory()
| Field | Type |
|---|---|
| Signature | (self: Client) → boolean |
| Returns | sends the buy-slots packet; no return value |
| Async | yes |
client:nextSlotCount()
| Field | Type |
|---|---|
| Signature | (self: Client) → number? |
| Returns | number? — slot count after the next upgrade tier, or nil when maxed (150) |
| Async | yes |
client:nextSlotPrice()
| Field | Type |
|---|---|
| Signature | (self: Client) → number? |
| Returns | number? — gem cost of the next tier, or nil when maxed |
| Async | yes |
client:canExpandInventory()
| Field | Type |
|---|---|
| Signature | (self: Client) → boolean |
| Returns | boolean — true when an unowned tier exists |
| Async | yes |
client:use(blockType, invType?, amount?)
| Field | Type |
|---|---|
| Signature | (self: Client, blockType: number, invType: number?, amount: number?) → string? |
| Returns | string? — nil on success |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:drop(blockType, inventoryType, amount)
client:trash(blockType, inventoryType, amount)
client:wear(blockType)
client:unwear(blockType)
client:wearing(blockType)
client:expandInventory()
client:nextSlotCount()
client:nextSlotPrice()
client:canExpandInventory()
client:use(blockType)
Collectables
client:collect(id)
| Field | Type |
|---|---|
| Signature | (self: Client, id: number) → string? |
| Returns | boolean — true on success, false when the id wasn't found in the loaded world snapshot |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
The server matches by id, NOT by position — the bot just has to be within walk range.
client:setAutoCollect(enable, intervalMs?)
| Field | Type |
|---|---|
| Signature | (self: Client, enable: boolean, intervalMs: number?) → () |
| Returns | nothing |
| Async | yes |
Background loop. intervalMs defaults to 250ms (clamped to 250 minimum). Only runs while in-world. false cancels.
client:collect(collectableId)
client:setAutoCollect(true)
client:setAutoCollect(true, 500)
client:setAutoCollect(false)
Gift boxes
client:collectGift(point)
| Field | Type |
|---|---|
| Signature | (self: Client, point: Vec2i) → string? |
| Returns | boolean — true after the punch packet sends; false is reserved for already-collected (signaled by server-side rejection) |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:collectGift(Vector2i.new(3, 3))
Item packs
client:buy(packId)
| Field | Type |
|---|---|
| Signature | (self: Client, packId: string) → string? |
| Returns | string — debug-formatted BuyPackResult on success, empty string on error / timeout |
| Async | yes |
Default 5 s timeout matches the bot UI's "Buy" button.
client:buy("BasicSeeds")