------------------------------------------------------------------------------------
--Name:  	201221[简体征服][活动脚本]全球春节活动-年兽肆虐
--Creator:	冯子鑫
--Created:	2020-12-21
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>107


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(430,515)

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

hero:SetPos(440,515)
hero:SetDir(2)

local XiaoHai1  = CppScriptMgr:AddSimplePlayer(32600, 436,509, "Tom")
local XiaoHai2  = CppScriptMgr:AddSimplePlayer(32614, 436,514, "Jim")
local XiaoHai3  = CppScriptMgr:AddSimplePlayer(32633, 443,521, "Jack")
local XiaoHai4  = CppScriptMgr:AddSimplePlayer(32627, 439,518, "Henry")
XiaoHai1:SetDir(0)
XiaoHai2:SetDir(4)
XiaoHai3:SetDir(3)
XiaoHai4:SetDir(7)

CppScriptMgr:WaitMilSec(2000)
-- 一头超巨大的年兽现身，地动山摇（震屏）


local NianShou = CppScriptMgr:AddPlayer(341,427,517, "Monster Nian")
NianShou:AddEffect("Attack35r")
NianShou:AddEffect("recovery")
NianShou:SetZoomPercent(200)
NianShou:SetDir(6)

CppScriptMgr:WaitMilSec(1000)
XiaoHai1:SetDir(1)
XiaoHai2:SetDir(1)
XiaoHai3:SetDir(2)
XiaoHai4:SetDir(1)

XiaoHai1:Say("What is this?",1000)
XiaoHai2:Say("It is so scary!",1000)
XiaoHai3:Say("Oh!",1000)
XiaoHai4:Say("Is it a dog or a lion?",1000)
hero:Say("Run! Danger!",1500)


CppScriptMgr:WaitMilSec(500)
NianShou:Say("Nice flesh! Mealtime!",5000)

local effectObj11 = CppScriptMgr:AddEffect("zf2-e233",426,523)
local effectObj12 = CppScriptMgr:AddEffect("tempest",433,512)
local effectObj13 = CppScriptMgr:AddEffect("thunder1-2",429,512)
local effectObj14 = CppScriptMgr:AddEffect("ssch_wlhd_hit",431,521)
local effectObj15 = CppScriptMgr:AddEffect("ssch_wlhd_hit",432,513)
local effectObj16 = CppScriptMgr:AddEffect("zf2-e236",432,508)
local effectObj17 = CppScriptMgr:AddEffect("tempest-2",434,506)
local effectObj18 = CppScriptMgr:AddEffect("tempest",446,520)
local effectObj19 = CppScriptMgr:AddEffect("zf2-e236",421,515)






-- 四个群众吓得四散而逃
CppScriptMgr:WaitMilSec(1000)
XiaoHai1:Say("Help!#08",3000)
XiaoHai2:Say("No! Monster Nian is here!",3000)
XiaoHai3:Say("Anyone? Help!",3000)
XiaoHai4:Say("Run!#25",3000)
XiaoHai1:RunTo(443,447)
XiaoHai3:RunTo(459,539)
CppScriptMgr:WaitMilSec(1000)
local effectObj1 = CppScriptMgr:AddEffect("BodyDisapear",436,514)
local effectObj2 = CppScriptMgr:AddEffect("BodyDisapear",439,518)
XiaoHai2:SetPos(1000,1000)
XiaoHai4:SetPos(1000,1000)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("This monster has finally appeared! Don`t worry! Let me teach you the spell to seal Monster Nian!\n\n\n\n                                     Click ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc5016", 150, 430, "Laozi", 250, 655)
CppScriptMgr:WaitMilSec(3000)

hero:Say("In the name of the Grand Lord, I command you! Seal!",1500)
CppScriptMgr:WaitMilSec(1000)

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

hero:AddEffect("ride_up")
CppScriptMgr:WaitMilSec(1000)
local effectObj4  = CppScriptMgr:AddEffect("shanhesheji",437,513)

NianShou:Say("This is the Painting of Mountains and Rivers!",3000)
CppScriptMgr:WaitMilSec(3000)
local effectObj3  = CppScriptMgr:AddEffect("5fire",427,517)
NianShou:SetPos(1000,1000)


CppScriptMgr:WaitMilSec(2000)