Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeClient APIGenerated

InventoryUse

Defined in: client/api.d.ts:3623

A local inventory action intercepted before the game applies it. A snapshot, not permission to spend an item on the server.

action: "primary" | "secondary" | "activate"

Defined in: client/api.d.ts:3652

Which native path was intercepted. Eat/Drink and Learn use secondary; primary also includes equipment actions; activate is the native equip-toggle path.


amount: number

Defined in: client/api.d.ts:3647

Always 1. The override requests one use, even when a native row represents a stack.


id: string

Defined in: client/api.d.ts:3637

A server inventory row represented by the selected native item. Send this to a server resource to request consumption.


item: string

Defined in: client/api.d.ts:3627

Item class GUID, using the logical GUID for custom items.


revision: number

Defined in: client/api.d.ts:3642

The inventory revision at the time of the action. The server must validate it and current ownership.


uid: string

Defined in: client/api.d.ts:3632

Native instance UID as a lossless decimal string. Local to this client; splits, merges and reprojection may replace it.