--势力场景
--仙厨

--脚本号
x105001_g_scriptId=105001

--事件交互入口
function x105001_OnDefaultEvent(scene, selfId, targetId)
	BeginEvent(scene)
	AddText(scene,"[43596b]只要付出星玉，我就能製作出特殊的仙食[-]")
	
	AddNumText(scene,x105001_g_scriptId,"小型仙宴(100星玉)",-1,1)
	AddNumText(scene,x105001_g_scriptId,"中型仙宴(200星玉)",-1,2)
	AddNumText(scene,x105001_g_scriptId,"大型仙宴(500星玉)",-1,3)
	EndEvent(scene)
	DispatchEventList(scene,selfId,targetId,true)
end

--事件列表选中一项
function x105001_OnEventRequest(scene, selfId, targetId, eventId, index)
	if index==1 then
		BeginEvent(scene)
		AddText(scene,"您確定消耗100星玉為大家訂製小型仙宴嗎?")
	
		AddNumText(scene,x105001_g_scriptId,"是",-1,4)
		AddNumText(scene,x105001_g_scriptId,"否",-1,7)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
	elseif index==2 then
		BeginEvent(scene)
		AddText(scene,"您確定消耗200星玉為大家訂製中型仙宴嗎?")
	
		AddNumText(scene,x105001_g_scriptId,"是",-1,5)
		AddNumText(scene,x105001_g_scriptId,"否",-1,7)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
	elseif index==3 then
		BeginEvent(scene)
		AddText(scene,"您確定消耗500星玉為大家訂製大型仙宴嗎?")
	
		AddNumText(scene,x105001_g_scriptId,"是",-1,6)
		AddNumText(scene,x105001_g_scriptId,"否",-1,7)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
	elseif index==4 then
		DonateFood(scene,selfId,targetId,100)
	elseif index==5 then
		DonateFood(scene,selfId,targetId,200)
	elseif index==6 then
		DonateFood(scene,selfId,targetId,500)
	elseif index==7 then
		BeginEvent(scene)
		AddText(scene,"只要付出星玉，我就能製作出特殊的仙食")
	
		AddNumText(scene,x105001_g_scriptId,"小型仙宴(100星玉)",-1,1)
		AddNumText(scene,x105001_g_scriptId,"中型仙宴(200星玉)",-1,2)
		AddNumText(scene,x105001_g_scriptId,"大型仙宴(500星玉)",-1,3)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
	end
end

function x105001_OnTriggerEvent(scene, selfId, targetId, stringInfo, index)
end