World of Warcraft Forever API · Instance.md, for your AI
Instance (global functions)
18 functions, 3 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
CanChangePlayerDifficulty
canChange, notOnCooldown = CanChangePlayerDifficulty()
May return nothing.
Returns
canChange | bool | |
|---|---|---|
notOnCooldown | bool |
CanMapChangeDifficulty
canChange = CanMapChangeDifficulty([mapID])
Arguments
mapID | number may be nil |
|---|
Returns
canChange | bool |
|---|
CanShowResetInstances
result = CanShowResetInstances()
Returns
result | bool |
|---|
GetBaseDifficultyID
baseDifficultyID = GetBaseDifficultyID(difficultyID)
Arguments
difficultyID | number |
|---|
Returns
baseDifficultyID | number |
|---|
GetDifficultyInfo
name, instanceType, isHeroic, isChallengeMode, displayHeroic, displayMythic, toggleDifficultyID, isLFR, minPlayers, maxPlayers, isUserSelectable = GetDifficultyInfo(difficultyID)
Arguments
difficultyID | number |
|---|
Returns
name | cstring | |
|---|---|---|
instanceType | cstring | |
isHeroic | bool | |
isChallengeMode | bool | |
displayHeroic | bool | |
displayMythic | bool | |
toggleDifficultyID | number may be nil | |
isLFR | bool | |
minPlayers | number may be nil | |
maxPlayers | number may be nil | |
isUserSelectable | bool |
GetDungeonDifficultyID
result = GetDungeonDifficultyID()
Returns
result | number |
|---|
GetInstanceBootTimeRemaining
result = GetInstanceBootTimeRemaining()
Returns
result | number |
|---|
GetInstanceInfo
name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceID, instanceGroupSize, lfgDungeonID, hasWorldTier = GetInstanceInfo()
Returns
name | cstring | |
|---|---|---|
instanceType | cstring | |
difficultyID | number | |
difficultyName | cstring | |
maxPlayers | number | |
dynamicDifficulty | number | |
isDynamic | bool may be nil | |
instanceID | number | |
instanceGroupSize | number | |
lfgDungeonID | number may be nil | |
hasWorldTier | bool default false |
GetInstanceLockTimeRemaining
timeLeft, extending, encountersTotal, encountersCompleted = GetInstanceLockTimeRemaining()
Returns
timeLeft | number | |
|---|---|---|
extending | bool | |
encountersTotal | number | |
encountersCompleted | number |
GetInstanceLockTimeRemainingEncounter
encounterName, texture, isKilled, ineligible = GetInstanceLockTimeRemainingEncounter(encounterIndex)
Arguments
encounterIndex | luaIndex |
|---|
Returns
encounterName | cstring | |
|---|---|---|
texture | cstring | |
isKilled | bool | |
ineligible | bool |
GetLegacyRaidDifficultyID
result = GetLegacyRaidDifficultyID()
Returns
result | number may be nil |
|---|
GetRaidDifficultyID
result = GetRaidDifficultyID()
Returns
result | number may be nil |
|---|
IsInInstance
isInInstance, instanceType = IsInInstance()
Returns
isInInstance | bool | |
|---|---|---|
instanceType | cstring |
IsLegacyDifficulty
result = IsLegacyDifficulty(difficultyID)
Arguments
difficultyID | number |
|---|
Returns
result | bool may be nil |
|---|
ResetInstances
ResetInstances()
SetDungeonDifficultyID
SetDungeonDifficultyID(difficultyID)
Arguments
difficultyID | number |
|---|
SetLegacyRaidDifficultyID
SetLegacyRaidDifficultyID(difficultyID, [force])
Arguments
difficultyID | number | |
|---|---|---|
force | bool default false |
SetRaidDifficultyID
SetRaidDifficultyID(difficultyID, [force])
Arguments
difficultyID | number | |
|---|---|---|
force | bool default false |
Tables
DifficultyInfo structure
name | cstring | |
|---|---|---|
instanceType | cstring | |
isHeroic | bool | |
isChallengeMode | bool | |
displayHeroic | bool | |
displayMythic | bool | |
toggleDifficultyID | number may be nil | |
isLFR | bool | |
minPlayers | number may be nil | |
maxPlayers | number may be nil | |
isUserSelectable | bool |
DungeonEncounterInfo structure
encounterName | cstring | |
|---|---|---|
texture | cstring | |
isKilled | bool | |
ineligible | bool |
InstanceInfo structure
name | cstring | |
|---|---|---|
instanceType | cstring | |
difficultyID | number | |
difficultyName | cstring | |
maxPlayers | number | |
dynamicDifficulty | number | |
isDynamic | bool may be nil | |
instanceID | number | |
instanceGroupSize | number | |
lfgDungeonID | number may be nil | |
hasWorldTier | bool default false |