------------------------------------------------------------------------------------
--Name:			[简体征服][活动脚本]全球万圣活动-噩梦456
--Creator:		翁清海
--Created:		2020/09/18
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>70

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

hero:SetPos(107, 130)
-- hero:SetCtrlMapView(1)

local player1  = CppScriptMgr:AddPlayer(919, 83, 119, "Dark Spirit")
local player2  = CppScriptMgr:AddSimplePlayer(1051220, 107, 126, "Scholar Ning", 4003068662,1)
local player3  = CppScriptMgr:AddSimplePlayer(1051152, 88, 117, "Ghost Hunter", 4003068663,1)

player1:SetZoomPercent(200)
player1:SetDir(6)
player3:SetDir(2)

player3:Say("In the name of the Grand Elderly Lord, you`re sealed!", 1000)
CppScriptMgr:WaitMilSec(1000)

player3:SetAction(836)
CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:AddEffect("ride_up", 88, 117)
CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:AddEffect("tj", 83, 119)
CppScriptMgr:WaitMilSec(1000)

player1:Say("What`s this spell?", 1000)
CppScriptMgr:WaitMilSec(1000)

player1:Say("Don`t try to catch me! Dark shadows!", 1000)
CppScriptMgr:WaitMilSec(1000)

player1:SetPos(200, 200)

local player4   = CppScriptMgr:AddPlayer(469, 83, 119, "Dark Shadow")
local player5   = CppScriptMgr:AddPlayer(469,83, 119, "Dark Shadow")
local player6   = CppScriptMgr:AddPlayer(469,83, 119, "Dark Shadow")
local player7   = CppScriptMgr:AddPlayer(469,83, 119, "Dark Shadow")
local player8   = CppScriptMgr:AddPlayer(469,83, 119, "Dark Shadow")
local player9   = CppScriptMgr:AddPlayer(469,83, 119, "Dark Shadow")
local player10  = CppScriptMgr:AddPlayer(469, 83, 119, "Dark Shadow")
local player11  = CppScriptMgr:AddPlayer(469, 83, 119, "Dark Shadow")

player4:RunTo(77, 112)
player5:RunTo(83, 111)
player6:RunTo(90, 115)
player7:RunTo(93, 122)
player8:RunTo(90, 127)
player9:RunTo(85, 128)
player10:RunTo(78, 127)
player11:RunTo(72, 121)

player3:Say("Hero! Please help me save Scholar Ning!", 1000)
CppScriptMgr:WaitMilSec(1000)

for i = 85, 103 do
	CppScriptMgr:SetViewPosByCell(i, i + 27)
	CppScriptMgr:WaitMilSec(30)
end

player2:SetAction(200)
CppScriptMgr:WaitMilSec(1000)

player2:Say("Hero! Please save me and my Ghost Girl!", 1000)
CppScriptMgr:WaitMilSec(1000)

-- 半身像对话框
CppScriptMgr:NpcCallOut("There are Dark Shadows around Dark Spirit. Kill all Dark Shadows and then you can defeat Dark Spirit!\n\n\n\n                                     Press ESC to skip the story.", 4000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27064", 150, 430, "Scholar Ning", 250, 655)
CppScriptMgr:WaitMilSec(4000)

hero:Say("I`ll defeat Dark Spirit!", 3000)
CppScriptMgr:WaitMilSec(3000)

