New Lua Functions: Option windows
Posted: Tue Jan 08, 2013 10:02 pm
CreateOptionWindow
AddOptionWindowOption
SendOptionWindow
These lua functions are used to create an option window like this

Detailed info for each function is on the wiki but here is a quick sample script
AddOptionWindowOption
SendOptionWindow
These lua functions are used to create an option window like this

Detailed info for each function is on the wiki but here is a quick sample script
Code: Select all
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