------------------------------------------------------------------------------------
--Name： 201027[简体征服][活动脚本]战士觉醒第预热第二章
--Creator:      谢孟轩
--Created:     2020-10-27
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>87

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

-- hero:SetPos(165, 230)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
-- hero:SetDir(4)
-- -- 设置外观：player:SetLook(外观type)
--hero:SetLook(7)
local hero = CppScriptMgr:QueryHero()
		hero:SetPos(67,66)
local sex = hero:GetSex()

--Xue Wenzong
CppScriptMgr:NpcCallOut("Evil Army drew near! Go!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(2000)

if sex == 1 then 
--玩家
CppScriptMgr:NpcCallOut("Battle are ceaseless! I will wipe them out here!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27064", 150, 430, hero:GetName(), 250, 655)
CppScriptMgr:WaitMilSec(2000)

else

--玩家
CppScriptMgr:NpcCallOut("Battle are ceaseless! I will wipe them out here!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc185", 150, 430, "Peace Warlord", 250, 655)
CppScriptMgr:WaitMilSec(2100)

end

hero:AddEffect("guard_defshare");

--烟雾
CppScriptMgr:AddEffect("Disapear1",66,82)
CppScriptMgr:AddEffect("Disapear1",77,80)
CppScriptMgr:AddEffect("Disapear1",85,74)
CppScriptMgr:AddEffect("Disapear1",66,63)
CppScriptMgr:AddEffect("Disapear1",78,54)
CppScriptMgr:AddEffect("Disapear1",54,61)
CppScriptMgr:AddEffect("Disapear1",53,58)
CppScriptMgr:AddEffect("Disapear1",46,77)
CppScriptMgr:AddEffect("Disapear1",40,64)
CppScriptMgr:AddEffect("Disapear1",54,74)
--CppScriptMgr:AddEffect("seismatt_01",59,72)

--怪物
local playerMonster1 = CppScriptMgr:AddPlayer(200,61,55, "Blade Evil Army")
playerMonster1:Say("Attack!",3000)
playerMonster1:SetZoomPercent(70)
playerMonster1:SetDir(0)

local playerMonster2 = CppScriptMgr:AddPlayer(200,56,63, "Blade Evil Army")
playerMonster2:Say("Destroy Peace Army!", 3000)
playerMonster2:SetZoomPercent(70)
playerMonster2:SetDir(0)

local playerMonster3 = CppScriptMgr:AddPlayer(200,57,69, "Blade Evil Army")
playerMonster3:SetZoomPercent(70)
playerMonster3:SetDir(0)

local playerMonster4 = CppScriptMgr:AddPlayer(200,64,78, "Blade Evil Army")
playerMonster4:Say("Attack!",3000)
playerMonster4:SetZoomPercent(70)
playerMonster4:SetDir(0)

local playerMonster5 = CppScriptMgr:AddPlayer(200,74,81, "Blade Evil Army")
playerMonster5:SetZoomPercent(70)
playerMonster5:SetDir(0)

local playerMonster6 = CppScriptMgr:AddPlayer(200,82,78, "Blade Evil Army")
playerMonster6:SetZoomPercent(70)
playerMonster6:SetDir(0)

local playerMonster7 = CppScriptMgr:AddPlayer(200,80,62, "Blade Evil Army")
playerMonster7:SetZoomPercent(70)
playerMonster7:SetDir(0)

local playerMonster8 = CppScriptMgr:AddPlayer(200,73,56, "Blade Evil Army")
playerMonster8:Say("Destroy Peace Army!", 3000)
playerMonster8:SetZoomPercent(70)
playerMonster8:SetDir(0)

--local playerMonster9 = CppScriptMgr:AddPlayer(400,66,77, "Blade Evil Army")
--playerMonster9:SetZoomPercent(70)
--playerMonster9:SetDir(0)
----1秒然后迅速移走
--playerMonster9:SetAction(330)
--CppScriptMgr:WaitMilSec(4000)
--playerMonster9:SetPos(1,1)


playerMonster1:RunTo(64,59)
playerMonster2:RunTo(60,63)
playerMonster3:RunTo(60,68)
playerMonster4:RunTo(67,74)
playerMonster5:RunTo(71,73)
playerMonster6:RunTo(74,69)
playerMonster7:RunTo(73,65)
playerMonster8:RunTo(68,60)
CppScriptMgr:WaitMilSec(2000)

hero:SetAction(905)
CppScriptMgr:WaitMilSec(400)

--地震
CppScriptMgr:AddEffect("seismatt_01",57,66)
CppScriptMgr:AddEffect("seismatt_01",67,58)
CppScriptMgr:AddEffect("seismatt_01",71,73)
CppScriptMgr:WaitMilSec(1000)
--怪物死亡
playerMonster1:SetAction(330)
playerMonster2:SetAction(330)
playerMonster3:SetAction(330)
playerMonster4:SetAction(330)
playerMonster5:SetAction(330)
playerMonster6:SetAction(330)
playerMonster7:SetAction(330)
playerMonster8:SetAction(330)
CppScriptMgr:WaitMilSec(4000)
--怪物移走
playerMonster1:SetPos(1,1)
playerMonster2:SetPos(1,1)
playerMonster3:SetPos(1,1)
playerMonster4:SetPos(1,1)
playerMonster5:SetPos(1,1)
playerMonster6:SetPos(1,1)
playerMonster7:SetPos(1,1)
playerMonster8:SetPos(1,1)

--hero:Say("这？这是什么力量？", 2000)
--hero:Say("这？这是什么力量？", 2000)
--CppScriptMgr:WaitMilSec(2000)
--
--local playerMonster1 = CppScriptMgr:AddPlayer(258,53,67, "Blade Evil Army")
--playerMonster1:SetZoomPercent(100)
--playerMonster1:SetDir(0)
--
--local playerMonster2 = CppScriptMgr:AddPlayer(204,58,70, "Snakeman Army")
--playerMonster2:SetZoomPercent(100)
--playerMonster2:SetDir(1)
--
--local playerMonster3 = CppScriptMgr:AddPlayer(202,61,71, "Lava Hound")
--playerMonster3:SetZoomPercent(100)
--playerMonster3:SetDir(1)
--
--local playerMonster4 = CppScriptMgr:AddPlayer(204,54,70, "Snakeman Army")
--playerMonster4:SetZoomPercent(100)
--playerMonster4:SetDir(1)
--
--local playerMonster5 = CppScriptMgr:AddPlayer(202,58,65, "Lava Hound")
--playerMonster5:SetZoomPercent(100)
--playerMonster5:SetDir(1)
--
--local playerMonster6 = CppScriptMgr:AddPlayer(258,48,60, "Blade Evil Army")
--playerMonster6:SetZoomPercent(100)
--playerMonster6:SetDir(0)
--
--local playerMonster7 = CppScriptMgr:AddPlayer(202,50,69, "Lava Hound")
--playerMonster7:SetZoomPercent(100)
--playerMonster7:SetDir(1)
--
--local playerMonster8 = CppScriptMgr:AddPlayer(202,46,65, "Lava Hound")
--playerMonster8:SetZoomPercent(100)
--playerMonster8:SetDir(1)
--
--local playerMonster9 = CppScriptMgr:AddPlayer(204,68,73, "Snakeman Army")
--playerMonster9:SetZoomPercent(100)
--playerMonster9:SetDir(1)
--
--local playerMonster10 = CppScriptMgr:AddPlayer(204,61,77, "Snakeman Army")
--playerMonster10:SetZoomPercent(100)
--playerMonster10:SetDir(1)
--
--
--CppScriptMgr:WaitMilSec(300)
--
--for i = 1, 10 do
--	CppScriptMgr:SetViewPosByCell(56,84 - i)
--	CppScriptMgr:WaitMilSec(50)
--end
--
--playerMonster1:Say("是战神！大家快跑啊", 2000)
--
--CppScriptMgr:WaitMilSec(2000)
--
--playerMonster2:Say("不可能，战神不是已经死了吗？", 2000)
--
--CppScriptMgr:WaitMilSec(2000)
--
--playerMonster1:RunTo(41,55)
--playerMonster2:RunTo(59,52)
--playerMonster3:RunTo(81,59)
--playerMonster4:RunTo(41,55)
--playerMonster5:RunTo(59,52)
--playerMonster6:RunTo(41,55)
--playerMonster7:RunTo(41,55)
--playerMonster8:RunTo(41,55)
--playerMonster9:RunTo(81,59)
--playerMonster10:RunTo(59,52)
--
--
--CppScriptMgr:WaitMilSec(5000)

--第二波
local playerMonster9 = CppScriptMgr:AddPlayer(282,61,55, "Bull Devil Army")
playerMonster9:SetZoomPercent(70)
playerMonster9:SetDir(0)

local playerMonster10 = CppScriptMgr:AddPlayer(282,56,63, "Bull Devil Army")
playerMonster10:SetZoomPercent(70)
playerMonster10:SetDir(0)

local playerMonster11 = CppScriptMgr:AddPlayer(282,57,69, "Bull Devil Army")
playerMonster11:Say("Keep attacking!",3000)
playerMonster11:SetZoomPercent(70)
playerMonster11:SetDir(0)

local playerMonster12 = CppScriptMgr:AddPlayer(282,64,78, "Bull Devil Army")
playerMonster12:Say("For our lord!",3000)
playerMonster12:SetZoomPercent(70)
playerMonster12:SetDir(0)

local playerMonster13 = CppScriptMgr:AddPlayer(282,74,81, "Bull Devil Army")
playerMonster13:SetZoomPercent(70)
playerMonster13:SetDir(0)

local playerMonster14 = CppScriptMgr:AddPlayer(282,82,78, "Bull Devil Army")
playerMonster14:SetZoomPercent(70)
playerMonster14:SetDir(0)

local playerMonster15 = CppScriptMgr:AddPlayer(282,80,62, "Bull Devil Army")
playerMonster15:Say("For our lord!", 3000)
playerMonster15:SetZoomPercent(70)
playerMonster15:SetDir(0)

local playerMonster16 = CppScriptMgr:AddPlayer(282,73,56, "Bull Devil Army")
playerMonster16:Say("Destroy Peace Army!", 3000)
playerMonster16:SetZoomPercent(70)
playerMonster16:SetDir(0)

playerMonster9:RunTo(64,59)
playerMonster10:RunTo(60,63)
playerMonster11:RunTo(60,68)
playerMonster12:RunTo(67,74)
playerMonster13:RunTo(71,73)
playerMonster14:RunTo(74,69)
playerMonster15:RunTo(73,65)
playerMonster16:RunTo(68,60)
CppScriptMgr:WaitMilSec(2000)

hero:SetAction(905)
CppScriptMgr:WaitMilSec(400)

--地震
CppScriptMgr:AddEffect("fathitgtsyd",67,66)
CppScriptMgr:WaitMilSec(1000)
--怪物死亡
playerMonster9:SetAction(330)
playerMonster10:SetAction(330)
playerMonster11:SetAction(330)
playerMonster12:SetAction(330)
playerMonster13:SetAction(330)
playerMonster14:SetAction(330)
playerMonster15:SetAction(330)
playerMonster16:SetAction(330)
CppScriptMgr:WaitMilSec(3500)
--怪物移走
playerMonster9:SetPos(1,1)
playerMonster10:SetPos(1,1)
playerMonster11:SetPos(1,1)
playerMonster12:SetPos(1,1)
playerMonster13:SetPos(1,1)
playerMonster14:SetPos(1,1)
playerMonster15:SetPos(1,1)
playerMonster16:SetPos(1,1)

--hero:Say("这？这是什么力量？", 2000)



local player1 = CppScriptMgr:AddSimplePlayer(1053663,76,75,"Jing Wuwei")
player1:SetLWeapon(560099,0,1)
local player2 = CppScriptMgr:AddSimplePlayer(1053673,73,78,"Zhao Tiejun")
player2:SetLWeapon(560099,0,1)
local player3 = CppScriptMgr:AddSimplePlayer(1053683,78,73,"Song Danxin")
player3:SetLWeapon(560099,0,1)

--local player3 = CppScriptMgr:AddSimplePlayer(1050001, 65,65, "楚榴香", 400300003,1);
--player3:SetZoomPercent(100);
--player3:SetDir(0);

--player3:SetAction(170)
player1:WalkTo(72,71);
player2:WalkTo(70,74);
player3:WalkTo(74,69);

CppScriptMgr:WaitMilSec(2000);

--Jing Wuwei
CppScriptMgr:NpcCallOut("Let`s help you!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc188", 150, 430, "Jing Wuwei", 250, 655)
CppScriptMgr:WaitMilSec(2000)

--Zhao Tiejun
CppScriptMgr:NpcCallOut("It feels so great to kill Evil Army!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc190", 150, 430, "Zhao Tiejun", 250, 655)
CppScriptMgr:WaitMilSec(2000)

--Song Danxin
CppScriptMgr:NpcCallOut("Fight together!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc184", 150, 430, "Song Danxin", 250, 655)
CppScriptMgr:WaitMilSec(2000)

if sex == 1 then 
--玩家
CppScriptMgr:NpcCallOut("The honor of the warlord can`t be profaned!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27064", 150, 430, hero:GetName(), 250, 655)
CppScriptMgr:WaitMilSec(2000)

else

--玩家
CppScriptMgr:NpcCallOut("The honor of the warlord can`t be profaned!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc185", 150, 430, "Peace Warlord", 250, 655)
CppScriptMgr:WaitMilSec(2100)

end
CppScriptMgr:SetDarkScreen(3000);
CppScriptMgr:WaitMilSec(3000);








