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

-- 设置摄像机指向位置(网格坐标)



CppScriptMgr:AddEffect("B_Fire",183, 167)
CppScriptMgr:AddEffect("B_Fire",163, 178)
CppScriptMgr:AddEffect("B_Fire",197, 195)
CppScriptMgr:AddEffect("B_Fire",178, 193)

local player1 = CppScriptMgr:AddSimplePlayer(1063686, 168,175, "MoismDisciple")
local playerMonster1 = CppScriptMgr:AddPlayer(167,169 ,179, "EvilDogface")
player1:SetRWeapon(500163, 0, 1);

local player2 = CppScriptMgr:AddSimplePlayer(1063686, 186,184, "MoismDisciple")
local playerMonster2 = CppScriptMgr:AddPlayer(167,183,187, "EvilDogface")

local player3 = CppScriptMgr:AddSimplePlayer(1063686, 190,180, "MoismDisciple")
local playerMonster3 = CppScriptMgr:AddPlayer(167,190,176, "EvilDogface")

local player4 = CppScriptMgr:AddSimplePlayer(1063686, 175,169, "MoismDisciple")
local playerMonster4 = CppScriptMgr:AddPlayer(167,178,169, "EvilDogface")

player1:SetRWeapon(500163, 0, 1);
player2:SetRWeapon(500163, 0, 1);
player3:SetRWeapon(500163, 0, 1);
player4:SetRWeapon(500163, 0, 1);

player3:SetDir(4)
player4:SetDir(6)
playerMonster1:SetDir(4)
playerMonster2:SetDir(4)
playerMonster3:SetDir(1)
playerMonster4:SetDir(2)

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(181,177)
hero:SetDir(1)
hero:SetZoomPercent(120);
local Situyou = CppScriptMgr:AddPlayer(149,180 ,181, "Szeto")
Situyou:SetDir(5)
Situyou:SetZoomPercent(150);


hero:SetAction(401)
player1:SetAction(401)
playerMonster2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
player2:SetAction(401)
playerMonster1:SetAction(401)

Situyou:SetAction(401)
player3:SetAction(401)
playerMonster4 :SetAction(401)
CppScriptMgr:WaitMilSec(500)
player4:SetAction(401)
playerMonster3 :SetAction(401)

-- hero:SetAction(401)
-- player1:SetAction(401)
-- playerMonster2:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player2:SetAction(401)
-- playerMonster1:SetAction(401)

-- Situyou:SetAction(401)
-- player3:SetAction(401)
-- playerMonster4 :SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player4:SetAction(401)
-- playerMonster3 :SetAction(401)

-- hero:SetAction(401)
-- player1:SetAction(401)
-- playerMonster2:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player2:SetAction(401)
-- playerMonster1:SetAction(401)

-- Situyou:SetAction(401)
-- player3:SetAction(401)
-- playerMonster4 :SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player4:SetAction(401)
-- playerMonster3 :SetAction(401)

-- hero:SetAction(401)
-- player1:SetAction(401)
-- playerMonster2:SetAction(401)
-- CppScriptMgr:WaitMilSec(500)
-- player2:SetAction(401)
-- playerMonster1:SetAction(401)

Situyou:SetAction(401)
player3:SetAction(401)
playerMonster4 :SetAction(401)
CppScriptMgr:WaitMilSec(500)
player4:SetAction(401)
playerMonster3 :SetAction(401)

hero:SetAction(520)
CppScriptMgr:AddEffect("TSM_FRSZ_aoe", 181,177)
CppScriptMgr:AddEffect("Blood", 169, 179)
CppScriptMgr:AddEffect("Blood", 183, 187)
CppScriptMgr:AddEffect("Blood", 190, 176)
CppScriptMgr:AddEffect("Blood", 178, 169)
CppScriptMgr:AddEffect("Blood", 180 ,181)
CppScriptMgr:WaitMilSec(500)


playerMonster1:SetAction(330)
playerMonster2:SetAction(330)
playerMonster3:SetAction(330)
playerMonster4:SetAction(330)
Situyou:SetAction(320)

CppScriptMgr:WaitMilSec(1000)

playerMonster1:SetPos(1000,1000)
playerMonster2:SetPos(1000,1000)
playerMonster3:SetPos(1000,1000)
playerMonster4:SetPos(1000,1000)

CppScriptMgr:AddEffect("curse-1", 181, 177)
CppScriptMgr:AddEffect("SuperXp_coat02", 178, 184)
local Molian = CppScriptMgr:AddSimplePlayer(22274,178 ,184, "MoLian")
Molian:SetZoomPercent(120);
Molian:SetDir(4)
Molian:SetRWeapon(500163, 0, 1);
player1:SetDir(6)
player2:SetDir(2)
player3:SetDir(2)
player4:SetDir(0)


CppScriptMgr:WaitMilSec(500)

Molian:Say("I failed to stop them from opening Twisted Note.", 2000)
-- CppScriptMgr:NpcCallOut("    首领，属下办事不力，未能阻止Twisted Note觉醒……\n\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc189", 150, 430, "MoLian", 250, 655)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("    We`ll talk about it later. Leave here now!\n\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc4241", 150, 430, "Szeto", 250, 655)
CppScriptMgr:WaitMilSec(1000)

hero:Say("Mo Lian! You are the defector! Old Castellan trusted you so much!", 2000)
-- CppScriptMgr:NpcCallOut("    MoLian，原来你就是那个奸细！枉费老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(1000)

Molian:Say("I am never one of the Mos!", 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, "MoLian", 250, 655)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:AddEffect("ssch_wlhd_fir", 178 ,184)
CppScriptMgr:AddEffect("ssch_wlhd_fir", 180 ,181)
CppScriptMgr:WaitMilSec(500)
Situyou:SetPos(1000,1000)
Molian:SetPos(1000,1000)
CppScriptMgr:WaitMilSec(500)

hero:Say("The defector is Mo Lian! I won`t forgive him!", 2000)
-- CppScriptMgr:NpcCallOut("    原来TwistedCity的奸细是MoLian！我一定不会放过这个叛徒！\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(1000)
CppScriptMgr:SetDarkScreen(2000)
CppScriptMgr:WaitMilSec(1000)

-- CppScriptMgr:WaitMilSec(2000)
------------------------------------------------------------
--玩家对象操作接口,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)
