Skip to main content

Inventory actions

client:drop(blockType, invType, amount)

FieldType
Signature(self: Client, blockType: number, invType: number, amount: number) → string?
Returnsstring?nil on success
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes

client:trash(blockType, invType, amount)

FieldType
Signature(self: Client, blockType: number, invType: number, amount: number) → string?
Returnsstring?nil on success
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes

client:wear(blockId)

FieldType
Signature(self: Client, blockId: number) → string?
Returnsstring?nil on success
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes

client:unwear(blockId)

FieldType
Signature(self: Client, blockId: number) → string?
Returnsstring?nil on success
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes

client:wearing(blockId)

FieldType
Signature(self: Client, blockId: number) → boolean
Returnsbooleantrue when the bot is currently wearing that block
Asyncyes

client:expandInventory()

FieldType
Signature(self: Client) → boolean
Returnssends the buy-slots packet; no return value
Asyncyes

client:nextSlotCount()

FieldType
Signature(self: Client) → number?
Returnsnumber? — slot count after the next upgrade tier, or nil when maxed (150)
Asyncyes

client:nextSlotPrice()

FieldType
Signature(self: Client) → number?
Returnsnumber? — gem cost of the next tier, or nil when maxed
Asyncyes

client:canExpandInventory()

FieldType
Signature(self: Client) → boolean
Returnsbooleantrue when an unowned tier exists
Asyncyes

client:use(blockType, invType?, amount?)

FieldType
Signature(self: Client, blockType: number, invType: number?, amount: number?) → string?
Returnsstring?nil on success
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes
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)

FieldType
Signature(self: Client, id: number) → string?
Returnsbooleantrue on success, false when the id wasn't found in the loaded world snapshot
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes

The server matches by id, NOT by position — the bot just has to be within walk range.

client:setAutoCollect(enable, intervalMs?)

FieldType
Signature(self: Client, enable: boolean, intervalMs: number?) → ()
Returnsnothing
Asyncyes

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)

FieldType
Signature(self: Client, point: Vec2i) → string?
Returnsbooleantrue after the punch packet sends; false is reserved for already-collected (signaled by server-side rejection)
Common errorsErrors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED
Asyncyes
client:collectGift(Vector2i.new(3, 3))

Item packs

client:buy(packId)

FieldType
Signature(self: Client, packId: string) → string?
Returnsstring — debug-formatted BuyPackResult on success, empty string on error / timeout
Asyncyes

Default 5 s timeout matches the bot UI's "Buy" button.

client:buy("BasicSeeds")