Package com.kraken.api.simulation
Class SimulationAction
- java.lang.Object
-
- com.kraken.api.simulation.SimulationAction
-
public final class SimulationAction extends java.lang.ObjectAction edge used while expanding and executing simulation trees.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimulationAction.TypeSimulation action kind.
-
Field Summary
Fields Modifier and Type Field Description static SimulationActionWAITCanonical wait action.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimulationActioncastSpell(CastableSpell spell)Creates an untargeted spell cast.static SimulationActioncastSpellOnNpc(CastableSpell spell, int targetNpcIndex)Creates a targeted spell cast.static SimulationActioncustom(java.lang.String customActionId)Creates a custom action marker.booleanequals(java.lang.Object other)static SimulationActionequipItem(int itemId)Creates an equip action.net.runelite.api.coords.WorldPointgetMovementDestination()Resolves movement destination.inthashCode()static SimulationActioninteractNpc(int npcIndex, java.lang.String action)Creates an npc interaction action.booleanisMovement()booleanisWait()static SimulationActionmoveTo(net.runelite.api.coords.WorldPoint destination)Creates a move action to a destination tile.static SimulationActionmoveToPacked(int packedWorldPoint, boolean run)Creates a move action using a packed destination.static SimulationActionrunTo(net.runelite.api.coords.WorldPoint destination)Creates a run action to a destination tile.static SimulationActionswitchPrayer(net.runelite.api.Prayer prayer)Creates a prayer switch action.java.lang.StringtoString()
-
-
-
Field Detail
-
WAIT
public static final SimulationAction WAIT
Canonical wait action.
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-