------------------------------------------------------------------------------------
--Name:  	210426[简体征服][任务脚本]210423[简体征服][任务脚本]Soaring Archers剧情任务
--Creator:	杨艳
--Created:	2021-04-26
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>8


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

CppScriptMgr:AddEffect("B_Fire", 117, 131)
CppScriptMgr:AddEffect("B_Fire", 116, 136)
CppScriptMgr:AddEffect("B_Fire", 97, 147)


local player21   = CppScriptMgr:AddSimplePlayer(10670, 95,144, "ArcherCorpse")
local player22   = CppScriptMgr:AddSimplePlayer(10670, 99,146, "ArcherCorpse")
local player23   = CppScriptMgr:AddSimplePlayer(10670, 106,147, "ArcherCorpse")

local player24   = CppScriptMgr:AddSimplePlayer(10670, 98,124, "ArcherCorpse")
local player25   = CppScriptMgr:AddSimplePlayer(10670, 102,124, "ArcherCorpse")
local player26   = CppScriptMgr:AddSimplePlayer(10670, 106,123, "ArcherCorpse")

local player1   = CppScriptMgr:AddPlayer(167, 97,139, "EvilDogface")
local player2   = CppScriptMgr:AddPlayer(167, 100,141, "EvilDogface")
local player4   = CppScriptMgr:AddPlayer(167, 105,143, "EvilDogface")
local player5   = CppScriptMgr:AddPlayer(167, 108,140, "EvilDogface")
local player3   = CppScriptMgr:AddPlayer(167, 102,137, "EvilDogface")

local player6   = CppScriptMgr:AddSimplePlayer(1051970, 102,130, "ArcherGeneral")
local player7   = CppScriptMgr:AddSimplePlayer(1064350, 97,129, "TigerArcher")
local player8   = CppScriptMgr:AddSimplePlayer(1064350, 98,126, "ArcherMaster")
local player9   = CppScriptMgr:AddSimplePlayer(1064350, 101,126, "TigerArcher")
local player10   = CppScriptMgr:AddSimplePlayer(1064350, 105,128, "ArcherMaster")

player6 :SetHair(26, 1)
player7 :SetHair(26, 1)
player8 :SetHair(26, 1)
player9 :SetHair(26, 1)
player10:SetHair(26, 1)
player6:SetArmor(192615, 0, 1);
player8:SetArmor(181415, 0, 1);
player10:SetArmor(181415, 0, 1);
player7:SetArmor(181325, 0, 1);
player9:SetArmor(181325, 0, 1);

player3:SetZoomPercent(150)
player6:SetZoomPercent(150)

player7:SetRWeapon(500163,0, 1)
player9:SetRWeapon(500163,0, 1)
player8:SetRWeapon(500163,0, 1)
player10:SetRWeapon(500163,0, 1)
player6:SetRWeapon(500169,0, 1)

-- player6:SetArmor(133069,0,1)
-- player7:SetArmor(133069,0,1)
-- player8:SetArmor(133069,0,1)
-- player9:SetArmor(133069,0,1)
-- player10:SetArmor(133069,0,1)

player1:SetDir(4)
player2:SetDir(4)
player3:SetDir(4)
player4:SetDir(4)
player5:SetDir(4)

-- 喊话
player6:Say("How dare you come here!", 2000)
-- 播放攻击动作
player1:SetAction(401)
player2:SetAction(401)
player3:SetAction(401)
player4:SetAction(401)
player5:SetAction(401)
CppScriptMgr:WaitMilSec(500)
player6:SetAction(401)
player7:SetAction(401)
player8:SetAction(401)
player9:SetAction(401)
player10:SetAction(401)


CppScriptMgr:AddEffect("xidag_bafi", 97, 139)
CppScriptMgr:AddEffect("xidag_bafi", 100,141)
CppScriptMgr:AddEffect("xidag_bafi", 105,143)
CppScriptMgr:AddEffect("xidag_bafi", 108,140)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 97,129)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 98,126)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 101,126)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 105,128)
CppScriptMgr:WaitMilSec(500)
player3:Say("Go! Raze them to the ground!", 2000)
-- 播放攻击动作
player1:SetAction(401)
player2:SetAction(401)
player3:SetAction(401)
player4:SetAction(401)
player5:SetAction(401)
CppScriptMgr:WaitMilSec(500)
player6:SetAction(401)
player7:SetAction(401)
player8:SetAction(401)
player9:SetAction(401)
player10:SetAction(401)

CppScriptMgr:AddEffect("xidag_bafi", 97, 139)
CppScriptMgr:AddEffect("xidag_bafi", 100,141)
CppScriptMgr:AddEffect("xidag_bafi", 105,143)
CppScriptMgr:AddEffect("xidag_bafi", 108,140)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 97,129)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 98,126)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 101,126)
CppScriptMgr:AddEffect("TSM_LXZF_sf", 105,128)
CppScriptMgr:WaitMilSec(500)

-- 播放攻击动作
-- player1:SetAction(401)
-- player2:SetAction(401)
-- player3:SetAction(401)
-- player4:SetAction(401)
-- player5:SetAction(401)
-- player6:SetAction(401)
-- player7:SetAction(401)
-- player8:SetAction(401)
-- player9:SetAction(401)
-- player10:SetAction(401)

-- CppScriptMgr:AddEffect("xidag_bafi", 97, 139)
-- CppScriptMgr:AddEffect("xidag_bafi", 100,141)
-- CppScriptMgr:AddEffect("xidag_bafi", 105,143)
-- CppScriptMgr:AddEffect("xidag_bafi", 108,140)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 97,129)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 98,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 101,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 105,128)
-- CppScriptMgr:WaitMilSec(1000)

-- 同时，EvilDogface所站的位置不停的出现光效“xidag_bafi”，弓手弟子所站的位置不停地出现光效“TSM_LXZF_sf”.
-- 光效持续3秒后，EvilDogface和弓手弟子身上都会出现光效
-- “Blood”，然后纷纷死亡倒下.
-- CppScriptMgr:AddEffect("xidag_bafi", 97, 139)
-- CppScriptMgr:AddEffect("xidag_bafi", 100,141)
-- CppScriptMgr:AddEffect("xidag_bafi", 105,143)
-- CppScriptMgr:AddEffect("xidag_bafi", 108,140)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 97,129)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 98,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 101,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 105,128)
-- CppScriptMgr:WaitMilSec(1000)
-- CppScriptMgr:AddEffect("xidag_bafi", 97, 139)
-- CppScriptMgr:AddEffect("xidag_bafi", 100,141)
-- CppScriptMgr:AddEffect("xidag_bafi", 105,143)
-- CppScriptMgr:AddEffect("xidag_bafi", 108,140)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 97,129)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 98,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 101,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 105,128)
-- CppScriptMgr:WaitMilSec(1000)
-- CppScriptMgr:AddEffect("xidag_bafi", 97, 139)
-- CppScriptMgr:AddEffect("xidag_bafi", 100,141)
-- CppScriptMgr:AddEffect("xidag_bafi", 105,143)
-- CppScriptMgr:AddEffect("xidag_bafi", 108,140)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 97,129)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 98,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 101,126)
-- CppScriptMgr:AddEffect("TSM_LXZF_sf", 105,128)
-- CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:AddEffect("Blood", 97, 139)
CppScriptMgr:AddEffect("Blood", 100,141)
CppScriptMgr:AddEffect("Blood", 105,143)
CppScriptMgr:AddEffect("Blood", 108,140)
CppScriptMgr:AddEffect("Blood", 97,129)
CppScriptMgr:AddEffect("Blood", 98,126)
CppScriptMgr:AddEffect("Blood", 101,126)
CppScriptMgr:AddEffect("Blood", 105,128)

CppScriptMgr:AddEffect("Disapear1", 97, 139)
CppScriptMgr:AddEffect("Disapear1", 100,141)
CppScriptMgr:AddEffect("Disapear1", 105,143)
CppScriptMgr:AddEffect("Disapear1", 108,140)
CppScriptMgr:AddEffect("Disapear1", 97,129)
CppScriptMgr:AddEffect("Disapear1", 98,126)
CppScriptMgr:AddEffect("Disapear1", 101,126)
CppScriptMgr:AddEffect("Disapear1", 105,128)

player1:SetAction(330)
player2:SetAction(330)
player4:SetAction(330)
player5:SetAction(330)
player1:SetPos(1000, 1000)
player2:SetPos(1000, 1000)
player4:SetPos(1000, 1000)
player5:SetPos(1000, 1000)

player7 :SetAction(330)
player8 :SetAction(330)
player9 :SetAction(330)
player10:SetAction(330)
player7 :SetPos(1000, 1000)
player8 :SetPos(1000, 1000)
player9 :SetPos(1000, 1000)
player10:SetPos(1000, 1000)

CppScriptMgr:WaitMilSec(1000)
local player13 = CppScriptMgr:AddSimplePlayer(1050010,96 ,117, "EagleArcher")
local player14 = CppScriptMgr:AddSimplePlayer(1050010,98 ,116, "EagleArcher")
local player15 = CppScriptMgr:AddSimplePlayer(1050010,100 ,115, "TigerArcher")
local player16 = CppScriptMgr:AddSimplePlayer(1050010,102 ,115, "TigerArcher")


local player17 = CppScriptMgr:AddPlayer(167, 97,147, "EvilDogface")
local player18 = CppScriptMgr:AddPlayer(167, 101,147, "EvilDogface")
local player19 = CppScriptMgr:AddPlayer(167, 104,147, "EvilDogface")
local player20 = CppScriptMgr:AddPlayer(167, 107,147, "EvilDogface")


player13:SetRWeapon(500163,0, 1)
player14:SetRWeapon(500163,0, 1)
player15:SetRWeapon(500163,0, 1)
player16:SetRWeapon(500163,0, 1)

player13:SetArmor(181525,0,1)
player14:SetArmor(181525,0,1)
player15:SetArmor(181325,0,1)
player16:SetArmor(181325,0,1)

player13:SetDir(0)
player14:SetDir(0)
player15:SetDir(0)
player16:SetDir(0)

player17:SetDir(4)
player18:SetDir(4)
player19:SetDir(4)
player20:SetDir(4)

player13:RunTo(97,129)
player14:RunTo(98,126)
player15:RunTo(101,126)
player16:RunTo(105,128)

player17:RunTo(97,139)
player18:RunTo(100,141)
player19:RunTo(105,143)
player20:RunTo(108,140)

-- 喊话
player6:Say("Hear me order. Repel Evils!", 2000)
CppScriptMgr:WaitMilSec(1000)
player3:Say("So stupid! Try our Evil power!", 2000)
CppScriptMgr:WaitMilSec(1000)


player17:Say("Go to hell!", 2000)
player20:Say("Go to hell!", 2000)

player13:Say("Go!", 2000)
player14:Say("Go!", 2000)
player15:Say("Kill Evils!", 2000)
player16:Say("Kill Evils!", 2000)

CppScriptMgr:WaitMilSec(1000)


player13:SetAction(401)
player14:SetAction(401)
player15:SetAction(401)
player16:SetAction(401)
player17:SetAction(401)
player18:SetAction(401)
player19:SetAction(401)
player20:SetAction(401)

player13:SetAction(401)
player14:SetAction(401)
player15:SetAction(401)
player16:SetAction(401)
player17:SetAction(401)
player18:SetAction(401)
player19:SetAction(401)
player20:SetAction(401)
CppScriptMgr:WaitMilSec(2000)

