------------------------------------------------------------------------------------
--Name:			201027[简体征服][活动脚本]战士觉醒预热活动
--Creator:		林玉锦
--Created:		2020/11/01
------------------------------------------------------------------------------------
-- /callluafunc </F>User_PlayPlot</N>88


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(107,104)
------------------------------------------------------------
--玩家对象操作接口,Hero、Player、Npc接口都一样
-- 查询/创建，玩家自己
-- 参数：无
CppScriptMgr:SetViewScale(255)
CppScriptMgr:SetLightScreen(2000)
local hero = CppScriptMgr:QueryHero()
hero:SetLook(hero:GetLook(), false, true)
hero:SetZoomPercent(100)
hero:SetPos(108,111)
hero:SetDir(4)
--三个npc
local Boss = CppScriptMgr:AddPlayer(353,107,104,"Abyss Evil Lord")
Boss:SetZoomPercent(200)
local player = CppScriptMgr:AddSimplePlayer(1053660,102,104,"Jing Wuwei")
player:SetLWeapon(560099,0,1)
local player1 = CppScriptMgr:AddSimplePlayer(1053670,106,99,"Zhao Tiejun")
player1:SetLWeapon(560099,0,1)
local player2 = CppScriptMgr:AddSimplePlayer(1053680,112,104,"Song Danxin")
player2:SetLWeapon(560099,0,1)
player:SetDir(6)
player1:SetDir(0)
player2:SetDir(2)
--boos倒下变成骷髅
hero:SetAction(401)
Boss:SetAction(330)
CppScriptMgr:WaitMilSec(2000)
Boss:SetPos(40,40)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
CppScriptMgr:AddEffect("zf2-e222_1",104,111)
CppScriptMgr:AddEffect("zf2-e222_1",111,111)
CppScriptMgr:AddEffect("zf2-e222_1",93,102)
CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
local effectObj1 = CppScriptMgr:AddPlayer(44150,107,104,"")
effectObj1:AddEffect("zf2-e218",107,104)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
player:Say("That`s it?",2000)
CppScriptMgr:WaitMilSec(2000)
player1:Say("Peace Army is saved thanks to you!",2000)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
CppScriptMgr:WaitMilSec(2000)
player2:Say("I`m afraid it`s not that easy. Stay alert!",2000)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:AddEffect("Disapear1",107,104)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
player:Say("!!!",2000)
player1:Say("!!!",2000)
player2:Say("!!!",2000)
CppScriptMgr:WaitMilSec(1000)
hero:Say("No! Danger!!!!!!",2000)
CppScriptMgr:WaitMilSec(2000)
--爆炸
effectObj1:SetPos(40,40)
CppScriptMgr:AddEffect("posionbomb",107,104)
-- hero:RunTo(108,113)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
CppScriptMgr:WaitMilSec(2000)
--三个npc倒地
player:SetAction(330)
player1:SetAction(330)
player2:SetAction(330)
hero:SetAction(483)
CppScriptMgr:WaitMilSec(2500)
-- hero:SetAction(1011)
-- for i =1,50 do
-- hero:SetAction(331)
-- hero:SetAction(370)
-- CppScriptMgr:WaitMilSec(500)
-- end
player:SetPos(40,40)
player1:SetPos(40,40)
player2:SetPos(40,40)

CppScriptMgr:WaitMilSec(1000)
-- local player4 = CppScriptMgr:AddSimplePlayer(8170,102,104,"Jing Wuwei")
-- player4:SetDir(6)
-- local player5 = CppScriptMgr:AddSimplePlayer(8170,106,99,"Zhao Tiejun")
-- player5:SetDir(4)
-- local player6 = CppScriptMgr:AddSimplePlayer(8170,112,104,"Song Danxin")
-- player6:SetDir(2)
-- player4:Say("大侠!!!",2000)
--场景烟雾

--四周冒出浓烟
-- local effectObj1 = CppScriptMgr:AddEffect("BodyDisapear",104,110)
-- local effectObj2 = CppScriptMgr:AddEffect("gam_refuse",111,110)
-- local effectObj3 = CppScriptMgr:AddEffect("BodyDisapear",111,115)
-- local effectObj4 = CppScriptMgr:AddEffect("gam_refuse",104,114)
-- local effectObj5 = CppScriptMgr:AddEffect("ring1",108,111)
-- Stone2:SetPos(40,40)
-- Stone3:SetPos(40,40)
CppScriptMgr:AddEffect("zf2-e225",103,102)
CppScriptMgr:AddEffect("zf2-e225",103,108)
CppScriptMgr:AddEffect("zf2-e225",113,108)
CppScriptMgr:AddEffect("zf2-e225",113,102)
CppScriptMgr:AddEffect("zf2-e224",107,104)
-- hero:Say("雕虫小技，也敢班门弄斧，伤我兄弟，拿命来.",1000)
hero:Say("Demons are tricky! Are you all right?",3000)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
CppScriptMgr:WaitMilSec(3000)

local Boss2 = CppScriptMgr:AddPlayer(153,107,104,"Abyss Evil Lord")
Boss2:SetZoomPercent(200)
Boss2:SetDir(0)
-- Boss2:SetCtrlMapView(1)
Boss2:RunTo(72,25)
CppScriptMgr:WaitMilSec(2000)
-- Boss2:Say("感受真正的力量，死吧，渺小的人类.",2000)
--场景烟雾
CppScriptMgr:AddEffect("BodyDisapear",111,116)
CppScriptMgr:AddEffect("BodyDisapear",104,116)
-- CppScriptMgr:AddEffect("zf2-e222_1",104,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",111,111)
-- CppScriptMgr:AddEffect("zf2-e222_1",93,102)
-- CppScriptMgr:AddEffect("zf2-e222_1",118,102)
CppScriptMgr:AddEffect("BodyDisapear",102,107)
CppScriptMgr:AddEffect("BodyDisapear",113,107)
-- CppScriptMgr:WaitMilSec(4000)

-- local Monster1 = CppScriptMgr:AddPlayer(154,117,106,"Orc Evil Army")
-- local Monster2 = CppScriptMgr:AddPlayer(200,115,98,"Blade Evil Army")
-- local Monster3 = CppScriptMgr:AddPlayer(400,105,96,"Sly Blade Ghost")
-- local Monster4 = CppScriptMgr:AddPlayer(282,101,101,"Bull Devil Army")
-- local Monster5 = CppScriptMgr:AddPlayer(279,97,104,"Wolf")
-- local Monster6 = CppScriptMgr:AddPlayer(200,106,118,"Blade Evil Army")
-- local Monster7 = CppScriptMgr:AddPlayer(400,110,118,"Sly Blade Ghost")
-- Monster5:SetZoomPercent(70)
-- Monster1:RunTo(107,111)
-- Monster2:RunTo(107,111)
-- Monster3:RunTo(107,111)
-- Monster4:RunTo(107,111)
-- Monster5:RunTo(107,111)
-- Monster6:RunTo(107,111)
-- Monster7:RunTo(107,111)

CppScriptMgr:NpcCallOut("How are our brothers? Are you OK? Abyss Evil Lord is running away! What should we do now?\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(5000)