Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
m (casing)
(Changed the long list of returned values to a table to more easily get the index of any individual value.)
Line 10: Line 10:
   
 
==Returns==
 
==Returns==
  +
{| class="darktable zebra"
;id : Number - Achievement ID.
 
  +
!Index!!Value!!Type!!Details
;name : String - The Name of the Achievement.
 
  +
|-
;points : Number - Points awarded for completing this achievement.
 
 
|1||id||Number||Achievement ID.
;completed : Boolean - Returns true/false depending if you've completed this achievement on any character.
 
  +
|-
;month : Number - Month this was completed. Returns nil if Completed is false.
 
 
|2||name||String||The Name of the Achievement.
;day : Number - Day this was completed. Returns nil if Completed is false.
 
  +
|-
;year : Number - Year this was completed. Returns nil if Completed is false. Returns number of years since 2000.
 
 
|3||points||Number||Points awarded for completing this achievement.
;description : String - The Description of the Achievement.
 
  +
|-
;flags : Number (bitfield) - Indicates achievement properties:
 
 
|4||completed||Boolean||Returns true/false depending if you've completed this achievement on any character.
::0x01 = Achievement is a statistic
 
  +
|-
::0x02 = Achievement should be hidden
 
 
|5||month||Number||Month this was completed. Returns nil if Completed is false.
::0x80 = Progress Bar
 
  +
|-
;icon : String - Path & file of the icon used for this achievement
 
 
|6||day||Number||Day this was completed. Returns nil if Completed is false.
;rewardText : String - Text describing the reward you get for completing this achievement.
 
  +
|-
;isGuild : Boolean - Returns true/false depending if this is a guild achievement.
 
 
|7||year||Number||Year this was completed. Returns nil if Completed is false. Returns number of years since 2000.
;wasEarnedByMe : Boolean - Returns true/false depending if you've completed this achievement on this character.
 
  +
|-
;earnedBy : String - Your character name if you've completed this achievement, otherwise the name of the first character to complete this achievement.
 
 
|8||description||String||The Description of the Achievement.
  +
|-valign="top"
  +
|9
  +
|flags
  +
|Number
 
|A bitfield that indicates achievement properties:
 
:0x01 - Achievement is a statistic
 
:0x02 - Achievement should be hidden
 
:0x80 - Progress Bar
  +
|-
 
|10||icon||String||Path & file of the icon used for this achievement
  +
|-
 
|11||rewardText||String||Text describing the reward you get for completing this achievement.
  +
|-
 
|12||isGuild||Boolean||Returns true/false depending if this is a guild achievement.
  +
|-
 
|13||wasEarnedByMe||Boolean||Returns true/false depending if you've completed this achievement on this character.
  +
|-
 
|14||earnedBy||String||Your character name if you've completed this achievement, or the name of the first character to complete this achievement.
  +
|}
   
 
== See also ==
 
== See also ==

Revision as of 07:21, 12 August 2016

Returns information about the given Achievement.

id, name, points, completed, month, day, year, description, flags, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID or categoryID, index)

Arguments

Specify either (achievementID) or (categoryID, index)

achievementID
Number - ID of the achievement to retrieve information for.
categoryID
Number - Achievement category ID.
index
Number - An offset into the achievement category, between 1 and GetCategoryNumAchievements(categoryID)

Returns

Index Value Type Details
1 id Number Achievement ID.
2 name String The Name of the Achievement.
3 points Number Points awarded for completing this achievement.
4 completed Boolean Returns true/false depending if you've completed this achievement on any character.
5 month Number Month this was completed. Returns nil if Completed is false.
6 day Number Day this was completed. Returns nil if Completed is false.
7 year Number Year this was completed. Returns nil if Completed is false. Returns number of years since 2000.
8 description String The Description of the Achievement.
9 flags Number A bitfield that indicates achievement properties:
0x01 - Achievement is a statistic
0x02 - Achievement should be hidden
0x80 - Progress Bar
10 icon String Path & file of the icon used for this achievement
11 rewardText String Text describing the reward you get for completing this achievement.
12 isGuild Boolean Returns true/false depending if this is a guild achievement.
13 wasEarnedByMe Boolean Returns true/false depending if you've completed this achievement on this character.
14 earnedBy String Your character name if you've completed this achievement, or the name of the first character to complete this achievement.

See also