New Lua Functions: Option windows

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

New Lua Functions: Option windows

Post by Jabantiz » Tue Jan 08, 2013 10:02 pm

CreateOptionWindow
AddOptionWindowOption
SendOptionWindow

These lua functions are used to create an option window like this
Image
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

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: New Lua Functions: Option windows

Post by John Adams » Wed Jan 09, 2013 11:47 am

Great work. I love seeing new UI's :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests