------------------------------------------------------------------------------------
--Name:			[简体征服][活动脚本]春节活动2020日常引导任务
--Creator:		黄啸
--Created:		2019/12/16
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>8


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(368, 449)
------------------------------------------------------------
--玩家对象操作接口,Hero、Player、Npc接口都一样
-- 查询/创建，玩家自己
-- 参数：无
-- local hero = CppScriptMgr:QueryHero()
-- hero:SetLook(hero:GetLook(), false, true) 
-- 创建人物接口：CppScriptMgr:AddPlayer(外观look, 坐标x, 坐标y, "名字", id, 角色类型luaPlayerType)
-- local player = CppScriptMgr:AddPlayer(276, 325, 345, "新手勇士", 4003000001)
-- 镜头一
local player = CppScriptMgr:AddSimplePlayer(1058296, 343,443, "ServerTransferOfficer", 4003000032,1)
local player1  = CppScriptMgr:AddSimplePlayer(1065002, 347,443, "DailyQuestEnvoy", 4003000031,1)

--沿途上的npc,光效随意摆放
local nRandomNpc = CppScriptMgr:AddSimplePlayer(8496, 342,423, "CrystalMerchant", 4003000050,1)
-- nRandomNpc.Say("凯歌辞旧岁，骏羊迎新春", 5000)

local nRandomNpc1 = CppScriptMgr:AddSimplePlayer(9232, 347,423, "LadyLuck", 4003000051,1)
-- nRandomNpc1.Say("丰年飞瑞雪，盛世展宏图", 5000)

local nRandomNpc2 = CppScriptMgr:AddSimplePlayer(8736, 343,403, "Confiscator", 4003000052,1)
-- nRandomNpc2.Say("佳节到，向你问个好，身体倍健康，心情特别好。", 5000)

local nRandomNpc3 = CppScriptMgr:AddSimplePlayer(1062682, 349,403, "DragonMessenger", 4003000053,1)
-- nRandomNpc3.Say("好运天天交，口味顿顿妙。", 5000)

CppScriptMgr:AddSimplePlayer(106682,341,416,"WuxingOven", 4003000054,1)
CppScriptMgr:AddSimplePlayer(34392,356,418,"DragonFurnace", 4003000055,1)


--花灯布置
CppScriptMgr:AddSimplePlayer(17024, 351,437, "", 4003000037,1)
CppScriptMgr:AddSimplePlayer(17024, 353,444, "", 4003000038,1)
CppScriptMgr:AddSimplePlayer(17024, 347,451, "", 4003000039,1)
CppScriptMgr:AddSimplePlayer(17024, 336,445, "", 4003000040,1)
CppScriptMgr:AddSimplePlayer(17024, 340,438, "", 4003000041,1)



player:SetLook(58296)
player1:SetLook(65002)

player:SetDir(6);
player1:SetDir(2);

player:SetZoomPercent(150)
player1:SetZoomPercent(150)


CppScriptMgr:SetViewPosByCell(367, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(366, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(365, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",364,442)
CppScriptMgr:SetViewPosByCell(364, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(363, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",362,442)
CppScriptMgr:SetViewPosByCell(362, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(361, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(360, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(359, 442)
CppScriptMgr:WaitMilSec(50)


CppScriptMgr:SetViewPosByCell(358, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(357, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(356, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(355, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(354, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",353,442)
CppScriptMgr:SetViewPosByCell(353, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(352, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(351, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(350, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",349,442)
CppScriptMgr:SetViewPosByCell(349, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(348, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(347, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(346, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(345, 442)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(344, 442)
CppScriptMgr:WaitMilSec(50)


--播放“拜新年”的三个大字地面光效
CppScriptMgr:AddEffect("angelwing",346,443);

--半身
CppScriptMgr:NpcCallOut("    The two persons are making a New Year visit, which is a custom of Chinese New Year to send best wishes to each other. Look, they`ve locked eyes with each other for a long time.", 8500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc25784", 150, 430, "GodofWealth[ChineseNewYearGala]", 250, 655)
-- hero:SetPos(368,449)
-- hero:SetDir(4)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
-- hero:SetAction(101)

player:SetAction(200)
player:Say("Happy Chinese New Year! Wish you always beautiful!", 5000)
CppScriptMgr:WaitMilSec(2000)

player1:SetAction(200)
player1:Say("Happy Chinese New Year! I wish you a bright and prosperous New Year!", 5000)
CppScriptMgr:WaitMilSec(2000)

player:SetAction(230)
player:Say("Um... I want to be brave this year. You know, you`re very special to me. I really like you.", 5000)
CppScriptMgr:WaitMilSec(2000)

player1:Say("(Feel shy) So many people are looking at us... I know you do. I really know.", 5000)
CppScriptMgr:WaitMilSec(1000)
CppScriptMgr:AddEffect("firework-2love",346,443)
CppScriptMgr:WaitMilSec(2000)



--镜头二
local player2  = CppScriptMgr:AddSimplePlayer(1057940, 305,387, "Mrs.Xue", 4003000033,1)
local player3 = CppScriptMgr:AddSimplePlayer(1062294, 305,392, "ArtisanPoTian", 4003000034,1)
CppScriptMgr:AddSimplePlayer(14584, 309,389, "TreasureBox", 4003000042,1)
CppScriptMgr:AddSimplePlayer(45000, 309,385, "", 4003000043,1)
CppScriptMgr:AddSimplePlayer(35920, 309,393, "", 4003000044,1)

CppScriptMgr:AddSimplePlayer(26394,314,395,"MartialDealer", 4003000056,1)
CppScriptMgr:AddSimplePlayer(9180,314,392,"CharacterNameEditor", 4003000057,1)
CppScriptMgr:AddSimplePlayer(105514,321,390,"ArtisanLuo", 4003000058,1)
CppScriptMgr:AddSimplePlayer(4720,321,387,"GarmentShopKeeper", 4003000059,1)
CppScriptMgr:AddSimplePlayer(250,328,393,"Beautician", 4003000060,1)
CppScriptMgr:AddSimplePlayer(24,328,396,"BarberSha", 4003000061,1)

CppScriptMgr:AddSimplePlayer(105156,304,401,"HorseRaceManager", 4003000062,1)
CppScriptMgr:AddSimplePlayer(106034,306,406,"Matchmaker", 4003000063,1)
CppScriptMgr:AddSimplePlayer(100,308,414,"Blacksmith", 4003000064,1)
CppScriptMgr:AddSimplePlayer(184,308,418,"Mr.Know-All", 4003000065,1)
CppScriptMgr:AddSimplePlayer(326,304,424,"GeneralWinner", 4003000066,1)
CppScriptMgr:AddSimplePlayer(40416,304,429,"TowerGuardian", 4003000067,1)
CppScriptMgr:AddSimplePlayer(1064,310,452,"PrizeOfficer", 4003000068,1)
CppScriptMgr:AddSimplePlayer(16504,308,448,"RichSu", 4003000069,1)
-- CppScriptMgr:AddSimplePlayer(16512,308,428,"黎云", 4003000070,1)
-- CppScriptMgr:AddSimplePlayer(2112,308,433,"仓库老板", 4003000071,1)


player2:SetLook(57940)
player3:SetLook(62294)

player2:SetDir(0);
player3:SetDir(4);

player2:SetZoomPercent(150)
player3:SetZoomPercent(150)

CppScriptMgr:SetViewPosByCell(343, 441)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",343,440)
CppScriptMgr:SetViewPosByCell(343, 440)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 439)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 438)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 437)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 436)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 435)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 434)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 433)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 432)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 431)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 430)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 429)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 428)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 427)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 426)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 425)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 424)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 423)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 422)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 421)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",343,420)
CppScriptMgr:SetViewPosByCell(343, 420)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 419)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 418)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 417)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 416)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 415)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",343,414)
CppScriptMgr:SetViewPosByCell(343, 414)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(343, 413)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(342, 412)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(341, 411)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(340, 410)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",339,409)
CppScriptMgr:SetViewPosByCell(339,409)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(338, 408)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(337, 407)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(336, 406)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(335, 405)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(334, 404)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",333,403)
CppScriptMgr:SetViewPosByCell(333,403)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(332, 402)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(331, 401)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(330, 400)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(329, 399)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(328, 398)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(327, 397)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(326, 396)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(325, 395)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(324, 394)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(323, 393)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(322, 392)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(321, 391)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(320, 390)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(319, 389)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(318, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(317, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:AddEffect("FF17",316,388)
CppScriptMgr:SetViewPosByCell(316, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(315, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(314, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(313, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(312, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(311, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(310, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(309, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(308, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(307, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(306, 388)
CppScriptMgr:WaitMilSec(50)
CppScriptMgr:SetViewPosByCell(305, 388)
CppScriptMgr:WaitMilSec(50)


--播放穿新衣光效
CppScriptMgr:AddEffect("angelwing",306,389);

--半身
CppScriptMgr:NpcCallOut("    Wearing brand new clothes, from head to toe, on the first day of the first lunar month is one of the folk customs of the Chinese New Year.", 8500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc25784", 150, 430, "GodofWealth[ChineseNewYearGala]", 250, 655)


player2:SetAction(190)
player2:Say("Sky, put on the new clothes for good luck this year.", 5000)
CppScriptMgr:WaitMilSec(2000)

player3:SetAction(170)
player3:Say("Thank you very much! You`re so kind to me.", 5000)
CppScriptMgr:WaitMilSec(3500)


player3:SetAction(001)
player3:SetLook(63850)
player3:AddEffect("angelwing")

player3:Say("Wow, I look so handsome with the new clothes.", 5000)
CppScriptMgr:WaitMilSec(5000)


--场景三
local player4  = CppScriptMgr:AddSimplePlayer(1063926, 309,440, "Warehouseman", 4003000035,1)
local player5 = CppScriptMgr:AddSimplePlayer(1062452, 313,440, "Shopboy", 4003000036,1)



-- 小孩子
local player6 = CppScriptMgr:AddSimplePlayer(105653, 315,446, "", 4003000045,1)
local player7 = CppScriptMgr:AddSimplePlayer(105652, 318,445, "", 4003000046,1)
local player8 = CppScriptMgr:AddSimplePlayer(105654, 319,443, "", 4003000047,1)
local player9 = CppScriptMgr:AddSimplePlayer(105656, 309,445, "", 4003000048,1)
local player10 = CppScriptMgr:AddSimplePlayer(105651, 312,436, "", 4003000049,1)

player4:SetLook(64726)
player5:SetLook(64072)
player4:SetDir(6);
player5:SetDir(2);

player4:SetZoomPercent(150)
player5:SetZoomPercent(150)


for nCppScriptMgrPosY = 389,438,1 do
	if nCppScriptMgrPosY == 391 or nCppScriptMgrPosY == 395 or nCppScriptMgrPosY == 399 or nCppScriptMgrPosY == 420 then
		CppScriptMgr:AddEffect("FF17",305,nCppScriptMgrPosY)
	end
	CppScriptMgr:SetViewPosByCell(305, nCppScriptMgrPosY)
	CppScriptMgr:WaitMilSec(50)
end

--半身
CppScriptMgr:NpcCallOut("    Firecrackers are set off at the stroke of midnight to scare away evil spirits and celebrate the coming of the new year. What a big noise Shopboy`s firecrackers are producing!", 8500, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc25784", 150, 430, "GodofWealth[ChineseNewYearGala]", 250, 655)

-- 放鞭炮光效
CppScriptMgr:AddEffect("angelwing",309,441)
-- CppScriptMgr:AddEffect("firecracker1",308,440)

player4:SetAction(190)
player4:Say("Chinese New Year celebrated with crackling noise!set off firecrackers outside!", 5000)
CppScriptMgr:WaitMilSec(2000)

player5:Say("Okay, my boss. People come here and watch. I`m going to set off big firecrackers!", 5000)
player5:SetAction(220)
CppScriptMgr:WaitMilSec(1000)
player5:AddEffect("firecracker1") --FF17
CppScriptMgr:WaitMilSec(2000)

--小孩
-- player6:SetAction(190)
player6:Say("Firecrackers, firecrackers! Come here!", 5000)
-- player7:SetAction(190)
player7:Say("So cool!", 5000)
-- player8:SetAction(002)
player8:Say("Happy Chinese New Year!", 5000)
-- player9:SetAction(002)
player9:Say("It`s so exciting!", 5000)
-- player10:SetAction(190)
player10:Say("Great Shopboy!", 5000)

CppScriptMgr:WaitMilSec(4000)
player4:SetAction(150)
player4:Say("Crackling sound brings great fortune!", 5000)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:AddEffect("WuFuLinMen",312,443);
CppScriptMgr:WaitMilSec(3000)



