getId
getId: (ItemComposition) -> numberThe item's id.
client:getItemDefinition(…)
itemManager:getItemComposition(…)| Method | Returns | Description |
|---|---|---|
getId() | number | The item's id. |
getName() | string | The name, as the client shows it ("Members object" for a members item on a free world). |
getMembersName() | string | The name as on a members world. |
getNote() | number | The note template (799) for a noted item, else -1. |
getLinkedNoteId() | number | The other side of the note link (the noted item for an unnoted one, and back), else -1. |
getPlaceholderId() | number | The bank placeholder's id (or, for a placeholder, the item's), else -1. |
getPlaceholderTemplateId() | number | The placeholder template (14401) for a placeholder, else -1. |
getPrice() | number | The store value. |
getHaPrice() | number | The high alchemy value: getPrice() * 0.6 in single precision, truncated. |
isMembers() | boolean | Whether it is a members item. |
isStackable() | boolean | Whether it stacks. |
isGeTradeable() | boolean | Whether the Grand Exchange trades it. |
getInventoryActions() | { n: number, [number]: string? } | The inventory actions, five slots, nil where there is none. Holes are nil and the array carries n, its length: walk it `for i = 1, acti… |
getSubops() | {{ n: number, [number]: string? }} | Each inventory action's sub-options (nil where an action has none). |
getShiftClickActionIndex() | number | The inventory action shift-click runs (0-based), -1 for none. |
| Method | Returns | Description |
|---|---|---|
Client.getItemDefinition | ItemComposition | Item id's definition, loaded through the client's cache on demand; an id with none answers the client's default (named "null"). |
ItemManager.getItemComposition | ItemComposition | The item's definition: client:getItemDefinition(itemId) (never nil: an unknown id is the client's default, named "null"). |
getIdgetId: (ItemComposition) -> numberThe item's id.
getNamegetName: (ItemComposition) -> stringThe name, as the client shows it ("Members object" for a members item on a free world).
getMembersNamegetMembersName: (ItemComposition) -> stringThe name as on a members world.
getNotegetNote: (ItemComposition) -> numberThe note template (799) for a noted item, else -1.
getLinkedNoteIdgetLinkedNoteId: (ItemComposition) -> numberThe other side of the note link (the noted item for an unnoted one, and back), else -1.
getPlaceholderIdgetPlaceholderId: (ItemComposition) -> numberThe bank placeholder's id (or, for a placeholder, the item's), else -1.
getPlaceholderTemplateIdgetPlaceholderTemplateId: (ItemComposition) -> numberThe placeholder template (14401) for a placeholder, else -1.
getPricegetPrice: (ItemComposition) -> numberThe store value.
getHaPricegetHaPrice: (ItemComposition) -> numberThe high alchemy value: getPrice() * 0.6 in single precision, truncated.
isMembersisMembers: (ItemComposition) -> booleanWhether it is a members item.
isStackableisStackable: (ItemComposition) -> booleanWhether it stacks.
isGeTradeableisGeTradeable: (ItemComposition) -> booleanWhether the Grand Exchange trades it.
getInventoryActionsgetInventoryActions: (ItemComposition) -> { n: number, [number]: string? }The inventory actions, five slots, nil where there is none. Holes are nil and the array carries n, its length: walk it for i = 1, actions.n. table.find stops at the first hole, so search it with your own contains(actions, x) that walks to n.
getSubopsgetSubops: (ItemComposition) -> {{ n: number, [number]: string? }}Each inventory action's sub-options (nil where an action has none).
getShiftClickActionIndexgetShiftClickActionIndex: (ItemComposition) -> numberThe inventory action shift-click runs (0-based), -1 for none.