Gets the data type of the current runtime NPC.
Returns if the entity is dead.
Returns true if the entity is dead, false if not.
Returns whether or not the npc is a follower (such as a pet) of any online player.
Returns true if the npc is a follower, false if not.
Returns if the entity has a headbar that is empty.
Returns true if the entity has a headbar that is empty, false if not.
Returns if the entitys healthbar is rendered.
Returns true if the entitys healthbar is rendered, false if not.
Returns the id of the entity that this entity is interacting with, returns -1 if there is none.
Returns the id of the entity that this entity is interacting with.
local npcs = osrs.ClientOp.getNpcIdAll()
for index, npc_id in pairs(npcs) do
local npc = osrs.ClientOp.getNpcObj(npc_id)
local target_id = npc:isInteracting()
if target_id ~= -1 then
local target = osrs.ClientOp.getNpcObj(target_id)
osrs.printf("NPC %s is interacting with %s", npc:getName(), target:getName())
end
end
Returns whether or not the npc is a follower (such as a pet) of the local player.
Returns true if the npc is a follower of the local player, false if not.
Returns whether or not the entitys 2D elements are rendered.
Returns true if the the entitys 2D elements are rendered, false if not.
Returns whether or not the entitys 3D elements are rendered.
Returns true if the the entitys 3D elements are rendered, false if not.
Changes the rendering of the entitys 2D elements based on the given boolean.
Boolean that will render 2D elements when true, and does not when false.
Changes the rendering of the entitys 3D elements based on the given boolean.
Boolean that will render 3D elements when true, and does not when false.
Lua class representing a runtime NPC.