Aksi inventory
client:drop(blockType, invType, amount)
| Field | Type |
|---|---|
| Signature | (self: Client, blockType: number, invType: number, amount: number) → string? |
| Returns | string? — nil kalau sukses |
| 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 kalau sukses |
| 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 kalau sukses |
| 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 kalau sukses |
| 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 kalau bot lagi pakai block itu |
| Async | yes |
client:expandInventory()
| Field | Type |
|---|---|
| Signature | (self: Client) → boolean |
| Returns | ngirim paket buy-slot; nggak ada return value |
| Async | yes |
client:nextSlotCount()
| Field | Type |
|---|---|
| Signature | (self: Client) → number? |
| Returns | number? — jumlah slot setelah upgrade tier berikutnya, atau nil kalau udah maxed (150) |
| Async | yes |
client:nextSlotPrice()
| Field | Type |
|---|---|
| Signature | (self: Client) → number? |
| Returns | number? — harga gem buat tier berikutnya, atau nil kalau udah maxed |
| Async | yes |
client:canExpandInventory()
| Field | Type |
|---|---|
| Signature | (self: Client) → boolean |
| Returns | boolean — true kalau masih ada tier yang belum dimiliki |
| Async | yes |
client:use(blockType, invType?, amount?)
| Field | Type |
|---|---|
| Signature | (self: Client, blockType: number, invType: number?, amount: number?) → string? |
| Returns | string? — nil kalau sukses |
| 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)
Collectable
client:collect(id)
| Field | Type |
|---|---|
| Signature | (self: Client, id: number) → string? |
| Returns | boolean — true kalau sukses, false kalau id-nya nggak ketemu di snapshot world |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
Server cocokin pakai id, BUKAN posisi — bot cuma perlu ada dalam jangkauan walk.
client:setAutoCollect(enable, intervalMs?)
| Field | Type |
|---|---|
| Signature | (self: Client, enable: boolean, intervalMs: number?) → () |
| Returns | nothing |
| Async | yes |
Loop background. intervalMs default 250ms (dibatasi minimum 250). Cuma jalan saat in-world. false buat cancel.
client:collect(collectableId)
client:setAutoCollect(true)
client:setAutoCollect(true, 500)
client:setAutoCollect(false)
Gift box
client:collectGift(point)
| Field | Type |
|---|---|
| Signature | (self: Client, point: Vec2i) → string? |
| Returns | boolean — true setelah paket punch terkirim; false artinya udah dikoleksi (ditandai sama rejection server) |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:collectGift(Vector2i.new(3, 3))
Item pack
client:buy(packId)
| Field | Type |
|---|---|
| Signature | (self: Client, packId: string) → string? |
| Returns | string — BuyPackResult debug-format kalau sukses, string kosong kalau error / timeout |
| Async | yes |
Timeout default 5 detik nyamain tombol "Buy" di UI bot.
client:buy("BasicSeeds")