--月老
--脚本号
x103009_g_scriptId=103009

--事件交互入口
function x103009_OnDefaultEvent( scene,selfId ,targetId)
	-- body
	BeginEvent(scene)
	AddText(scene,"[43596b]我是月老[-]")
	AddNumText(scene,x103009_g_scriptId,"申請結婚",-2,10000)
	AddNumText(scene,x103009_g_scriptId,"結婚巡遊",-1,10001)
	AddNumText(scene,x103009_g_scriptId,"開辦婚禮",-1,10002)
	AddNumText(scene,x103009_g_scriptId,"進入禮堂",-1,10003)
	AddNumText(scene,x103009_g_scriptId,"婚禮說明",-1,10004)	
	EndEvent(scene)
	DispatchEventList(scene,selfId,targetId,true)
end

--事件列表选中一项

function x103009_OnEventRequest( scene,selfId,targetId,eventId ,index)
	-- body

	if index == 10000 then
		 MarryToTeamObj(scene,selfId)
   	elseif index == 10001 then
   		BeginEvent(scene)
   		AddText(scene,"功能暫未開啟，敬請期待")
		AddNumText(scene,x103009_g_scriptId,"申請結婚",-2,10000)
		AddNumText(scene,x103009_g_scriptId,"結婚巡遊",-1,10001)
		AddNumText(scene,x103009_g_scriptId,"開辦婚禮",-1,10002)
		AddNumText(scene,x103009_g_scriptId,"進入禮堂",-1,10003)
		AddNumText(scene,x103009_g_scriptId,"婚禮說明",-1,10004)	
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
   	elseif index == 10002 then
   		BeginEvent(scene)
   		AddText(scene,"功能暫未開啟，敬請期待")
		AddNumText(scene,x103009_g_scriptId,"申請結婚",-2,10000)
		AddNumText(scene,x103009_g_scriptId,"結婚巡遊",-1,10001)
		AddNumText(scene,x103009_g_scriptId,"開辦婚禮",-1,10002)
		AddNumText(scene,x103009_g_scriptId,"進入禮堂",-1,10003)
		AddNumText(scene,x103009_g_scriptId,"婚禮說明",-1,10004)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
   	elseif index == 10003 then
   		BeginEvent(scene)
   		AddText(scene,"功能暫未開啟，敬請期待")
		AddNumText(scene,x103009_g_scriptId,"申請結婚",-2,10000)
		AddNumText(scene,x103009_g_scriptId,"結婚巡遊",-1,10001)
		AddNumText(scene,x103009_g_scriptId,"開辦婚禮",-1,10002)
		AddNumText(scene,x103009_g_scriptId,"進入禮堂",-1,10003)
		AddNumText(scene,x103009_g_scriptId,"婚禮說明",-1,10004)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
   	elseif index == 10004 then
   		BeginEvent(scene)
   		AddText(scene,"在這裏添加結婚說明")
		AddNumText(scene,x103009_g_scriptId,"申請結婚",-2,10000)
		AddNumText(scene,x103009_g_scriptId,"結婚巡遊",-1,10001)
		AddNumText(scene,x103009_g_scriptId,"開辦婚禮",-1,10002)
		AddNumText(scene,x103009_g_scriptId,"進入禮堂",-1,10003)
		AddNumText(scene,x103009_g_scriptId,"婚禮說明",-1,10004)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
	end
end