------------------------------------------------------------------------------------
--Name:			191227[简体征服][任务脚本]忍者觉醒版本-忍者觉醒剧情任务
--Creator:		兰瑞妹
--Created:		2020/01/02
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>24
-- /chgmap 10764 176 274
-- 1.背景为sswq-zs01a_new
-- 2.玩家、真纪站在屏幕左方下方，Yiraiya闪进屏幕中上方，Chimaru站在屏幕右方
-- 3.Yiraiya闪进屏幕时，玩家向前移动一步，真纪闪到玩家前方
-- 4.Yiraiya、真纪、Chimaru同时释放通灵术，出现3个通灵术(怪物外形)
-- 5.三个PsychicBeast同时播放攻击动作，播放光效后白屏

-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(394, 650)
------------------------------------------------------------
--玩家对象操作接口,Hero、Player、Npc接口都一样
-- 查询/创建，玩家自己
-- 参数：无
local hero = CppScriptMgr:QueryHero()
-- 创建人物接口：CppScriptMgr:AddPlayer(外观look, 坐标x, 坐标y, "Name", id, 角色类型luaPlayerType)
-- local player = CppScriptMgr:AddPlayer(276, 325, 345, "Newbie", 4003000001)
-- hero:SetPos(394, 650)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向

local player1 = CppScriptMgr:AddSimplePlayer(1053840, 406, 650, "Maki", 4003000100,1)
player1:SetDir(2)
local player2 = CppScriptMgr:AddSimplePlayer(23570, 387, 644, "Yiraiya", 4003000101,1)
player2:SetDir(7)
local player3 = CppScriptMgr:AddSimplePlayer(1053834, 393, 662, "Chimaru", 4003000102,1)
player3:SetArmor(196175,0,1)
player3:SetHair(40, 1)
player3:SetRWeapon(0, 0, 1)
player3:SetLWeapon(0, 0, 1)
player3:SetDir(4)

--三忍对话
CppScriptMgr:NpcCallOut("Chimaru, long time no see.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc206", 150, 430, "Yiraiya", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("You are as repulsive as ever.\n\n\n\n                                     Press ESC to skip the story.",2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc191", 150, 430, "Chimaru", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("Why did you betray the Fireland? Our teacher almost died because of you.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc206", 150, 430, "Yiraiya", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("You won`t understand. You will never understand what you are fighting against.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc191", 150, 430, "Chimaru", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("Cut it out.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc194", 150, 430, "Maki", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("You are still so grumpy! Aren`t you afraid of the blood on me?\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc191", 150, 430, "Chimaru", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("I will spread your blood over the Wind Plain!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc194", 150, 430, "Maki", 250, 655)
CppScriptMgr:WaitMilSec(2000)

-- 释放通灵术
CppScriptMgr:NpcCallOut("Psychic Attack!\n\n\n\n                                     Press ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc194", 150, 430, "Maki", 250, 655)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("Psychic Attack!\n\n\n\n                                     Press ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc206", 150, 430, "Yiraiya", 250, 655)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("No! Psychic Attack!\n\n\n\n                                     Press ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc191", 150, 430, "Chimaru", 250, 655)
CppScriptMgr:WaitMilSec(1000)
player1:AddEffect("tonglingshu")
player2:AddEffect("tonglingshu")
player3:AddEffect("tonglingshu")
CppScriptMgr:WaitMilSec(2000)

-- 3个通灵术(怪物外形)
local nMonster0 = CppScriptMgr:AddPlayer(912, 408, 650, "PsychicBeast",4003000103, 1)
local nMonster1 = CppScriptMgr:AddPlayer(954, 389, 646, "PsychicBeast",4003000104, 1)
local nMonster2 = CppScriptMgr:AddPlayer(603, 393, 660, "PsychicBeast",4003000105, 1)
nMonster0:SetZoomPercent(170)
nMonster1:SetZoomPercent(170)
nMonster2:SetZoomPercent(300)
nMonster0:SetDir(2)
nMonster1:SetDir(7)
nMonster2:SetDir(4)
CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:NpcCallOut("I will tatter you today!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc194", 150, 430, "Maki", 250, 655)
CppScriptMgr:WaitMilSec(3000)
local effectObj1 = CppScriptMgr:AddEffect("chufa3", 394, 650)
local effectObj2 = CppScriptMgr:AddEffect("chufa2", 394, 650)
local effectObj3 = CppScriptMgr:AddEffect("chufa1", 394, 650)
local effectObj4 = CppScriptMgr:AddEffect("baozha", 394, 650)
CppScriptMgr:WaitMilSec(3000)
-- 播放光效后白屏
-- CppScriptMgr:ChangeScreenColor(颜色渐变时间, 开始颜色, 最终颜色)
CppScriptMgr:ChangeScreenColor(5000, 0xFFffffff, 0xFFffffff)
