Class Item

    • Constructor Detail

      • Item

        public Item​(int itemId,
                    int stack,
                    int slot,
                    ContainerType containerType)
      • Item

        public Item​(int itemId,
                    int stack,
                    int slot)
      • Item

        public Item​(int itemId,
                    int stack)
    • Method Detail

      • getDestination

        public AbstractMouseDestination getDestination()
        Gets the RectangleDestination for the Item. If there is no ContainerType on the item, it will return the currently set destination. Otherwise, if the respective container is open, it will recalculate and return the current destination for the item's slot. If the respective container is closed, it will return the last set destination. If no set destination and it cannot calculate a destination, this will return null;
      • setDestination

        public void setDestination​(RectangleDestination destination)
        Manually sets the destination for this item. This will be overridden on the next getDestination call if the respective container is available.
      • getID

        public int getID()
        Description copied from interface: Identifiable
        Gets ID number of the given object.
        Specified by:
        getID in interface Identifiable
        Returns:
        the ID number as integer.
      • getAmount

        public int getAmount()
      • setAmount

        public void setAmount​(int amount)
      • getLivePrice

        public int getLivePrice()
        This will get the average selling price on the GE, if available
        Returns:
        The current average price sold on the GE if found, otherwise 0
      • getSlot

        public int getSlot()
        For Inventory items only!
        Returns:
        Slot for inventory item.
      • isMembersOnly

        public boolean isMembersOnly()
      • isStackable

        public boolean isStackable()
      • getUnnotedItemID

        public int getUnnotedItemID()
      • getNotedItemID

        public int getNotedItemID()
      • isNoted

        public boolean isNoted()
      • isNotable

        public boolean isNotable()
      • isPlaceholder

        public boolean isPlaceholder()
      • getPlaceholderValue

        public int getPlaceholderValue()
      • getPlaceholderID

        public int getPlaceholderID()
      • getDiscardableValue

        public int getDiscardableValue()
      • getDiscardableID

        public int getDiscardableID()
      • getComposite

        public org.dreambot.internal.cache.wrappers.def.ItemDefinition getComposite()
      • setComposite

        public void setComposite​(org.dreambot.internal.cache.wrappers.def.ItemDefinition composite)
      • getName

        public java.lang.String getName()
        Description copied from interface: Identifiable
        Gets the name of the given object.
        Specified by:
        getName in interface Identifiable
        Returns:
        the name as a string.
      • isValid

        public boolean isValid()
        Checks to make sure the item has valid id, stack size, and name
        Returns:
        True if information is valid, else false
      • useOn

        public boolean useOn​(Entity entity)
        Uses this item on an entity
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        entity - The entity you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(Item item)
        Uses this item on another item
        Note: both items MUST be inventory items for this method to work
        Parameters:
        item - The Item you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(java.lang.String name)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        name - The Item name you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(int id)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        id - The Item id you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(Filter<Item> filter)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        filter - The Item filter you want to use this item on
        Returns:
        True if successful
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • interact

        public boolean interact​(java.lang.String action)
        Interacts with this item in its respective container using the action given. If no container exists, it will check for the item to be in the inventory and then equipment, otherwise it will log an Error. Null actions on Bank/Trade/Deposit Box will use basic actions for 1 amount, eg: Bank would be Bank.withdraw(int) Otherwise it will use the respectively needed methods. Note: Action-X does currently not work with Item#interact. Please use respective container classes for that due to the requirement of extra input. If no container exists, it will first check Inventory, then check Equipment for the item.
        Parameters:
        action - The action to interact with
        Returns:
        True if successful
      • hasAction

        public boolean hasAction​(java.lang.String... actions)
      • getTeam

        public int getTeam()
      • getValue

        public int getValue()
        Base item value determined by Jagex, high/low alch is based on this value.
        Returns:
        Base item value, 0 if definition is not found
      • getShiftClickIndex

        public int getShiftClickIndex()
      • isTradable

        public boolean isTradable()
      • getActions

        public java.lang.String[] getActions()
      • getLowAlchValue

        public int getLowAlchValue()
      • getHighAlchValue

        public int getHighAlchValue()
      • getEquippedModelMaleDialog2

        public int getEquippedModelMaleDialog2()
      • getReTextureToReplace

        public short[] getReTextureToReplace()
      • getEquippedModelMaleDialog1

        public int getEquippedModelMaleDialog1()
      • getReTextureToFind

        public short[] getReTextureToFind()
      • getParams

        public java.util.Map<java.lang.Integer,​java.lang.Object> getParams()
      • getEquippedModelFemale1

        public int getEquippedModelFemale1()
      • getEquippedModelFemale2

        public int getEquippedModelFemale2()
      • getEquippedModelFemale3

        public int getEquippedModelFemale3()
      • getEquippedModelFemaleDialogue1

        public int getEquippedModelFemaleDialogue1()
      • getEquippedModelFemaleDialogue2

        public int getEquippedModelFemaleDialogue2()
      • getEquippedModelFemaleTranslationY

        public int getEquippedModelFemaleTranslationY()
      • getEquippedModelMale1

        public int getEquippedModelMale1()
      • getEquippedModelMale2

        public int getEquippedModelMale2()
      • getEquippedModelMale3

        public int getEquippedModelMale3()
      • getEquippedModelMaleDialogue1

        public int getEquippedModelMaleDialogue1()
      • getEquippedModelMaleDialogue2

        public int getEquippedModelMaleDialogue2()
      • getEquippedModelMaleTranslationY

        public int getEquippedModelMaleTranslationY()
      • getGroundActions

        public java.lang.String[] getGroundActions()
      • getInventoryModelID

        public int getInventoryModelID()
      • getLightIntensity

        public int getLightIntensity()
      • getLightMagnitude

        public int getLightMagnitude()
      • getModelRecolorOriginal

        public short[] getModelRecolorOriginal()
      • getModelRecolorTarget

        public short[] getModelRecolorTarget()
      • getModelScaleX

        public int getModelScaleX()
      • getModelScaleY

        public int getModelScaleY()
      • getModelScaleZ

        public int getModelScaleZ()
      • getRotationLength

        public int getRotationLength()
      • getRotationX

        public int getRotationX()
      • getRotationY

        public int getRotationY()
      • getRotationZ

        public int getRotationZ()
      • getStackVariantID

        public int[] getStackVariantID()
      • getStackVariantSize

        public int[] getStackVariantSize()
      • getTranslateX

        public int getTranslateX()
      • getTranslateY

        public int getTranslateY()
      • getImage

        public java.awt.image.BufferedImage getImage()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hasDefinition

        public boolean hasDefinition()