------------------------------------------------------------------------------------
--Name:			[英文征服][活动脚本]9月主题活动-金秋狩猎季[9.07-9.27]
--Creator:		翁清海
--Created:		2021/08/12
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>211

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

hero:SetPos(164, 268)

local player1  = CppScriptMgr:AddPlayer(203, 166, 288, "DemonSerpent")
local player2  = CppScriptMgr:AddSimplePlayer(1057180, 157, 269, "Hunting Officer", 4003068662,1)

player2:SetDir(6)
CppScriptMgr:WaitMilSec(1000)
player2:Say("Come here please, brave adventurer!", 1000)
CppScriptMgr:WaitMilSec(1000)

hero:WalkTo(159, 269)
CppScriptMgr:WaitMilSec(2000)

hero:SetDir(2)
hero:SetAction(200)
CppScriptMgr:WaitMilSec(1000)

hero:Say("Please train me hard.", 1000)
CppScriptMgr:WaitMilSec(1000)

player2:Say("This is a trap. Lure the prey into the trap and kill it. That`s the completion of the task.", 1000)
CppScriptMgr:WaitMilSec(1000)

player2:Say("I`ll show you how to do it. Please follow me.", 1000)
CppScriptMgr:WaitMilSec(1000)

player2:WalkTo(166, 286)
hero:WalkTo(164, 286)
CppScriptMgr:WaitMilSec(2000)

for i = 160, 166 do
	CppScriptMgr:SetViewPosByCell(i, i + 112)
	CppScriptMgr:WaitMilSec(100)
end

CppScriptMgr:WaitMilSec(2000)

player2:Say("The best way to bring them into the trap is to get their attention.", 1000)
CppScriptMgr:WaitMilSec(1000)

player1:Say("All intruders in my territory should be dead!", 1000)
CppScriptMgr:WaitMilSec(1000)

player2:Say("Now! Get them to the trap!", 1000)
CppScriptMgr:WaitMilSec(1000)

player1:WalkTo(159, 263)
player2:WalkTo(157, 258)
hero:WalkTo(156, 266)

for i = 166, 154, -1 do
	CppScriptMgr:SetViewPosByCell(i, i + 112)
	CppScriptMgr:WaitMilSec(100)
end

CppScriptMgr:WaitMilSec(10000)

player2:SetDir(0)
player2:Say("The prey is now in the trap! Hurry up and kill it!", 1000)
CppScriptMgr:WaitMilSec(1000)

player1:SetPos(500, 500)
CppScriptMgr:AddEffect("5fire", 159, 263)
CppScriptMgr:WaitMilSec(1000)

player2:Say("I bet you know how to lure the prey. You may start your hunting now!", 1000)
CppScriptMgr:WaitMilSec(2000)


