------------------------------------------------------------------------------------
--Name:			191227[简体征服][任务脚本]忍者觉醒版本-忍者觉醒剧情任务
--Creator:		兰瑞妹
--Created:		2020/01/02
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>30
-- /chgmap 1015 702 675
-- 1.背景为Map1015d
-- 2.Onogi、玩家在屏幕左侧，Itachi在屏幕右侧
-- 3.Onogi向Itachi释放尘盾、玩家向Itachi冲去（2秒），在屏幕中停下
-- 4.Itachi闪开了Onogi的攻击，并向玩家释放了月读
-- 5.播放月读光效，光效结束后结束


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

local player0 = CppScriptMgr:AddSimplePlayer(23647, 689, 679, "Onogi", 4003000070,1)
player0:SetDir(6)
local player1 = CppScriptMgr:AddSimplePlayer(1058381, 710, 676, "Itachi", 4003000071,1)
player1:SetDir(2)
player1:SetArmor(196175,0,1)
player1:SetHair(16, 1)
player1:SetRWeapon(0,0,1)
player1:SetLWeapon(0,0,1)
player1:SetHide(1)
local player2 = CppScriptMgr:AddSimplePlayer(17620, 710, 676, "", 4003000072,1)
player2:SetHide(1)
CppScriptMgr:WaitMilSec(1000)

-- CppScriptMgr:NpcCallOut("Well, welll, great as the Earthland would also reduce to this.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("Well, welll, great as the Earthland would also reduce to this.", 2000)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:NpcCallOut("Don`t try to provoke me.\n\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(2000)

-- CppScriptMgr:NpcCallOut("What would people on the Earthland think of you if they see other Shadows?\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("What would people on the Earthland think of you if they see other Shadows?", 2000)
CppScriptMgr:WaitMilSec(2000)

-- CppScriptMgr:NpcCallOut("If we win by a fluke, the Earthland will still be buried in history.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("If we win by a fluke, the Earthland will still be buried in history.", 2000)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:NpcCallOut("How can I let it ruined in my hand?\n\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(2000)

CppScriptMgr:NpcCallOut("All right! You have my word! I will try my best!\n\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(2000)

-- CppScriptMgr:NpcCallOut("Thank you so much.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("Thank you so much.", 2000)
CppScriptMgr:WaitMilSec(500)

effectObj1 = CppScriptMgr:AddEffect("Nnfenglei",710, 676)
CppScriptMgr:WaitMilSec(500)
player1:SetHide(0)
player2:SetHide(0)
CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:NpcCallOut("Go back to the Bird Island, old man!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc205", 150, 430, "Itachi", 250, 655)
CppScriptMgr:WaitMilSec(1000)

hero:SetDir(6)
CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:NpcCallOut("I am Earth Shadow II!\nDust Detachment!\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(2000)

player0:AddEffect("YJBL_WZ")
CppScriptMgr:WaitMilSec(400)
player2:AddEffect("YJBL_Loop")
CppScriptMgr:WaitMilSec(100)
player1:SetHide(1)
CppScriptMgr:WaitMilSec(2000)
player2:DelEffect("YJBL_Loop")
player1:SetHide(0)

CppScriptMgr:NpcCallOut("My waist! What are you waiting for? Go!\n\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(2000)

-- CppScriptMgr:NpcCallOut("(Oh my god, how dare I provoke him just now?)\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("(Oh my god, how dare I provoke him just now?)", 2000)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:NpcCallOut("That`s it? \nMy turn.\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc205", 150, 430, "Itachi", 250, 655)
CppScriptMgr:WaitMilSec(500)

player1:AddEffect("WXYD_SF")
CppScriptMgr:WaitMilSec(500)
effectObj1 = CppScriptMgr:AddEffect("WXYD_Strike",702, 675)
CppScriptMgr:WaitMilSec(500)
hero:SetAction(340)
CppScriptMgr:WaitMilSec(2000)
hero:SetHide(1)
CppScriptMgr:NpcCallOut("(Recalling) As a Ninja, you should have a tough mind.\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)
player1:RunTo(689, 679)
CppScriptMgr:WaitMilSec(2000)
-- CppScriptMgr:NpcCallOut("(It`s the time. I can make it!)\nGate of Shock, open!\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("(It`s the time. I can make it!)\nGate of Shock, open!", 2000)
CppScriptMgr:WaitMilSec(500)
hero:SetHide(0)
CppScriptMgr:WaitMilSec(500)
hero:SetAction(905)
CppScriptMgr:WaitMilSec(200)
hero:AddEffect("endureXPappear")
CppScriptMgr:WaitMilSec(400)
hero:AddEffect("BlueChixv")
CppScriptMgr:WaitMilSec(400)
CppScriptMgr:NpcCallOut("How come...\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc205", 150, 430, "Itachi", 250, 655)
CppScriptMgr:WaitMilSec(300)
player1:SetDir(6)
hero:SetDir(2)
-- CppScriptMgr:NpcCallOut("That`s it? OK. My turn.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("That`s it? OK. My turn.", 2000)
hero:SetAction(401)
CppScriptMgr:WaitMilSec(200)
player1:SetAction(330)
CppScriptMgr:WaitMilSec(2000)
player1:SetHide(1)
CppScriptMgr:WaitMilSec(1000)