Template:ParseHiscoreData/doc: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "<!-- The documentation is included as a whole in the template page which often does not show the template itself. Editing the page actually results in editing the actual template rather than the documentation. The templates to achieve a more sensible behaviour are missing from the RuneScape Wiki. As an interim measure, users should use the section edit. --> <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> {{Documentation}} The '''ParseHiscor...")
 
No edit summary
 
Line 50: Line 50:
</nowiki></pre>
</nowiki></pre>


==Updating a user's Hiscore Data mw.pages==
==Updating a user's Hiscore Data pages==
Users can periodically update their Hiscore Data mw.pages by doing the following:
Users can periodically update their Hiscore Data pages by doing the following:
# Go to the web page '''<nowiki>http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=<playername></nowiki>''' (where the '''<nowiki><playername></nowiki>''' is replaced with the player's RuneScape username).
# Go to the web page '''<nowiki>http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=<playername></nowiki>''' (where the '''<nowiki><playername></nowiki>''' is replaced with the player's RuneScape username).
# Copy the contents of the page (e.g. using Ctrl-C).
# Copy the contents of the page (e.g. using Ctrl-C).
Line 60: Line 60:
# Save the changes.
# Save the changes.


All mw.pages making use of the user's hiscore data should then be automatically updated.
All pages making use of the user's hiscore data should then be automatically updated.


<includeonly>[[Category:User templates|{{BASEPAGENAME}}]]</includeonly>
<includeonly>[[Category:User templates|{{BASEPAGENAME}}]]</includeonly>

Latest revision as of 11:51, 17 October 2024

This is a documentation subpage for Template:ParseHiscoreData.
It contains usage information, categories, and other content that is not part of the original template page.

The ParseHiscoreData template can be used to extract chosen skill levels, rank or experience from raw highscore data in the same format as returned from http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=<playername>.

Usage

{{ParseHiscoreData|hiscore data|skill name|value type}}

The hiscore data should be a string of number separated with commas and spaces in the format returned by the index_lite.ws. For example, for Zezima, this can be seen here.

Rather than copying the data into each use of ParseHiscoreData, this returned text from the index_lite.ws can be saved in a user's subpage that then can be included. See examples below.

The skill name is the name of the skill to extract the information for. The skill name can be one of the following:

  • A standard skill name, such as attack, ranged, etc.
  • overall - for overall skill rank, level and xp.
  • total - for overall skill rank, level and xp.

The value type is the type of value to extract.

  • 0 - for the skill rank.
  • 1 - for the skill level (this is the default).
  • 2 - for the skill experience.

Examples

The following template call returns the overall level of a user called Example, using the user's hiscore data saved in the page [[User:Example/Hiscore Data]]:

{{ParseHiscoreData| {{User:Example/Hiscore Data}} | overall}}

The following example shows the number of experience points for the user Example for the Fletching skill:

{{ParseHiscoreData| {{User:Example/Hiscore Data}} | fletching | 2}}

The following example shows the Fletching level for the user Example:

{{ParseHiscoreData| {{User:Example/Hiscore Data}} | fletching | 1}}

The following example shows the rank of Fletching for the user Example:

{{ParseHiscoreData| {{User:Example/Hiscore Data}} | fletching | 0}}

Updating a user's Hiscore Data pages

Users can periodically update their Hiscore Data pages by doing the following:

  1. Go to the web page http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=<playername> (where the <playername> is replaced with the player's RuneScape username).
  2. Copy the contents of the page (e.g. using Ctrl-C).
  3. Go to user's own Hiscore Data sub-page.
  4. Edit the Hiscore Data page.
  5. Select any existing text in the edit box.
  6. Paste in the new data.
  7. Save the changes.

All pages making use of the user's hiscore data should then be automatically updated.