NpcQuery

public class NpcQuery extends StreamBackedQuery<Npc, NpcQuery> implements CharacterQuery<Npc, NpcQuery>, IdentifiableQuery<Npc, NpcQuery>, ActionableQuery<Npc, NpcQuery>

A query to search over entities of type Npc

See also

Functions

actionContains
Link copied to clipboard
QueryType actionContains(Array<String> actions)
Checks if any of the actions of this entity contains any of the specified actions, case insensitive
actionEquals
Link copied to clipboard
QueryType actionEquals(Array<String> actions)
Checks if any of the actions of this entity equal any of the specified actions, case sensitive
actionNotContains
Link copied to clipboard
QueryType actionNotContains(Array<String> actions)
Checks if none of the actions of this entity contains any of the specified actions, case insensitive
actionNotEquals
Link copied to clipboard
QueryType actionNotEquals(Array<String> actions)
Checks if none of the actions of this entity equal any of the specified actions, case sensitive
bank
Link copied to clipboard
static BankQuery bank()
Creates a new BankQuery
count
Link copied to clipboard
int count()
Executes this query and gets the number of results
distinctById
Link copied to clipboard
QueryType distinctById()
Removes duplicate entities from this query based on the id (keeps the first match, removes the rest)
distinctByName
Link copied to clipboard
QueryType distinctByName()
Removes duplicate entities from this query based on the name (keeps the first match, removes the rest)
equipment
Link copied to clipboard
static EquipmentQuery equipment()
Creates a new EquipmentQuery
filter
Link copied to clipboard
QueryType filter(Predicate<EntityType> filter)
Applies the specified filter to this query.
findBestInteractable
Link copied to clipboard
Optional<EntityTypefindBestInteractable()
Orders the best entity according to PreferredTargetSelector (the element with the minimum cost)
findClosest
Link copied to clipboard
Optional<EntityTypefindClosest()
Executes this query and gets the closest matching entity to our player
findClosestByPathDistance
Link copied to clipboard
Optional<EntityTypefindClosestByPathDistance()
Executes this query and gets the closest matching entity to our player, based on path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)
findFirst
Link copied to clipboard
Optional<EntityTypefindFirst()
Executes this query, and gets the first result if it exists
findRandom
Link copied to clipboard
Optional<EntityTypefindRandom()
Executes this query, and selects a random result based on a uniform distribution
forEach
Link copied to clipboard
void forEach(Consumer<EntityType> consumer)
Executes this query and passes each result to the specified consumer
gameObjects
Link copied to clipboard
static GameObjectQuery gameObjects()
Creates a new GameObjectQuery
grandExchangeOffers
Link copied to clipboard
static GrandExchangeOfferQuery grandExchangeOffers()
graphicObjects
Link copied to clipboard
static GraphicObjectQuery graphicObjects()
Creates a new GraphicObjectQuery
groundItems
Link copied to clipboard
static GroundItemQuery groundItems()
Creates a new GroundItemQuery
hasHitsplat
Link copied to clipboard
QueryType hasHitsplat()
Checks if any hitsplat is present
QueryType hasHitsplat(Predicate<Hitsplat> filter)
Checks if any hitsplat is present that matches the filter
hasLineOfSightTo
Link copied to clipboard
QueryType hasLineOfSightTo(Positionable other)
Unmaintained.
hasNoHitsplat
Link copied to clipboard
QueryType hasNoHitsplat()
Checks if no hitsplat is present
hasOverheadIcon
Link copied to clipboard
QueryType hasOverheadIcon()
Only match players who have an overhead icon
idEquals
Link copied to clipboard
QueryType idEquals(Array<int> id)
Only match entities with the specified id
idNotEquals
Link copied to clipboard
QueryType idNotEquals(Array<int> id)
Only match entities who do not have the specified id
inArea
Link copied to clipboard
QueryType inArea(Array<Area> area)
Only match entities in the specified areas
indexEquals
Link copied to clipboard
NpcQuery indexEquals(Array<int> index)
Only match entities with the specified index
indexNotEquals
Link copied to clipboard
QueryType indexNotEquals(Array<int> index)
Only match entities who do not have the specified index
inventory
Link copied to clipboard
static InventoryQuery inventory()
Creates a new InventoryQuery
isAnimating
Link copied to clipboard
QueryType isAnimating()
Only match characters who are animating
isAnimation
Link copied to clipboard
QueryType isAnimation(Array<int> animation)
Only match characters with any of the specified animations
isAny
Link copied to clipboard
boolean isAny()
Executes this query and checks if any result exists
isBeingInteractedWith
Link copied to clipboard
QueryType isBeingInteractedWith()
Only match entities that at least one character is interacting with
isFacing
Link copied to clipboard
QueryType isFacing(Positionable position)
Only matches characters that are facing the specified position
isFacingMe
Link copied to clipboard
QueryType isFacingMe()
Only matches characters that are facing our player
isHealthBarEmpty
Link copied to clipboard
QueryType isHealthBarEmpty()
isHealthBarFull
Link copied to clipboard
QueryType isHealthBarFull()
isHealthBarNotEmpty
Link copied to clipboard
QueryType isHealthBarNotEmpty()
isHealthBarNotFull
Link copied to clipboard
QueryType isHealthBarNotFull()
isHealthBarNotVisible
Link copied to clipboard
QueryType isHealthBarNotVisible()
Only matches characters who's health bar is not visible
isHealthBarVisible
Link copied to clipboard
QueryType isHealthBarVisible()
Only matches characters who's health bar is currently visible
isHovering
Link copied to clipboard
QueryType isHovering()
Only match entities that are being hovered
isInLineOfSight
Link copied to clipboard
QueryType isInLineOfSight()
Unmaintained.
QueryType isInLineOfSight(Positionable source)
Unmaintained.
isInteractingWith
Link copied to clipboard
QueryType isInteractingWith(Array<Character> interacting)
Only match entities that are interacting with any of the specified entities
isInteractingWithCharacter
Link copied to clipboard
QueryType isInteractingWithCharacter()
Only match entities that are interacting with another character
isInteractingWithMe
Link copied to clipboard
QueryType isInteractingWithMe()
Only matches characters that are interacting with our player
isMoving
Link copied to clipboard
QueryType isMoving()
Only matches characters that are moving
isMyPlayerInteractingWith
Link copied to clipboard
NpcQuery isMyPlayerInteractingWith()
Only match entities that my player is interacting with (this limits the query to 0 or 1 results)
isMyPlayerNotInteractingWith
Link copied to clipboard
QueryType isMyPlayerNotInteractingWith()
Only match entities that my player is interacting with
isNotAnimating
Link copied to clipboard
QueryType isNotAnimating()
Only match characters who are not animating
isNotAnimation
Link copied to clipboard
QueryType isNotAnimation(Array<int> animation)
Only match characters who do not have any of the specified animations
isNotBeingInteractedWith
Link copied to clipboard
QueryType isNotBeingInteractedWith()
Only match entities that no character is interacting with
isNotHovering
Link copied to clipboard
QueryType isNotHovering()
Only match entities that are not being hovered
isNotInteractingWith
Link copied to clipboard
QueryType isNotInteractingWith(Array<Character> interacting)
Only match entities that are not interacting with any of the specified entities
isNotInteractingWithCharacter
Link copied to clipboard
QueryType isNotInteractingWithCharacter()
Only match entities that are not interacting with another character
isNotMoving
Link copied to clipboard
QueryType isNotMoving()
Only matches characters that are not moving
isNotVisible
Link copied to clipboard
QueryType isNotVisible()
Only match clickable entities that are not visible
isOnMinimap
Link copied to clipboard
QueryType isOnMinimap()
Only match entities that are on the minimap
isReachable
Link copied to clipboard
QueryType isReachable()
Only match entities that are reachable via canReach obtained from createMap
isVisible
Link copied to clipboard
QueryType isVisible()
Only match clickable entities that are visible
itemDefinitions
Link copied to clipboard
static ItemDefinitionQuery itemDefinitions()
Creates a new ItemDefinitionQuery
maxDistance
Link copied to clipboard
QueryType maxDistance(double maxDistance)
Only match entities who are at most the specified distance away from our player
QueryType maxDistance(Positionable source, double maxDistance)
Only match entities who are at most the specified distance away from the specified location
maxHealthBarPercent
Link copied to clipboard
QueryType maxHealthBarPercent(double max)
maxLevel
Link copied to clipboard
QueryType maxLevel(int maxLevel)
Only matches characters who are at most the specific level
maxPathDistance
Link copied to clipboard
QueryType maxPathDistance(double maxDistance)
Only match entities who are at most the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)
minDistance
Link copied to clipboard
QueryType minDistance(double min)
Only match entities who are at least the specified distance away from our player
QueryType minDistance(Positionable source, double min)
Only match entities who are at least the specified distance away from the specified location
minHealthBarPercent
Link copied to clipboard
QueryType minHealthBarPercent(double min)
minLevel
Link copied to clipboard
QueryType minLevel(int minLevel)
Only matches characters who are at least the specified level
minPathDistance
Link copied to clipboard
QueryType minPathDistance(double min)
Only match entities who are at least the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)
nameContains
Link copied to clipboard
QueryType nameContains(Array<String> names)
Only match entities whose name contains any of the specified names, case insensitive
nameEquals
Link copied to clipboard
QueryType nameEquals(Array<String> names)
Only match entities with the specified names, case sensitive
nameNotContains
Link copied to clipboard
QueryType nameNotContains(Array<String> names)
Only match entities whose name does not contains any of the specified names, case insensitive
nameNotEquals
Link copied to clipboard
QueryType nameNotEquals(Array<String> names)
Only match entities whose name does not equal any of the specified names, case sensitive
nameNotStartsWith
Link copied to clipboard
QueryType nameNotStartsWith(Array<String> names)
Only match entities whose name does not start with any of the specified names, case insensitive
nameStartsWith
Link copied to clipboard
QueryType nameStartsWith(Array<String> names)
Only match entities whose name starts with any of the specified names, case insensitive
notInArea
Link copied to clipboard
QueryType notInArea(Array<Area> area)
Only match entities who are not in any of the specified areas
npcs
Link copied to clipboard
static NpcQuery npcs()
Creates a new NpcQuery
orientationEquals
Link copied to clipboard
QueryType orientationEquals(Array<Orientable.Orientation> orientations)
Only matches entities with the specified orientation
orientationNotEquals
Link copied to clipboard
QueryType orientationNotEquals(Array<Orientable.Orientation> orientations)
Only matches entities that don't have the specified orientation
overheadIconEquals
Link copied to clipboard
QueryType overheadIconEquals(Array<Player.OverheadIcon> overhead)
Only match players with the specified overhead icon
overheadMessageContains
Link copied to clipboard
QueryType overheadMessageContains(Array<String> msg)
overheadMessageEquals
Link copied to clipboard
QueryType overheadMessageEquals(Array<String> msg)
overheadMessageNotContains
Link copied to clipboard
QueryType overheadMessageNotContains(Array<String> msg)
overheadMessageNotEquals
Link copied to clipboard
QueryType overheadMessageNotEquals(Array<String> msg)
players
Link copied to clipboard
static PlayerQuery players()
Creates a new PlayerQuery
projectiles
Link copied to clipboard
static ProjectileQuery projectiles()
Creates a new ProjectileQuery
shop
Link copied to clipboard
static ShopItemQuery shop()
Creates a new ShopItemQuery
sorted
Link copied to clipboard
QueryType sorted(Comparator<EntityType> comparator)
Orders the query by the specified comparator.
sortedByDistance
Link copied to clipboard
QueryType sortedByDistance()
Sorts the entities by their distance to our player, with the closest appearing first
QueryType sortedByDistance(Positionable source)
Sorts the entities by their distance to the specified location, with the closest appearing first
sortedByInteractionCost
Link copied to clipboard
QueryType sortedByInteractionCost()
Orders the entities by PreferredTargetSelector
sortedByPathDistance
Link copied to clipboard
QueryType sortedByPathDistance()
Sorts the entities by their path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)
stream
Link copied to clipboard
Stream<EntityTypestream()
Returns this query as a stream.
tileEquals
Link copied to clipboard
QueryType tileEquals(Array<Positionable> positions)
Only matches entities at the specified positions
tileNotEquals
Link copied to clipboard
QueryType tileNotEquals(Array<Positionable> positions)
Only match entities who are not at any of the specified positions
tiles
Link copied to clipboard
static TileQuery tiles()
Creates a new TileQuery
toList
Link copied to clipboard
List<EntityTypetoList()
Executes this query, and gets the results
trade
Link copied to clipboard
static TradeQuery trade()
Creates a new TradeQuery
walkingDirectionEquals
Link copied to clipboard
QueryType walkingDirectionEquals(Array<Character.WalkingDirection> walkingDirection)
walkingDirectionNotEquals
Link copied to clipboard
QueryType walkingDirectionNotEquals(Array<Character.WalkingDirection> walkingDirection)
widgets
Link copied to clipboard
static WidgetQuery widgets()
Creates a new WidgetQuery
withinCombatLevels
Link copied to clipboard
QueryType withinCombatLevels(int within)
Only matches characters who are within the specified range from our player's level.
withinCombatLevelsAbove
Link copied to clipboard
QueryType withinCombatLevelsAbove(int within)
Only matches characters who are within the specified range above our player's level.
withinCombatLevelsBelow
Link copied to clipboard
QueryType withinCombatLevelsBelow(int within)
Only matches characters who are within the specified range below our player's level.
worlds
Link copied to clipboard
static WorldQuery worlds()
Creates a new WorldQuery