ItemEx
An item in your inventory or the bank.
ClassRLPlugins API
public class ItemEx implements Interactable, IdentifiableGet one from InventoryAPI.getItem(int) or InventoryAPI.getItems().
Members
Constructors
- newItemEx(Item, int)
Creates a ItemEx.
Methods
- booleanequals(Object)
Whether this and the other object are the same thing.
- String[]getActions()
The item's actions, such as Eat or Drop.
- intgetCanonicalId()
The plain item id. A noted or placeholder item gives the id of the normal item.
- ShapegetClickBox()
The item's box on screen, or
nullwhen it does not show. - intgetEquippedActionIndex(ItemEx, String)
Resolve an **equipped item action index** by reading ItemComposition param opcodes.
- longgetGePrice()
The Grand Exchange price.
- intgetHighAlchValue()
The coins High Level Alchemy gives for it.
- intgetId()
The item ID.
- ItemgetItem()
The RuneLite
Itembehind it. - intgetLinkedNoteId()
The id of its noted form. For a noted item, the id of the normal item.
- intgetLowAlchValue()
The coins Low Level Alchemy gives for it.
- StringgetName()
The item's name, without color tags.
- intgetQuantity()
How many there are.
- intgetShopPrice()
Its base shop price.
- intgetSlot()
The slot the item is in.
- WidgetgetWidget()
The inventory widget that shows it.
- booleanhasAction(String)
Whether it has this action.
- booleanhasActionContains(String)
Whether one of its actions contains this text.
- voidinteract(String...)
Clicks one of the item's actions.
- voidinteract(int)
Clicks one of the item's actions.
- booleanisNoted()
Whether it is a bank note.
- booleanisPlaceholder()
Whether it is a bank placeholder.
- booleanisTradeable()
Whether it can be traded.
ItemEx(Item, int)
public ItemEx(Item arg0, int arg1)Creates a ItemEx.
Parameters
arg0- Argument 0.
arg1- Argument 1.
equals(Object)
public boolean equals(Object other)Whether this and the other object are the same thing.
Parameters
other- Other.
getActions()
public String[] getActions()The item's actions, such as Eat or Drop.
getCanonicalId()
public int getCanonicalId()The plain item id. A noted or placeholder item gives the id of the normal item.
getClickBox()
public Shape getClickBox()The item's box on screen, or null when it does not show.
getEquippedActionIndex(ItemEx, String)static
public static int getEquippedActionIndex(ItemEx item, String option)Resolve an **equipped item action index** by reading ItemComposition param opcodes.
TODO: Fix for equipmentitem subops (Con cape, Max cape, Diary cape, ..) see here for params.
Parameters
item- Item.
option- Option.
Returns
Int index.
getGePrice()
public long getGePrice()The Grand Exchange price.
getHighAlchValue()
public int getHighAlchValue()The coins High Level Alchemy gives for it.
getId()
public int getId()The item ID.
Returns
The item ID. A noted item has its own ID.
getItem()
public Item getItem()The RuneLite Item behind it.
getLinkedNoteId()
public int getLinkedNoteId()The id of its noted form. For a noted item, the id of the normal item.
getLowAlchValue()
public int getLowAlchValue()The coins Low Level Alchemy gives for it.
getName()
public String getName()The item's name, without color tags.
Returns
The name.
getQuantity()
public int getQuantity()How many there are.
Returns
The stack size, or 1 for an item that does not stack.
getShopPrice()
public int getShopPrice()Its base shop price.
getSlot()
public int getSlot()The slot the item is in.
Returns
The slot, counting from 0.
getWidget()
public Widget getWidget()The inventory widget that shows it.
hasAction(String)
public boolean hasAction(String action)Whether it has this action.
Parameters
action- Action.
hasActionContains(String)
public boolean hasActionContains(String actionPart)Whether one of its actions contains this text.
Parameters
actionPart- Action part.
interact(String...)
public void interact(String... action)Clicks one of the item's actions.
Parameters
action- Action.
interact(int)
public void interact(int action)Clicks one of the item's actions.
Parameters
action- Action.
isNoted()
public boolean isNoted()Whether it is a bank note.
isPlaceholder()
public boolean isPlaceholder()Whether it is a bank placeholder.
isTradeable()
public boolean isTradeable()Whether it can be traded.
Also allowed
Every class has these, as in plain Java.
isInteractable, toString