------------------------------------------------------------------------------------
--Name： 201030[简体征服][活动脚本]战士觉醒第预热第一章
--Creator:      洪连顺
--Created:     2020-10-30
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>89
--/chgmap 11028 100 100
-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(107,147)
------------------------------------------------------------
--玩家对象操作接口,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 effectObj = CppScriptMgr:AddEffect("moveback", 107, 147);
CppScriptMgr:WaitMilSec(1500);
local hero = CppScriptMgr:QueryHero()
local heroname = hero:GetName()
local heroSex = hero:GetSex()
local herolook = "NPCBust_npc27064"
if heroSex == 2 then
	herolook = "NPCBust_npc185"
end
hero:SetPos(107,147)
hero:SetDir(4)
hero:SetCtrlMapView(1)
--怪物位置点
local playerMonster1 = CppScriptMgr:AddPlayer(154,105 ,130, "Orc Evil Army")
playerMonster1:SetZoomPercent(100)
playerMonster1:SetDir(1)

local playerMonster2 = CppScriptMgr:AddPlayer(154,111 ,130, "Orc Evil Army")
playerMonster2:SetZoomPercent(100)
playerMonster2:SetDir(1)

local playerMonster3 = CppScriptMgr:AddPlayer(400,105 ,124, "Sly Blade Ghost")
playerMonster3:SetZoomPercent(100)
playerMonster3:SetDir(1)

local playerMonster4 = CppScriptMgr:AddPlayer(400,111 ,124, "Sly Blade Ghost")
playerMonster4:SetZoomPercent(100)
playerMonster4:SetDir(1)

local playerMonster5 = CppScriptMgr:AddPlayer(200,105 ,116, "Blade Evil Army")
playerMonster5:SetZoomPercent(100)
playerMonster5:SetDir(1)

local playerMonster6 = CppScriptMgr:AddPlayer(200,111,116, "Blade Evil Army")
playerMonster6:SetZoomPercent(100)
playerMonster6:SetDir(1)

local playerMonster7 = CppScriptMgr:AddPlayer(282,120 ,128, "Bull Devil Army")
playerMonster7:SetZoomPercent(100)
playerMonster7:SetDir(1)

local playerMonster8 = CppScriptMgr:AddPlayer(282,120 ,120, "Bull Devil Army")
playerMonster8:SetZoomPercent(100)
playerMonster8:SetDir(1)

local playerMonster9 = CppScriptMgr:AddPlayer(200,104 ,107, "Blade Evil Army")
playerMonster9:SetZoomPercent(100)
playerMonster9:SetDir(1)

local playerMonster10= CppScriptMgr:AddPlayer(400,112 ,107, "Sly Blade Ghost")
playerMonster10:SetZoomPercent(100)
playerMonster10:SetDir(1)

local playerMonster11 = CppScriptMgr:AddPlayer(400,103 ,100, "Sly Blade Ghost")
playerMonster11:SetZoomPercent(100)
playerMonster11:SetDir(1)

local playerMonster12 = CppScriptMgr:AddPlayer(154,111 ,98, "Orc Evil Army")
playerMonster12:SetZoomPercent(100)
playerMonster12:SetDir(1)

--local playerMonster13 = CppScriptMgr:AddPlayer(282,97 ,85, "Bull Devil Army13")
--playerMonster13:SetZoomPercent(100)
--playerMonster13:SetDir(1)

--local playerMonster14 = CppScriptMgr:AddPlayer(154,105 ,85, "Orc Evil Army14")
--playerMonster14:SetZoomPercent(100)
--playerMonster14:SetDir(1)

local playerMonster15 = CppScriptMgr:AddPlayer(200,90 ,85, "Blade Evil Army")
playerMonster15:SetZoomPercent(100)
playerMonster15:SetDir(1)

local playerMonster16 = CppScriptMgr:AddPlayer(282,116 ,84, "Bull Devil Army")
playerMonster16:SetZoomPercent(100)
playerMonster16:SetDir(1)

local playerMonster17= CppScriptMgr:AddPlayer(400,78 ,72, "Sly Blade Ghost")
playerMonster17:SetZoomPercent(100)
playerMonster17:SetDir(1)

local playerMonster18 = CppScriptMgr:AddPlayer(154,86 ,66, "Orc Evil Army")
playerMonster18:SetZoomPercent(100)
playerMonster18:SetDir(1)

local playerMonster19 = CppScriptMgr:AddPlayer(400,106 ,67, "Sly Blade Ghost")
playerMonster19:SetZoomPercent(100)
playerMonster19:SetDir(1)

local playerMonster20= CppScriptMgr:AddPlayer(154,71 ,52, "Orc Evil Army")
playerMonster20:SetZoomPercent(100)
playerMonster20:SetDir(1)

local playerMonster21 = CppScriptMgr:AddPlayer(282,84 ,49, "Bull Devil Army")
playerMonster21:SetZoomPercent(100)
playerMonster21:SetDir(1)

local playerMonster22 = CppScriptMgr:AddPlayer(400,92 ,49, "Sly Blade Ghost")
playerMonster22:SetZoomPercent(100)
playerMonster22:SetDir(1)

local playerMonster23 = CppScriptMgr:AddPlayer(154,100 ,50, "Orc Evil Army")
playerMonster23:SetZoomPercent(100)
playerMonster23:SetDir(1)

local playerMonster24 = CppScriptMgr:AddPlayer(279,108 ,130, "Wolf")
playerMonster24:SetZoomPercent(70)
playerMonster24:SetDir(1)

local playerMonster25 = CppScriptMgr:AddPlayer(279,108 ,124, "Wolf")
playerMonster25:SetZoomPercent(70)
playerMonster25:SetDir(1)

local playerMonster26 = CppScriptMgr:AddPlayer(279,114 ,98, "Wolf")
playerMonster26:SetZoomPercent(70)
playerMonster26:SetDir(1)

CppScriptMgr:WaitMilSec(3000)
CppScriptMgr:NpcCallOut("Here is the Evil Army Camp. The leader is Abyss Evil Lord this time. Its axe can split mountains. We have to be careful.\n\n\n                                     Press ESC to skip the story.", 3500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(3500)

CppScriptMgr:NpcCallOut("Is it true that Evil Army`s attack has something to do with General Xiao?\n\n\n\n\n                                     Press ESC to skip the story.", 2500, 1, "NPCBust_bg", "", 320, 570, 400, 580, herolook, 150, 430, heroname, 250, 655)
CppScriptMgr:WaitMilSec(2500)

CppScriptMgr:NpcCallOut("Abyss Evil Lord used to be sealed by General Xiao. It must have a conspiracy. We need to figure it out this time.\n\n\n                                     Press ESC to skip the story.", 3500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(3500)

CppScriptMgr:NpcCallOut("I see.\n\n\n\n\n\n                                     Press ESC to skip the story.", 2500, 1, "NPCBust_bg", "", 320, 570, 400, 580, herolook, 150, 430, heroname, 250, 655)
CppScriptMgr:WaitMilSec(2500)

CppScriptMgr:NpcCallOut("Be careful. I`m here for you once you are in danger.\n\n\n\n\n                                     Press ESC to skip the story.", 2500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(2500)

CppScriptMgr:NpcCallOut("Thank you.\n\n\n\n\n                                     Press ESC to skip the story.", 2500, 1, "NPCBust_bg", "", 320, 570, 400, 580, herolook, 150, 430, heroname, 250, 655)
CppScriptMgr:WaitMilSec(2500)

hero:RunTo(96,141)
playerMonster1:Say("zzz~", 5000)
playerMonster2:Say("zzz~", 5000)
CppScriptMgr:WaitMilSec(2000)
local effectObj3 = CppScriptMgr:AddEffect("BodyDisapear",100,133);
hero:RunTo(96,121)
local playerEffect1 = CppScriptMgr:AddSimplePlayer(44340,96 ,118, "Evil Army Chest", 4003000115,1)
CppScriptMgr:WaitMilSec(2000)
local effectObj2 = CppScriptMgr:AddEffect("gam_refuse",92,130);
playerMonster3:Say("zzz~", 5000)
playerMonster4:Say("zzz~", 5000)
playerMonster5:Say("zzz~", 5000)
CppScriptMgr:WaitMilSec(3000)
hero:SetAction(220);
hero:SetAction(220);
hero:SetAction(220);
local effectObj5 = CppScriptMgr:AddEffect("BodyDisapear",92,121);
CppScriptMgr:WaitMilSec(3000)
CppScriptMgr:NpcCallOut("I found nothing here. Go ahead to have a look.\n\n\n\n\n                                     Press ESC to skip the story.", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:NpcCallOut("OK.\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, herolook, 150, 430, heroname, 250, 655)
CppScriptMgr:WaitMilSec(2000)


local playerEffect2 = CppScriptMgr:AddSimplePlayer(44340,96 ,99, "Evil Army Chest",4003000116,1)
CppScriptMgr:WaitMilSec(1000)

hero:RunTo(96,101)
local effectObj4 = CppScriptMgr:AddEffect("gam_refuse",92,107);

CppScriptMgr:WaitMilSec(2500)
playerMonster9:Say("zzz~", 5000)
CppScriptMgr:WaitMilSec(2000)
hero:SetAction(220)
hero:SetAction(220)
hero:SetAction(220)
local effectObj5 = CppScriptMgr:AddEffect("BodyDisapear",92,99)
CppScriptMgr:WaitMilSec(3000)

CppScriptMgr:NpcCallOut("This is Warlord Record? So Evil Army is restless because the warlord is coming back.\n\n\n\n                                     Press ESC to skip the story.", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:NpcCallOut("But this is incomplete. Go to find more.\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, herolook, 150, 430, heroname, 250, 655)

CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:NpcCallOut("I`m afraid we will encounter Evil Army if we keep going. As we have got a Warlord Record, let`s report to Han Jingzhong first.\n\n\n\n                                     Press ESC to skip the story.", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(3000)

CppScriptMgr:NpcCallOut("Evil Army will be on alert once they found that we stole the Warlord Record. It will be harder next time. I want to give it a try.\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, herolook, 150, 430, heroname, 250, 655)

CppScriptMgr:WaitMilSec(3000)
hero:JumpTo(92,87)
playerMonster15:Say("Who is that?", 2000)
CppScriptMgr:WaitMilSec(2500)

CppScriptMgr:NpcCallOut("They found us! Run!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Xue Wenzong", 250, 655)
CppScriptMgr:WaitMilSec(3000)

playerMonster15:Say("Enemy! Catch him!", 2000)
CppScriptMgr:WaitMilSec(3000)


hero:AddEffect("goldendragon")

--攻击动作
hero:SetAction(405)
hero:SetAction(405)
CppScriptMgr:WaitMilSec(1500)
for i = 0 , 50 do
	playerMonster15:SetAction(331)
end

CppScriptMgr:WaitMilSec(2000)


hero:SetCtrlMapView(0)
for i=0, 5 do 
	CppScriptMgr:SetViewPosByCell(91+i,90+i)
	CppScriptMgr:WaitMilSec(50)
end
playerMonster15:SetPos(1,1)

playerMonster9:RunTo(95,85)
playerMonster9:Say("Enemy! Catch him!", 4000)
playerMonster10:RunTo(95,85)
playerMonster10:Say("Catch him!", 4000)
playerMonster11:RunTo(97,85)
playerMonster11:Say("Enemy! Catch him!", 4000)
playerMonster12:RunTo(97,85)
playerMonster12:Say("Don`t let him escape!", 4000)
playerMonster26:RunTo(97,85)
playerMonster26:Say("Stop!", 4000)
CppScriptMgr:WaitMilSec(2000)
for i=0, 5 do 
	CppScriptMgr:SetViewPosByCell(96-i,95-i)
	CppScriptMgr:WaitMilSec(50)
end
hero:SetCtrlMapView(1)
hero:RunTo(95,86)
CppScriptMgr:WaitMilSec(1000)

hero:AddEffect("goldendragon")
hero:SetAction(405)
hero:SetAction(405)
CppScriptMgr:WaitMilSec(500)
for i = 0 , 50 do
	playerMonster11:SetAction(331)
	playerMonster12:SetAction(331)
end


hero:JumpTo(104,95)
CppScriptMgr:WaitMilSec(2000)

hero:JumpTo(107,107)

playerMonster11:SetPos(1,1)
playerMonster12:SetPos(1,1)

playerMonster5:RunTo(109,109)
playerMonster5:Say("Enemy! Catch him!", 4000)
playerMonster6:RunTo(111,109)
playerMonster6:Say("Don`t let him escape!", 4000)
CppScriptMgr:WaitMilSec(1500)
hero:RunTo(107,117)

playerMonster3:RunTo(105,118)
playerMonster3:Say("Don`t let him escape!", 4000)
playerMonster4:RunTo(109,118)
playerMonster4:Say("Enemy! Catch him!", 4000)
playerMonster25:RunTo(109,113)
playerMonster25:Say("Stop!", 4000)
CppScriptMgr:WaitMilSec(2500)
hero:AddEffect("goldendragon")
hero:SetAction(405)
hero:SetAction(405)
CppScriptMgr:WaitMilSec(1500)
for i = 0 , 50 do
	playerMonster4:SetAction(331)
	playerMonster3:SetAction(331)
end
CppScriptMgr:WaitMilSec(1500)
playerMonster4:SetPos(1,1)
playerMonster3:SetPos(1,1)
local effectObj6 = CppScriptMgr:AddEffect("BodyDisapear",118,114);
hero:JumpTo(108,127)
local effectObj7 = CppScriptMgr:AddEffect("gam_refuse",116,132);


playerMonster1:RunTo(106,124)
playerMonster1:Say("Enemy! Catch him!", 4000)
playerMonster2:RunTo(109,124)
playerMonster2:Say("Don`t let him escape!", 4000)
playerMonster24:RunTo(107,122)
playerMonster24:Say("Stop!", 4000)
CppScriptMgr:WaitMilSec(1000)

hero:JumpTo(107,137)
CppScriptMgr:WaitMilSec(1200)
local effectObj8 = CppScriptMgr:AddEffect("BodyDisapear",119,142);

local effectObj9 = CppScriptMgr:AddEffect("BodyDisapear",118,124);
hero:JumpTo(107,147)
CppScriptMgr:WaitMilSec(1200)

CppScriptMgr:SetViewPosByCell(105,96)
CppScriptMgr:WaitMilSec(50)
local playerMonster27 = CppScriptMgr:AddPlayer(353,105,96, "Abyss Evil Lord")
playerMonster27:SetZoomPercent(150)
playerMonster27:SetDir(1)

playerMonster27:SetCtrlMapView(1)

CppScriptMgr:WaitMilSec(300)

playerMonster27:WalkTo(106,102)

CppScriptMgr:WaitMilSec(2500)


playerMonster27:Say("I must seek revenge today!", 3000)

CppScriptMgr:ChangeScreenColor()

CppScriptMgr:SetDarkScreen(6000)

CppScriptMgr:WaitMilSec(6000)










