OsrsEx v0.1.1 OsrsEx.Hiscores.Skill View Source

A Hiscores Skill.

Link to this section Summary

Types

The level a player has in a skill

The rank of the player compared to all other players in the skill

t()

A struct for representing an anonymous skill tuple as returned from the hiscores

The amount of experience a player has in a skill

Link to this section Types

Link to this type level() View Source
level() :: 0..99

The level a player has in a skill.

The level is capped between what an account starts with (1) and the maximum level achievable (99). The minimum level for :hitpoints is 10 instead of 1 due to all accounts starting at level 10.

The Jagex Hiscore API is inconsistent when the player is unranked. It will randomly return either the players true level or -1. OsrsEx makes sure the minimum is always 1.

Link to this type rank() View Source
rank() :: 1..2000000 | nil

The rank of the player compared to all other players in the skill.

If the player is not in the top 2_000_000, then they are unranked and represented as nil.

Link to this type t() View Source
t() :: %OsrsEx.Hiscores.Skill{level: level(), rank: rank(), xp: xp()}

A struct for representing an anonymous skill tuple as returned from the hiscores

Link to this type xp() View Source
xp() :: 0..200000000

The amount of experience a player has in a skill.

The xp is capped between having none (0) and the maximum experience achievable before no more experience is rewarded (200_000_000).

The Jagex Hiscore API is inconsistent when the player is unranked. It will randomly return either the players true xp or -1. OsrsEx makes sure the minimum is always 0.