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

InventoryUse

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

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:3931

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:3926

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


id: string

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

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:3906

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


revision: number

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

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:3911

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