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


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(176, 178)
local effect1 = CppScriptMgr:AddEffect("B_Fire", 169, 170)
local effect2 = CppScriptMgr:AddEffect("B_Fire", 183, 167)
local effect3 = CppScriptMgr:AddEffect("B_Fire", 194, 195)
local effect4 = CppScriptMgr:AddEffect("B_Fire", 167, 188)

local player1 = CppScriptMgr:AddSimplePlayer(10670, 175,170, "MoismDiscipleCorpse")
local player3 = CppScriptMgr:AddSimplePlayer(10670, 186,174, "MoismDiscipleCorpse")
local player4 = CppScriptMgr:AddSimplePlayer(10670, 178,185, "MoismDiscipleCorpse")
local player5 = CppScriptMgr:AddSimplePlayer(10670, 169,173, "MoismDiscipleCorpse")
local player6 = CppScriptMgr:AddSimplePlayer(10670, 190,186, "MoismDiscipleCorpse")
local player7 = CppScriptMgr:AddSimplePlayer(10670, 172,186, "MoismDiscipleCorpse")
local player8 = CppScriptMgr:AddSimplePlayer(10670, 165,179, "MoismDiscipleCorpse")

local Moxin = CppScriptMgr:AddSimplePlayer(1063706, 181,187, "MoShin")
Moxin:SetRWeapon(500163, 0, 1);
-- Moxin:SetZoomPercent(150);
Moxin:SetDir(5)

local playerMonster1 = CppScriptMgr:AddPlayer(167,183 ,183, "EvilDogface")
local playerMonster2 = CppScriptMgr:AddPlayer(167,187 ,187, "EvilDogface")

local Moli = CppScriptMgr:AddSimplePlayer(1063694, 188,176, "MoLi")
Moli:SetRWeapon(500163, 0, 1);
Moli:SetDir(0)
-- Moli:SetZoomPercent(150);
local playerMonster3 = CppScriptMgr:AddPlayer(167,186 ,179, "EvilDogface")
local playerMonster4 = CppScriptMgr:AddPlayer(167,189 ,181, "EvilDogface")
playerMonster3:SetDir(5)
playerMonster4:SetDir(4)

local player9 = CppScriptMgr:AddSimplePlayer(1063686, 178,170, "MoismDisciple")
player9:SetDir(6)

local playerMonster5 = CppScriptMgr:AddPlayer(167,181 ,172, "EvilDogface")
playerMonster5:SetDir(2)
local player10 = CppScriptMgr:AddSimplePlayer(1063686, 169,177, "MoismDisciple")
local playerMonster6 = CppScriptMgr:AddPlayer(167,169 ,182, "EvilDogface")
local playerMonster7 = CppScriptMgr:AddPlayer(167,167 ,180, "EvilDogface")
playerMonster6:SetDir(4)
playerMonster7:SetDir(6)

playerMonster6:SetAction(401)
Moxin:SetAction(401)
player9:SetAction(401)
playerMonster3:SetAction(401)
CppScriptMgr:WaitMilSec(500)
playerMonster7:SetAction(401)
player10:SetAction(401)
playerMonster5:SetAction(401)
Moli:SetAction(401)
playerMonster1:SetAction(401)
CppScriptMgr:WaitMilSec(500)
playerMonster2:Say("Go to hell!", 2000)
playerMonster6:SetAction(401)
playerMonster4:SetAction(401)
player9:SetAction(401)
Moxin:SetAction(401)
playerMonster2:SetAction(401)
player10:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster6:SetAction(401)
-- Moxin:SetAction(401)
-- player9:SetAction(401)
-- playerMonster3:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster7:SetAction(401)
-- player10:SetAction(401)
-- playerMonster5:SetAction(401)
-- Moli:SetAction(401)
-- playerMonster1:SetAction(401)

-- CppScriptMgr:WaitMilSec(500)

-- local player11 = CppScriptMgr:AddSimplePlayer(1063686, 172,164, "MoismDisciple")
-- player11:RunTo(169, 177);

-- playerMonster6:SetAction(401)
-- playerMonster4:SetAction(401)
-- playerMonster4:Say("去死吧！", 2000)
-- player9:SetAction(401)
-- Moxin:SetAction(401)
-- playerMonster2:SetAction(401)
-- player10:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)

CppScriptMgr:AddEffect("Blood", 169, 177)
player10:SetAction(330)
player10:Say("Kill Evils!", 2000)

-- playerMonster6:SetAction(401)
-- Moxin:SetAction(401)
-- player9:SetAction(401)
-- playerMonster3:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster7:SetAction(401)

-- playerMonster5:SetAction(401)
-- Moli:SetAction(401)
-- playerMonster1:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster6:Say("去死吧！", 2000)
-- playerMonster6:SetAction(401)
-- playerMonster4:SetAction(401)
-- player9:SetAction(401)
-- Moxin:SetAction(401)

-- playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
playerMonster6:SetAction(401)
Moxin:SetAction(401)
player9:SetAction(401)
player10:SetPos(1000, 1000)
-- playerMonster3:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster7:SetAction(401)
-- player11:SetAction(401)

-- playerMonster5:SetAction(401)
-- Moli:SetAction(401)
-- playerMonster1:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player11:SetAction(401)
-- playerMonster6:SetAction(401)
-- playerMonster4:SetAction(401)
-- player9:SetAction(401)
-- Moxin:SetAction(401)
-- playerMonster2:SetAction(401)

-- CppScriptMgr:WaitMilSec(500)
-- player11:SetAction(401)
-- playerMonster6:SetAction(401)
-- Moxin:SetAction(401)
-- player9:SetAction(401)
-- playerMonster3:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster7:SetAction(401)
-- player11:SetAction(401)
-- playerMonster5:SetAction(401)
-- Moli:SetAction(401)
-- playerMonster1:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster6:SetAction(401)
-- playerMonster4:SetAction(401)
-- player9:SetAction(401)
-- Moxin:SetAction(401)
-- playerMonster2:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player11:SetAction(401)
-- playerMonster6:SetAction(401)
-- Moxin:SetAction(401)
-- player9:SetAction(401)
-- playerMonster3:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster7:SetAction(401)
-- player11:SetAction(401)
-- playerMonster5:SetAction(401)
-- Moli:SetAction(401)
-- playerMonster1:SetAction(401)
CppScriptMgr:WaitMilSec(500)
playerMonster2:Say("Go to hell!", 2000)
playerMonster6:SetAction(401)
playerMonster4:SetAction(401)
player9:SetAction(401)
Moxin:SetAction(401)
playerMonster2:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- playerMonster5:SetAction(401)
-- Moli:SetAction(401)
-- playerMonster1:SetAction(401)

CppScriptMgr:AddEffect("GodRef_twzh", 177, 179)
CppScriptMgr:WaitMilSec(500)

local Situyou = CppScriptMgr:AddPlayer(149,177 ,179, "Szeto")
Situyou:SetDir(5)
Situyou:SetZoomPercent(150);
Situyou:SetAction(401)
CppScriptMgr:AddEffect("Bf_attack", 177, 179)
CppScriptMgr:WaitMilSec(500)
Situyou:Say("Evils rule the world!", 2000)

player9:SetAction(330)
-- player11:SetAction(330)
CppScriptMgr:AddEffect("Blood", 178, 170)
CppScriptMgr:AddEffect("Blood", 169, 177)
CppScriptMgr:WaitMilSec(1000)
player9:SetPos(1000, 1000)
CppScriptMgr:SetDarkScreen(2000)

CppScriptMgr:WaitMilSec(1800)
local Monster1 = CppScriptMgr:AddPlayer(167,178 ,173, "EvilDogface")
local Monster2 = CppScriptMgr:AddPlayer(167,181 ,172, "EvilDogface")

local Monster3 = CppScriptMgr:AddPlayer(167,183 ,177, "EvilDogface")
local Monster4 = CppScriptMgr:AddPlayer(167,178 ,177, "EvilDogface")

local Monster5 = CppScriptMgr:AddPlayer(167,179 ,182, "EvilDogface")
local Monster6 = CppScriptMgr:AddPlayer(167,184 ,182, "EvilDogface")

Monster1:SetDir(2)
Monster2:SetDir(2)
Monster3:SetDir(2)
Monster4:SetDir(2)
Monster5:SetDir(2)
Monster6:SetDir(2)
CppScriptMgr:WaitMilSec(200)


CppScriptMgr:SetViewPosByCell(170, 176)
CppScriptMgr:AddEffect("glebesword6", 164, 176)
CppScriptMgr:ClearEffect( effect1 );
CppScriptMgr:ClearEffect( effect2 );
CppScriptMgr:ClearEffect( effect3 );
CppScriptMgr:ClearEffect( effect4 );
Moxin:SetPos(1000, 1000)
Moli:SetPos(1000, 1000)
playerMonster1:SetPos(1000, 1000)
playerMonster2:SetPos(1000, 1000)
playerMonster3:SetPos(1000, 1000)
playerMonster4:SetPos(1000, 1000)
playerMonster5:SetPos(1000, 1000)
playerMonster6:SetPos(1000, 1000)
playerMonster7:SetPos(1000, 1000)

CppScriptMgr:WaitMilSec(1000)
Situyou:SetDir(2)
CppScriptMgr:WaitMilSec(1000)
local Chenzhu = CppScriptMgr:AddSimplePlayer(24016, 167,177, "MoChu")
Chenzhu:SetDir(6)
Chenzhu:SetZoomPercent(150);
Chenzhu:SetRWeapon(500169, 0, 1);

local Dizi1 = CppScriptMgr:AddSimplePlayer(1063686, 170,189, "MoismDisciple")
local Dizi2 = CppScriptMgr:AddSimplePlayer(1063686, 167,186, "MoismDisciple")
local Dizi3 = CppScriptMgr:AddSimplePlayer(1063686, 165,182, "MoismDisciple")
local Dizi4 = CppScriptMgr:AddSimplePlayer(1063686, 164,174, "MoismDisciple")
local Dizi5 = CppScriptMgr:AddSimplePlayer(1063686, 166,171, "MoismDisciple")
local Dizi6 = CppScriptMgr:AddSimplePlayer(1063686, 168,168, "MoismDisciple")
-- local Dizi7 = CppScriptMgr:AddSimplePlayer(1063686, 160,175, "MoismDisciple")
Dizi1:SetDir(6)
Dizi2:SetDir(6)
Dizi3:SetDir(6)
Dizi4:SetDir(6)
Dizi5:SetDir(6)
Dizi6:SetDir(6)

CppScriptMgr:WaitMilSec(1000)
Situyou:Say("Finally! Castellan!", 2000)
-- CppScriptMgr:NpcCallOut("    终于出现了，Castellan大人！\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Szeto", 250, 655)
CppScriptMgr:WaitMilSec(1000)

Chenzhu:Say("No invaders will be let off!", 2000)
-- CppScriptMgr:NpcCallOut("    犯我TwistedCity者，吾必诛之！\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "MoChu", 250, 655)
CppScriptMgr:WaitMilSec(1000)

Situyou:Say("Well, try me!", 2000)
-- CppScriptMgr:NpcCallOut("    那便要看看你的本事了！\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "Szeto", 250, 655)
CppScriptMgr:WaitMilSec(1000)

Chenzhu:Say("Attention! Wipe out Evils!", 2000)
-- CppScriptMgr:NpcCallOut("    MoismDisciple听令！全力以赴，诛灭Evil！\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "MoChu", 250, 655)
CppScriptMgr:WaitMilSec(1000)


------------------------------------------------------------
--玩家对象操作接口,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)
