Package net.runelite.api
Interface NPCComposition
-
- All Superinterfaces:
ParamHolder
public interface NPCComposition extends ParamHolder
Information about a specificNpcID
-
-
Field Summary
Fields Modifier and Type Field Description static intSTAT_ATTACKstatic intSTAT_DEFENCEstatic intSTAT_HITPOINTSstatic intSTAT_MAGICstatic intSTAT_RANGEDstatic intSTAT_STRENGTH
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]getActions()The 5 menuops this NPC has when in world.int[]getChatheadModels()Gets the model IDs that compose this NPC's chathead.short[]getColorToReplace()Get the colors to be replaced on this npc's model for this npc.short[]getColorToReplaceWith()Get the colors applied to this npc's model for this npc.intgetCombatLevel()int[]getConfigs()intgetFootprintSize()Get the npc footprint sizeintgetHeightScale()Vertical scaling of the npc model (1/128th of a tile).intgetId()Gets the ID of the NPC.int[]getModels()Gets the model IDs that compose this NPC.StringgetName()Gets the name of the NPC.intgetSize()How many tiles wide this NPC isint[]getStats()Get the npc's statsintgetWidthScale()Horizontal scaling of the npc model (1/128th of a tile).booleanisFollower()If the npc is a follower, such as a pet.booleanisInteractible()NPC can be interacting with via menu optionsbooleanisMinimapVisible()Gets whether the NPC is visible on the mini-map.NPCCompositiontransform()Get the NPC composition the player's state says this NPC should transmogrify into.-
Methods inherited from interface net.runelite.api.ParamHolder
getIntValue, getParams, getStringValue, setParams, setValue, setValue
-
-
-
-
Field Detail
-
STAT_ATTACK
static final int STAT_ATTACK
- See Also:
- Constant Field Values
-
STAT_DEFENCE
static final int STAT_DEFENCE
- See Also:
- Constant Field Values
-
STAT_STRENGTH
static final int STAT_STRENGTH
- See Also:
- Constant Field Values
-
STAT_HITPOINTS
static final int STAT_HITPOINTS
- See Also:
- Constant Field Values
-
STAT_RANGED
static final int STAT_RANGED
- See Also:
- Constant Field Values
-
STAT_MAGIC
static final int STAT_MAGIC
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Gets the name of the NPC.
-
getModels
int[] getModels()
Gets the model IDs that compose this NPC.
-
getChatheadModels
@Nullable int[] getChatheadModels()
Gets the model IDs that compose this NPC's chathead.
-
getActions
String[] getActions()
The 5 menuops this NPC has when in world. Index 0 corresponds toMenuAction.NPC_FIRST_OPTION, Index 2 toMenuAction.NPC_SECOND_OPTIONand so on.
-
isInteractible
boolean isInteractible()
NPC can be interacting with via menu options- Returns:
-
isMinimapVisible
boolean isMinimapVisible()
Gets whether the NPC is visible on the mini-map.
-
getId
int getId()
Gets the ID of the NPC.- See Also:
NpcID
-
getCombatLevel
int getCombatLevel()
- Returns:
- the combat level, -1 if none
-
getConfigs
int[] getConfigs()
-
transform
NPCComposition transform()
Get the NPC composition the player's state says this NPC should transmogrify into.- Throws:
NullPointerException- ifgetConfigs()is null
-
getSize
int getSize()
How many tiles wide this NPC is
-
isFollower
boolean isFollower()
If the npc is a follower, such as a pet. Is affected by the "Move follower options lower down" setting.- Returns:
-
getColorToReplace
@Nullable short[] getColorToReplace()
Get the colors to be replaced on this npc's model for this npc.- Returns:
- the colors to be replaced
- See Also:
JagexColor
-
getColorToReplaceWith
@Nullable short[] getColorToReplaceWith()
Get the colors applied to this npc's model for this npc.- Returns:
- the colors to replace with
- See Also:
JagexColor
-
getWidthScale
int getWidthScale()
Horizontal scaling of the npc model (1/128th of a tile).- Returns:
-
getHeightScale
int getHeightScale()
Vertical scaling of the npc model (1/128th of a tile).- Returns:
-
getFootprintSize
int getFootprintSize()
Get the npc footprint size- Returns:
-
getStats
int[] getStats()
Get the npc's stats- Returns:
- See Also:
STAT_ATTACK,STAT_DEFENCE,STAT_STRENGTH,STAT_HITPOINTS,STAT_RANGED,STAT_MAGIC
-
-