------------------------------------------------------------------------------------
--Name:			191227[简体征服][任务脚本]忍者觉醒版本-忍者觉醒剧情任务
--Creator:		兰瑞妹
--Created:		2020/01/02
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>31
-- /chgmap 10764 191 144
-- 1.背景为Map1015d
-- 2.Onogi站在屏幕左侧，战备动作（300），玩家在屏幕中，头上有被月读的标识
-- 3.Itachi在玩家右侧，向Onogi跑去，跑至Onogi至玩家中段时停止，播放受击动作
-- 4.Itachi播放受击光效前1秒，玩家被月读标识消失，玩家闪至Itachi身后，播放攻击动作


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(192, 141)
------------------------------------------------------------
--玩家对象操作接口,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(186, 129)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
hero:SetDir(0)
-- hero:SetCtrlMapView(1)

local player1 = CppScriptMgr:AddSimplePlayer(23570, 181, 128, "Yiraiya", 4003000083,1)
local player2 = CppScriptMgr:AddSimplePlayer(1053845, 181, 138, "Maki", 4003000072,1)
local player3 = CppScriptMgr:AddSimplePlayer(1053875, 185, 138, "Terumi", 4003000073,1)
local player4 = CppScriptMgr:AddSimplePlayer(23645, 189, 138, "Onogi", 4003000074,1)
local player5 = CppScriptMgr:AddSimplePlayer(1053865, 183, 141, "Raik", 4003000075,1)
local player6 = CppScriptMgr:AddSimplePlayer(1053855, 187, 141, "Gara", 4003000076,1)
player2:SetDir(4)
player3:SetDir(4)
player4:SetDir(4)
player5:SetDir(4)
player6:SetDir(4)

CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("We can sneak into the Ghost Island and...\nWho`s there?\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(1000)
--大蛇丸、兜入场
effectObj1 = CppScriptMgr:AddEffect("Nnfenglei",203, 139)
effectObj2 = CppScriptMgr:AddEffect("Nnfenglei",203, 143)
CppScriptMgr:WaitMilSec(500)
local player7 = CppScriptMgr:AddSimplePlayer(1064512, 203, 139, "Kabuto", 4003000077,1)
player7:SetArmor(196175,0,1)
player7:SetHair(41, 1)
player7:SetDir(2)
local player8 = CppScriptMgr:AddSimplePlayer(1064512, 203, 143, "Chimaru", 4003000078,1)
player8:SetArmor(196175,0,1)
player8:SetHair(40, 1)
player8:SetDir(2)
--众人转向
CppScriptMgr:WaitMilSec(100)
player1:SetDir(6)
player2:SetDir(6)
player3:SetDir(6)
player4:SetDir(6)
player5:SetDir(6)
player6:SetDir(6)
hero:SetDir(6)
CppScriptMgr:WaitMilSec(100)

CppScriptMgr:NpcCallOut("Chimaru! You again!\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(1500)
CppScriptMgr:NpcCallOut("Good! I can solve you all.\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("You can`t run away this time.\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("Let me show you something good!\nDirt Reincarnation!\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(500)
local effectObj1 = CppScriptMgr:AddEffect("Huituzhuansheng", 197, 139)
local effectObj1 = CppScriptMgr:AddEffect("Huituzhuansheng", 197, 142)
local effectObj1 = CppScriptMgr:AddEffect("Huituzhuansheng", 197, 145)
CppScriptMgr:WaitMilSec(4000)
local monster1 = CppScriptMgr:AddSimplePlayer(1064512, 197, 139, "NinjaSenpai", 4003000079,1)
monster1:SetArmor(196175,0,1)
monster1:SetHair(7, 1)
local monster2 = CppScriptMgr:AddSimplePlayer(1064512, 197, 142, "NinjaSenpai", 4003000080,1)
monster2:SetArmor(196175,0,1)
monster2:SetHair(9, 1)
local monster3 = CppScriptMgr:AddSimplePlayer(1064512, 197, 145, "NinjaSenpai", 4003000081,1)
monster3:SetArmor(196175,0,1)
monster3:SetHair(15, 1)

CppScriptMgr:WaitMilSec(200)
monster1:AddEffect("ShafangyvOpen")
monster2:AddEffect("ShafangyvOpen")
monster3:AddEffect("ShafangyvOpen")
CppScriptMgr:NpcCallOut("Sand Tie!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc193", 150, 430, "Gara", 250, 655)
CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:NpcCallOut("Try this!\n\n\n\n                                     Press ESC to skip the story.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc195", 150, 430, "Raik", 250, 655)
player5:JumpTo(191,140)
CppScriptMgr:WaitMilSec(500)
player5:SetAction(905)
CppScriptMgr:WaitMilSec(100)
monster2:AddEffect("QL_Strike")
CppScriptMgr:WaitMilSec(1000)

monster1:SetAction(330)
monster2:SetAction(330)
monster3:SetAction(330)
CppScriptMgr:WaitMilSec(2000)
monster1:SetHide(1)
monster2:SetHide(1)
monster3:SetHide(1)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:NpcCallOut("(It`s not easy to deal with 5 Shadows.)\nGo.\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc191", 150, 430, "Chimaru", 250, 655)
effectObj21 = CppScriptMgr:AddEffect("Nnfenglei",203, 143)
CppScriptMgr:WaitMilSec(500)
player8:SetHide(1)
CppScriptMgr:NpcCallOut("Want to go? No way!\nEarth Release!\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc204", 150, 430, "Onogi", 250, 655)
CppScriptMgr:WaitMilSec(100)
player7:AddEffect("TBL_StrikeTQ")
CppScriptMgr:WaitMilSec(500)
hero:JumpTo(198,138)
CppScriptMgr:WaitMilSec(500)
hero:SetAction(905)
CppScriptMgr:WaitMilSec(1000)