RuneScape:Lookup

From Old School RuneScape Wiki
Jump to: navigation, search

The RSLookup extension helps create integrations between the wiki and RuneScape clients.

Special:Lookup is a page that redirects users to articles based on the ID provided. We currently support looking up items (fully supported), NPCs/monsters (fully supported), and objects (minimally supported currently). The special page takes advantage of IDs defined in infoboxes, and uses Semantic MediaWiki to query for pages with matching IDs. If the page includes a switch infobox, the pane with the right ID will be selected.

Usage[edit source]

Special:Lookup takes three query parameters:

  • type (string) taking values item, npc, object. This is the type of entity you want to look up.
  • id (int). This is the ID of the entity you want to look up.
  • name (string). This is the page that will be shown (or searched) if the ID query does not return any results.

Case: ID match[edit source]

If the specified ID is found on the wiki, the user will be redirected to the page/section with the matching ID. If multiple pages match the specified ID, then the one with the lowest page ID (usually earliest-created wiki article) will be shown. However, this should be avoided.

Case: no ID match, fallback[edit source]

If the specified ID cannot be found on the wiki (or the query is malformed, perhaps due to a missing type parameter), the user will be redirected to the fallback page. If the fallback page is found on the wiki, the user will be redirected to the page. If the fallback page is not found, it is treated as a search query.

This is to hedge against cases when the ID mapping might not be fully complete, especially after new updates or reshuffling of NPC ids.

Case: no ID match, no fallback[edit source]

If the ID cannot be found, and no fallback is provided, the user is redirected to the main page.

Caveats[edit source]

Requires canonical IDs[edit source]

The extension will not play nicely with the IDs of noted or placeholder items, as those are not recorded by the wiki. In all cases, we strongly recommend converting an ID to the "canonical" (non-noted, non-placeholder) version before sending it off to Special:Lookup.

For example, convert 1334 (noted Rune scimitar) to 1333 (regular Rune scimitar) before querying the wiki.

The same holds true for so-called "multi-NPCs", which show one version or another depending on player varbits. We recommend converting to the version that the player is actually shown, as there is no guarantee that the wiki will have coverage of the base NPC ID.