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(OptionWindow, OptionName, OptionDescription, OptionIconSheet, OptionIconID, OptionCommand, OptionConfirmTitle)

Description: Adds a new option to the option window screen.

Parameters:

  • OptionWindow: OptionWindow - OptionWindow object made with CreateOptionWindow().
  • OptionName: string - String value.
  • OptionDescription: string - String value.
  • OptionIconSheet: int32 - Integer value.
  • OptionIconID: int16 - Short integer value.
  • OptionCommand: string - String value.
  • OptionConfirmTitle: string - String value.

Returns: None.

Notes:

  • Must call CreateOptionWindow to instantiate the OptionWindow before AddOptionWindowOption can be used.

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.