------------------------------------------------------------------------------------
--Name:			200215[简体征服][任务脚本]忍者觉醒版本-忍者职业剧情任务
--Creator:		兰瑞妹
--Created:		2020/02/10
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>23
-- 1.背景为新职业大厅，有个龙盘在那的那个
-- 2.雾影才藏与玩家站在屏幕中对话
-- 3.对话至Eight Gates内容时，雾影才藏释放开八门动作，并播放光效

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

-- 开八门动作
local player = CppScriptMgr:AddSimplePlayer(1053831, 572, 589, "Saizo", 4003000060,1)
if LuaScriptMgr_IsPassionServer() == true then
	player:SetPos(243,339)
end	
player:SetRWeapon(601439, 0, 1)
player:SetLWeapon(601439, 0, 1)
player:SetHair(16, 1)
player:SetBattleLev(300)
-- 设置玩家方向，[0, 7]-八方向
player:SetDir(1)
-- 设置衣服：player:SetArmor(衣服物品type, 神魂type, 更新外观)
-- player:SetArmor(194905, 0, 1)
-- 设置右手武器：player:SetRWeapon(武器物品type, 神魂type, 更新外观)
-- player:SetRWeapon(616439, 0, 1)
-- 设置左手武器：player:SetLWeapon(武器物品type, 神魂type, 更新外观)
-- player:SetLWeapon(616439, 0, 1)

hero:SetPos(576, 589)
if LuaScriptMgr_IsPassionServer() == true then
	hero:SetPos(245, 338)
end	
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
hero:SetDir(5)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("I teach you the Eight Gates now.\n\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc207", 150, 430, "Saizo", 250, 655)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:NpcCallOut("May the presiders over warriors be my vanguard! Eight Gates, open!\n\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc207", 150, 430, "Saizo", 250, 655)
-- Eight Gates-红色持续   	RedChixv
-- Eight Gates-红色消失   	RedXiaoshi
-- Eight Gates-红色触发	    RedChufa
-- Eight Gates-绿色持续	    GreenChixv
-- Eight Gates-绿色消失	    GreenXiaoshi
-- Eight Gates-绿色触发	    GreenChufa
-- Eight Gates-蓝色持续	    BlueChixv
-- Eight Gates-蓝色消失	    BlueXiaoshi
-- Eight Gates-蓝色触发	    BlueChufa
player:SetAction(905)
CppScriptMgr:WaitMilSec(500)
player:AddEffect("endureXPappear")
CppScriptMgr:WaitMilSec(1000)
player:AddEffect("BlueChufa")
CppScriptMgr:WaitMilSec(1000)
player:AddEffect("BlueChixv")
CppScriptMgr:WaitMilSec(2000)
player:AddEffect("BlueXiaoshi")
CppScriptMgr:WaitMilSec(2000)
-- CppScriptMgr:NpcCallOut("May the presiders over warriors be my vanguard! Eight Gates, open!\n\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("May the presiders over warriors be my vanguard! Eight Gates, open!", 2000)
hero:SetAction(905)
CppScriptMgr:WaitMilSec(500)
hero:AddEffect("endureXPappear")
CppScriptMgr:WaitMilSec(1000)
hero:AddEffect("GreenChufa")
CppScriptMgr:WaitMilSec(1000)
hero:AddEffect("GreenChixv")
CppScriptMgr:WaitMilSec(2000)
hero:AddEffect("GreenXiaoshi")
CppScriptMgr:WaitMilSec(1000)
