Achievement
¶
Provides access to achievements.
Forms¶
Type | Form | Description |
---|---|---|
achievement | Achievement[#|Name] | Look up an achievement by name or by id. |
achievementmgr | Achievement | Access the achievement manager which provides access to information about achievements |
Associated DataTypes¶
achievementmgr
Type¶
Provides access achievements, achievement categories, and other information surrounding the achievement system.
Type | Name | Description |
---|---|---|
achievement | Achievement[#|Name] | Find an achievement by its ID or by its name. |
achievement | AchievementByIndex[#] | Find an achievement by its index. |
int | AchievementCount | The number of achievements in the manager. |
achievementcat | Category[#|Name] | Find an achievement category by its id or by its name.Note: If searching by name, only top-level categories are returned from the achievement manager. |
achievementcat | CategoryByIndex[#] | Find an achievement category by its index. |
int | CategoryCount | The number of achievement categories in the manager. |
int | Points | The total number of accumulated achievement points. |
int | CompletedAchievement | The number of completed achievements. |
int | TotalAchievement | The number of available achievements. |
bool | Ready | Indicates that the manager has loaded all achievement data and is ready to be used. |
Usage¶
Warning
Looking up achievements by name may not always return the correct achievement if multiple exist with the same name. Achievement IDs should be preferred over names as they don't change and are unique.
Note About Achievement Indices
Achievements and categories can be looked up by index. This is significantly faster than looking up by id or name. However, these indices are not stable and will change from patch to patch, but they will not change during the session.
If an achievement is being utilized in a script many times, it may be more performant to look up an achievement's index (with its .Index member) and then use that in subsequent queries.
See Achievement Examples for some examples of using indices for looking up achievements.
Achievement[ # ] and Achievement.Achievement[ # ] are equivalent and are provided for consistency. The primary way to access achievement information should be via id. Achievement IDs are unique and do not change.
To look up an achievement's ID, you can look up an achievement by name, or you can use the Achievements Inspector.
Usage Examples¶
| Look up an achievement by name, and then print its ID.
/echo ${Achievement[Master of Claws of Veeshan].ID}
| print the completed status of achievement
| "Wayfarers Brotherhood Adventurer's Stone (Various 20+)"
/echo ${Achievement[500980300].Completed}
-- Look up an achievement by name, and then print its ID.
print(mq.TLO.Achievement("Master of Claws of Veeshan").ID())
-- print the completed status of achievement
-- "Wayfarers Brotherhood Adventurer's Stone (Various 20+)"
print(mq.TLO.Achievement(500980300).Completed())