- summary: Uses one unit of an inventory item that needs no target (bread, potion, recall potion...).
- area: Game.Inventory
Uses one unit of an inventory item that needs no target (bread, potion, recall potion...).
Kind request · Area Game.Inventory
Uses ONE unit of an item that acts on the character itself.
HOW TO SEND IT
1. Set object_uid to the item's ObjectItem.uid from your inventory (not its
template id, ObjectItem.gid).
2. Send it only for one unit and only for an item that needs no target. The client
picks another request otherwise:
- more than one unit at once: ObjectUseMultipleRequest (uid + quantity);
- an item used on a cell or on another character: the use-on-cell /
use-on-character requests, sent after the player picks the target.
Those requests have no signature yet.
3. Do not send it while your character is playing an animation: the client
holds the request until the animation ends, then sends it.
4. Watch the item's quantity: it drops by one (or the item is deleted) when the
use succeeds.
When you may send it
- Requires
character_loadedinferred - Raised by: the player uses an item from the inventory or the shortcut bar, one unit at a time, on no target proven
Related messages
- Reply not yet recovered: the server answers with the item's new quantity or its deletion (see
ObjectQuantityEvent/ObjectDeletedEvent) and with whatever the item does (life, stats, teleport). A refusal comes as an object error event that has no signature yet, so treat the use as unconfirmed until the quantity changes.
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | object_uid | int32 | The inventory item to use: its uid, as in ObjectItem.uid. (item uid) | required |