Package net.storm.api.domain.actors
Interface INPC
- All Superinterfaces:
net.runelite.api.Actor,net.runelite.api.CameraFocusableEntity,IActor,Identifiable,Interactable,Locatable,Nameable,net.runelite.api.Node,net.runelite.api.NPC,net.runelite.api.Renderable,RuneLiteWrapper<net.runelite.api.Actor>,SceneEntity,Transformable<net.runelite.api.NPCComposition>
public interface INPC
extends net.runelite.api.NPC, IActor, Transformable<net.runelite.api.NPCComposition>
Represents a non-player character (NPC) in the game world.
NPCs are actors controlled by the game. This interface extends IActor
and provides NPC-specific functionality such as overhead icons and transformations.
Example usage:
INPCs npcs = Static.getNpcs();
INPC banker = npcs.nearest("Banker");
if (banker != null) {
banker.interact("Bank");
NPCComposition composition = banker.transform();
}
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault net.runelite.api.HeadIconGets the primary overhead icon, if any.net.runelite.api.HeadIcon[]Gets all overhead icons displayed above the NPC.voidupdate(net.runelite.api.NPC npc) Updates this NPC's state with data from a RuneLite NPC object.Methods inherited from interface net.runelite.api.Actor
clearSpotAnims, createSpotAnim, getAnimation, getAnimationFrame, getAnimationHeightOffset, getCanvasImageLocation, getCanvasSpriteLocation, getCanvasTextLocation, getCanvasTilePoly, getConvexHull, getCurrentOrientation, getGraphic, getGraphicHeight, getHealthRatio, getHealthScale, getIdlePoseAnimation, getIdleRotateLeft, getIdleRotateRight, getLocalLocation, getLogicalHeight, getMinimapLocation, getOrientation, getOverheadCycle, getOverheadText, getPoseAnimation, getPoseAnimationFrame, getRunAnimation, getSpotAnimFrame, getSpotAnims, getWalkAnimation, getWalkRotate180, getWalkRotateLeft, getWalkRotateRight, getWorldArea, getWorldLocation, getWorldView, hasSpotAnim, isDead, isInteracting, removeSpotAnim, setActionFrame, setAnimation, setAnimationFrame, setDead, setGraphic, setGraphicHeight, setIdlePoseAnimation, setIdleRotateLeft, setIdleRotateRight, setOverheadCycle, setOverheadText, setPoseAnimation, setPoseAnimationFrame, setRunAnimation, setSpotAnimFrame, setWalkAnimation, setWalkRotate180, setWalkRotateLeft, setWalkRotateRightMethods inherited from interface net.runelite.api.CameraFocusableEntity
getCameraFocusMethods inherited from interface net.storm.api.domain.actors.IActor
attack, getIndex, getInteracting, getSpotAnimationCount, getTarget, isAnimating, isHealthBarVisible, isIdle, isMovingMethods inherited from interface net.storm.api.domain.Identifiable
getIdMethods inherited from interface net.storm.api.domain.Interactable
generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, getActionIndex, getActions, getClickPoint, hasAction, hasAction, hasAction, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, isInteractable, isInteractable, isInteractableMethods inherited from interface net.storm.api.domain.Locatable
distanceTo, distanceTo, distanceTo2DHypotenuse, distanceToHypotenuse, getLocalLocation, getPlane, getWorldLocation, getWorldX, getWorldYMethods inherited from interface net.runelite.api.Node
getHash, getNext, getPreviousMethods inherited from interface net.runelite.api.NPC
getChatheadOverrides, getCombatLevel, getComposition, getId, getIndex, getModelOverrides, getName, getOverheadArchiveIds, getOverheadSpriteIds, getTransformedCompositionMethods inherited from interface net.runelite.api.Renderable
getModel, getModelHeight, setModelHeightMethods inherited from interface net.storm.api.domain.RuneLiteWrapper
getWrappedMethods inherited from interface net.storm.api.domain.SceneEntity
getWorldViewMethods inherited from interface net.storm.api.domain.Transformable
getActualId, getTransformedComposition
-
Method Details
-
getOverheadIcons
net.runelite.api.HeadIcon[] getOverheadIcons()Gets all overhead icons displayed above the NPC.Overhead icons include prayer protection icons, skull icons, etc.
- Returns:
- array of overhead icons (may be empty)
-
update
void update(net.runelite.api.NPC npc) Updates this NPC's state with data from a RuneLite NPC object.This is an internal method used to sync NPC data.
- Parameters:
npc- the RuneLite NPC object
-
getOverheadIcon
default net.runelite.api.HeadIcon getOverheadIcon()Gets the primary overhead icon, if any.This is a convenience method that returns the first overhead icon.
- Returns:
- the first overhead icon, or null if none exist
-