Sharp Aion2 Lua SDK
API reference

Quests, Dungeons, and RewardsLua table

Inspect quest objectives and expedition parties, request progression actions, and read collections.

These advanced calls live directly on game; retain their exact leading underscores. These interfaces are experimental; check function availability in the installed runtime. They are not additional sdk aliases. Reads may return nil, error during a character/map transition or when a supported game system is unavailable. Successful empty arrays are different from failed reads.

Quest IDs, tracking IDs, and quest UIDs are different values. The detailed readers below do not supply a quest UID for every action. Do not substitute a quest ID or an undocumented field where a request requires a UID. For the simpler list and claim/execute/submit contracts, see Game: Quests and the quest journal guide.

true from an action means local invocation, dispatch, or queue acceptance, not that progression changed or a reward arrived. Yield through a worker, then refresh the relevant state. None of the requests below should be repeatedly sent just because a later read is unavailable.

Quest Progress

game._active_quest_components()

Parameters: None. Returns: An array of active quest records, or nil, error. Each documented quest record contains:

FieldMeaning
source_indexSource-list position, not the Lua array index.
idQuest definition ID.
stateCurrent quest-state code.
track_idTracking ID.
typeQuest-type code.
levelQuest level value.
step_idCurrent step ID.
step_indexCurrent step index.
objectivesArray of current objective records.

Each documented objective has integer map_id, current, required_count, and goal_type, plus boolean target_ids_known and an integer array target_ids. When target_ids_known is false, an empty target_ids is not proof that the objective has no target. With true, an empty list is a known-empty target list. Goal and state codes have no complete public label mapping; do not use one goal's IDs as another goal's entity IDs.

local quests, err = game._active_quest_components()
if quests == nil then
    log.warn(err)
else
    for _, quest in ipairs(quests) do
        for _, objective in ipairs(quest.objectives) do
            log.info(string.format("Quest %d: %d / %d on map %d",
                quest.id, objective.current, objective.required_count,
                objective.map_id))
        end
    end
end

game._active_quest_record_candidate()

Parameters: None. Returns: An array of active quest records with id, state, track_id, type, level, step_id, step_index, and phases, or nil, error. Every phase contains integer quest_id, map_id, current, and maximum, plus an integer array target_ids.

This is an experimental, stricter phase view: one unsupported objective can make the entire read unavailable. Prefer the components view when your script can handle incomplete target knowledge. phase.quest_id can be 0; it is not a reliable child-quest identity. Empty targets can be correct for progress objectives. Do not infer missing targets or completion from a failed read.

game._available_quest_records()

Parameters: None. Returns: An array of {id, type, state, track_id, level, step_id, step_index, phases}, or nil, error. Only id and type are populated by this reader. state, track_id, level, step_id, and step_index are 0, and phases is empty. These placeholders are not current progress. Use game.claim_quest(id) to request a known available quest.

game._completed_quest_records()

Parameters: None. Returns: An array of records with id, state, track_id, type, level, step_id, step_index, and phases, or nil, error. Only id is populated; the other integer fields are 0 and phases is empty. Membership in the completed list indicates completion, not its placeholder state value.

game._current_map_quest_entries()

Parameters: None. Returns: {count, rows}, or nil, error. Each row contains integer source_index and quest id. This is the current map's quest list, not necessarily the active or available list. Iterate rows with ipairs and compare IDs with the corresponding quest list.

game._mission_quest_rows()

Parameters: None. Returns: An array of mission quest records, or nil, error. Each documented record contains integer id, index, status, level, and tracking_id, plus rewards, an array of integer {id, count} item rewards. Up to 20 missions and 10 rewards per mission can be returned. A mission index is not a quest UID; reward IDs are item definition IDs, not owned item UIDs.

game._dungeon_quest_records()

Parameters: None. Returns: An array of records with integer id, state, step_index, and phase_index, or nil, error. These describe current dungeon quest stages and steps. No complete state-code mapping is supplied. The dungeon quest ID is not an entry destination ID or quest UID.

game._map_dungeon_quest_candidate()

Parameters: None. Returns: {node_key, quest_id, dungeon_state} with integer values, or nil, error. This experimental read describes the current map's dungeon quest association. It is not a catalog of dungeon destinations; do not pass node_key to an entry action as though it were a dungeon ID.

game._quest_teleport_candidate(quest_uid)

Parameters: Integer quest UID. Returns: true when dispatched, false when rejected locally, or nil, error. It does not discover a UID, guarantee teleport eligibility, or confirm arrival. Read current map and position afterward. Do not pass an ID from game.active_quest_ids() as a UID.

Dungeon Availability

game._dungeon_entry_info_source()

Parameters: None. Returns: A table of integer values, or nil, error:

FieldValue
conquest_reward_countConquest reward count.
conquest_boss_kill_countConquest boss-kill count.
lower_abyss_timeLower Abyss time value.
surface_abyss_timeSurface Abyss time value.
middle_abyss_timeMiddle Abyss time value.
transcendence_reward_countTranscendence reward count.
expedition_aether_energyExpedition aether-energy value.

The time values have no documented conversion to seconds, and the count values alone do not prove entry eligibility. Read the current values rather than assuming reset behavior or treating them as remaining entries.

game._account_reward_count(category)

Parameters: Integer category from 1 to 5. Returns: Its current integer account-content reward count, or nil, error.

CategoryContent
1Easy party dungeon.
2Normal party dungeon.
3Advanced party dungeon.
4Hard party dungeon.
5Abyss point category.

These are stored counts, not a calculation of remaining entries or rewards.

game._expedition_completion_snapshot()

Parameters: None. Returns: {exploration_count, conquest_count} with integer values, or nil, error. The field names are compatibility labels: exploration_count reads category 1 and conquest_count reads category 2 from the account reward counts above. They do not independently prove an expedition was completed or that a reward is ready.

game._dungeon_enter_request(dungeon_id)

Parameters: Integer dungeon destination ID. Returns: true when dispatched, false when rejected locally, or nil, error. Use a real destination ID selected for the current character; the wrapper does not validate unlocks, costs, group requirements, or arrival.

game._dungeon_leave_request()

Parameters: None. Returns: true when accepted locally, or nil, error for rejection or unavailability. Read the map afterward to confirm departure. For unlocked destinations, see Game: Travel.

Expedition Parties

game._current_expedition_party_snapshot()

Parameters: None. Returns: A table with boolean read_complete and has_room, plus integer dungeon_id, party_id, and reward_claimed, or nil, error. In the current version this reader only publishes absence: read_complete=true, has_room=false, and all three integers are 0. An existing room returns nil, error because complete room/reward information is not available through this reader. Do not interpret that error as no room or use this function alone to confirm that a create/leave request succeeded.

game._current_expedition_party_rows()

Parameters: None. Returns: An array of current party-member rows, or nil, error. Each documented row has integer ready and leader flags. Compare their values explicitly rather than relying on Lua truthiness. The field named leader currently marks the local character's row (1) rather than independently proving party leadership. This reader does not provide a documented stable character identifier. An empty list can represent an observed absence of a room.

game._expedition_party_create_request(dungeon_id, difficulty, is_public)

Parameters: One to three integers. dungeon_id is required; difficulty and is_public both default to 0. Use game-supported values; is_public is an integer flag, not true or false. Returns: true when submitted, false when rejected locally, or nil, error. It does not prove a room was created. Observe the game party state and available party rows; the snapshot reader cannot publish existing rooms.

game._expedition_enter_request()

Parameters: None. Returns: true when accepted locally, false when the dungeon system is unavailable or entry was rejected locally, or nil, error for other unavailability. It uses the current expedition context and does not select a destination. Confirm entry through later map/state reads.

game._expedition_leave_request()

Parameters: None. Returns: true when submitted, false when the dungeon system is unavailable, or nil, error. Refresh the party/map state to verify departure.

game._expedition_party_ready_request()

Parameters: None. Returns: true when submitted, false when the dungeon system is unavailable, or nil, error. This requests the ready state in the current party; refresh the party rows to observe the resulting flags.

game._expedition_match_request(dungeon_id)

Parameters: Integer dungeon ID within the signed 32-bit range. Returns: true when submitted, false when locally rejected or the dungeon system is unavailable, or nil, error. A sent request is not proof that matchmaking succeeded or that entry happened.

game._claimed_expedition_pity_reward_rows()

Parameters: None. Returns: An array of {dungeon_id, current_energy, claimed} with integer values, or nil, error. claimed is a code/flag, not a Lua boolean. This lists current recorded pity-reward state and does not claim anything.

game._expedition_pity_claim_request(dungeon_id, item_id)

Parameters: Integer dungeon ID and reward item definition ID. Returns: true when submitted, false when rejected locally, or nil, error. Read the pity rows and inventory afterward to verify a claim. This does not validate the available reward choice or energy requirement for you.

Collections

game._current_owned_wing_entries()

Parameters: None. Returns: {count, rows}, or nil, error. Each row contains integer wing id, type, equipped, and level. equipped is 1 for the current wing and 0 otherwise. type is currently a 0 placeholder. The field named level reads the wing's grade value, not its enhancement level; it can remain 0 when metadata is unavailable. The list can contain zero or repeated IDs; filter those before offering an equipment choice. An unavailable character can produce a successful empty list, so that result alone does not prove the account owns no wings.

game._wing_change_request(wing_id)

Parameters: Integer wing ID within the signed 32-bit range. Returns: true when invoked, or nil, error. Use an owned wing ID; this does not establish ownership or confirm an equipment change. Refresh the wing entries afterward.

game._current_owned_title_entries()

Parameters: None. Returns: {count, rows}, or nil, error. Each row contains integer title id, type, equipment_state, color, and equipment_stat_value. equipment_state indicates whether the title is equipped. The other values are title metadata codes/values, not a formatted label, display color, or universally comparable power score.

game._title_equip_request(slot, title_id)

Parameters: Integer title slot from 0 to 255 and integer title ID within the signed 32-bit range. Use a game-supported slot and owned title. Returns: true when invoked, or nil, error. Refresh title entries afterward; invocation is not confirmation that the title was equipped.

game._map_exploration_target_rows()

Parameters: None. Returns: An array of {id, status, class_name}, or nil, error. id and status are integers; class_name is text. These are exploration target records, not live nearby entity records. No complete status-code mapping is provided. See Entities for nearby world objects.

game._divine_trace_level_candidate()

Parameters: None. Returns: The current integer Divine Trace level, or nil, error. This experimental read does not report upgrades, rewards, or costs and should not be substituted for character level. A successful 0 can also mean no matching selected progression entry was found.

Reward Claims

game._achievement_claim_request()

Parameters: None. Returns: true when submitted, false when rejected locally, or nil, error. This invokes the current achievement-claim request; it does not select a particular achievement or guarantee a reward.

game._mail_claim_request()

Parameters: None. Returns: true when claim-all is invoked, false when there is no mail to claim, or nil, error. This is a bulk mail claim, not a single-message selector. Read the game mail/inventory state to confirm receipt.

game._battle_pass_claim_request()

Parameters: None. Returns: true when queued, false when not queued, or nil, error. This does not select a pass tier or confirm delivery. Observe the game pass and inventory state afterward.

game._sign_in_claim_request(type_id)

Parameters: Integer attendance/sign-in type ID. Returns: true when submitted, false when rejected locally, or nil, error. A supported type-ID catalog is not supplied by this function. It is a game attendance reward request, not an account login action.

For item boxes and item consumption, see Inventory: Item Use and Equipment. Keep claim actions behind explicit choices when they can consume a limited claim or select a reward; a failed follow-up read should not trigger a replay.

On this page