require("Necessary")
require("StoryUtility")

--------------DLC5----------------

function DLCStory3Begin()
	task()
	.log("DLCStory3Begin")
	.SetStoryVersion(3)
	.InitTourCamera()
	.stopMusic(1.5, false)
	.SetDLC3Story(610100)	   --初始化剧情变量
	.gValueQuestInit()
	.dlcValueInit()
	.changeScene("Q17", "Q17D", "null", "")
end

function dlcValueInit()
	gValue.rockM04D = false
	gValue.dustman = false
end

function OnDLCEnterLevelQ17()	--Q17
	log("OnDLCEnterLevelQ17")
	playMusic("P30.ogg", 1, 3, 0, 1, 3)
	callTaskFunction("dlcstory610100")
end

function OnDLCEnterLevelQ05()	--Q05
	log("OnDLCEnterLevelQ05")
	playMusic("P87.ogg", 1, 3, 0, 1, 3)
	callTaskFunction("dlcstory610200")
end

function OnDLCEnterLevelQ02()	--Q02
	log("OnDLCEnterLevelQ02")
	if GetDLC3Story() > 610304 and GetDLC3Story() < 640100 then
		playMusic("P07.ogg", 1, 3, 0, 1, 3)
	else
		playMusic("P15.ogg", 1, 3, 0, 1, 3)
	end
	setMiniMap("MQ002")
	showNPC("NPC asan", false)
	showNPC("NPC asi", false)
	setPostMan("NPC 530")
	setShopName("NPC 507", "Q02DLCza")
	showMail()
	callTaskFunction("dlcstory610201")
end

function OnDLCEnterLevelM04()	--M04
	log("OnDLCEnterLevelM04")

	playMusic("P07.ogg", 1, 3, 0, 1, 3)
	setMiniMap("MM010")

	if gValue.rockM04D == nil then
		gValue.rockM04D = false
	end

	if gValue.rockM04D == false then
		showNPC("questEffect", false)
		showNPC("ItemObject 05", true)
	else
		showNPC("questEffect", true)
		showNPC("ItemObject 05", false)
		MachineXYZMove("blockA", 2, -1000, 0)
	end

	if gValue.Sub032 == 1 then
		showNPC("Monster 111", true)
	else
		showNPC("Monster 111", false)
	end

	callTaskFunction("dlcstory620100")
end

function OnDLCEnterLevelM03()	--M03
	log("OnDLCEnterLevelM03")
	playMusic("P07.ogg", 1, 3, 0, 1, 3)
	setMiniMap("MM006")
	callTaskFunction("dlcstory620300")

	if gValue.dustman then
		showNPC("NPC 600", false)
	end
	
	if GetDLC3Story() >= 630201 then
		clearMonster()
	end
end

------------------dlcquest------------------------
function DLC05Quest1A()
	callTaskFunction("taskQuest1Begin")
end

function taskQuest1Begin()
	if gValue.Sub030 == 0 or gValue.Sub030 == nil then	--未接任务
		task()
		.taskDialogue("DlgQ02", 7000)       --哎呦，看我这记性，*B只记得请戴夫子写了谜面，却不记得谜底了～*$这位公子，我瞧你打扮像个读书人，能帮我想想不？
		.taskSelectDialogue(84, 75, 76)
		.callTaskFunction("Quest1A")
	elseif gValue.Sub030 == 1 then
		task()								--过程对话
		.taskDialogue("DlgQ02", 7002)		--听好呦，谜面来啦～“自小生在富贵家，时常出入享荣华。万岁也曾传圣旨，代代儿孙做探花。”$怎么样，公子猜出了未？
		.taskSelectDialogue(7647, 8000, 8001, 8002, 8003)
		.log("112")
		.callTaskFunction("Answer1")
	elseif gValue.Sub030 == 2 then
		task()
		.taskDialogue("DlgQ02", 7006)   	--嗯……既然如此，还有一事要劳烦公子。你看都元宵了，我家隔壁钱婆婆的儿子还在外地跑生意，她一个老人家孤苦伶仃，怪冷清的～
		.taskDialogue("DlgQ02", 7007)
		.taskDialogue("DlgQ02", 7008)
		.taskDialogue("DlgQ02", 7009)
		.addObject(1723, 3)
		.addObject(1770, 3)
		.addObject(1774, 3)
		.setSub030(3)
	elseif gValue.Sub030 == 3 then
		task()
		.taskDialogue("DlgQ02", 7010)
		.taskDialogue("DlgQ02", 7044)
		.setHUD(true)
		.setControl(true)
	elseif gValue.Sub030 == 4 then
		task()
		.taskDialogue("DlgQ02", 7012)
		.setHUD(true)
		.setControl(true)
	end
end

function Quest1A()
	local r = getSelectResult()
	if r == 1 then
		--选择了“是“
		task()
		.setSub030(1)
		.taskDialogue("DlgQ02", 7002)		--听好呦，谜面来啦～“自小生在富贵家，时常出入享荣华。万岁也曾传圣旨，代代儿孙做探花。”$怎么样，公子猜出了未？
		.taskSelectDialogue(7647, 8000, 8001, 8002, 8003)
		.callTaskFunction("Answer1")
	else
		--do nothing
		task()
		.setHUD(true)
		.setControl(true)
	end
end

function Answer1()
	local r = getSelectResult()
	if r == 2 then
		--right
		task()
		.setSub030(2)
		.taskDialogue("DlgQ02", 7005)
		.addObject(1775, 2)
		.setSub031(1)		--开启任务莫问前尘
		.setHUD(true)
		.setControl(true)
	else
		--wrong
		task()
		--.setSub030(0)
		.taskDialogue("DlgQ02", 7004)
		.setHUD(true)
		.setControl(true)
	end
end

function DLC05Quest1B()
	callTaskFunction("Quest1B")
end

function Quest1B()
	if gValue.Sub030 == 3
	and getItemCount(1723) >= 3
	and getItemCount(1770) >= 3
	and getItemCount(1774) >= 3 then --包里有昙花冻*３ 青团*３ 丹桂花糕*3
		task()
		.setSub030(4)
		.taskDialogue("DlgQ02", 7013)         --是我家福生托人捎回来的？
		.addObject(1723, -3)   --失去昙花冻*３
		.addObject(1770, -3)   --失去青团*３
		.addObject(1774, -3)   --失去丹桂花糕*３
		.addObject(22427, 1)   --得到绛纹戒指*１
		.msgBoxInTable(91, true)	--任务完成
		.setHUD(true)
		.setControl(true)
	else
		task()
		.taskDialogue("DlgQ02", 7016)        --盼过了腊八盼过年，盼过了年又盼元宵……我家福生何时才回呦……
		.setHUD(true)
		.setControl(true)
	end
end


function DLC05Quest2()
	callTaskFunction("taskQuest2Begin")
end

function taskQuest2Begin()
	if gValue.Sub031 == 1 then
		task()
		.taskDialogue("DlgQ02", 7017)
		.taskSelectDialogue(84, 75, 76)
		.callTaskFunction("Quest2")
	elseif gValue.Sub031 == 2 then
		task()
		.taskDialogue("DlgQ02", 7019)
		.taskSelectDialogue(7647, 8004, 8005, 8006, 8007)
		.callTaskFunction("Answer2")
	elseif gValue.Sub031 == 3 then
		task()
		.taskDialogue("DlgQ02", 7029)
		.taskDialogue("DlgQ02", 7030)
		.taskDialogue("DlgQ02", 7031)
		.taskDialogue("DlgQ02", 7032)
		.taskSelectDialogue(7647, 8021, 8022, 8023, 8024)
		.callTaskFunction("Answer6")
	else
		task()
		.taskDialogue("DlgQ02", 7038)
		.taskDialogue("DlgQ02", 7039)
		.setHUD(true)
		.setControl(true)
	end
end

function Quest2()
	local r = getSelectResult()
	if r == 1 then
		task()
		.setSub031(2)
		.taskDialogue("DlgQ02", 7019)
		.taskSelectDialogue(7647, 8004, 8005, 8006, 8007)
		.callTaskFunction("Answer2")
	else
		task()
		.setHUD(true)
		.setControl(true)
	end
end

function Answer2()
	local r = getSelectResult()
	if r == 4 then
		--right
		task()
		.taskDialogue("DlgQ02", 7021)
		.taskSelectDialogue(7647, 8008, 8009, 8010, 8011)
		.callTaskFunction("Answer3")
	else
		--wrong
		task()
		.taskDialogue("DlgQ02", 7026)
		.setHUD(true)
		.setControl(true)
	end
end

function Answer3()
	local r = getSelectResult()
	if r == 2 then
		--right
		task()
		.taskDialogue("DlgQ02", 7023)
		.taskSelectDialogue(7647, 8012, 8013, 8014, 8015)
		.callTaskFunction("Answer4")
	else
		--wrong
		task()
		.taskDialogue("DlgQ02", 7026)
		.setHUD(true)
		.setControl(true)
	end
end

function Answer4()
	local r = getSelectResult()
	if r == 4 then
		--right
		task()
		.taskDialogue("DlgQ02", 7025)
		.taskSelectDialogue(7647, 8016, 8017, 8018, 8019, 8020)
		.callTaskFunction("Answer5")
	else
		--wrong
		task()
		.taskDialogue("DlgQ02", 7026)
		.setHUD(true)
		.setControl(true)
	end
end

function Answer5()
	local r = getSelectResult()
	if r == 5 then
		--right
		task()
		.taskDialogue("DlgQ02", 7027)
		.addObject(1013, 1)	--给物品
		.setSub031(3)
		.setHUD(true)
		.setControl(true)
	else
		--wrong
		task()
		.taskDialogue("DlgQ02", 7026)
		.setHUD(true)
		.setControl(true)
	end
end

function setDestiny(v)
	gValue.destiny = v
end

function Answer6()
	local r = getSelectResult()
	if r == 1 then
		--right
		task()
		.setDestiny(true)
		.taskDialogue("DlgQ02", 7033)
		.taskSelectDialogue(7647, 8025, 8026, 8027, 8028)
		.callTaskFunction("Answer7")
	else
		--wrong
		task()
		.setDestiny(false)
		.taskDialogue("DlgQ02", 7033)
		.taskSelectDialogue(7647, 8025, 8026, 8027, 8028)
		.callTaskFunction("Answer7")
	end
end

function Answer7()
	local r = getSelectResult()
	if gValue.destiny == true and r == 3 then
		--right
		task()
		.setDestiny(true)
		.taskDialogue("DlgQ02", 7034)
		.taskSelectDialogue(7647, 8029, 8030, 8031, 8032, 8033)
		.callTaskFunction("Answer8")
	else
		--wrong
		task()
		.setDestiny(false)
		.taskDialogue("DlgQ02", 7034)
		.taskSelectDialogue(7647, 8029, 8030, 8031, 8032, 8033)
		.callTaskFunction("Answer8")
	end
end

function Answer8()
	local r = getSelectResult()
	if gValue.destiny == true and r == 2 then
		--right
		gValue.destiny = true
	else
		--wrong
		gValue.destiny = false
	end

	task().log(gValue.destiny)
	if gValue.destiny == true then
		task()
		.taskDialogue("DlgQ02", 7035)
		.taskDialogue("DlgQ02", 7037)
		.addObject(4004, 1)	--给物品
		.setSub031(4)
		.setHUD(true)
		.setControl(true)
	else
		task()
		.taskDialogue("DlgQ02", 7035)
		.taskDialogue("DlgQ02", 7036)
		.setSub031(5)
		.setHUD(true)
		.setControl(true)
	end
end


----------------------------------rock---------------------------
function setRock(v)
	gValue.rockM04D = v
end

function moveRock()
	if gValue.rockM04D == nil then
		gValue.rockM04D = false
	end

	if gValue.Sub031 == 4 and getItemCount(4004) >= 1 and gValue.rockM04D == false then
		task()
		.setHUD(false)
		.setControl(false)
		.placeEffect("EF112_01", "effect", getNPCPosX("ItemObject 05"), getNPCPosY("ItemObject 05"), getNPCPosZ("ItemObject 05"), 1.0, 4)
		.wait(2)
		.showNPC("ItemObject 05", false)
		.showNPC("questEffect", false)
		.setRock(true)
		.MachineXYZMove("blockA", 2, -1000, 0)
		.taskDialogue("DlgM04", 10)
		.addObject(4004, -1)
		.setHUD(true)
		.setControl(true)
	end
end

function giveJL()
	log("giveJL")
	if gValue.Sub031 == 4 then
		callTaskFunction("Quest2End")
	end
end

function Quest2End()
	task()
	.log("Quest2End")
	.setHUD(false)
	.setControl(false)
	.setNpcOverlayAnimation("Chest 01", "open")
	.wait(1.0)
	.taskDialogue("DlgM04", 11)
	.setNpcBaseAnimation("Chest 01", "opened")
	.addObject(22059, 1)
	.setSub031(6)
	.msgBoxInTable(91, true)	--任务完成
	.addEffort(429, 1)
	.setHUD(true)
	.setControl(true)
end

----------------M03 dustman-------------
function DLCQuestM03()
	callTaskFunction("dustman")
end

function dustman()
	task()
	.setHUD(false)
	.setControl(false)
	.taskDialogue("DlgM03", 1)
	.taskDialogue("DlgM03", 2)
	.taskDialogue("DlgM03", 3)
	.enterBattle("M03", "M03P1D", "M03_2_D", 313)
	--.setHUD(true)
	--.setControl(true)
end

--------------M04 monkey-----------
function DLC05QuestM04()
	callTaskFunction("monkey")
end

function monkey()
	if gValue.Sub032 == 0 or gValue.Sub032 == nil then	             --未接任务
		task()
		.taskDialogue("DlgM04", 1)		--吱吱——吱——吱吱——吱！吱吱！吱哇——
		.taskDialogue("DlgM04", 2)		--……？
		.taskDialogue("DlgM04", 3)		--谁替老子赶走那混账，老子重重有赏！
		.taskSelectDialogue(84, 75, 76)	--选择对话框
		.callTaskFunction("Quest32")	--选择结果处理
	elseif gValue.Sub032 == 1 then		--任务已接
		task()
		.taskDialogue("DlgM04", 4)
		.setHUD(true)
		.setControl(true)
	elseif gValue.Sub032 == 2 then
		task()
		.taskDialogue("DlgM04", 5)    --看不出你还有点本事
		.addObject(2003, 5, 2)			--
		.addObject(22415, 1, 2)			--
		.setSub032(3)				    --结束
		.msgBoxInTable(91, true)	    --任务完成
		.setHUD(true)				    --开启界面
		.setControl(true)			    --解除人物行走锁定
    else	                                                         --任务已完成
	    task()
		.taskDialogue("DlgM04", 6)		--没看过老子这么英俊潇洒风流倜傥能文能武貌比潘安的猴子啊！
		.setHUD(true)					--开启界面
		.setControl(true)				--解除人物行走锁定
	end
end


function Quest32()
	local seletedIndex = getSelectResult()
	if 1 == seletedIndex then			--选择了“是”
		task()
		.setSub032(1)					--接受任务，变量设为1
		.showNPC("Monster 111", true)
		.setHUD(true)					--开启界面
		.setControl(true)				--解除人物行走锁定
	elseif 2 == seletedIndex then		--选择了“否”
		task()
		.showNPC("Monster 111", false)
		.setHUD(true)					--开启界面
		.setControl(true)				--解除人物行走锁定
	end
end

-----------------------dlcstory----------------------------
function dlcstory610100()
	local role = 115
	if GetDLC3Story() == 610100 then
		task()
		.taskPlaySequence("600100", "Q17DLC5")
		.SetDLC3Story(610200)
		.changeScene("Q05", "Q05N19D", "null", "")	      --跳场景
		.taskPlaySequence("610200", "Q05DLC5")
		.SetDLC3Story(610201)
		.changeScene("Q02", "Q02D", "null", "")	        --跳场景
		.taskPlaySequence("610201", "Q02DLC5")
		.SetDLC3Story(610300)
		.joinTeam(role, false)                          --入队
		.setRoleLevel(role, 50)
		.setRoleInt(role, "CurrentActPoint", 5)
		.addSkill(role, 6052)
		.addSkill(role, 1115)
		.addSkill(role, 1114)
		.addSkill(role, 1113)
		.addSkill(role, 1112)
		.addSkill(role, 1111)
		.addSkill(role, 3101)
		.addSkill(role, 3102)
		.addSkill(role, 3103)
		.addSkill(role, 3104)
		.addSkill(role, 3105)
		.addSkill(role, 3106)
		.addSkill(role, 3107)
		.addSkill(role, 3108)
		.addSkill(role, 3109)
		.addSkill(role, 2401)
		.addSkill(role, 2402)
		.addSkill(role, 2403)
		.addSkill(role, 2404)
		.addSkill(role, 2405)
		.addSkill(role, 2406)
		.addSkill(role, 2001)
		.addSkill(role, 2002)
		.addSkill(role, 2003)
		.addSkill(role, 2004)
		.addSkill(role, 2005)
		.addSkill(role, 2006)
		.setRoleInt(role, "Water", 160)
		.setRoleInt(role, "CurrentWater", 160)
		.setRoleInt(role, "Wood", 160)
		.setRoleInt(role, "CurrentWood", 160)
		.setRoleInt(role, "AntiConfuse", 40)
		.setRoleInt(role, "CurrentAntiConfuse", 40)
		.setRoleInt(role, "CurrentAP", 98)
		.addMoney(5000, false)
		.addObject(21115, 1, 0)
		.equip(role, 21115)
		.addObject(21736, 1, 0)
		.equip(role, 21736)
		.addObject(21921, 1, 0)
		.equip(role, 21921)
		.addObject(22233, 1, 0)
		.equip(role, 22233)
		.addObject(1003, 5, 0)
		.addObject(1007, 5, 0)
		.addObject(1224, 2, 0)
		.setRoleLevel(117, 50)	--奶娘
		.setRoleInt(117, "CurrentActPoint", 5)
		.addSkill(117, 6060)
		.addSkill(117, 6061)
		.addSkill(117, 6062)
		.addSkill(117, 6063)
		.setPlayerPos(38.2, 110.3, 0)
		.setPlayerDir(83.54794)
		.taskDoPostScreen(1, 1.0, 1)
		.setHUD(true)
		.setControl(true)
	end
end

function dlcstory610300()
	if GetDLC3Story() == 610300 then
		task()
		.playMusic("P89.ogg", 1, 3, 0, 1, 1)
		.taskPlaySequence("610300", "Q02DLC5")
		.SetDLC3Story(610301)
		.playMusic("P80.ogg", 1, 3, 0, 1, 1)
		.taskPlaySequence("610301", "Q02DLC5")
		.SetDLC3Story(610302)
		.taskPlaySequence("610302", "Q02DLC5")
		.SetDLC3Story(610303)
		.taskPlaySequence("610303", "Q02DLC5")
		.SetDLC3Story(610304)
		.taskPlaySequence("610304", "Q02DLC5")            --音乐在xfx中
		.addMoney(-2,false)
		.SetDLC3Story(610305)
		.taskPlaySequence("610306", "Q02DLC5")            --剧情名称交换
		.SetDLC3Story(610306)
		.setPlayerPos(34.7, 18.3, 0)
		.setPlayerDir(4.295477)
		.showNPC("NPC asan", false)
		.showNPC("NPC asi", false)
		.taskDoPostScreen(1, 1.0, 1)
		.playMusic("P07.ogg", 1, 3, 0, 1, 1)              --剧情结束后换场景音乐
		.setHUD(true)
		.setControl(true)
	end
end

function dlcstory610306()
	if GetDLC3Story() == 610306 then
		task()
		.taskPlaySequence("610305", "Q02DLC5")            --音乐在xfx中
		.SetDLC3Story(620100)
		.setPlayerPos(-35.7, -59.7, 1)
		.setPlayerDir(80.3314)
		.taskDoPostScreen(1, 1.0, 1)
		.playMusic("P07.ogg", 1, 3, 0, 1, 1)              --剧情结束后换场景音乐
		.setHUD(true)
		.setControl(true)
		.msgBoxInTable(7680,2,false)
		.wait(7)
	end
end

function dlcstory620100()
	if GetDLC3Story() == 620100 then
		task()
		.taskPlaySequence("620100", "M04DLC5")
		.SetDLC3Story(620200)
		.setPlayerPos(-44.70607, -60.12247, 14.43838)
		.setPlayerDir(-148.5772)
		.setMiniMapArea(-85.56994, -49.41589)
		.taskDoPostScreen(1, 1.0, 1)
		.setHUD(true)
		.setControl(true)
	end
end

function dlcstory620200()
	if GetDLC3Story() == 620200 then
		task()
		.taskPlaySequence("620200", "M04DLC5")
		.SetDLC3Story(620300)
		.changeScene("M03", "M03P1DLC05", "null", "")	  --跳场景
	end
end

function dlcstory620300()
	if GetDLC3Story() == 620300 then
		task()
		.playMusic("P46.ogg", 1, 3, 0, 1, 1)
		.taskPlaySequence("620300", "M03DLC5")            --音乐在xfx中
		.SetDLC3Story(630100)
		.changeScene("M04", "M04P1D", "null", "")	      --跳场景
		.setPlayerPos(82.15762, 7.551424, 4.823148)
		.setPlayerDir(-124.4016)
		.taskDoPostScreen(1, 1.0, 1)
		.setHUD(true)
		.setControl(true)
	end
end

function dlcstory630100()
	if GetDLC3Story() == 630100 then
		task()
		.changeScene("M03", "M03P1D", "null", "")	      --跳场景
		.playMusic("P46.ogg", 1, 3, 0, 1, 1)
		.taskPlaySequence("630100", "M03DLC5")
		.SetDLC3Story(630101)
		.enterBattle("M03", "M03P1D", "M03_2_D", 319)     --接阿高、阿全战斗
        .taskDoPostScreen(1, 0, 1)
	end
end

function DlcComeFromCombatM03(minor, reason)
	playMusic("P07.ogg" , 1 , 3 , 0 , 1 , 3)

	if GetDLC3Story() == 630101 then
		callTaskFunction("dlcstory630101")
	end
	if GetDLC3Story() == 630201 then
		callTaskFunction("dlcstory630201")
	end

	if isRoleInTeam(117) then
		leaveTeam(117, false)
	end
end

function DlcComeFromCombatM04(minor, reason)
	playMusic("P07.ogg" , 1 , 3 , 0 , 1 , 3)

	if isRoleInTeam(117) then
		leaveTeam(117, false)
	end
end

function dlcstory630101()
	if GetDLC3Story() == 630101 then
		task()
		.playMusic("P122.ogg", 1, 3, 0, 1, 1)
		.taskPlaySequence("630101", "M03DLC5")
		.SetDLC3Story(630102)
		.playMusic("P80.ogg",1,3,0,1,3)
		.taskPlaySequence("630102", "M03DLC5")
		.SetDLC3Story(630200)
		.setPlayerPos(-20.54086, -70.67348, 1.050241)
		.setPlayerDir(-143.9807)
		.setMiniMapArea(-26.64134, -92.01172)
		.setMiniMapArea(-27.53292, -104.8042)
		.taskDoPostScreen(1, 1.0, 1)
		.playMusic("P07.ogg",1,3,0,1,3)                  --剧情结束后换场景音乐
		.setHUD(true)
		.setControl(true)
	end
end

function dlcstory630200()
	if GetDLC3Story() == 630200 then
		task()
		.playMusic("P46.ogg", 1, 3, 0, 1, 1)
		.taskPlaySequence("630200", "M03DLC5")
		.SetDLC3Story(630201)
		.enterBattle("M03", "M03P1D", "M03_1_D", 333)     --接黄天霸战斗
		.taskDoPostScreen(1, 0, 1)
	end
end

function dlcstory630201()
	if GetDLC3Story() == 630201 then
		task()
		.playMusic("P25.ogg",1,3,0,1,3)
		.taskPlaySequence("630201", "M03DLC5")          --音乐在xfx中
		.SetDLC3Story(630202)
		.playMusic("P87.ogg",1,3,0,1,3)
		.taskPlaySequence("630202", "M03DLC5")          --音乐在xfx中
		.SetDLC3Story(630203)
		.taskPlaySequence("630203", "M03DLC5")          --音乐在xfx中
		.SetDLC3Story(630300)
		.setPlayerPos(15.49033, 79.96369, 9.025486)
		.setPlayerDir(-57.22598)
		.taskDoPostScreen(1, 1.0, 1)
		.playMusic("P07.ogg",1,3,0,1,3)                 --剧情结束后换场景音乐
		.clearMonster()
		.setHUD(true)
		.setControl(true)
	end
end

function clearMonster()
	showNPC("Monster 301", false)
	showNPC("Monster 302", false)
	showNPC("Monster 303", false)
	showNPC("Monster 304", false)
	showNPC("Monster 306", false)
	showNPC("Monster 307", false)
	showNPC("Monster 308", false)
	showNPC("Monster 309", false)
	showNPC("Monster 310", false)
	showNPC("Monster 311", false)
	showNPC("Monster 312", false)
	showNPC("Monster 314", false)
	showNPC("Monster 315", false)
	showNPC("Monster 316", false)
	showNPC("Monster 317", false)
	showNPC("Monster 318", false)
	showNPC("Monster 320", false)
	showNPC("Monster 321", false)
	showNPC("Monster 322", false)
	showNPC("NPC 600", false)
end

function dlcstory630300()
	if GetDLC3Story() == 630300 then
		task()
		.stopMusic(1,false,1)
		.taskPlaySequence("630300", "M03DLC5")            --音乐在xfx中
		.SetDLC3Story(640100)
		.changeScene("Q02", "Q02YD", "null", "")	      --跳场景
		.playMusic("P80.ogg",1,3,0,1,3)
		.taskPlaySequence("640101", "Q02DLC5")
		.SetDLC3Story(640101)
		.playMusic("P15.ogg",1,3,0,1,3)
		.taskPlaySequence("640102", "Q02DLC5")            --音乐在xfx中
		.SetDLC3Story(640200)
		.setPlayerPos(37.83569, 53.28146, 0.07695693)
		.setPlayerDir(115.7824)
		.taskDoPostScreen(1, 1.0, 1)
		.playMusic("P15.ogg",1,3,0,1,3)                   --剧情结束后换场景音乐
		.setHUD(true)
		.setControl(true)
	end
end

function dlcstory640200()
	if GetDLC3Story() == 640200 then
		task()
		.playMusic("P29.ogg",1,3,0,1,3)                   --暂定
		.taskPlaySequence("640103", "Q02DLC5")
		.taskPlaySequence("640200", "Q02DLC5")
		.playSWF("Dlc003_end.swf")
		.taskPlaySequence("600001","Q02DLC5")
		.stopSWF()
        .addEffort(428, 1)      		                  --成就
        .saveEffort()
        .taskDoPostScreen(1, 0, 1)
		.endGame(false)
	end
end

function showMail()
	if GetDLC3Story() == 610201 then
		sendMail(184)
		sendMail(185)
		sendMail(186)
		sendMail(187)
		sendMail(188)
		sendMail(189)
		sendMail(190)
		sendMail(191)
		sendMail(192)
	end
end