Skip to main content

World Functions

Overview

The core.world module exposes world-level state queries, including flying availability, map encounter positions, and active Mythic+ keystone information.


core.world.is_flyable_area

Syntax
core.world.is_flyable_area() -> boolean
Returns
  • boolean: true if the current area allows regular flying, false otherwise.
Description

Returns whether the current area allows regular flying.

Example Usage

if core.world.is_flyable_area() then
core.log("Regular flying is available here")
end

core.world.is_advanced_flyable_area

Syntax
core.world.is_advanced_flyable_area() -> boolean
Returns
  • boolean: true if the current area allows advanced flying, false otherwise.
Description

Returns whether the current area allows advanced dynamic flying or skyriding.

Example Usage

if core.world.is_advanced_flyable_area() then
core.log("Advanced flying is available here")
end

core.world.get_encounters_on_map

Syntax
core.world.get_encounters_on_map(ui_map_id: integer) -> encounter_info[]

Parameters

  • ui_map_id: integer - The UI map ID to query encounters for.
Returns
  • encounter_info[]: An array of encounter info tables.

Each encounter table contains:

FieldTypeDescription
encounter_idintegerThe encounter ID
map_xnumberThe normalized X position on the map
map_ynumberThe normalized Y position on the map
Description

Returns encounter data for the specified UI map ID. Each entry contains the encounter ID and its normalized map position.

Example Usage

local map_id = core.game_ui.get_current_map_id()
local encounters = core.world.get_encounters_on_map(map_id)

for _, encounter in ipairs(encounters) do
core.log(string.format(
"Encounter %d at %.2f, %.2f",
encounter.encounter_id,
encounter.map_x,
encounter.map_y
))
end

core.world.get_active_keystone_info

Syntax
core.world.get_active_keystone_info() -> active_keystone_info
Returns
  • active_keystone_info: A table containing active Mythic+ keystone data. Returns an empty table when unavailable or when no active keystone exists.

The returned table contains:

FieldTypeDescription
levelintegerThe active keystone level
was_chargedbooleanWhether the active keystone was charged
affix_idsinteger[]The active keystone affix IDs
Description

Returns active Mythic+ keystone information from the client challenge mode API.

Example Usage

local keystone = core.world.get_active_keystone_info()

if keystone.level then
core.log("Active keystone level: " .. keystone.level)

for _, affix_id in ipairs(keystone.affix_ids) do
core.log("Affix: " .. affix_id)
end
end