OSRS Plugin API
    Preparing search index...

    Function getNpcIdByNameAll

    • Gets the NPC Ids of all NPCs rendered on the screen identified by the specified name. Otherwise, returns -1.

      Parameters

      • name: string

        The name of an NPC.

      Returns number[]

      table of ids for each identified NPCs.

      idList = osrs.ClientOp.getNpcIdByNameAll("Man")
      for index, id in pairs(idList) do
      osrs.ClientOp.highlightNpcOn(
      id,
      osrs.ClientOp.npcCreationCycle(id),
      6);
      end