Lua functions

AddConversationOption

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

Historical signature: AddConversationOption(ConversationOption, Message, FunctionName)

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

Function: AddConversationOption(conversation, message[, function_name])

Appends a choice to an open builder returned by CreateConversation.

Parameters:

  • conversation (Conversation): the open conversation builder.
  • message (string): nonempty text displayed for this choice.
  • function_name (string, optional): Lua callback name. Defaults to an empty string, which supplies no response callback.

Returns: None.

The builder owns copies of both strings. Empty messages and consumed, replaced or expired builders are ignored. Adding a choice cannot modify data already transferred to a displayed menu.

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.

AddConversationOption(con, "Next page", "offer")

Evidence: server/SpawnScripts/antonica/bookcasewindstalker.lua:40; binding EQ2Emu_lua_AddConversationOption.

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