🔑Item

Table to work with CItem.

CItem extends CAbility

IsCombinable(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is combinable. I'm not sure if non-combinable items even exist.


IsPermanent(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is permanent. I'm not sure what permanent items is, but for items with stacks this function returns false.


IsStackable(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is stackable. e.g tangoes, wards, etc.


IsRecipe(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is recipe.


GetSharability(item: CItem): Enum.ShareAbility

Name
Type
Description

item

Returns item's sharability type.


IsDroppable(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is droppable.


IsPurchasable(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is purchasable.


IsSellable(item: CItem): boolean

Name
Type
Description

item

Returns true if the item is sellable.


RequiresCharges(item: CItem): boolean

Name
Type
Description

item

Returns true if the item requires charges. e.g. urn, vessel etc.


IsKillable(item: CItem): boolean

Name
Type
Description

item

Returns true if item is destroyable by autoatack.


IsDisassemblable(item: CItem): boolean

Name
Type
Description

item

Returns true if item is disassemblable.


IsAlertable(item: CItem): boolean

Name
Type
Description

item

Returns true if item is alertable. e.g. smoke, mekansm, arcane boots etc.


GetInitialCharges(item: CItem): integer

Name
Type
Description

item

Returns initial charges of the item. e.g. 3 for bottle, 1 for dust etc.


CastsOnPickup(item: CItem): boolean

Name
Type
Description

item

No idea what this function does.


GetCurrentCharges(item: CItem): integer

Name
Type
Description

item

Returns amount of current charges.


GetSecondaryCharges(item: CItem): integer

Name
Type
Description

item

Returns amount of secondary charges. e.g. pack of both type of wards.


IsCombineLocked(item: CItem): boolean

Name
Type
Description

item

Returns true if item locked for combining.


GetPurchaseTime(item: CItem): number

Name
Type
Description

item

Returns the game time when the item was purchased. If the item was assembled from other items, It returns the purchase time of the item that had the lowest index at the moment of assembling.


GetAssembledTime(item: CItem): number

Name
Type
Description

item

Returns the game time when the item was assembled. If the item was not assembled, returns time when the item was purchased.


PurchasedWhileDead(item: CItem): boolean

Name
Type
Description

item

Returns true if item was purchased while dead.


CanBeUsedOutOfInventory(item: CItem): boolean

Name
Type
Description

item

No idea which specific item example could be used out of inventory.


IsItemEnabled(item: CItem): boolean

Name
Type
Description

item

Returns false if item has CD after moving from stash.


GetEnableTime(item: CItem): number

Could be less than current game time if item is already enabled.

Name
Type
Description

item

Returns game time when item will be enabled.


GetPlayerOwnerID(item: CItem): integer

Name
Type
Description

item

Returns player ID who owns the item.


GetCost(item: CItem): integer

Name
Type
Description

item

Returns item cost.


GetStockCount(item_id: integer): integer

Item id can be found in `assets/data/items.json` file in cheat folder.

Name
Type
Description

item_id

integer

Returns amount of remaining items in shop by item id.

Example

-- "item_ward_observer": {
--     "ID": "42",
Log.Write("Observers available: " .. Item.GetStockCount(42))

Last updated