--飞行石·遭遇雷龙【旗标：130】

function m013_1()
if	flag.GetValue(6001)==130	then

func_start(0,0,0)
flag.SetValue(6001,131)
	
	map.Change(1,1084)
	player.SetPos(2656,2590)
	
--创建人物
	
	--夏侯
	npc.Create(1,1,2670,2580)
	npc.SetAt(1,0,1)
	
	--瑕
	npc.Create(2,2,2730,2605)
	npc.SetAt(2,1,0)
	
	--姜承
	npc.Create(3,3,2585,2585)--2640,2550
	npc.SetAt(3,-1,0)
	
	--暮菖兰
	npc.Create(4,4,2735,2580)
	npc.SetAt(4,1,1)
	
	--皇甫卓
	npc.Create(6,6,2575,2560)
	npc.SetAt(6,-1,0)
	
	
--剧情开始
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(3333,231,2154,3249,203,2199)--3352,198,2873,3257,184,2900
	-- 播放音乐 gs03
	global.PlayMusic(153,100,3000)			
	fade(1)------------------------------------------------
	
	camera.ResetLerp(5000)
	camera.ChangeCameraStatic(3485,232,3643,3404,215,3586)--3167,146,1813,3097,136,1884
	global.WaitForCameraLerp()
	
	fade(1)------------------------------------------------
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(3156,249,2434,3079,209,2483)
	camera.ResetLerp(8000)
	camera.ChangeCameraStatic(3149,153,2596,3053,128,2613)
	wt(1)
	
	--瑕
	npc.RunTo(2,2826,2620,1)
	npc.SetAnim(2,223,2)
	wt(0.7)
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2871,69,2677,2801,66,2606)
	
	npc.TurnToNpc(4,2)
	
	ui.Dialog(78699,191,0,2,0,0)--飞起来了～飞起来了。
	wt(0.8)
	ui.Dialog(78700,192,0,2,0,0)--哈哈，就管这个东西叫“云来石”好啦！
	
	--夏侯
	camera.ResetLerp(3000)
	camera.ChangeCameraStatic(2859,69,2688,2784,65,2623)
	npc.MoveTo(1,2780,2630)
	
	-- wt(0.7)
	-- npc.SetAnim(2,200)
	
	global.WaitForNpcPos(1,2780,2630)
	npc.SetAnimSpeed(1,50)
	npc.SetAnim(1,216)--思考
	ui.Dialog(78701,521,2,1,0,0)--书中载有之异事怪谈虽多，但未曾想如今竟真能遇到如此神妙之物，实乃——
	
	--瑕
	npc.RunTo(2,2827,2673,1)
	
	npc.SetAnimSpeed(1,100)--夏侯恢复
	npc.SetAnim(1,200)
	
	npc.TurnTo(2,1,0,1)
	-- npc.SetAnim(2,211,2)
	npc.SetAnim(2,222)
	ui.Dialog(78702,191,0,2,0,0)--哗～看得真远～上次飞的时候都没好好看个清楚。
	
	camera.ResetLerp(3000)
	camera.ChangeCameraStatic(2859,69,2688,2784,65,2623)
	npc.RunTo(2,2800,2656,1)
	npc.SetHeadRotTo(1,2,0,40)--夏侯转头
	npc.TurnToNpc(2,1,1)
	ui.Dialog(78703,192,0,2,0,0)--乌鸦嘴，你看那，商队已经变得那么小了？真好玩～
	
	--夏侯
	wt(0.5)
	ui.Dialog(78704,519,2,1,0,0)--呃……
	
	wt(0.7)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2724,95,2735,2753,71,2642)
	camera.ResetLerp(5000)
	camera.ChangeCameraStatic(2746,86,2712,2794,62,2627)
	--暮菖兰
	npc.MoveTo(4,2802,2617,1)
	npc.TurnToNpc(4,2,1)
	ui.Dialog(78705,709,0,4,0,0)--妹子啊，刚刚夏侯少爷正诗兴大发，这下可是被你打断了。
	
	--瑕
	npc.SetHeadRotTo(2,4,1,60)
	ui.Dialog(78706,707,2,2,0,0)--哈？嗨，反正他说的也都是那些酸溜溜的句子。
	
	--夏侯
	npc.SetHeadRot(1,0,0)
	npc.SetAnim(1,234,2)
	wt(1.5)
	ui.Dialog(78707,524,0,1,0,0)--唉～酸溜溜的……
	wt(1.5)
	
	npc.SetHeadRot(2,0,0)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2711,84,2426,2638,81,2494)
	camera.ResetLerp(10000)
	camera.ChangeCameraStatic(2740,84,2466,2649,85,2509)
	--皇甫卓
	npc.MoveTo(6,2500,2565,1)
	npc.SetHeadRot(6,0,20,1,30)
	ui.Dialog(78708,548,2,6,0,0)--没想到这大漠如此广阔，一眼望去竟然看不到头。

	--音乐渐停  
	global.MusicFadeIn(1500,100,0)	
	wt(1.5)
	
	--音效，雷声响起
	global.PlaySound(2010,100)
	global.Wait(2)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2647,75,2530,2563,66,2584)
	--姜承
	npc.TurnTo(3,1,-1,1)
	ui.Dialog(78709,130,0,3,0,0)--嗯？
	
	--皇甫卓
	npc.SetHeadRot(6,0,0)
	npc.MoveTo(6,2560,2570,1)
	ui.Dialog(78710,545,2,6,0,0)--怎么了？
	
	--音效，雷声响起
	global.PlaySound(2011,100)
	global.Wait(1)
	--姜承
	ui.Dialog(78711,128,0,3,0,0)--好像有雷声……\n那是？！大家小心！！
	
	-- 播放音乐 35
	global.PlayMusic(35,100,1000)		
	
	npc.SetAnim(3,101)
	
	npc.TurnTo(6,1,-1)
	
--震动、黑雾、黑屏
	-- camera.ResetLerp(5000)
	-- camera.ChangeCameraStatic(2716,72,2432,2652,69,2509)
	
	
	
	camera.ResetLerp(0)	
	camera.ChangeCameraStatic(2828,100,2795,2777,83,2711)
	
	npc.CreateFloat(290,11,2633,36,2313)
	npc.ScaleTo(11,150,1000)
	effect.MotionBlur(1)--运动模糊
	camera.Shake(5,2)
	
	wt(6)
	fade(0,0.5,3)
	effect.MotionBlur(0)--运动模糊关
	
	ui.Dialog(78712,523,0,1,0,0)--这是……！
	wt(0.5)
	ui.Dialog(78713,555,0,6,0,0)--大家小心！黑雾中有什么东西！
	wt(0.5)
	ui.Dialog(78714,528,0,1,0,0)--瑕姑娘！抓住我的手！
	ui.Dialog(78715,197,0,2,0,0)--难、难道又让咱们碰上了？！
	wt(0.8)
	ui.Dialog(78716,138,0,3,0,0)--看那里！——是龙！！
	
	--清理NPC
	npc.Destroy(1)
	npc.Destroy(2)
	npc.Destroy(3)
	npc.Destroy(4)
	npc.Destroy(6)
	
	--更换地图
	map.Change(1,1094)	--飞行石·雷雨天空
	
	--重建人物
	local	x=2650
	local	z=2485
	--夏侯
	npc.Create(1,1,x,z)
	npc.SetAt(1,0,-1)
	--瑕
	npc.Create(2,2,x+18,z-2)
	npc.SetAt(2,0,-1)
	--姜承
	npc.Create(3,3,x-10,z-35)
	npc.SetAt(3,0,-1)
	npc.SetAnim(3,101)
	npc_weapon(3,3)
	--暮菖兰
	npc.Create(4,4,x+30,z-20)
	npc.SetAt(4,0,-1)
	npc.SetAnim(4,101)
	npc_weapon(4,4)
	--皇甫卓
	npc.Create(6,6,x-30,z-10)
	npc.SetAt(6,0,-1)
	npc.SetAnim(6,101)
	npc_weapon(6,6)
	
	--雷龙
	npc.CreateFloat(42,11,2650,-120,2000)
	npc.SetAt(11,0,1)
	
--亮屏
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2645,78,2556,2641,59,2458)
	fade(1,0.7,1.5)
	
	camera.ResetLerp(5000)
	camera.ChangeCameraStatic(2645,86,2548,2645,109,2451)
	global.WaitForCameraLerp()
	wt(1)
	
	--暮菖兰
	ui.Dialog(78717,164,0,4,0,0)--那个模样……\n糟了！那好像就是之前把我们撞下去的云中巨兽！
	wt(0.8)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2704,58,2572,2672,83,2481)
	camera.ResetLerp(30000)
	camera.ChangeCameraStatic(2647,57,2587,2645,87,2491)
	--瑕
	npc.TurnToNpc(2,1,1)
	npc.SetAnim(2,205)
	ui.Dialog(78718,200,2,2,0,0)--我想起来了！上次掉下去后有人说过想再见见这个东西，现在真的碰到了，我们也要挂了！
	
	--夏侯
	npc.TurnToNpc(1,2,1)
	npc.SetAnim(1,217,2)
	ui.Dialog(78719,524,0,1,0,0)--我只是——
	npc.SetAnim(1,200)
	
	--瑕
	ui.Dialog(78720,193,2,2,0,0)--你真、真、真的是个乌鸦嘴啊！！！
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(2644,88,2388,2645,65,2485)
	--皇甫卓
	ui.Dialog(78721,556,2,6,0,0)--大敌当前，全都闭嘴！
	
	npc.TurnTo(2,0,-1,1)
	npc.TurnTo(1,0,-1,1)
	
	--姜承
	ui.Dialog(78722,138,0,3,0,0)--必须阻止那条龙，否则再掉下去，可就吉凶难测了！！
	wt(0.5)
	
	npc.SetAnim(1,101)
	npc_weapon(1,1)
	npc.SetAnim(2,101)
	npc_weapon(2,2)
	
	camera.ResetLerp(1500)
	camera.ChangeCameraStatic(2643,108,2303,2644,85,2400)
	wt(1.5)
	
--卸除武器
	npc_weapon(1,0)
	npc_weapon(2,0)
	npc_weapon(3,0)
	npc_weapon(4,0)
	npc_weapon(6,0)
	
	
--战斗后衔接准备【防止战斗结束后一帧穿帮画面】

--龙
	npc.SetPos3D(11,2650,-140,2200)
--众人受伤
	npc.SetAnim(1,125)
	npc.SetAnim(2,125)
	npc.SetAnim(3,125)
	npc.SetAnim(4,125)
	npc.SetAnim(6,125)
	
--镜头
	camera.ResetLerp(0)
	-- camera.ChangeCameraStatic(2650,52,2370,2650,57,2470)	
	camera.ChangeCameraStatic(2649,55,2359,2653,55,2458)
	
	
	
-- func_end(0,0,1)
player.Control(1)
global.SetWideScreen(0)

	--恢复所有人的ＨＰ、ＭＰ
	player.ChangeHP(1,1,1,100)
	player.ChangeMP(1,1,1,100)	
	
	player.LockPlace(p_id(1),0)
	player.LockPlace(p_id(2),0)
	player.LockPlace(p_id(3),0)
	player.LockPlace(p_id(4),0)
	player.LockPlace(p_id(6),0)
	
battle.Begin(2033,514,1)---------------------雷龙战斗

end

end