Difference between revisions of "LUA:CreateOptionWindow"

(Created page with "= LUA Functions: CreateOptionWindow() = Creates an option window ==== Syntax ==== CreateOptionWindow() ==== Parameters ==== ; None ==== Usage ==== <pre> function hailed(NPC, ...")
 
(No difference)

Latest revision as of 21:35, 8 January 2013

LUA Functions: CreateOptionWindow()

Creates an option window


Syntax

CreateOptionWindow()

Parameters

None

Usage

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

Creates an option window and stores it in the variable "window" and adds 2 options to it.