Lua functions

StartDialogConversation

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

Historical signature: StartDialogConversation(conversation, type, spawn, player, text, mp3, key1, key2, language, can_close)

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

Function: StartDialogConversation(conversation, type, source, player, text[, mp3, key1, key2, language, can_close])

Attempts to display an actor or item dialogue with owned choice values.

Parameters:

  • conversation (Conversation): a builder returned by CreateConversation.
  • type (integer): 1 for a Spawn dialog window, 2 for an Item dialog window, 3 for a Spawn conversation anchored to the Player, or 4 for an Item conversation anchored to the Player.
  • source (Spawn or Item): a Spawn for types 1/3, or an Item for types 2/4.
  • player (Player): the recipient Player.
  • text (string): nonempty dialogue text.
  • mp3 (string, optional): voice asset path; defaults to an empty string.
  • key1, key2 (uint32, optional): voice keys; default to 0.
  • language (integer, optional): language identifier; defaults to 0 and uses the native 8-bit field.
  • can_close (integer, optional): numeric 0 or 1; defaults to 1.

Returns: None.

This entry point consumes a valid builder even if the request's arguments or connection do not allow display. Actor dialogues may have no choices; item dialogues require at least one. The consumed builder cannot be reused, and a failed/throwing send does not reopen it. Displayed dialogue ownership, reply admission and the 65,535-choice protocol limit are the same as StartConversation.

Choices, text and voice are owned through callbacks. The original Player operation, source identity and scene are checked; reconnecting or replacing an object cannot redirect a pending request or reply to its successor. Idle menus observe their sources weakly rather than keeping them alive.

Checked example

Active call in a local runtime Lua script. Audio, keys, and language default empty or zero; close defaults to enabled. The binding also handles arguments dynamically. This is a contextual call pattern, not a tested standalone script.

StartDialogConversation(con, 1, NPC, Spawn, "Upon the wall you see a shiny axe.")

Evidence: server/SpawnScripts/Commonlands/wallaxewidget.lua:28; binding EQ2Emu_lua_StartDialogConversation.

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