Lua functions

AddOptionWindowOption

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

Historical signature: AddOptionWindowOption(OptionWindow, OptionName, OptionDescription, OptionIconSheet, OptionIconID, OptionCommand, OptionConfirmTitle)

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

Function: AddOptionWindowOption(window, name, description[, icon_sheet, icon_id, command, confirm_title])

Appends owned values to an open option-window builder.

Parameters:

  • window (OptionWindow): a builder from CreateOptionWindow.
  • name (string): nonempty option name.
  • description (string): nonempty option description.
  • icon_sheet (uint32, optional): icon sheet; defaults to 0.
  • icon_id (uint16, optional): icon identifier; defaults to 0.
  • command (string, optional): selection command; defaults to an empty string.
  • confirm_title (string, optional): confirmation title; defaults to an empty string.

Returns: None.

The builder copies its strings and serializes mutation with consumption. Empty names/descriptions and consumed or expired builders are ignored. Sending supports at most 255 choices; oversized builders are rejected rather than wrapping the packet count.

Checked example

Active call in a local runtime Lua script. The confirmation title defaults to an empty string. This is a contextual call pattern, not a tested standalone script.

AddOptionWindowOption(window, " Stay", "...", 0, 2296, "Cancel")

Evidence: server/SpawnScripts/IsleRefuge1/LeavetheIsleofRefuge.lua:125; binding EQ2Emu_lua_AddOptionWindowOption.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.