Class SimulationAction


  • public final class SimulationAction
    extends java.lang.Object
    Action edge used while expanding and executing simulation trees.
    • Method Detail

      • moveTo

        public static SimulationAction moveTo​(net.runelite.api.coords.WorldPoint destination)
        Creates a move action to a destination tile.
        Parameters:
        destination - destination world point.
        Returns:
        move action.
      • runTo

        public static SimulationAction runTo​(net.runelite.api.coords.WorldPoint destination)
        Creates a run action to a destination tile.
        Parameters:
        destination - destination world point.
        Returns:
        run action.
      • moveToPacked

        public static SimulationAction moveToPacked​(int packedWorldPoint,
                                                    boolean run)
        Creates a move action using a packed destination.
        Parameters:
        packedWorldPoint - packed destination.
        run - true for 2-step movement per tick.
        Returns:
        move action.
      • switchPrayer

        public static SimulationAction switchPrayer​(net.runelite.api.Prayer prayer)
        Creates a prayer switch action.
        Parameters:
        prayer - overhead prayer to enable.
        Returns:
        prayer switch action.
      • equipItem

        public static SimulationAction equipItem​(int itemId)
        Creates an equip action.
        Parameters:
        itemId - inventory item id.
        Returns:
        equip action.
      • interactNpc

        public static SimulationAction interactNpc​(int npcIndex,
                                                   java.lang.String action)
        Creates an npc interaction action.
        Parameters:
        npcIndex - target npc index.
        action - interaction action text.
        Returns:
        npc interaction action.
      • castSpell

        public static SimulationAction castSpell​(CastableSpell spell)
        Creates an untargeted spell cast.
        Parameters:
        spell - spell.
        Returns:
        spell action.
      • castSpellOnNpc

        public static SimulationAction castSpellOnNpc​(CastableSpell spell,
                                                      int targetNpcIndex)
        Creates a targeted spell cast.
        Parameters:
        spell - spell.
        targetNpcIndex - target npc index.
        Returns:
        spell action.
      • custom

        public static SimulationAction custom​(java.lang.String customActionId)
        Creates a custom action marker.
        Parameters:
        customActionId - custom action id.
        Returns:
        custom action.
      • isMovement

        public boolean isMovement()
        Returns:
        true when this action is movement.
      • isWait

        public boolean isWait()
        Returns:
        true when this action is wait.
      • getMovementDestination

        public net.runelite.api.coords.WorldPoint getMovementDestination()
        Resolves movement destination.
        Returns:
        destination world point, or null for non-movement actions.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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