Charges
A value shape that methods take or return.
Getting one
player:charges():of(…)Fields
| Field | Type | Description |
|---|---|---|
charges | number | The count: doses, teleports, uses. |
fixed | boolean | true when the item id says it (a potion's doses, a games necklace's 8); false for a count the client tracked from the game's messages. |
seenAt | number? | A tracked count's last observation, Unix milliseconds: 0 when its time is not known. nil for a fixed count. |
live | boolean? | Whether a tracked count was set this session, so the client has seen every change since. nil for a fixed count. |
Returned by
| Method | Returns | Description |
|---|---|---|
ItemCharges.of | Charges? | One item's charges. |