------------------------------------------------------------------------------------
--Name:			191227[简体征服][任务脚本]忍者觉醒版本-忍者觉醒剧情任务
--Creator:		兰瑞妹
--Created:		2020/01/02
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>28
-- /chgmap 1002 392 599
-- 1.背景为sswq-zs01a_new
-- 2.真纪站在屏幕中，使用战备动作(300)
-- 3.玩家站在真纪下方
-- 4.Chimaru从屏幕左方向真纪冲，在1个身位停下使用攻击动作(大概1秒)
-- 5.Chimaru停下前玩家闪到真纪前方，并播放受击动作(320)

-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(392, 599)
------------------------------------------------------------
--玩家对象操作接口,Hero、Player、Npc接口都一样
-- 查询/创建，玩家自己
-- 参数：无
local hero = CppScriptMgr:QueryHero()
hero:SetDir(1)
hero:SetAction(300)
-- 创建人物接口：CppScriptMgr:AddPlayer(外观look, 坐标x, 坐标y, "Name", id, 角色类型luaPlayerType)
-- local player = CppScriptMgr:AddPlayer(276, 325, 345, "Newbie", 4003000001)

hero:SetPos(406,602)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
-- hero:SetDir(4)
-- hero:SetCtrlMapView(1)

local player1 = CppScriptMgr:AddSimplePlayer(1053846, 399, 602, "Maki", 4003000085,1)
player1:SetDir(6)

local player2 = CppScriptMgr:AddSimplePlayer(1053836, 374, 600, "Chimaru", 4003000086,1)
player2:SetArmor(196175,0,1)
player2:SetHair(40, 1)
player2:SetRWeapon(0, 0, 1)
player2:SetLWeapon(0, 0, 1)
player2:SetDir(6)

CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("I said that I was afraid of blood! I can`t fight any more! Leave me alone!\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:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("(She is afraid of blood? Well, I will kill you with my bloody hands!)\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)
-- 大Chimaru入场
player2:JumpTo(392, 602)
CppScriptMgr:WaitMilSec(1500)
CppScriptMgr:NpcCallOut("Go to hell!\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)
CppScriptMgr:NpcCallOut("Who the hell is that?\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)
player1:SetDir(1)
CppScriptMgr:WaitMilSec(500)
player1:SetAction(210)
player1:Say("Blood... So much blood!", 2000)
-- 玩家替纲手挡伤害
hero:JumpTo(395, 602)
CppScriptMgr:WaitMilSec(500)
hero:Say("Watch out!", 2000)
CppScriptMgr:WaitMilSec(500)
player2:SetAction(401)
hero:SetAction(320)
hero:SetAction(330)
CppScriptMgr:WaitMilSec(500)
player2:SetAction(401)
CppScriptMgr:WaitMilSec(500)
local effectObj1 = CppScriptMgr:AddEffect("stipple_bdh", 395, 597)
local effectObj2 = CppScriptMgr:AddEffect("halo_shui_fir", 395, 597)
local player3 = CppScriptMgr:AddSimplePlayer(23577, 395, 597, "Yiraiya", 4003000084,1)
CppScriptMgr:WaitMilSec(500)
hero:SetHide(1)
CppScriptMgr:NpcCallOut("Yiraiya? Damn!\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(500)
player2:JumpTo(365, 657)
CppScriptMgr:WaitMilSec(500)
CppScriptMgr:NpcCallOut("I`ll go after Chimaru. Please save him!\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)
local effectObj11 = CppScriptMgr:AddEffect("daqingwa", 395, 597)
CppScriptMgr:WaitMilSec(500)
player3:SetHide(1)
CppScriptMgr:WaitMilSec(1500)
CppScriptMgr:NpcCallOut("I want... But you are bleeding...\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)
player1:RunTo(403, 601)
CppScriptMgr:WaitMilSec(1000)
player1:RunTo(399, 602)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("I……\nI……<Gnashing>\nRegeneration!\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 effectObj3 = CppScriptMgr:AddEffect("halo_mu_fir", 395, 602)
CppScriptMgr:WaitMilSec(1000)
hero:SetHide(0)
hero:SetDir(6)
CppScriptMgr:WaitMilSec(1000)


