------------------------------------------------------------------------------------
--Name:  	201111[简体征服][任务脚本]战士觉醒任务-步入战神殿
--Creator:	冯子鑫
--Created:	2020-11-11
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>96


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(113,150)
------------------------------------------------------------
--玩家对象操作接口,Hero、Player、Npc接口都一样
-- 查询/创建，玩家自己
-- 参数：无
-- local hero = CppScriptMgr:QueryHero()
-- 创建人物接口：CppScriptMgr:AddPlayer(外观look, 坐标x, 坐标y, "名字", id, 角色类型luaPlayerType)
-- local player = CppScriptMgr:AddPlayer(276, 325, 345, "新手勇士", 4003000001)



local hero = CppScriptMgr:QueryHero()

hero:SetPos(109,156)
hero:SetDir(4)

local sex = hero:GetSex()
local touxiang = "NPCBust_npc27064"
if sex == 2 then 
	touxiang = "NPCBust_npc185"
end

local General1 = CppScriptMgr:AddPlayer(8,108,160, "Zheng Dongjiang")
General1:SetZoomPercent(100)
General1:SetArmor(187465,0,1)
General1:SetRWeapon(410389,0,1)
General1:SetLWeapon(900309,0,1)

local General2 = CppScriptMgr:AddPlayer(8,111,160, "Xue Wenzong")
General2:SetZoomPercent(100)
General2:SetArmor(187505,0,1)
General2:SetRWeapon(420389,0,1)
General2:SetLWeapon(420389,0,1)

hero:RunTo(116,142)
General1:RunTo(112,144)
General2:RunTo(118,147)

CppScriptMgr:WaitMilSec(3000)


-- 生成魔军

local Monster1 = CppScriptMgr:AddPlayer(977,113,170, "Green-faced Beast [Evil]")
local Monster2 = CppScriptMgr:AddPlayer(225,112,174, "")
local Monster3 = CppScriptMgr:AddPlayer(225,116,173, "")
local Monster4 = CppScriptMgr:AddPlayer(154,114,177, "")
local Monster5 = CppScriptMgr:AddPlayer(154,117,176, "")
local Monster6 = CppScriptMgr:AddPlayer(263,115,178, "")
local Monster7 = CppScriptMgr:AddPlayer(604,118,178, "")
local Monster8 = CppScriptMgr:AddPlayer(604,116,181, "")
local Monster9 = CppScriptMgr:AddPlayer(211,120,180, "")

Monster1:RunTo(111,152)
Monster2:RunTo(106,150)
Monster3:RunTo(108,153)
Monster4:RunTo(110,155)
Monster5:RunTo(112,156)
Monster6:RunTo(104,153)
Monster7:RunTo(106,156)
Monster8:RunTo(109,158)
Monster9:RunTo(112,161)
Monster1:Say("Go! Catch them!",5000)
Monster3:Say("Coward! Stop running if you`ve got the guts!",5000)
Monster6:Say("You can`t run away!",5000)

CppScriptMgr:WaitMilSec(5300)
Monster1:SetDir(5)
CppScriptMgr:WaitMilSec(500)
Monster2:SetDir(5)
Monster3:SetDir(5)
CppScriptMgr:WaitMilSec(400)
Monster4:SetDir(5)
Monster5:SetDir(5)
CppScriptMgr:WaitMilSec(400)
Monster6:SetDir(5)
Monster7:SetDir(5)
CppScriptMgr:WaitMilSec(300)
Monster8:SetDir(5)
Monster9:SetDir(5)


hero:SetDir(1)
General1:SetDir(1)
General2:SetDir(1)

CppScriptMgr:WaitMilSec(1000)

--玩家
CppScriptMgr:NpcCallOut("The light of warlord has disappeared! Where should we go now?\n\n\n\n                                     Click ESC to skip the story.", 1500, 1, "NPCBust_bg", "", 320, 570, 400, 580, touxiang, 150, 430, hero:GetName(), 250, 655)
CppScriptMgr:WaitMilSec(1500)

--郑东江
CppScriptMgr:NpcCallOut("You go first. I`ll go after you!\n\n\n\n                                     Click ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc190", 150, 430, "Zheng Dongjiang", 250, 655)
CppScriptMgr:WaitMilSec(1000)

--薛文踪
CppScriptMgr:NpcCallOut("Yes! We`ll cover you. You must find General Xiao!\n\n\n\n                                     Click ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc188", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(2000)



-- local Guard1 = CppScriptMgr:AddPlayer(8,14,22, "花木兰")
-- Guard1:SetZoomPercent(100)
-- Guard1:SetArmor(187505,0,1)
-- Guard1:SetRWeapon(420389,0,1)
-- Guard1:SetLWeapon(420389,0,1)
-- Guard1:SetDir(6)



-- Guard1:SetPos(111,130)

-- Guard1:RunTo(117,139)
-- CppScriptMgr:WaitMilSec(2000)
-- Guard1:SetDir(1)



-- Guard1:SetAction(404)
-- Guard1:AddEffect("zsjn_jqxp")

-- CppScriptMgr:WaitMilSec(2000)
-- Guard1:DelEffect("zsjn_jqxp")
CppScriptMgr:WaitMilSec(1000)

--萧无定
CppScriptMgr:NpcCallOut("How dare you! I`ll kill you all!\n\n\n\n                                     Click ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27644", 150, 430, "General Xiao", 250, 655)
CppScriptMgr:WaitMilSec(2000)
local effectObj2  = CppScriptMgr:AddEffect("zsl_rwzy",109,154)

CppScriptMgr:WaitMilSec(1000)




Monster1:SetAction(330)
Monster2:SetAction(330)
Monster3:SetAction(330)
Monster4:SetAction(330)
Monster5:SetAction(330)
Monster6:SetAction(330)
Monster7:SetAction(330)
Monster8:SetAction(330)
Monster9:SetAction(330)

CppScriptMgr:ClearEffect(effectObj2)
local effectObj12 = CppScriptMgr:AddEffect("5fire",109,154)

CppScriptMgr:WaitMilSec(1000)

Monster4:SetPos(1000,1000)
Monster5:SetPos(1000,1000)
Monster6:SetPos(1000,1000)
Monster9:SetPos(1000,1000)
CppScriptMgr:WaitMilSec(800)
Monster1:SetPos(1000,1000)
Monster2:SetPos(1000,1000)
Monster3:SetPos(1000,1000)
Monster7:SetPos(1000,1000)
Monster8:SetPos(1000,1000)

local General3 = CppScriptMgr:AddSimplePlayer(1056744,113,124, "General Xiao")
General3:SetZoomPercent(130)
General3:SetDir(4)

General3:RunTo(117,139)
CppScriptMgr:WaitMilSec(3700)
General3:SetDir(1)

CppScriptMgr:WaitMilSec(1000)
hero:SetDir(5)
General1:SetDir(5)
General2:SetDir(5)
CppScriptMgr:WaitMilSec(1000)

--郑东江
CppScriptMgr:NpcCallOut("General Xiao!\n\n\n\n                                     Click ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc190", 150, 430, "Zheng Dongjiang", 250, 655)
CppScriptMgr:WaitMilSec(1000)

--薛文踪
CppScriptMgr:NpcCallOut("General Xiao!\n\n\n\n                                     Click ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc188", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(1000)

--萧无定
CppScriptMgr:NpcCallOut("Brothers! I`m back! Let`s go inside the Warlord Shrine!\n\n\n\n                                     Click ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27644", 150, 430, "General Xiao", 250, 655)
CppScriptMgr:WaitMilSec(2000)

hero:RunTo(104,117)
General1:RunTo(106,116)
General2:RunTo(101,120)
General3:RunTo(100,114)


CppScriptMgr:WaitMilSec(4000)
