AddOptionWindowOption(OptionWindow: Window, String: OptionName, String: OptionDescription, Int32: IconSheet, Int16: IconID, String: Command, String: ConfirmTitle)
Pre-Requisite(s)
- Not available on Kingdom of Sky or earlier clients, use AddConversationOption and CreateConversation instead
- Must call CreateOptionWindow() before to obtain the OptionWindow
Parameter(s)
OptionWindow: Window - LUA Pointer for OptionWindow
String: OptionName - Displayed text to the Player
String: OptionDescription - Displayed text to the Player
Int32: IconSheet - Icon Sheet to select Icon ID from
Int16: IconID - Icon ID to display
String: Command - Function to run if option is selected
String: ConfirmTitle - Title of Confirm Window if selected
Return(s)
- None
Example(s)
function hailed(NPC, Spawn)
window = CreateOptionWindow();
AddOptionWindowOption(window, "Test 1", "Test 1 description", 0, 0, "Test1")
AddOptionWindowOption(window, "Test 2", "Test 2 description", 0, 1, "Test2")
SendOptionWindow(window, Spawn, "Option Window Test", "TestCancel")
end
function Test1(NPC, Spawn)
Shout(Spawn, "Test 1")
end
function Test2(NPC, Spawn)
Shout(Spawn, "Test 2")
end
function TestCancel(NPC, Spawn)
Shout(Spawn, "Test cancel")
end
Result
Additional Notes