WowAddons

World of Warcraft Forever API · Console.md, for your AI

Console (global functions)

10 functions, 7 events, 4 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

CalculateStringEditDistance

distance = CalculateStringEditDistance(firstString, secondString)

Arguments

firstStringstringView
secondStringstringView

Returns

distancenumber

ConsoleEcho

result = ConsoleEcho(command, [addToHistory], [prefix])

Arguments

commandcstring
addToHistorybool default false
prefixcstring may be nil

Returns

resultbool

ConsoleExec

result = ConsoleExec(command, [addToHistory])

Arguments

commandcstring
addToHistorybool default false

Returns

resultbool

ConsoleGetAllCommands

commands = ConsoleGetAllCommands()

Returns

commandsConsoleCommandInfo[]

ConsoleGetColorFromType

color = ConsoleGetColorFromType(colorType)

Arguments

colorTypeConsoleColorType

Returns

colorcolorRGB

ConsoleGetFontHeight

fontHeightInPixels = ConsoleGetFontHeight()

Returns

fontHeightInPixelsnumber

ConsoleIsActive

consoleIsActive = ConsoleIsActive()

Returns

consoleIsActivebool

ConsolePrintAllMatchingCommands

ConsolePrintAllMatchingCommands(partialCommandText)

Arguments

partialCommandTextcstring

ConsoleSetFontHeight

ConsoleSetFontHeight(fontHeightInPixels)

Arguments

fontHeightInPixelsnumber

SetConsoleKey

SetConsoleKey(keystring)

Arguments

keystringcstring

Events

CONSOLE_CLEAR

No payload.

CONSOLE_COLORS_CHANGED

No payload.

CONSOLE_FONT_SIZE_CHANGED

No payload.

CONSOLE_LOG

messagecstring

CONSOLE_MESSAGE

messagecstring
colorTypenumber

CVAR_UPDATE

eventNamecstring
valuecstring

TOGGLE_CONSOLE

showConsolebool may be nil

Tables

Enum.ConsoleCategory enumeration

Debug0
Graphics1
Console2
Combat3
Game4
Default5
Net6
Sound7
Gm8
Reveal9
None10

Enum.ConsoleColorType enumeration

DefaultColor0
InputColor1
EchoColor2
ErrorColor3
WarningColor4
GlobalColor5
AdminColor6
HighlightColor7
BackgroundColor8
ClickbufferColor9
PrivateColor10
DefaultGreen11

Enum.ConsoleCommandType enumeration

Cvar0
Command1
Macro2
Script3

ConsoleCommandInfo structure

commandcstring
helpcstring
categoryConsoleCategory
commandTypeConsoleCommandType
scriptContentscstring
scriptParameterscstring

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows