--蚩尤遗迹4桥上事件点触发
function m034_2()

local	xz=flag.GetValue(6001)	--主线旗标
local	xz1=flag.GetValue(6100)	--主线副旗标

if	xz==342	and	xz1==0	then

	--开始剧情
	func_start(2620,1650,0,1)	
	--修改旗标 
	flag.SetValue(6001,343)
	
	local	i
	

	--镜头1 
	-- 特写蚩尤像 
	camera.ResetLerp(0)			
	-- camera.ChangeCameraStatic(2439,496,1627,2457,502,1529)
	camera.ChangeCameraStatic(2620,485,1782,2620,491,1682)
	camera.ResetLerp(7000)			
	-- camera.ChangeCameraStatic(2439,496,1627,2455,546,1542)
	camera.ChangeCameraStatic(2620,543,1590,2620,593,1504)
	effect.FadeIn(1,1)
	-- global.Wait(6)
	global.WaitForCameraLerp()
	-- effect.FadeOut(1,1)
	global.Wait(1)
	-- camera.ResetLerp(0)			
	-- camera.ChangeCameraStatic(2911,704,1590,2870,732,1503)
	-- camera.ResetLerp(8000)		
	-- camera.ChangeCameraStatic(2310,704,1587,2344,714,1493)
	-- effect.FadeIn(1,1)
	-- global.Wait(7)
	-- effect.FadeOut(1,1)
	-- global.Wait(1)
	-- camera.ResetLerp(0)			
	-- camera.ChangeCameraStatic(2627,570,1760,2624,611,1669)
	camera.ResetLerp(8000)			
	camera.ChangeCameraStatic(2620,444,2326,2620,474,2231)
	-- effect.FadeIn(1,1)
	global.Wait(7)
	effect.FadeOut(1,1)
	global.Wait(1)
	
	
	
	
	
	--npc建立 
	--夏侯澜辉
	npc.Create(1,1,2603,1776)
	npc.SetAt(1,0,-1)
	--瑕	
	npc.Create(2,2,2625,1790)
	npc.SetAt(2,0,-1)
	--姜承 
	npc.Create(55,3,2613,1724)
	npc.SetAt(3,0,-1)
	--暮菖兰 
	npc.Create(4,4,2646,1791)	
	npc.SetAt(4,0,-1)
	--血手 
	npc.Create(9,9,2638,1733)
	npc.SetAt(9,0,-1)
	--毒影 
	npc.Create(10,10,2653,1756)	
	npc.SetAt(10,0,-1)
	--？？
	npc.Create(91,21,1,1)
	npc.SetVisible(21,0)
	--炎舞 
	npc.Create(46,22,2620,1620)	
	npc.SetAt(22,0,1)
	npc.SetVisible(22,0)
	
	--抬头
	npc.SetHeadRot(1,0,-10)
	npc.SetHeadRot(2,0,-10)
	npc.SetHeadRot(3,0,-10)
	npc.SetHeadRot(4,0,-10)
	npc.SetHeadRot(9,0,-10)
	npc.SetHeadRot(10,0,-10)
	
	fade(1)
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2254,725,2433,2288,712,2340)
	camera.ResetLerp(5000)
	camera.ChangeCameraStatic(2342,551,2214,2378,553,2121)
	global.WaitForCameraLerp()
	
	--镜头2 
	-- 面向众人 
	camera.ResetLerp(0)		
	-- camera.ChangeCameraStatic(2654,451,1675,2622,422,1764)
	camera.ChangeCameraStatic(2516,460,1624,2571,443,1706)
	camera.ResetLerp(10000)		
	-- camera.ChangeCameraStatic(2666,451,1677,2641,421,1769)
	camera.ChangeCameraStatic(2560,448,1678,2615,428,1760)
	--淡入
	effect.FadeIn(1,1)
	global.Wait(1)

	ui.Dialog(82628,523,2,1,0,0)--真是意想不到，穿过山腹看见的竟是这般壮观的景色。
	wt(0.7)
	ui.Dialog(82629,183,2,2,0,0)--那个大雕像就是蚩尤吗？长得好奇怪啊。

	-- 血手转向瑕 
	npc.SetHeadRot(9,0,0)
	npc.TurnToNpc(9,2,1)
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2545,458,1817,2626,426,1768)
	camera.ResetLerp(10000)
	camera.ChangeCameraStatic(2569,446,1802,2651,417,1752)
	-- 瑕转向血手 
	npc.SetHeadRotTo(2,9,0,50)
	-- 血手愤怒
	npc.SetAnim(9,210,2)
	global.Wait(1)

	ui.Dialog(82630,617,0,9,0,0)		--怒 --不得侮辱蚩尤大人！

	global.Wait(0.5)
	-- 瑕摆手 
	npc.SetAnim(2,206,2)
	global.Wait(1)

	ui.Dialog(82631,185,2,2,0,0)--对、对不起。
	wt(0.5)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2657,440,1695,2633,417,1790)

	--毒影
	npc.SetHeadRotTo(10,9,1,50)
	ui.Dialog(82632,562,0,10,0,0)		--他很厉害吗？比巫月神殿供的那个女娲还厉害？
	global.Wait(1)

	
	--镜头3 
	-- 特写蚩尤像
	camera.ResetLerp(0)			
	camera.ChangeCameraStatic(2644,448,1784,2630,495,1697)
	camera.ResetLerp(10000)			
	camera.ChangeCameraStatic(2644,448,1784,2643,495,1696)
	global.Wait(2)
	--夏侯思考  
	npc.SetHeadRot(1,0,10)
	npc.SetAnim(1,216)	
	--npc位置 
	npc.SetHeadRot(2,0,0)
	npc.SetHeadRot(9,0,-10)
	npc.TurnTo(9,0,-1)	
	npc.SetHeadRot(10,0,-10)
	
	ui.Dialog(82633,515,2,1,0,0)--据书上记载，创世之初，神族与兽族大战，蚩尤正是兽族首领。之后兽族战败，他打开神魔之井将兽族送往魔界，之后就再无记载。

	global.Wait(1)

	--镜头4 
	--面向众人  
	camera.ResetLerp(0)			
	camera.ChangeCameraStatic(2589,444,1677,2623,421,1768)
	camera.ResetLerp(8000)			
	camera.ChangeCameraStatic(2582,457,1661,2614,422,1749)
	global.Wait(0.5)
	--夏侯思考  
	-- npc.SetAnim(1,216)
	-- global.Wait(1)

	ui.Dialog(82634,522,2,1,0,0)		--蚩尤可说是魔族共主，如此重要人物，他的坟冢既无神族镇压，亦无魔族看守，实难想象。
	ui.Dialog(82635,515,2,1,0,0)--依我之见，此地恐怕并非真正的蚩尤冢所在，由地理来看，与他打开神魔之井处倒有几分关联。
	wt(1.2)
	ui.Dialog(82636,100,0,21,0,0)--呵呵呵呵呵——谁说此地无人看守？！

    global.PlaySound(4052,90)--剧变
    global.PlayMusic(-1,90)--静音

	-- 夏侯 瑕  毒影吃惊 
	npc.SetHeadRot(1,0,0)
	npc.SetAnim(1,222,2)
	npc.SetAnim(2,243,2)
	npc.SetAnim(10,208,2)
	global.Wait(1)
	-- 血手 姜承备战  
	npc.SetAnim(3,101)
	npc.SetAnim(9,101)
	global.Wait(2)

	global.PlayMusic(111,100,5000)--zd11
	
	
	--镜头5
	-- 特写炎舞
	camera.ResetLerp(0)			
	camera.ChangeCameraStatic(2630,462,1756,2630,449,1657)
	-- ui.Message(82637)--Pause
	camera.ResetLerp(4000)			
	camera.ChangeCameraStatic(2630,462,1829,2630,490,1731)
	--特效*******************************************************************
	-- 火柱
	-- 炎舞出现
	npc.CreateSE(22,4425)
	
	global.PlaySound(88,90)--登场特效声
	
	npc.SetSpeed(22,0.01)--位移减速
	npc.SetAnimSpeed(22,150)
	npc.FloatTo(22,2620,420,1620)
	npc.SetAnim(22,219)
	
	global.Wait(1)
	npc.SetAppear(22,1)		

	global.WaitForCameraLerp()
	
	npc.SetSpeed(22,0.05)
	npc.FloatTo(22,2620,395,1620)
	npc.SetAnim(22,220)
	camera.ResetLerp(2000)			
	camera.ChangeCameraStatic(2630,462,1829,2630,471,1729)
	
	-- global.WaitForNpcAnim(22,117)
	npc.SetSpeed(22,1)--恢复
	npc.SetAnimSpeed(22,100)
	ui.Dialog(82638,700,0,22,0,0)		--炎舞在此，谁敢造次？！
	
	
	
	
	--镜头6 
	-- 面向众人 
	camera.ResetLerp(0)		
	camera.ChangeCameraStatic(2569,455,1884,2610,442,1793)
	camera.ResetLerp(12000)			
	camera.ChangeCameraStatic(2543,465,1874,2585,457,1784)
	global.Wait(0.5)
	--瑕吃惊   
	npc.SetAnim(2,243,2)
	global.Wait(1)

	ui.Dialog(82639,185,2,2,0,0)--不会吧……我还以为乌鸦嘴的乌鸦嘴已经好了……
  
	-- 姜承走上前 
	npc.MoveTo(3,2625,1683,1)
	npc.TurnToNpc(3,22,1)
	-- 姜承备战  
	npc.SetAnim(3,101)
	global.Wait(1)
 
	ui.Dialog(82640,132,2,3,0,0)		--你便是此地的看守者？
	
	npc.SetAnim(22,115,2)
	ui.Dialog(82641,700,0,22,0,0)--哈哈哈，我乃火中之精，在此修炼。这里藏有蚩尤之力，擅闯者杀无赦！杀无赦！杀无赦——
	-- wt(1)


	-- 姜承格挡  
	npc.SetAnim(3,219)
	wt(0.5)
	npc.SetVisible(22,0)
	npc.SetAnim(22,200)
	--镜头7 
	camera.ResetLerp(0)		
	camera.ChangeCameraStatic(2628,439,1623,2621,422,1721)
	camera.ResetLerp(10000)			
	camera.ChangeCameraStatic(2628,440,1628,2622,414,1724)
	global.Wait(1)

	ui.Dialog(82642,136,2,3,0,0)		--都退到我身后！
	
	
	
	
	
	
	
	
	--清理npc 恢复转头 
	-- effect.FadeOut(1,1)
	global.Wait(1)	
	
	npc.SetVisible(22,1)
	for	i=1,10,1
		do 
		npc.SetHeadRot(i,0,0)
		end
	
	-- global.Wait(0.5)
	
	-- for i=1,30,1
		-- do
		-- npc.Destroy(i)	
		-- end	

	player.SetMainPlayer(p_id(3))	--姜承放队首
	player.LockPlace(p_id(3),1)		--锁定


    player.Control(1)
    global.SetWideScreen(0)
    
--	func_end(0,0,1)
	
	--boss战斗 
	-- 炎舞  
	battle.Begin(2021,504,1)--可选人
	
end
end