Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeIsAchievementsSubTypeUnlocked

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns whether the player has unlocked an achievement subtype in the Tome of Knowledge.

unlocked = TomeIsAchievementsSubTypeUnlocked(subTypeId)

Arguments

subTypeId
number – Achievement subtype id.

Returns

unlocked
boolean – true if the subtype is unlocked; false if it is locked or the id is unknown.

Details

  • Unknown ids return false without an error.
  • The argument check names the wrong function: if the argument is missing or not a number, the Invalid Parameters message names TomeGetAchievementsEntryData.
  • The stock UI never calls this function. It uses the isUnlocked field from TomeGetAchievementsTOC instead.
  • Exactly one argument must be passed.

Errors

None besides the Invalid Parameters argument check (see Details).

Example

A minimal example built from the signature:

if TomeIsAchievementsSubTypeUnlocked( subTypeId ) then
    local data = TomeGetAchievementsSubTypeData( subTypeId )
end

See also