Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeIsAchievementsEntryUnlocked

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns whether the player has unlocked (completed) an achievement entry in the Tome of Knowledge.

unlocked = TomeIsAchievementsEntryUnlocked(entryId)

Arguments

entryId
number – Achievement entry id.

Returns

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

Details

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

Errors

None besides the Invalid Parameters argument check.

Example

A minimal example built from the signature:

if TomeIsAchievementsEntryUnlocked( entryId ) then
    local entryData = TomeGetAchievementsEntryData( entryId )
end

See also