Class InteractionManager


  • public class InteractionManager
    extends java.lang.Object
    Manages interactions across various game entities like NPC's, Players, Widgets, GameObjects, TileObjects and more.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void interact​(BankItemWidget item, java.lang.String action)
      Interacts with a widget in the players bank using the specific action.
      void interact​(ContainerItem item, java.lang.String action)
      Interacts with an item with the specified ID in an item container (inventory, inventory while banking, equipment, etc...) using the specified action.
      void interact​(GroundItem item)
      Interacts with a ground item (GroundItem) using the specified action i.e.
      void interact​(net.runelite.api.NPC npc, java.lang.String action)
      Interacts with an NPC using the specified action i.e.
      void interact​(net.runelite.api.Player player, java.lang.String action)
      Interacts with a Player using the specified action i.e.
      void interact​(net.runelite.api.TileObject object, java.lang.String action)
      Interacts with a GameObject (TileObject) using the specified action i.e.
      void interact​(net.runelite.api.widgets.Widget item, java.lang.String action)
      Interacts with a widget using the specific action.
      void interact​(net.runelite.api.widgets.Widget item, java.lang.String menu, java.lang.String action)
      Interacts with a widget using the specific sub action.
      void interact​(net.runelite.api.widgets.Widget src, net.runelite.api.GameObject gameObject)
      Uses a source widget on a destination Game Object (i.e.
      void interact​(net.runelite.api.widgets.Widget src, net.runelite.api.NPC npc)
      Uses a source widget on a destination NPC (i.e.
      void interact​(net.runelite.api.widgets.Widget src, net.runelite.api.widgets.Widget dest)
      Uses a source widget on a destination widget (i.e.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InteractionManager

        public InteractionManager()
    • Method Detail

      • interact

        public void interact​(net.runelite.api.NPC npc,
                             java.lang.String action)
        Interacts with an NPC using the specified action i.e. "Attack", "Talk-To", or "Examine".
        Parameters:
        npc - the NPC to interact with
        action - The action to take, "Attack", "Talk-To", or "Examine".
      • interact

        public void interact​(net.runelite.api.Player player,
                             java.lang.String action)
        Interacts with a Player using the specified action i.e. "Attack", "Trade", or "Follow"
        Parameters:
        player - the Player to interact with
        action - The action to take, "Attack", "Trade", or "Follow"
      • interact

        public void interact​(ContainerItem item,
                             java.lang.String action)
        Interacts with an item with the specified ID in an item container (inventory, inventory while banking, equipment, etc...) using the specified action.

        Parameters:
        item - The Container Item to interact with. A container item is an item stored in a container like an inventory, a inventory while banking or the equipment interface.
        action - The action to take. i.e. "Eat", "Remove", "Wield", "Wear", or "Use"
      • interact

        public void interact​(BankItemWidget item,
                             java.lang.String action)
        Interacts with a widget in the players bank using the specific action.
        Parameters:
        item - The bank item widget to interact with
        action - The action to take i.e. Withdraw-1, Withdraw-X, Examine
      • interact

        public void interact​(net.runelite.api.widgets.Widget item,
                             java.lang.String action)
        Interacts with a widget using the specific action.
        Parameters:
        item - The widget to interact with
        action - The action to take i.e. Wield, Use or Examine
      • interact

        public void interact​(net.runelite.api.widgets.Widget item,
                             java.lang.String menu,
                             java.lang.String action)
        Interacts with a widget using the specific sub action.
        Parameters:
        item - The widget to interact with
        menu - The menu to select
        action - The action to take i.e. Wield, Use or Examine
      • interact

        public void interact​(net.runelite.api.widgets.Widget src,
                             net.runelite.api.widgets.Widget dest)
        Uses a source widget on a destination widget (i.e. High Alchemy)
        Parameters:
        src - The source widget to use on the destination widget
        dest - The destination widget
      • interact

        public void interact​(net.runelite.api.widgets.Widget src,
                             net.runelite.api.NPC npc)
        Uses a source widget on a destination NPC (i.e. Crumble Undead spell on Vorkath Spawn)
        Parameters:
        src - The source widget to use on the destination widget
        npc - The NPC to use the widget on
      • interact

        public void interact​(net.runelite.api.widgets.Widget src,
                             net.runelite.api.GameObject gameObject)
        Uses a source widget on a destination Game Object (i.e. "Bones" on the "Chaos Altar")
        Parameters:
        src - The source widget to use on the destination widget
        gameObject - The Game Object to use the widget on
      • interact

        public void interact​(net.runelite.api.TileObject object,
                             java.lang.String action)
        Interacts with a GameObject (TileObject) using the specified action i.e. "Chop", "Mine", or "Examine". GameObject's are objects that exist on a tile like walls, trees, ore, or fishing spots.
        Parameters:
        object - the TileObject to interact with
        action - The action to take on the game object, i.e. "Chop", "Mine", or "Examine".
      • interact

        public void interact​(GroundItem item)
        Interacts with a ground item (GroundItem) using the specified action i.e. "Take" or "Examine". A Ground item is an actual item that is on the ground like coins dropped from a boss or logs a player has dropped on a tile. This differs from GameObjects like trees, ore, or fish which exist on a tile but are not "takeable" into the players inventory.
        Parameters:
        item - the GroundItem to interact with