------------------------------------------------------------------------------------
--Name:			191227[简体征服][任务脚本]忍者觉醒版本-忍者觉醒剧情任务
--Creator:		兰瑞妹
--Created:		2020/01/02
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>26
-- /chgmap 1000 582 480
-- 1.背景为maidan-A
-- 2.Gara站在屏幕中，玩家从屏幕左跑至Gara身旁时停止，并播放沙缚术光效
-- 3.玩家与对话后Deidara从屏幕右闪入屏幕中，并与Gara对话
-- 4.对话结束后，Gara身上播放沙缚术光效、Deidara播放C4迦楼Gara，C4光效播放完后结束


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(566,455)
------------------------------------------------------------
local player0 = CppScriptMgr:AddSimplePlayer(1053850, 559, 452, "Gara", 4003000203,1)
player0:SetArmor(193295, 0, 1)
player0:SetRWeapon(0, 0, 1)
player0:SetLWeapon(0, 0, 1)
player0:SetHair(6, 1)
-- CppScriptMgr:WaitMilSec(1000)


--玩家对象操作接口,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(559, 456)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
hero:SetDir(4)
-- hero:SetCtrlMapView(1)
-- CppScriptMgr:WaitMilSec(2000)

-- CppScriptMgr:NpcCallOut("I didn`t expect 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("I didn`t expect this.", 2000)
CppScriptMgr:WaitMilSec(1500)
--Deidara入场
local effectObj1 = CppScriptMgr:AddEffect("Nnfenglei",572, 453)
CppScriptMgr:WaitMilSec(500)
local player1 = CppScriptMgr:AddSimplePlayer(1053862, 572, 453, "Deidara", 4003000204,1)
player1:SetArmor(196175, 0, 1)
-- player1:SetRWeapon(0, 0, 1)
-- player1:SetLWeapon(0, 0, 1)
player1:SetHair(2, 1)
CppScriptMgr:WaitMilSec(500)
player0:SetDir(6)

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

CppScriptMgr:NpcCallOut("There are more surprises waiting for you.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("Who`s that!\n\n\n\n                                     Press ESC to skip the story.", 1500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc193", 150, 430, "Gara", 250, 655)
CppScriptMgr:WaitMilSec(1500)
-- CppScriptMgr:NpcCallOut("What are the surprises?\n\n\n\n                                     Press ESC to skip the story.", 1500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("What are the surprises?", 2000)
CppScriptMgr:WaitMilSec(1500)
CppScriptMgr:NpcCallOut("Well, since you are dying, it`s no big deal to tell you a story.\n\n\n\n                                     Press ESC to skip the story.", 1500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(1500)
CppScriptMgr:NpcCallOut("Your father is actually a rare Earth Ninja.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("What?\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(1500)
CppScriptMgr:NpcCallOut("My boss is interested in your father`s ability. But we can`t find his flaws. Then you were born.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("We thought you would also be an Earth Ninja and planned to steal you away. Unexpectedly, your father announced that you were not his son and locked you down all the day. Your mother also had a rough time chiming in with him.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("They successfully fooled us. We never thought that they would swallow so much for you.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("What?\nThey were protecting me?\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(2000)
CppScriptMgr:NpcCallOut("Surprise, huh? We were also shocked.\nSo we didn`t kill him right away and got along with him for a few days.\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("I have to admit that he is a superb Ninja. He made it for 7 days, while common Ninja usually dies within an hour or turns his coat immediately.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("OK. No more stories. Time to go.\nC4-Gara!\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc192", 150, 430, "Deidara", 250, 655)
CppScriptMgr:WaitMilSec(1000)
effectObj2 = CppScriptMgr:AddEffect("C4zibao",566,455)
CppScriptMgr:NpcCallOut("Sheer Shield!\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(500)
local effectObj2 = CppScriptMgr:AddEffect("ShafangyvLoop",559, 452)
local effectObj3 = CppScriptMgr:AddEffect("ShafangyvLoop",559, 456)
hero:SetHide(1)
player0:SetHide(1)
CppScriptMgr:WaitMilSec(3500)
