Lua functions

CreateOptionWindow

Registered in this checkout as EQ2Emu_lua_CreateOptionWindow; implementation found at WorldServer/Lua/LuaFunctions.cpp:5999.

Historical signature: CreateOptionWindow(…) via current binding

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: CreateOptionWindow()

Creates an opaque option-window builder that owns its option values.

Parameters: None.

Returns: A new OptionWindow userdata value.

Add choices with AddOptionWindowOption, then call SendOptionWindow. Unsent values are released when the userdata is collected or expires. A consumed or expired builder cannot be appended to or sent again.

Checked example

Active call in a local runtime Lua script. Argument count matches current fixed C++ readers. This is a contextual call pattern, not a tested standalone script.

window = CreateOptionWindow()

Evidence: server/SpawnScripts/Generic/GenericCraftingTrainer.lua:123; binding EQ2Emu_lua_CreateOptionWindow.

Current registration: WorldServer/Lua/LuaInterface.cpp.