Auto-translated
This requires heroes of version 3.1.
TalkBoxForPlayers "Opens a dialog with multiple answer options (from 1 to 5) for selected players (playersFilter).
The function does not output error messages because if the parameters are incorrect, default values are used."
playersFilter PlayersFilteringConstantsID Identifier of the selected players
iconRef Reference to the icon texture
iconTooltipRef Path to the icon tooltip text
textRef Path to the dialog text
addTextRef Path to the dialog text (additional)
callback String with the name of the Lua function, through the first parameter of which the player's answer is communicated (number: 0 - cancel, -1 - closed by the game, 1.. - the number of the answer selected by the player)
mode Type of mode: 0 - with an OK button, 1 - OK/Close
titleTextRef Path to the window title text
selectTextRef Path to the text of the title before the selection options
defaultOption Number of the answer that is highlighted by default (number: 0 - no, 1.. - the number of the answer)
optionTextRef Path to the text of answer #1
[optionTextRef] Path to the text of answer #...
… [Answer Number]
Here is an example:
a1=(GetMapDataPath().."a1.txt");
a2=(GetMapDataPath().."a2.txt");
a3=(GetMapDataPath().."a3.txt");
a4=(GetMapDataPath().."a4.txt");
TalkBoxForPlayers (PLAYER_1, "/Textures/Icons/Heroes/Academy/Academy_Razzak_128x128.(Texture).xdb#xpointer(/Texture)", "", GetMapDataPath().."v.txt", "", "func", 0, GetMapDataPath().."v.txt", "", 0, a1, a2, a3, a4)