Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

X2Achievement

Globals

AF_ALL

integer

AF_COMPLETE

integer

AF_INVALID

integer

AF_TRACING

integer

AF_UNCOMPLETE

integer

EAK_ACHIEVEMENT

integer

EAK_ARCHERAGE

integer

EAK_COLLECTION

integer

EAK_RACIAL_MISSION

integer

MAX_TRACING_ACHIEVEMENT

integer

TADT_ARCHE_PASS

integer

TADT_EXPEDITION

integer

TADT_EXPEDITION_PUBLIC

integer

TADT_FAMILY

integer

TADT_HERO

integer

TADT_MAX

integer

TADT_TODAY

integer

X2Achievement

X2Achievement

Aliases

ACHIEVEMENT_FILTER

AF_ALL|AF_COMPLETE|AF_INVALID|AF_TRACING|AF_UNCOMPLETE

-- api/X2Achievement
-- Achievement Filter
ACHIEVEMENT_FILTER:
    | `AF_ALL`
    | `AF_COMPLETE` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_INVALID` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_TRACING`
    | `AF_UNCOMPLETE` -- Doesnt work. Produces the same result as AF_ALL.

EAK_ACHIEVEMENT

2

EAK_ACHIEVEMENT:
    | 2

EAK_ARCHERAGE

4

EAK_ARCHERAGE:
    | 4

EAK_COLLECTION

3

EAK_COLLECTION:
    | 3

EAK_RACIAL_MISSION

1

EAK_RACIAL_MISSION:
    | 1

ENUM_ACHIEVEMENT_KIND

EAK_ACHIEVEMENT|EAK_ARCHERAGE|EAK_COLLECTION|EAK_RACIAL_MISSION

-- api/X2Achievement
ENUM_ACHIEVEMENT_KIND:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

TODAY_ACHIEVEMENT_DAILY_TYPE

TADT_ARCHE_PASS|TADT_EXPEDITION_PUBLIC|TADT_EXPEDITION|TADT_FAMILY|TADT_HERO…(+2)

-- api/X2Achievement
TODAY_ACHIEVEMENT_DAILY_TYPE:
    | `TADT_ARCHE_PASS`
    | `TADT_EXPEDITION`
    | `TADT_EXPEDITION_PUBLIC`
    | `TADT_FAMILY`
    | `TADT_HERO`
    | `TADT_MAX`
    | `TADT_TODAY`

Classes

Class: X2Achievement

Method: AddTracingAchievement

(method) X2Achievement:AddTracingAchievement(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`, achievementType: number)
  -> success: boolean

Adds an achievement to the ambitions category under the specified kind.

@param achievementKind — The achievement kind.

@param achievementType — The achievement type (id) to add.

@return successtrue if the achievement was added successfully, false otherwise.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

Method: GetTodayAssignmentInfo

(method) X2Achievement:GetTodayAssignmentInfo(todayType: `TADT_ARCHE_PASS`|`TADT_EXPEDITION_PUBLIC`|`TADT_EXPEDITION`|`TADT_FAMILY`|`TADT_HERO`...(+2), index: number)
  -> todayAssignmentInfo: TodayAssignmentInfo|nil

Retrieves assignment information for the specified type and index.

@param todayType — The type of today’s assignments.

@param index — The index of the assignment.

@return todayAssignmentInfo — The assignment information, or nil if not found.

-- api/X2Achievement
todayType:
    | `TADT_ARCHE_PASS`
    | `TADT_EXPEDITION`
    | `TADT_EXPEDITION_PUBLIC`
    | `TADT_FAMILY`
    | `TADT_HERO`
    | `TADT_MAX`
    | `TADT_TODAY`

See: TodayAssignmentInfo

Method: GetTodayAssignmentGoal

(method) X2Achievement:GetTodayAssignmentGoal()
  -> todayAssignmentGoal: TodayAssignmentGoal[]

Retrieves a table with daily contract completion rewards.

@return todayAssignmentGoal — A table of daily contract completion rewards.

Method: GetTodayAssignmentCount

(method) X2Achievement:GetTodayAssignmentCount(todayType: `TADT_ARCHE_PASS`|`TADT_EXPEDITION_PUBLIC`|`TADT_EXPEDITION`|`TADT_FAMILY`|`TADT_HERO`...(+2))
  -> todayAssignmentCount: number

Retrieves the assignment count for the specified today type, defaulting to 7 if not found.

@param todayType — The type of today’s assignments.

@return todayAssignmentCount — The number of assignments for the day.

-- api/X2Achievement
todayType:
    | `TADT_ARCHE_PASS`
    | `TADT_EXPEDITION`
    | `TADT_EXPEDITION_PUBLIC`
    | `TADT_FAMILY`
    | `TADT_HERO`
    | `TADT_MAX`
    | `TADT_TODAY`

Method: GetTodayAssignmentInfoForChange

(method) X2Achievement:GetTodayAssignmentInfoForChange(todayType: `TADT_ARCHE_PASS`|`TADT_EXPEDITION_PUBLIC`|`TADT_EXPEDITION`|`TADT_FAMILY`|`TADT_HERO`...(+2), index: number)
  -> todayAssignmentInfo: TodayAssignmentInfo|nil

Retrieves assignment information for changing the specified type and index.

@param todayType — The type of today’s assignments.

@param index — The index of the assignment.

@return todayAssignmentInfo — The assignment information, or nil if not found.

-- api/X2Achievement
todayType:
    | `TADT_ARCHE_PASS`
    | `TADT_EXPEDITION`
    | `TADT_EXPEDITION_PUBLIC`
    | `TADT_FAMILY`
    | `TADT_HERO`
    | `TADT_MAX`
    | `TADT_TODAY`

See: TodayAssignmentInfo

Method: GetTodayAssignmentStatus

(method) X2Achievement:GetTodayAssignmentStatus()
  -> done: number
  2. total: number

Retrieves the completion status of today’s assignments.

@return done — The number of completed assignments.

@return total — The total completion count.

Method: GetTodayAssignmentResetCount

(method) X2Achievement:GetTodayAssignmentResetCount(todayType: `TADT_ARCHE_PASS`|`TADT_EXPEDITION_PUBLIC`|`TADT_EXPEDITION`|`TADT_FAMILY`|`TADT_HERO`...(+2))
  -> resetCount: number
  2. maxCount: number

Retrieves the reset count and maximum reset count for the specified today type.

@param todayType — The type of today’s assignments.

@return resetCount — The current reset count.

@return maxCount — The maximum reset count.

-- api/X2Achievement
todayType:
    | `TADT_ARCHE_PASS`
    | `TADT_EXPEDITION`
    | `TADT_EXPEDITION_PUBLIC`
    | `TADT_FAMILY`
    | `TADT_HERO`
    | `TADT_MAX`
    | `TADT_TODAY`

Method: IsTodayAssignmentQuest

(method) X2Achievement:IsTodayAssignmentQuest(todayType: `TADT_ARCHE_PASS`|`TADT_EXPEDITION_PUBLIC`|`TADT_EXPEDITION`|`TADT_FAMILY`|`TADT_HERO`...(+2), questType: number)
  -> todayAssignmentQuest: boolean

Checks if the quest ID is in the today’s assignment quests and not already complete.

@param todayType — The type of today’s assignments.

@param questType — The quest type (id) to check.

@return todayAssignmentQuesttrue if the quest is in the list and not complete, false otherwise.

-- api/X2Achievement
todayType:
    | `TADT_ARCHE_PASS`
    | `TADT_EXPEDITION`
    | `TADT_EXPEDITION_PUBLIC`
    | `TADT_FAMILY`
    | `TADT_HERO`
    | `TADT_MAX`
    | `TADT_TODAY`

Method: IsTracingAchievement

(method) X2Achievement:IsTracingAchievement(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`, achievementType: number)
  -> tracingAchievement: boolean

Checks if the specified achievement type in the given kind is being traced.

@param achievementKind — The achievement kind.

@param achievementType — The achievement type (id) to check.

@return tracingAchievementtrue if the achievement is being traced, false otherwise.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

Method: GetSubcategoryInfo

(method) X2Achievement:GetSubcategoryInfo(subCategory: `10`|`11`|`12`|`13`|`14`...(+53))
  -> subcategoryInfo: SubcategoryInfo|nil

Retrieves subcategory information if the specified subcategory exists.

@param subCategory — The subcategory to query.

@return subcategoryInfo — The subcategory information, or nil if not found.

subCategory:
    | `1` -- Character
    | `2` -- Pets/Mounts
    | `3` -- Collection
    | `4` -- Misc.
    | `5` -- Combat/PvP
    | `6` -- Siege
    | `7` -- Arena
    | `8` -- Collection
    | `9` -- Crafting
    | `10` -- Harvesting
    | `11` -- Trade
    | `12` -- Construction / Furniture
    | `13` -- Badges/Proficiency
    | `14` -- Quests/Completed
    | `15` -- Rifts/Attacks
    | `16` -- Collection
    | `17` -- Criminal Justice
    | `18` -- Groups
    | `31` -- Spring
    | `32` -- Summer
    | `33` -- Fall
    | `34` -- Winter
    | `35` -- Special Events
    | `41` -- Heroic
    | `44` -- Fishing
    | `9000001` -- Collection
    | `9000002` -- Exploration
    | `9000003` -- Special Events
    | `9000004` -- Arena
    | `9000005` -- Festival
    | `9000006` -- Exploration
    | `9000007` -- Pets/Mounts
    | `9000008` -- Character Development
    | `9000009` -- Adventure
    | `9000010` -- Royal Archivist
    | `9000011` -- Vocation
    | `9000012` -- Hiram Disciple
    | `9000013` -- Great Library Curator
    | `9000014` -- Akaschic Investigator
    | `36` -- Skywarden
    | `42` -- Sky Emperor
    | `45` -- Shapeshifter
    | `46` -- Strada
    | `47` -- Tuskora
    | `48` -- Fashion Icon
    | `8000001` -- Crazy Cat Person
    | `19` -- Lv1-5
    | `20` -- Lv6-10
    | `21` -- Lv11-15
    | `22` -- Lv16-20
    | `23` -- Lv21-25
    | `24` -- Lv26-30
    | `25` -- Lv31-35
    | `26` -- Lv36-40
    | `27` -- Lv41-45
    | `29` -- Lv51-55
    | `28` -- Lv46-50
    | `30` -- Lv1-70

See: SubcategoryInfo

Method: GetCategories

(method) X2Achievement:GetCategories(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`)
  -> categories: AchievementCategory[]|AchievementLevelSubCategory[]

Retrieves categories for the specified kind, returning level subcategories for EAK_RACIAL_MISSION or regular categories otherwise.

@param achievementKind — The achievement kind.

@return categories — A table of categories or level subcategories for EAK_RACIAL_MISSION, or empty if kind is invalid.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

See:

Method: GetAchievementMainList

(method) X2Achievement:GetAchievementMainList(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`, subCategoryType: number|`0`, achievementFilter: `AF_ALL`|`AF_COMPLETE`|`AF_INVALID`|`AF_TRACING`|`AF_UNCOMPLETE`)
  -> achievementMainList: number[]

Retrieves a list of achievement types for the specified kind and subcategory with the given filter.

@param achievementKind — The achievement kind.

@param subCategoryType — The subcategory achievement type.

@param achievementFilter — The filter to apply.

@return achievementMainList — A table of achievement types, or empty if none exist.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

subCategoryType:
    | `0`

-- api/X2Achievement
-- Achievement Filter
achievementFilter:
    | `AF_ALL`
    | `AF_COMPLETE` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_INVALID` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_TRACING`
    | `AF_UNCOMPLETE` -- Doesnt work. Produces the same result as AF_ALL.

Method: GetAchievementInfo

(method) X2Achievement:GetAchievementInfo(achievementType: number)
  -> achievementInfo: AchievementInfo|nil

Retrieves achievement information if the specified type exists.

@param achievementType — The achievement type (id) to query.

@return achievementInfo — The achievement information, or nil if not found.

See: AchievementInfo

Method: GetCategoryCount

(method) X2Achievement:GetCategoryCount(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`, categoryType: number, subCategoryType: number, achievementFilter: `AF_ALL`|`AF_COMPLETE`|`AF_INVALID`|`AF_TRACING`|`AF_UNCOMPLETE`)
  -> complete: number
  2. total: number

Retrieves the completed and total count for the specified kind, category, and subcategory with the given filter.

@param achievementKind — The achievement kind.

@param categoryType — The category type.

@param subCategoryType — The subcategory type.

@param achievementFilter — The filter to apply.

@return complete — The number of completed achievements.

@return total — The total number of achievements.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

-- api/X2Achievement
-- Achievement Filter
achievementFilter:
    | `AF_ALL`
    | `AF_COMPLETE` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_INVALID` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_TRACING`
    | `AF_UNCOMPLETE` -- Doesnt work. Produces the same result as AF_ALL.

Method: GetAchievementName

(method) X2Achievement:GetAchievementName(achievementType: number)
  -> achievementName: string

Retrieves the name of the specified achievement type.

@param achievementType — The achievement type (id) to query.

@return achievementName — The achievement name, or empty string if not found.

Method: GetAchievementTracingList

(method) X2Achievement:GetAchievementTracingList(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`)
  -> achievementTracingList: number[]

Retrieves a list of achievement types being traced for the specified kind.

@param achievementKind — The achievement kind.

@return achievementTracingList — A table of traced main achievement types, or empty if none exist.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`

Method: GetAchievementSubList

(method) X2Achievement:GetAchievementSubList(mainType: number, achievementFilter: `AF_ALL`|`AF_COMPLETE`|`AF_INVALID`|`AF_TRACING`|`AF_UNCOMPLETE`)
  -> achievementSubList: AchievementSubList[]

Retrieves a list of achievement sublists for the specified main type with the given filter.

@param mainType — The main achievement type.

@param achievementFilter — The filter to apply.

@return achievementSubList — A table of achievement sublists, or empty if none exist.

-- api/X2Achievement
-- Achievement Filter
achievementFilter:
    | `AF_ALL`
    | `AF_COMPLETE` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_INVALID` -- Doesnt work. Produces the same result as AF_ALL.
    | `AF_TRACING`
    | `AF_UNCOMPLETE` -- Doesnt work. Produces the same result as AF_ALL.

See: AchievementSubList

Method: RemoveTracingAchievement

(method) X2Achievement:RemoveTracingAchievement(achievementKind: `EAK_ACHIEVEMENT`|`EAK_ARCHERAGE`|`EAK_COLLECTION`|`EAK_RACIAL_MISSION`, achievementType: number)

Removes the specified achievement type in the given kind from tracing.

@param achievementKind — The achievement kind.

@param achievementType — The achievement type (id) to remove.

-- api/X2Achievement
achievementKind:
    | `EAK_ACHIEVEMENT`
    | `EAK_ARCHERAGE`
    | `EAK_COLLECTION`
    | `EAK_RACIAL_MISSION`