------------------------------------------------------------------------------------
--Name：            200514[简体征服][活动脚本]全球暑期活动引导与摊位NPC
--Creator:      蔡颖静
--Created:     2020-05-14
------------------------------------------------------------------------------------

--/callluafunc </F>User_PlayPlot</N>61


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(63,79)
------------------------------------------------------------
--玩家对象操作接口,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)
-- 镜头一
-- CppScriptMgr:AddEffect("meiguihua_01",32,31);
-- CppScriptMgr:WaitMilSec(100)

CppScriptMgr:SetLightScreen(2000);

-- local ZhuRong  = CppScriptMgr:AddSimplePlayer(1062584, 56, 59, "ZealousMan", 4003000200,1)
local ZhangYuGe  = CppScriptMgr:AddSimplePlayer(1059647, 53,82, "[OctopusBall]OctopusBallPeddler", 4003000201,1)
local MaiMaiTi  = CppScriptMgr:AddSimplePlayer(1059650, 70,84, "[Kebab]Mehmet", 4003000202,1)
local LiDaZui  = CppScriptMgr:AddSimplePlayer(1059667, 81,82, "[NightSnack]CookLee", 4003000203,1)
local ChenChengCheng  = CppScriptMgr:AddSimplePlayer(1059677, 86,74, "[ChilledFruit]Orange", 4003000204,1)
local JinXiangYu  = CppScriptMgr:AddSimplePlayer(1059687, 85,65, "[ChilledBeer]Winemaker", 4003000205,1)

local effectObj3 = CppScriptMgr:AddEffect("task144", 55,84);
local effectObj4 = CppScriptMgr:AddEffect("task025", 70,86);
local effectObj5 = CppScriptMgr:AddEffect("task024", 83,84);
local effectObj6 = CppScriptMgr:AddEffect("task146", 88,76);
local effectObj7 = CppScriptMgr:AddEffect("task145", 87,67);

local effectObj1 = CppScriptMgr:AddEffect("moveback", 63,79);
CppScriptMgr:WaitMilSec(1000)

local hero = CppScriptMgr:QueryHero();
hero:SetLook(hero:GetLook(), false, true) ;
hero:SetZoomPercent(100)
hero:SetPos(63,79)
hero:SetDir(0)

--出现半身像
CppScriptMgr:NpcCallOut("Welcome to Summer Passion Feast! Make yourself at home!\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
CppScriptMgr:WaitMilSec(2000);
hero:Say("So fragrant! I can`t wait!", 2000)
CppScriptMgr:WaitMilSec(2000);

--章鱼烧摊位前

-- CppScriptMgr:SetViewPosByCell(57,86)
-- CppScriptMgr:SetLightScreen(2000);

-- hero:SetPos(62, 90)
hero:RunTo(57,86)
CppScriptMgr:WaitMilSec(1500)
hero:SetDir(3)
CppScriptMgr:WaitMilSec(500)

--祝融做鼓掌动作
CppScriptMgr:NpcCallOut("This is the famous Octopus Ball Peddler! You will love his Octopus Balls!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
CppScriptMgr:WaitMilSec(1000)


--播放光效pie
CppScriptMgr:AddEffect("pie",53,82)
CppScriptMgr:WaitMilSec(500)

--章鱼哥,播放动作“高兴”
ZhangYuGe:SetAction(190)
ZhangYuGe:Say("Octopus Balls! Freshly made Octopus Balls! Fragrant and juicy!#25#25", 2000)
CppScriptMgr:WaitMilSec(2000)

hero:Say("The balls look so tasty!", 2000)
CppScriptMgr:AddEffect("horse_run",56,85)

CppScriptMgr:WaitMilSec(1000)

--买买提,播放动作“舞蹈”
MaiMaiTi:SetAction(1)
MaiMaiTi:Say("Come to try authentic kebabs!", 2000)

CppScriptMgr:WaitMilSec(2000)
hero:Say("I want kebabs more!#17#17", 2000)
CppScriptMgr:AddEffect("horse_aff",56,85)

CppScriptMgr:WaitMilSec(1000)
ZhangYuGe:SetAction(160)
ZhangYuGe:Say("No!", 2000)

CppScriptMgr:WaitMilSec(2000)

--出现半身像
-- CppScriptMgr:NpcCallOut("Octopus Balls! Freshly made Octopus Balls! Fragrant and juicy!\n\n\n                                     Press ESC to skip the story.", 4000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "OctopusBallPeddler", 250, 655);
-- CppScriptMgr:WaitMilSec(4000);



-- CppScriptMgr:SetViewPosByCell(70,84)
-- CppScriptMgr:SetLightScreen(2000);

-- hero:SetPos(56,85)
hero:RunTo(70,87)

CppScriptMgr:WaitMilSec(2800)
hero:SetDir(4)

--祝融做鼓掌动作
CppScriptMgr:NpcCallOut("Have you tried the authentic kebabs? This vendor won`t disappoint you!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
CppScriptMgr:WaitMilSec(1000)


--播放光效pie
CppScriptMgr:AddEffect("NEW-flower-charm3",70,84)
CppScriptMgr:WaitMilSec(1000)

--买买提,播放动作“舞蹈”
MaiMaiTi:SetAction(1)
MaiMaiTi:Say("Fresh and authentic kebabs! You will love it!", 3000)
CppScriptMgr:WaitMilSec(3000)

hero:Say("It`s so tender. I can have some night snacks later.", 3000)
CppScriptMgr:AddEffect("horse_aff",70,87)
CppScriptMgr:WaitMilSec(3000)

--出现半身像
-- CppScriptMgr:NpcCallOut("Have you ever tried our kebabs? The mutton is freshly got from the live goats.\n\n\n                                     Press ESC to skip the story.", 4000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "Mehmet", 250, 655);
-- CppScriptMgr:WaitMilSec(4000);



CppScriptMgr:SetViewPosByCell(81,82)
-- CppScriptMgr:SetLightScreen(2000);

-- hero:SetPos(70,87)
hero:RunTo(84,85)
CppScriptMgr:WaitMilSec(2800)
hero:SetDir(3)

--祝融做鼓掌动作
CppScriptMgr:NpcCallOut("This is the God of Cook -- Cook Lee!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
CppScriptMgr:WaitMilSec(1000)


--播放光效pie
CppScriptMgr:AddEffect("pie",81,82)
CppScriptMgr:WaitMilSec(1000)


--李大嘴,播放动作“招呼”
LiDaZui:SetAction(180)
LiDaZui:Say("I would let you know who is the best cook in Twin City!", 3000)
CppScriptMgr:WaitMilSec(3000)

hero:Say("My mouth is watering!#16#16", 1000)
CppScriptMgr:AddEffect("hunpo02",83,84)
CppScriptMgr:WaitMilSec(1500)
hero:Say("The snack is a bit oily. Go to have something refreshing!", 2000)
CppScriptMgr:WaitMilSec(3000)

--出现半身像
-- CppScriptMgr:NpcCallOut("I came to Twin City for 2 things. One is to see the condition here, and the other is to show you my cooking skills.\n\n                                     Press ESC to skip the story.", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "CookLee", 250, 655);
-- CppScriptMgr:WaitMilSec(5000);


CppScriptMgr:SetViewPosByCell(86,74)
-- CppScriptMgr:SetLightScreen(2000);


-- hero:SetPos(83,84)
hero:RunTo(89,77)

CppScriptMgr:WaitMilSec(1800)
hero:SetDir(3)

--祝融做鼓掌动作
CppScriptMgr:NpcCallOut("How can you miss the Chilled Fruit in this hot summer?\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
CppScriptMgr:WaitMilSec(1000)



--播放光效pie
CppScriptMgr:AddEffect("NEW-flower-charm3",86,74)
CppScriptMgr:WaitMilSec(1000)

--陈澄呈，播放动作“招呼”
ChenChengCheng:SetAction(190)
ChenChengCheng:Say("Our fruits will bring refreshing happiness to your heart!#20#20", 3000)
CppScriptMgr:WaitMilSec(3000)

hero:Say("So cool and refreshing!", 2000)
CppScriptMgr:AddEffect("rainbow",88,76)
CppScriptMgr:WaitMilSec(1000)

JinXiangYu:SetAction(190)
JinXiangYu:Say("You can`t miss the beer here!", 3000)
CppScriptMgr:WaitMilSec(3000)
hero:Say("Right. Go to have a try!", 2000)
CppScriptMgr:WaitMilSec(2000)

--出现半身像
-- CppScriptMgr:NpcCallOut("My name is Orange. Our fruits have all been chilled. Is there anything better having sweet and chilled fruits in this hot summer?\n     If you bought rotten fruits at my booth, I would give you a decuple compensation.\n\n                                     Press ESC to skip the story.", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "Orange", 250, 655);
-- CppScriptMgr:WaitMilSec(5000);


-- CppScriptMgr:SetViewPosByCell(85,65)
-- CppScriptMgr:SetLightScreen(2000);

CppScriptMgr:NpcCallOut("You can go to the last booth on your own. I had better go.\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
-- hero:SetPos(88,76)
hero:RunTo(88,68)
CppScriptMgr:WaitMilSec(2000)
hero:SetDir(3)
CppScriptMgr:WaitMilSec(1000)

--播放光效pie
CppScriptMgr:AddEffect("NEW-flower-charm3",85,65)

--金香玉做跳舞动作
JinXiangYu:SetAction(1)
JinXiangYu:Say("Hahahaha...", 1000)
CppScriptMgr:WaitMilSec(1000)
JinXiangYu:Say("Wine doesn`t... intoxicate... One intoxicates oneself...", 3000)
CppScriptMgr:WaitMilSec(3000)

hero:Say("Bottoms up!#35#35", 3000)
CppScriptMgr:AddEffect("horse_back",87,67)
CppScriptMgr:WaitMilSec(3000)


--出现半身像
-- CppScriptMgr:NpcCallOut("Wine doesn`t... intoxicate... One intoxicates oneself. Let`s... drink!\n\n\n                                     Press ESC to skip the story.", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "Winemaker", 250, 655);
-- CppScriptMgr:WaitMilSec(6000);


--回到起始位置
CppScriptMgr:SetViewPosByCell(63,79)
CppScriptMgr:SetLightScreen(2000)

local ZhuRong  = CppScriptMgr:AddSimplePlayer(1062584, 63,84, "ZealousMan", 4003000200,1)

local effectObj2 = CppScriptMgr:AddEffect("archer-s", 63,79);
CppScriptMgr:WaitMilSec(1000)
hero:SetPos(63,79)
hero:SetDir(0)
CppScriptMgr:NpcCallOut("You have finished visiting. Go to claim your reward. You can only claim the reward from 1 vendor.\n\n\n                                     Press ESC to skip the story.", 4000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc210", 150, 430, "ZealousMan", 250, 655);
CppScriptMgr:WaitMilSec(4000)





