------------------------------------------------------------------------------------
--Name:  	210426[简体征服][任务脚本]210423[简体征服][任务脚本]Soaring Archers剧情任务
--Creator:	杨艳
--Created:	2021-04-26
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>8
-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewScale(200)
CppScriptMgr:SetViewPosByCell(170, 176)

CppScriptMgr:AddEffect("B_Fire", 152, 171)
CppScriptMgr:AddEffect("B_Fire", 190, 194)
CppScriptMgr:AddEffect("B_Fire", 179, 164)

local player1 = CppScriptMgr:AddSimplePlayer(10670, 175,170, "MoismDiscipleCorpse")
local player3 = CppScriptMgr:AddSimplePlayer(10670, 186,174, "MoismDiscipleCorpse")
local player4 = CppScriptMgr:AddSimplePlayer(10670, 186,179, "EvilDogfaceCorpse")
local player6 = CppScriptMgr:AddSimplePlayer(10670, 181,186, "EvilDogfaceCorpse")
local player7 = CppScriptMgr:AddSimplePlayer(10670, 172,186, "MoismDiscipleCorpse")


local Chenzhu = CppScriptMgr:AddSimplePlayer(24016, 170,176, "MoChu")
Chenzhu:SetDir(6)
Chenzhu:SetZoomPercent(200);
Chenzhu:SetRWeapon(500169, 0, 1);

local Moli = CppScriptMgr:AddSimplePlayer(1063694, 171,166, "MoLi")
Moli:SetRWeapon(500163, 0, 1);
Moli:SetDir(7)
Moli:SetZoomPercent(150);

local playerMonster1 = CppScriptMgr:AddPlayer(167,178 ,171, "EvilDogface")
playerMonster1:SetDir(5)

local Moxin = CppScriptMgr:AddSimplePlayer(1063706, 161,177, "MoShin")
Moxin:SetRWeapon(500163, 0, 1);
Moxin:SetZoomPercent(150);
Moxin:SetDir(6)

local playerMonster2 = CppScriptMgr:AddPlayer(167,167 ,179, "EvilDogface")
playerMonster2:SetDir(3)

local Shaochenzhu = CppScriptMgr:AddSimplePlayer(1063676, 172,191, "YoungCastellan")
Shaochenzhu:SetDir(5)
Shaochenzhu:SetRWeapon(500163, 0, 1);
Shaochenzhu:SetZoomPercent(150);

local playerMonster3 = CppScriptMgr:AddPlayer(167,177 ,186, "EvilDogface")
playerMonster3:SetDir(0)

local Situyou = CppScriptMgr:AddPlayer(149,181 ,179, "Szeto")
Situyou:SetDir(2)
Situyou:SetZoomPercent(150);

-- Chenzhu:SetAction(190)
Shaochenzhu:SetAction(401)
playerMonster1:SetAction(401)
playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
Situyou:SetAction(401)
playerMonster3:SetAction(401)
Moli:SetAction(401)
Moxin:SetAction(401)

CppScriptMgr:WaitMilSec(500)
-- Chenzhu:SetAction(401)
Shaochenzhu:SetAction(401)
playerMonster1:SetAction(401)
playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)

playerMonster3:SetAction(401)
Moli:SetAction(401)
Moxin:SetAction(401)

CppScriptMgr:NpcCallOut("   No! Szeto is too powerful! I need support!\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc35543", 150, 430, "MoChu", 250, 655)

CppScriptMgr:WaitMilSec(500)
-- Chenzhu:SetAction(401)
Shaochenzhu:SetAction(401)
playerMonster1:SetAction(401)
playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
Situyou:SetAction(401)
playerMonster3:SetAction(401)
Moli:SetAction(401)
Moxin:SetAction(401)

CppScriptMgr:WaitMilSec(500)
-- Chenzhu:SetAction(401)
Shaochenzhu:SetAction(401)
playerMonster1:SetAction(401)
playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
-- Situyou:SetAction(401)
playerMonster3:SetAction(401)
Moli:SetAction(401)
Moxin:SetAction(401)

CppScriptMgr:WaitMilSec(500)
-- Chenzhu:SetAction(401)
Shaochenzhu:SetAction(401)
playerMonster1:SetAction(401)
playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
Situyou:SetAction(401)
playerMonster3:SetAction(401)
Moli:SetAction(401)
Moxin:SetAction(401)
Moli:Say("Lay out array!", 2000)
Moxin:Say("Lay out array!", 2000)
Shaochenzhu:Say("Lay out array!", 2000)
CppScriptMgr:AddEffect("TSM_JZ_ZFR_JH", 172 ,166)
CppScriptMgr:AddEffect("TSM_JZ_ZFR_JH", 161 ,177)
CppScriptMgr:AddEffect("TSM_JZ_ZFR_JH", 172 ,191)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("Mf_castB", 172 ,166)
CppScriptMgr:AddEffect("Mf_castB", 161 ,177)
CppScriptMgr:AddEffect("Mf_castB", 172 ,191)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("TSM_JTSW_jh", 172 ,166)
CppScriptMgr:AddEffect("TSM_JTSW_jh", 161 ,177)
CppScriptMgr:AddEffect("TSM_JTSW_jh", 172 ,191)


CppScriptMgr:AddEffect("gssswq_chuxian1", 170,176)
CppScriptMgr:AddEffect("gssswq_chuxian3", 170,176)
CppScriptMgr:AddEffect("gssswq_chuxian4", 170,176)

CppScriptMgr:AddEffect("gssswq_xiaoshi1", 170,176)
CppScriptMgr:AddEffect("gssswq_xiaoshi3", 170,176)
CppScriptMgr:AddEffect("gssswq_xiaoshi4", 170,176)

local t1 = CppScriptMgr:AddEffect("gssswq_xunhuan1", 170,176)
local t2 = CppScriptMgr:AddEffect("gssswq_xunhuan3", 170,176)
local t3 = CppScriptMgr:AddEffect("gssswq_xunhuan4", 170,176)

-- CppScriptMgr:WaitMilSec(2000000)
CppScriptMgr:WaitMilSec(500)

CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:WaitMilSec(500)

CppScriptMgr:NpcCallOut("    The legendary Mos are overrated!\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc4241", 150, 430, "Szeto", 250, 655)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)

CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
Situyou:Say("Hmm!", 2000)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
-- Chenzhu:SetAction(320)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e233", 170,176)
CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
-- Chenzhu:SetAction(320)
CppScriptMgr:WaitMilSec(500)


Moli:Say("Castellan! Be careful!", 2000)
Moxin:Say("Castellan!", 2000)
Shaochenzhu:Say("Castellan!", 2000)
CppScriptMgr:ClearEffect( t1 );
CppScriptMgr:ClearEffect( t2 );
CppScriptMgr:ClearEffect( t3 );

CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("GodRef_sltz_hd", 170,176)
CppScriptMgr:AddEffect("NineDragon", 170,176)

local hero = CppScriptMgr:QueryHero()
local heroname = hero:GetName()
local sex = hero:GetSex()
local touxiang = "NPCBust_npc356961"
if sex == 2 then 
	touxiang = "NPCBust_npc356962"
end
hero:SetPos(1000,1000)
CppScriptMgr:WaitMilSec(500)
--玩家
CppScriptMgr:NpcCallOut("    It is Mo Token! Mo Token sensed the danger and took the strike for Castellan!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, touxiang, 150, 430, hero:GetName(), 250, 655)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
CppScriptMgr:WaitMilSec(500)

CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
CppScriptMgr:NpcCallOut("   Retreat during fight! Go to Mo`s Secret Room!\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc35543", 150, 430, "MoChu", 250, 655)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
-- Chenzhu:SetAction(320)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
-- Chenzhu:SetAction(320)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)
CppScriptMgr:AddEffect("zf2-e251_coat01", 181 ,179)

CppScriptMgr:SetDarkScreen(2000)
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)
