--主线剧情<6-4>
--剧情起始点：雪石路雪女小院内
--调用条件：雪女战后调用
--旗标变更：结束时变更为(71)
--脚本id：7104
function m006_4()
	func_start(845,8142,0)
	global.PlayMusic(162,100,1000)
	flag.SetValue(6001,71)
	--还原dlc
	--flag.SetValue(45000,2)
	--###############
	--#本段用到的npc#
	--###############
	local nXiaHou = 1
	local nXia = 2
	local nJiang = 3
	local nLan = 4
	local nHuang = 5
	local nXueNv = 6 --npcid=39
	local nCunMin1 = 7 --冻住的村民
	local nCunMin2 = 8
	local nCunMin3 = 9
	local nGang = 10
	local nCunMin4 = 11
	local nFang = 12 --npcid=317
	local nYuan = 13 --npcid=318
	local nOdz1 = 14 --npcid=306
	local nOdz2 = 15
	local nOdz3 = 16
	local nOdz4 = 17
	local nStone = 18 --灵石
	
	--###@@@切镜头，战败的雪女特写，下至上
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(735,890-20,8133,667,883-20,8059)
	npc.Create(141,nCunMin1,875,8028) --坐地
	npc.SetAt(nCunMin1,-1,0)
	npc.Create(139,nCunMin2,797,8184) --扁担
	npc.SetAt(nCunMin2,-1,-2)
	npc.Create(138,nCunMin3,669,8134) --宽体
	npc.SetAt(nCunMin3,1,0)
	npc.Create(140,nCunMin4,781,8013) --背弓
	npc.SetAt(nCunMin4,1,4)
	npc.Create(39,nXueNv,704,8109)
	npc.SetAt(nXueNv,6,-1)
	npc.SetAnim(nXueNv,125)
	npc.Create(1,nXiaHou,811,8106)
	npc.SetAtPos(nXiaHou,704,8109)
	npc.Create(6,nHuang,782,8121)
	npc.SetAtPos(nHuang,704,8109)
	npc.Create(3,nJiang,802,8131)
	npc.SetAtPos(nJiang,704,8109)
	npc.Create(2,nXia,798,8095)
	npc.SetAtPos(nXia,704,8109)
	npc.Create(4,nLan,776,8082)
	npc.SetAtPos(nLan,704,8109)
	npc.SetAnim(nHuang,101)
	npc_weapon(nHuang,6)
	effect.FadeIn(1,0.7)
	global.Wait(0.6)
	camera.ResetLerp(6000)
	camera.ChangeCameraStatic(735,890,8133,667,883,8059)
	global.WaitForCameraLerp()
	wt(1)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(672,894,8133,764,878,8099)
	camera.ResetLerp(10000)
	camera.ChangeCameraStatic(680,892,8130,773,876,8096)
	global.Wait(0.5)
	npc.SetAnim(nHuang,105)
	npc.AddAnimChain(nHuang,105,101)
	wt(0.3)
	global.PlaySound(519,100)
	wt(1.5)
	ui.Dialog(77001,552,2,nHuang,0,0)--妖孽，你作恶多端，受死吧！
	global.Wait(0.6)
	ui.Dialog(77002,688,0,nXueNv,0,0)--我……我不想死。
	global.Wait(0.3)
	--==========

	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(753,893,8121,656,884,8095)
	camera.ResetLerp(15000)
	camera.ChangeCameraStatic(739,891,8117,643,883,8091)
	global.Wait(1)
	ui.Dialog(77003,688,0,nXueNv,0,0)--公子……琴瑟调和，缱绻情深……我二人相处虽是幻境一场，可我对公子当真是痴心一片……
	global.Wait(0.3)
	npc.SetHeadRot(nXia,45,0,0,80)
	npc.SetHeadRot(nJiang,-45,0,0,80)
	global.Wait(0.3)
	ui.Dialog(77004,526,2,nXiaHou,0,0)--这……
	global.Wait(0.3)
	ui.Dialog(77005,552,2,nHuang,0,0)--还在花言巧语，蛊惑人心！
	global.Wait(0.3)
	ui.Dialog(77006,528,2,nXiaHou,0,0)--等等，皇甫兄！
	npc.SetPos(nXiaHou,784,8103)
	npc.SetAnim(nHuang,200)
	npc.RemoveRefItem(nHuang,49)
	npc.SetSpeed(nXiaHou,1.3)
	npc.MoveTo(nXiaHou,748,8111)
	wt(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(876,906,8041,796,883,8096)
	camera.ResetLerp(30000)
	camera.ChangeCameraStatic(847,898,8061,767,875,8116)
	npc.SetHeadRot(nJiang,-15,0,0,50)
	npc.TurnToPos(nLan,748,8111)
	npc.SetHeadRot(nXia,10,0,0,50)
	global.WaitForNpcPos(nXiaHou,748,8111)
	npc.SetSpeed(nXiaHou,1)
	npc.SetHeadRot(nHuang,-20,0,0,70)
	npc.TurnToNpc(nXiaHou,nHuang,1)
	global.Wait(0.5)
	ui.Dialog(77007,544,0,nHuang,0,0)--你要阻我？
	npc.SetAnim(nHuang,206,2)
	global.Wait(0.5)
	ui.Dialog(77008,556,0,nHuang,0,0)--她要是安分守己也罢，但既然行凶害人，就当自承其罪。
	global.Wait(0.3)
	ui.Dialog(77009,130,0,nJiang,0,0)--夏侯少主……
	global.Wait(0.3)
	--暮菖兰摆一下头发
	npc.SetAnim(nLan,217,2)
	global.Wait(0.5)
	ui.Dialog(77010,179,0,nLan,0,0)--大少爷，可不要中了人家的美人计啊。
	--夏侯转向暮菖兰
	npc.TurnToNpc(nXiaHou,nLan,1)
	npc.SetAnim(nXiaHou,225,2)
	wt(1.5)
	ui.Dialog(77011,526,2,nXiaHou,0,0)--暮姑娘，不是的，我……
	global.Wait(0.5)
	--夏侯看向瑕
	npc.TurnToNpc(nXiaHou,nXia,1)
	global.Wait(1)
	ui.Dialog(77012,185,0,nXia,0,0)--？
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(733,892,8148,794,876,8070)
	--瑕叉腰
	npc.SetHeadRot(nXia,0,-15,0,100)
	npc.TurnToNpc(nXia,nXiaHou,1)
	npc.SetAnim(nXia,245)
	global.Wait(0.5)
	ui.Dialog(77013,199,2,nXia,0,0)--你、你看我干嘛？
	global.Wait(0.3)
	--夏侯低头
	npc.SetHeadRot(nXiaHou,0,20,1,40)
	ui.Dialog(77014,534,0,nXiaHou,0,0)--呃，没什么……
	global.Wait(0.3)
	npc.SetHeadRot(nXiaHou,0,0,1,50)
	ui.Dialog(77015,522,0,nXiaHou,0,0)--在下失礼了。
	global.Wait(0.3)
	--夏侯转向雪女
	npc.SetHeadRot(nXiaHou,0,0,0,100)
	npc.TurnToNpc(nXiaHou,nXueNv)
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(777,897,8143,700,874,8083)
	camera.ResetLerp(20000)
	camera.ChangeCameraStatic(770,895,8138,691,877,8078)
	--暂时把皇甫卓的武器拿下来
	-- npc_weapon(nHuang,0)
	--还原瑕的状态
	npc.SetAnim(nXia,200)
	npc.SetHeadRot(nXia,0,0,0,500)
	global.Wait(0.5)
	npc.SetAnim(nXiaHou,217,2)
	wt(0.5)
	ui.Dialog(77016,517,2,nXiaHou,0,0)--失踪村民……当真是你所害？
	wt(0.1)
	ui.Dialog(77017,688,0,nXueNv,0,0)--不！我并未夺取他们性命，只是将他们冰冻起来……
	global.Wait(0.1)
	ui.Dialog(77018,552,2,nHuang,0,0)--一派胡言！活生生被冰封，言行不能，这同死人何异！
	global.Wait(0.5)
	ui.Dialog(77019,688,0,nXueNv,0,0)--公子，我知错了……我只是想……只是想有几个人来陪陪我……
	global.Wait(0.6)
	ui.Dialog(77020,516,2,nXiaHou,0,0)--……
	global.Wait(0.3)
	--夏侯转回身
	npc.TurnToPos(nXiaHou,778,8109)
	--调整身后npc位置
	npc.SetPos(nHuang,785,8114)
	npc.SetAtPos(nHuang,748,8111)
	npc.SetHeadRot(nHuang,0,0,0,1000)
	npc.SetAnim(nHuang,101)
	npc.SetPos(nJiang,789,8140)
	npc.SetAtPos(nJiang,748,8111)
	npc.SetHeadRot(nJiang,0,0,0,1000)
	--恢复皇甫卓的武器
	npc_weapon(nHuang,6)
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(710,895,8065,791,876,8120)
	global.Wait(0.5)
	--夏侯左右看看几人
	npc.SetHeadRot(nXiaHou,35,0,1,40)
	global.Wait(0.4)
	npc.SetHeadRot(nXiaHou,-35,0,1,60)
	global.Wait(0.3)
	ui.Dialog(77021,520,2,nXiaHou,0,0)--几位……可否放过她？
	global.Wait(0.5)
	ui.Dialog(77022,168,0,nLan,0,0)--……
	global.Wait(0.3)
	npc.SetHeadRot(nXiaHou,0,0,0,60)
	ui.Dialog(77023,552,0,nHuang,0,0)--夏侯瑾轩！你——
	global.Wait(0.3)
	--夏侯随皇甫移动转头
	npc_weapon(nHuang,0)
	npc.SetAnim(nHuang,206,2)
	wt(0.5)
	ui.Dialog(77024,552,0,nHuang,0,0)--害人妖物怎能姑息！！让开！
	global.Wait(0.3)
	npc.SetAnim(nJiang,217,2)
	global.Wait(0.5)
	ui.Dialog(77025,127,0,nJiang,0,0)--夏侯少主，要是放过这妖物，难保将来她不会再为祸害人。
	npc.TurnToNpc(nXiaHou,nJiang,1)
	-- global.Wait(0.3)
	--夏侯对话动作
	npc.SetAnim(nXiaHou,217,2)
	global.Wait(0.5)
	ui.Dialog(77026,534,2,nXiaHou,0,0)--但……她已经决定悔过——
	--冻结音效
	--~~~~~~~~~~~~
	effect.FadeOutWhite(1,1)
	global.Wait(1)
	--众人身上散发蓝光
	npc.CreateSE(nXiaHou,4279)
	npc.CreateSE(nXia,4279)
	npc.CreateSE(nHuang,4279)
	npc.CreateSE(nJiang,4279)
	--暮菖兰躲到雪女后面
	npc.SetPos(nLan,657,8134)
	npc.SetAtPos(nLan,655,8125)
	npc.SetHeadRot(nLan,-45,0,0,500)
	npc.SetAnimSpeed(nXiaHou,50)
	npc.SetAnimSpeed(nXia,50)
	npc.SetAnimSpeed(nJiang,50)
	npc.SetAnimSpeed(nHuang,50)
	npc.SetAnim(nXiaHou,200)
	npc.SetAnim(nXia,200)
	npc.SetAnim(nJiang,200)
	npc.SetAnim(nHuang,200)
	global.PlaySound(1317,100)
	global.Wait(2)
	ui.Dialog(77027,130,0,nJiang,0,0)--——！
	--调整雪女的位置
	npc.SetPos(nXueNv,664,8099)
	wt(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(730,873,8081,802,833,8137)
	effect.FadeInWhite(1,0.7)
	global.Wait(1)
	camera.ResetLerp(8000)
	camera.ChangeCameraStatic(736,891,8054,790,876,8137)
	wt(2)
	ui.Dialog(77028,523,0,nXiaHou,0,0)--呃？！这是？！
	global.Wait(0.3)
	ui.Dialog(77029,185,0,nXia,0,0)--动、动不了了！
	global.Wait(0.3)
	ui.Dialog(77030,555,0,nHuang,0,0)--可恶，这女妖！
	npc.SetAnim(nXueNv,200)
	npc.SetPos(nXueNv,661,8102)
	global.Wait(0.3)
	global.WaitForCameraLerp()
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(658,910,8151,743,880,8108)
	--隐藏冰雕挡镜头
	npc.SetVisible(9,0)
	npc.SetSpeed(nXueNv,0.7)
	npc.MoveTo(nXueNv,710,8108)
	global.WaitForNpcPos(nXueNv,710,8108)
	npc.SetSpeed(nXueNv,1)
	global.Wait(0.5)
	ui.Dialog(77031,689,0,nXueNv,0,0)--呵呵……
	global.Wait(0.3)
	ui.Dialog(77032,689,0,nXueNv,0,0)--之前我偶得一物，修为得以快速增长，现在已可吸取人类魂魄增补精元，这是上天的眷顾，怎么可能轻易罢手！
	global.Wait(0.3)
	ui.Dialog(77033,689,0,nXueNv,0,0)--人类觉得自己聪明，可实际上却愚蠢的要命……
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(738,903,8095,649,880,8133)
	camera.ResetLerp(7000)
	camera.ChangeCameraStatic(754,917,8087,669,879,8123)
	--显示出冰雕
	npc.SetVisible(9,1)
	global.Wait(0.5)
	ui.Dialog(77034,687,0,nXueNv,0,0)--嗯？
	npc.SetSpeed(nLan,0.25)
	npc.SetHeadRot(nLan,-25,0,0,10)
	npc.SetAnimSpeed(nLan,65)
	npc.MoveTo(nLan,656,8113)
	global.Wait(0.3)
	--雪女左右寻找
	npc.SetHeadRot(nXueNv,20,0,1,40)
	global.Wait(0.3)
	npc.SetHeadRot(nXueNv,-20,0,1,60)
	global.Wait(0.3)
	global.WaitForNpcPos(nLan,656,8113)
	--###@@@切镜头
	npc.SetHeadRot(nLan,0,0,0,100)
	npc.TurnToNpc(nLan,nXueNv)
	global.Wait(0.3)
	ui.Dialog(77035,687,0,nXueNv,0,0)	--怎么少了一个……
	npc.SetSpeed(nLan,1)
	global.Wait(0.3)
	--暮菖兰冲上去砍
	npc.SetAnimSpeed(nLan,100)
	npc.RunTo(nLan,690,8110)
	--雪女转身
	npc.SetHeadRot(nXueNv,0,0,0,100)
	npc.TurnToPos(nXueNv,676,8118)
	global.Wait(0.2)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(615,922,8046,680,887,8113)
	-- global.Wait(0.2)
	global.WaitForNpcPos(nLan,688,8110)
	-- global.Wait(0.1)
	--暮菖兰攻击
	npc_weapon(nLan,4)
	npc.SetAnim(nLan,33)
	global.Wait(0.6)
	--雪女被攻击
	npc.SetAnim(nXueNv,11)
	npc.CreateSE(nXueNv,3941)
	global.PlaySound(536,70)
	global.Wait(1)
	--==========	
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(770,907,8171,683,882,8129)
	--雪女飘到别处
	npc.SetSpeed(nXueNv,1.5)
	npc.MoveBackTo(nXueNv,713,8160)
	npc.TurnToPos(nLan,713,8160,1)
	--暮菖兰备战
	npc.SetHeadRot(nLan,-20,0,0,100)
	npc.SetAnim(nLan,101)
	global.WaitForNpcPos(nXueNv,713,8160)
	npc.TurnToNpc(nXueNv,nLan,1)
	npc.SetSpeed(nXueNv,1)
	global.Wait(0.3)
	ui.Dialog(77036,687,0,nXueNv,0,0)--你——竟敢伤我——
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(701,897,8078,689,880,8176)
	camera.ResetLerp(2000)
	camera.ChangeCameraStatic(692,881,8067,703,912,8162)
	npc.SetSpeed(nXueNv,0.1)
	npc.CreateSE(nXueNv,4543)
	npc.FloatTo(nXueNv,713,885,8160)
	wt(0.3)
	--暮菖兰防御
	npc.SetAnimSpeed(nLan,25)
	npc.SetAnim(nLan,136)
	wt(0.5)
	npc.SetAnimSpeed(nLan,100)
	npc.SetAnim(nLan,136)
	npc.SetHeadRot(nXueNv,0,20,0,40)
	ui.Dialog(77037,170,2,nLan,0,0)--……
	global.Wait(0.5)
	ui.Dialog(77038,170,2,nLan,0,0)--（难道我竟然要……\n不行，我还有非做不可的事情，绝不能死在这里。实在不行，只能先丢下他们逃走……）
	global.Wait(0.5)
	global.WaitForCameraLerp()
	wt(0.3)
	ui.Dialog(77039,687,0,nXueNv,0,0)--去死吧，人类！
	--加载冰漩涡特效
	
	npc.CreateSE(nXueNv,4541)
	-- wt(2)
	npc.SetAnim(nXueNv,15)
	global.PlaySound(1317,120)
	wt(1.3)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(883,941,8031,804,987,7991)
	wt(0.4)
	global.CreateSE(4335,651,850+100,7877)
	global.PlaySound(1421,90)
	wt(1.1)
	
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(724,881,8062,688,907,8151)
	npc.CreateSE(nXueNv,4336)
	wt(0.3)
	npc.CreateSE(nXueNv,3941)
	npc.SetAnim(nXueNv,11)
	global.PlaySound(535,80)
	npc.StopSE(nXueNv)
	global.Wait(0.5)
	effect.FadeOutWhite(1,1)
	global.Wait(0.5)
	ui.Dialog(77040,687,0,nXueNv,0,0)--啊！
	global.Wait(0.5)

	npc.SetPos3D(nXueNv,701,864,8160)
	npc.SetAnim(nXueNv,224)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(681,898,8125,701,840,8204)
	--隐藏冰雕
	npc.SetVisible(9,0)
	effect.FadeInWhite(1,1)
	global.Wait(2)
	global.MusicFadeOut(3000,100,0)	
	global.StopLastLoopSound()
	ui.Dialog(77041,688,0,nXueNv,0,0)--……怎么……会……
	wt(0.5)
	
	npc.CreateSE(nXueNv,2416)
	wt(0.5)
	npc.SetAppear(nXueNv,0)
	global.Wait(1)

	--清武器
	npc_weapon(nLan,0)	
	--创建罡斩
	npc.CreateFloat(5,nGang,115,1262,7740)
	npc.SetAt(nGang,1,1)
	--罡斩处下雪
	--醒醒吧，根本没这指令。。。所以那里下不了雪
	-- player.SetPos3D(800,1134,7173) 
	-- map.Weather(4,200,60)
	wt(1)
	--==========

	
	--###@@@切镜头，罡斩，脚下
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(80,1305,7745,161,1251,7769)
	--显示冰雕
	
	npc.SetVisible(9,1)
	npc.StopSE(nXiaHou)
	npc.StopSE(nXia)
	npc.StopSE(nJiang)
	npc.StopSE(nHuang)
	npc.SetAnimSpeed(nLan,25)
	npc.SetAnim(nLan,200)
	npc_weapon(nLan,0)
	global.Wait(0.5)
	npc.SetAnimSpeed(nLan,100)
	npc.SetAnim(nLan,200)
	ui.Dialog(77042,115,2,nGang,0,0)--哎呀哎呀，看来我来的还真是时候。
	npc.TurnToPos(nGang,115-50,7740-20,1)
	wt(0.3)
	
	npc.SetSpeed(nGang,0.4)
	npc.FloatTo(nGang,115-50,1262,7740-20)
	npc.SetAnim(nGang,201)
	wt(1.5)
	effect.FadeOut(1,0.7)
	global.Wait(1.5)
	npc.StopSE(nXiaHou)
	npc.StopSE(nXia)
	npc.StopSE(nJiang)
	npc.StopSE(nHuang)
	--删除npc
	npc.Destroy(nJiang)
	npc.Destroy(nHuang)
	npc.Destroy(nXia)
	npc.Destroy(nLan)
	npc.Destroy(nXiaHou)
	npc.Destroy(nXueNv)
	npc.Destroy(nGang)
	wt(2)
	--==========
	
	--###@@@切回画面
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(727,925,7956,793,887,8020)
	camera.ResetLerp(6000)
	camera.ChangeCameraStatic(763,928,7921,803,891,8005)
	--院子下雪
	-- player.SetPos(808,8105)
	-- map.Weather(4,200,60)
	effect.FadeIn(1,0.7)
	global.PlayMusic(14,100,2000)
	--重新设置众人站位
	npc.Create(3,nJiang,856,8026)
	npc.SetAtPos(nJiang,901,8013)
	npc.Create(6,nHuang,833,8082)
	npc.SetAtPos(nHuang,901,8013)
	npc.Create(2,nXia,777,8084)
	npc.SetAtPos(nXia,779,8001)
	npc.Create(4,nLan,800,8106)
	npc.SetAtPos(nLan,779,8001)
	npc.CreateFloat(1,nXiaHou,854,863,8067)
	npc.SetAtPos(nXiaHou,901,8013)
	wt(0.2)
	npc.SetAnim(nJiang,203,2)
	wt(2.5)
	npc.MoveTo(nJiang,798,8019)
	global.WaitForNpcPos(nJiang,798,8019)
	global.Wait(1)
	npc.MoveTo(nJiang,821,8049)
	npc.TurnToPos(nHuang,821,8049)
	wt(0.1)
	npc.TurnToPos(nLan,821,8049)
	wt(0.1)
	npc.TurnToPos(nXiaHou,821,8049)
	wt(0.1)
	npc.TurnToPos(nXia,821,8049)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(820,904,8111,848,880,8018)
	camera.ResetLerp(20000)
	camera.ChangeCameraStatic(816,907,8122,844,879,8030)
	global.WaitForNpcPos(nJiang,821,8049)
	--姜承转身
	npc.TurnToNpc(nJiang,nHuang,1)
	global.Wait(0.3)
	--姜承点头
	npc.SetHeadRot(nJiang,0,20,1,40)
	global.Wait(0.2)
	npc.SetHeadRot(nJiang,0,0,1,50)
	ui.Dialog(77043,126,0,nJiang,0,0)--确实是失踪的村民。
	npc.SetHeadRotTo(nHuang,nJiang,0,80)
	npc.SetHeadRot(nXia,0,-10,0,100)
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(828,919,7985,822,880,8077)
	camera.ResetLerp(15000)
	camera.ChangeCameraStatic(827,914,7996,821,876,8089)
	npc.MoveTo(nXia,801,8070,1)
	npc.TurnToNpc(nXia,nJiang,1)
	npc.TurnToNpc(nJiang,nXia)
	--瑕对话动作
	npc.SetAnim(nXia,217,2)
	global.Wait(0.2)
	npc.TurnToNpc(nXiaHou,nXia)
	wt(0.3)
	ui.Dialog(77044,183,2,nXia,0,0)--刚、刚才是怎么回事？
	global.Wait(0.5)
	ui.Dialog(77045,162,2,nLan,0,0)--……
	global.Wait(0.5)
	--皇甫张望
	npc.MoveTo(nHuang,844,8143)
	global.Wait(0.2)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(822,898,8056,847,895,8153)
	camera.ResetLerp(10000)
	camera.ChangeCameraStatic(828,898,8078,853,895,8175)
	--夏侯朝向皇甫
	npc.TurnToPos(nXiaHou,844,8143)
	--还原姜承头部
	npc.SetHeadRot(nJiang,0,0,0,100)
	--调整姜承朝向
	npc.TurnToPos(nJiang,844,8143)
	global.Wait(0.2)
	npc.SetHeadRot(nHuang,30,-15,1,40)
	global.Wait(0.3)
	npc.SetHeadRot(nHuang,-30,-15,1,60)
	global.WaitForNpcPos(nHuang,844,8143)
	global.Wait(0.4)
	npc.SetHeadRot(nHuang,0,-15,0,40)
	npc.TurnToPos(nHuang,838,8117,1)
	global.Wait(0.4)
	npc.SetHeadRot(nHuang,30,-15,1,40)
	global.Wait(0.4)
	npc.SetHeadRot(nHuang,-30,-15,1,60)
	global.Wait(0.4)
	npc.SetHeadRot(nHuang,0,-15,1,40)
	ui.Dialog(77046,542,0,nHuang,0,0)--请问是哪位前辈出手相助？还请现身相见！
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(826,917,8086,751,946,8026)
	camera.ResetLerp(6000)
	camera.ChangeCameraStatic(826,917,8086,870,946,8001)
	npc.SetHeadRot(nHuang,0,0,0,100)
	global.WaitForCameraLerp()
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(831,898,8043,762,874,8111)
	camera.ResetLerp(8000)
	camera.ChangeCameraStatic(825,896,8050,755,872,8118)
	npc.SetVisible(nJiang,0)
	--暮菖兰走近瑕
	npc.SetHeadRot(nLan,0,-10,0,50)
	npc.MoveTo(nLan,800,8085)
	--瑕瑕左右看
	npc.SetHeadRot(nXia,35,-10,1,80)
	global.Wait(0.6)
	npc.SetHeadRot(nXia,-35,-10,1,80)
	global.Wait(0.6)
	ui.Dialog(77047,185,0,nXia,0,0)--没人？
	wt(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(859,908,8123,809,881,8041)
	camera.ResetLerp(15000)
	camera.ChangeCameraStatic(873,921,8137,822,877,8063)
	npc.SetVisible(nJiang,1)
	--皇甫走回来说，同时众人转向他
	npc.MoveTo(nHuang,835,8090)
	npc.SetHeadRot(nXiaHou,0,0,0,20)
	npc.TurnToPos(nXiaHou,835,8090)
	global.WaitForNpcPos(nHuang,835,8090)
	ui.Dialog(77048,551,0,nHuang,0,0)--刚才的……应是剑气。
	global.Wait(0.3)
	npc.TurnToNpc(nLan,nHuang)
	npc.SetHeadRot(nLan,0,-10,0,100)
	npc.TurnToNpc(nXia,nHuang)
	npc.SetHeadRot(nXia,0,-15,0,100)
	--姜承近前对话
	npc.MoveTo(nJiang,824,8058,1)
	global.Wait(0.3)
	--姜承点头
	npc.SetHeadRot(nJiang,0,20,1,40)
	global.Wait(0.2)
	npc.SetHeadRot(nJiang,0,0,1,50)
	global.Wait(0.3)
	ui.Dialog(77049,132,0,nJiang,0,0)--嗯……此次品剑大会，师父有邀请蜀山弟子出席，蜀山派的御剑之术天下闻名，刚才或许是他们碰巧路经此地，于是出手相助。
	global.Wait(0.3)
	--姜承对话动作
	npc.SetAnim(nJiang,217,2)
	global.Wait(0.5)
	ui.Dialog(77050,126,0,nJiang,0,0)--皇甫少主，我们还是先将村民带回山庄，之后再行查访。
	global.Wait(0.3)
	--皇甫点头
	npc.SetHeadRot(nHuang,0,20,1,40)
	global.Wait(0.2)
	npc.SetHeadRot(nHuang,0,0,1,50)
	global.Wait(0.1)
	ui.Dialog(77051,542,0,nHuang,0,0)--嗯。
	global.Wait(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(886,916,8070,798,869,8071)
	camera.ResetLerp(20000)
	camera.ChangeCameraStatic(901,925,8070,815,873,8070)
	global.Wait(0.3)
	npc.TurnToNpc(nLan,nXiaHou,1)
	npc.SetAnim(nLan,212,2)
	global.Wait(0.5)
	npc.SetHeadRot(nXia,35,-15,0,50)
	ui.Dialog(77052,708,0,nLan,0,0)--喂，夏侯少爷～
	npc.TurnToNpc(nXiaHou,nLan)
	npc.TurnToNpc(nJiang,nXiaHou)
	npc.SetHeadRotTo(nHuang,nXiaHou,0,70)
	global.Wait(0.5)
	ui.Dialog(77053,711,0,nLan,0,0)--长得美的未必就是好人，以后可不能随便相信女人了哦，呵呵～
	npc.SetAnim(nXiaHou,225,2)
	global.Wait(2.3)
	ui.Dialog(77054,520,0,nXiaHou,0,0)--……
	wt(0.3)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(829,896,8018,847,889,8117)
	camera.ResetLerp(15000)
	camera.ChangeCameraStatic(830,896,8024,848,888,8122)
	npc.SetVisible(nXia,0)
	npc.SetVisible(nLan,0)
	npc.SetHeadRot(nXia,0,0)
	npc.SetHeadRot(nLan,0,0)
	--皇甫和姜承转向夏侯
	npc.TurnToNpc(nHuang,nXiaHou)
	npc.SetHeadRot(nHuang,0,0,0,100)
	npc.SetHeadRot(nJiang,0,0,0,100)
	global.Wait(0.6)
	npc.TurnToNpc(nXiaHou,nHuang)
	ui.Dialog(77055,550,2,nHuang,0,0)--所谓除恶务尽。那女妖伤害无辜，罪不可赦，但你刚才还被她花言巧语所蒙骗——哼！
	wt(0.3)
	--夏侯低头
	npc.SetHeadRot(nXiaHou,0,20,1,40)
	global.Wait(1)
	ui.Dialog(77056,520,0,nXiaHou,0,0)--……皇甫兄，我错了。
	global.Wait(0.3)
	--皇甫上前一步，把笔还给夏侯
	-- npc.MoveTo(nHuang,842,8080,1)
	global.Wait(0.3)
	ui.Dialog(77057,542,2,nHuang,0,0)--你最好能记住教训。
	global.Wait(0.3)
	--脚步声
	--~~~~~~~~~~~~~~~~
	global.Wait(2)
	--众人转头
	npc.SetHeadRot(nXiaHou,0,0,0,100)
	npc.TurnToPos(nXiaHou,954,8153)
	npc.TurnToPos(nXia,954,8153)
	npc.TurnToPos(nLan,954,8153)
	npc.TurnToPos(nJiang,954,8153)
	npc.TurnToPos(nHuang,954,8153)
	global.Wait(0.5)
	--创建折剑弟子6人
	npc.Create(317,nFang,1124,8146) --从背面看，左侧
	npc.SetAt(nFang,-1,0)
	npc.Create(318,nYuan,1115,8122) --从背面看，右侧
	npc.SetAt(nYuan,-1,0)
	npc.Create(302,nOdz1,1160,8146) --从背面看，1
	npc.SetAt(nOdz1,-1,0)
	npc.Create(312,nOdz2,1143,8132) --从背面看，2
	npc.SetAt(nOdz2,-1,0)
	npc.Create(662,nOdz3,1165,8122) --从背面看，3
	npc.SetAt(nOdz3,-1,0)
	npc.Create(306,nOdz4,1152,8111) --从背面看，4
	npc.SetAt(nOdz4,-1,0)
	npc.SetSpeed(nFang,1.5)
	npc.SetSpeed(nYuan,1.5)
	npc.SetSpeed(nOdz1,1.5)
	npc.SetSpeed(nOdz2,1.5)
	npc.SetSpeed(nOdz3,1.5)
	npc.SetSpeed(nOdz4,1.5)
	npc.SetPatrolType(nYuan,10)
	npc.AddPatrolPoint(nYuan,1115,8122,0)
	npc.AddPatrolPoint(nYuan,975,8134,0)
	npc.AddPatrolPoint(nYuan,864,8117-5,0)
	npc.SetPatrolType(nFang,10)
	npc.AddPatrolPoint(nFang,1124,8146,0)
	npc.AddPatrolPoint(nFang,976,8159,0)
	npc.AddPatrolPoint(nFang,846-5,8117,0)
	npc.SetPatrolType(nOdz2,10)
	npc.AddPatrolPoint(nOdz2,1143,8132,0)
	npc.AddPatrolPoint(nOdz2,978,8152,0)
	npc.AddPatrolPoint(nOdz2,859,8131,0)
	npc.SetPatrolType(nOdz4,10)
	npc.AddPatrolPoint(nOdz4,1152,8111,0)
	npc.AddPatrolPoint(nOdz4,979,8131,0)
	npc.AddPatrolPoint(nOdz4,876,8134,0)
	wt(0.2)
	npc.SetPatrolType(nOdz3,10)
	npc.AddPatrolPoint(nOdz3,1165,8122,0)
	npc.AddPatrolPoint(nOdz3,973,8140,0)
	npc.AddPatrolPoint(nOdz3,837,8148-5,0)
	wt(0.3)
	npc.SetPatrolType(nOdz1,10)
	npc.AddPatrolPoint(nOdz1,1160,8146,0)
	npc.AddPatrolPoint(nOdz1,974,8168,0)
	npc.AddPatrolPoint(nOdz1,857,8150,0)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(944,962,8278,1013,924,8217)
	camera.ResetLerp(4500)
	camera.ChangeCameraStatic(944,962,8278,968,912,8194)
	--调整位置
	npc.SetPos3D(nHuang,841,861+1,8077)
	npc.SetAtPos(nHuang,855,8120)
	npc.SetPos(nJiang,822,8074)
	npc.SetAtPos(nJiang,855,8120)
	npc.SetPos(nLan,823,8042)
	npc.SetAtPos(nLan,876,8118)
	npc.SetPos(nXiaHou,854,8067)
	npc.SetAtPos(nXiaHou,855,8120)
	npc.SetPos(nXia,804,8039)
	npc.SetAtPos(nXia,876,8118)
	npc.SetHeadRot(nXiaHou,30,0,0,1000)
	npc.SetHeadRot(nHuang,30,0,0,1000)
	npc.SetHeadRot(nJiang,30,0,0,1000)
	global.WaitForCameraLerp()
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(783,901,8042,861,884,8102)
	camera.ResetLerp(4000)
	camera.ChangeCameraStatic(779,901,8047,857,884,8107)
	wt(0.6)
	npc.SetHeadRot(nXiaHou,0,0,0,20)
	npc.SetHeadRot(nHuang,0,0,0,20)
	npc.SetHeadRot(nJiang,0,0,0,20)
	global.WaitForNpcPos(nYuan,864,8117-5)
	npc.TurnToNpc(nYuan,nHuang)
	global.WaitForNpcPos(nFang,846-5,8117)
	npc.TurnToNpc(nFang,nHuang)
	global.WaitForNpcPos(nOdz4,876,8134)
	npc.TurnToNpc(nOdz4,nHuang)
	global.WaitForNpcPos(nOdz2,859,8131)
	npc.TurnToNpc(nOdz2,nHuang)
	global.WaitForNpcPos(nOdz1,857,8150)
	npc.TurnToNpc(nOdz1,nHuang)
	global.WaitForNpcPos(nOdz3,837,8148-5)
	npc.TurnToNpc(nOdz3,nHuang)
	global.Wait(0.5)
	--众人转头看向门口
	npc.SetAnim(nFang,204,2)
	global.Wait(0.5)
	ui.Dialog(77058,0,0,nFang,0,0)--两位少主，我们并未找到失踪的村民，不知你们可有收获？
	global.Wait(0.3)
	npc.SetAnim(nJiang,217,2)
	wt(0.2)
	npc.SetHeadRot(nFang,20,0,0,40)
	wt(0.2)
	npc.SetHeadRot(nYuan,15,0,0,40)
	ui.Dialog(77059,126,0,nJiang,0,0)--劫掳村民的妖怪已经被我们除去。\n你们来得正好，将这些村民带回山庄吧。
	global.Wait(0.6)
	ui.Dialog(77060,0,0,nFang,0,0)--……是！
	global.Wait(0.3)
	--欧阳弟子向小屋走去
	npc.SetSpeed(nFang,1)
	npc.SetSpeed(nYuan,1)
	npc.SetSpeed(nOdz3,1)
	npc.SetSpeed(nOdz2,1)
	npc.SetSpeed(nOdz1,1)
	npc.SetSpeed(nOdz4,1)
	npc.SetHeadRot(nFang,0,0)
	npc.MoveTo(nFang,671,8116)
	npc.MoveTo(nOdz3,687,8146)
	wt(0.1)
	npc.SetHeadRot(nYuan,0,0)
	npc.MoveTo(nYuan,671,8116)
	npc.MoveTo(nOdz2,687,8134)
	wt(0.1)
	npc.MoveTo(nOdz1,687,8146)
	npc.MoveTo(nOdz4,687,8134)
	global.Wait(0.6)
	wt(0.4)
	npc.MoveTo(nJiang,826,8104,1)
	--==========
	
	--###@@@切镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(846,898,8183,855,884,8084)
	npc.SetVisible(nXia,1)
	npc.SetVisible(nLan,1)
	npc.MoveTo(nJiang,876,8118)
	wt(0.4)
	npc.TurnToPos(nHuang,876,8118)
	wt(0.2)
	npc.TurnToPos(nXiaHou,876,8118)
	global.WaitForNpcPos(nJiang,876,8118)
	npc.TurnToPos(nJiang,852,8085,1)
	wt(0.4)
	npc.SetAnim(nJiang,217,2)
	wt(0.3)
	ui.Dialog(77061,126,2,nJiang,0,0)--二位少主，瑕姑娘，暮姑娘，我们也回去吧？
	global.Wait(0.3)	
	head_nod(nHuang)
	ui.Dialog(77062,542,0,nHuang,0,0)--嗯。
	wt(0.2)
	--皇甫离开
	npc.MoveTo(nHuang,1002,8126)
	wt(1)
	npc.SetAnim(nXiaHou,225,2)
	wt(0.5)
	ui.Dialog(77063,524,0,nXiaHou,0,0)--姜兄，刚才的事……对不起。
	wt(0.3)
	npc.SetAnim(nJiang,217,2)
	wt(0.5)
	ui.Dialog(77064,126,2,nJiang,0,0)--夏侯兄不必自责，还好没有酿成大祸。
	npc.SetAnim(nXiaHou,207,2)
	wt(1)
	ui.Dialog(77065,520,0,nXiaHou,0,0)--唉……惭愧。
	wt(0.3)
	--夏侯离开
	npc.MoveTo(nXiaHou,982,8135)
	wt(0.5)
	npc.SetHeadRot(nJiang,0,0,0,100)
	npc.MoveTo(nJiang,1024,8147)
	camera.ResetLerp(4500)
	camera.ChangeCameraStatic(821,894,8137,826,884,8038)
	wt(3)
	npc.Destroy(nXiaHou)
	npc.Destroy(nJiang)
	npc.Destroy(nHuang)
	npc.Create(340,nStone,848,8154)
	npc.SetAt(nStone,1,0)
	npc.Disable(nStone)
	npc.CreateSE(nStone,4282)
	global.PlaySound(1139,100)
	npc.SetHeadRot(nLan,0,5,0,100)
	npc.TurnToNpc(nLan,nXia)
	wt(0.15)
	npc.SetHeadRot(nXia,0,-10,0,100)
	npc.TurnToNpc(nXia,nLan)
	wt(0.8)
	npc.SetHeadRot(nLan,0,25,1,40)
	wt(0.2)
	npc.SetHeadRot(nLan,0,5,1,50)
	npc.SetHeadRot(nXia,0,10,1,40)
	wt(0.2)
	npc.SetHeadRot(nXia,0,-10,1,50)
	npc.SetHeadRot(nLan,0,0,0,100)
	npc.MoveTo(nLan,885,8124)
	wt(0.7)
	npc.SetHeadRot(nXia,0,0,0,100)
	npc.MoveTo(nXia,866,8140)
	camera.ResetLerp(3000)
	camera.ChangeCameraStatic(867,901,8228,859,874,8132)
	global.WaitForNpcPos(nLan,885,8124)
	npc.MoveTo(nLan,994,8152)
	global.WaitForNpcPos(nXia,866,8140)
	wt(0.5)
	ui.Dialog(77066,185,0,nXia,0,0)--咦？
	wt(0.3)
	npc.TurnToNpc(nXia,nStone,1)
	wt(0.2)
	npc.SetAnim(nXia,219,2)
	wt(1.8)
	npc.StopSE(nStone)
    global.StopLastSound()
	wt(0.5)
	npc.SetVisible(nStone,0)
	wt(2)
	npc.SetPos(nLan,994,8152)
	npc.SetAtPos(nLan,866,8140)
	ui.Dialog(77067,160,2,nLan,0,0)--妹子，回去了！
	wt(0.3)
	--==========
	
	--###@@@切镜头，瑕侧身，扭头看向远处的暮菖兰
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(810,894,8155,909,881,8147)
	npc.SetHeadRot(nXia,20,0,0,100)
	npc.TurnToPos(nXia,948,8167,1)
	global.Wait(0.3)
	ui.Dialog(77068,182,0,nXia,0,0)--哦、哦！就来！
	global.Wait(0.3)
	--跟随跑过去的瑕
	camera.ResetLerp(10000)
	camera.ChangeCameraStatic(810,894,8140,909,894,8137)
	npc.SetHeadRot(nXia,0,0,0,100)
	npc.RunTo(nXia,971,8137,1)
	npc.MoveTo(nXia,1169,8111)
	npc.TurnToPos(nLan,1064,8148,1)
	global.Wait(0.1)
	npc.MoveTo(nLan,1170,8131)
	global.Wait(2)	
	effect.FadeOut(1,0.7)
	global.MusicFadeOut(2000,100,0)	
	global.Wait(2)
	npc.SetSpeed(nFang,1)
	npc.SetSpeed(nYuan,1)
	npc.SetSpeed(nOdz1,1)
	npc.SetSpeed(nOdz2,1)
	npc.SetSpeed(nOdz3,1)
	npc.SetSpeed(nOdz4,1)
	npc.Destroy(nFang,0)
	npc.Destroy(nYuan,0)
	npc.Destroy(nOdz1,0)
	npc.Destroy(nOdz2,0)
	npc.Destroy(nOdz3,0)
	npc.Destroy(nOdz4,0)
	npc.Destroy(nLan)
	npc.Destroy(nXia)
	npc.Destroy(nCunMin1)
	npc.Destroy(nCunMin2)
	npc.Destroy(nCunMin3)
	npc.Destroy(nCunMin4)
	--==========
	
	--直接切回折剑山庄
	player.Add(p_id(1),1,1)
	map.Change(1,28)
	--调整镜头
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(825,79,2437,884,55,2359)
	player.SetAt(1,-1)
	
	--删除上一个任务
	ui.FinishQuest(523)
	--添加任务
	ui.AddQuest(524)	
	
	--全员恢复
	player.ChangeHP(1,1,0,100)
	player.ChangeMP(1,1,0,100)
	
	--开启雪石路可飞（为以后能飞左准备）
	flag.SetValue(16026,1)
	
	--调整最终镜头方向
	camera.ResetLerp(0)
	camera.ChangeCameraStatic(822,111,2442,878,72,2370)
	player.SetAt(2,-3)
--]]	
	-- func_end(827,8112,1,0.7) --院内
	func_end(949,2280,1,0.7) --折剑山庄
	
	if player.GetTitleStat(6007)==0 or player.GetTitleStat(6012)==0 or player.GetTitleStat(6016)==0 or player.GetTitleStat(6017)==0 then
		player.AddTitleList(6007,0)		---称号“有如神助”提示
		player.AddTitleList(6012,0)		---称号“云游四方”提示
		player.AddTitleList(6016,0)		---称号“救死扶伤”提示
		player.AddTitleList(6017,0)		---称号“妙手回春”提示
		ui.Message(77069)--开启新的称号提示
	end
	
	global.PlayMusic(213,100,2000)
	
	--瑕习得职业技能 
	player.AddMagic(81)
	ui.Message(89666) 
end