------------------------------------------------------------------------------------
--Name:			201013[简体征服][活动脚本]感恩狂欢季--主NPC部分
--Creator:		洪聪敏
--Created:		2020/10/13
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>83


-- 设置摄像机指向位置(网格坐标);
CppScriptMgr:SetViewPosByCell(346,442);
------------------------------------------------------------
--玩家对象操作接口,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);


-- hero:AddEffect("zf2-e280")
local player1 = CppScriptMgr:AddSimplePlayer(1056956, 344,442, "DailyQuestkEnvoy", 400300001,1);
player1:SetZoomPercent(100);
player1:SetDir(0);

local player2 = CppScriptMgr:AddSimplePlayer(106790, 348,449, "GameManger", 400300002,1);
player2:SetZoomPercent(100);
player2:SetDir(0);


local player3 = CppScriptMgr:AddSimplePlayer(1064175, 350,440, "ServerTransferOfficer", 400300003,1);
player3:SetZoomPercent(100);
player3:SetDir(0);

local effectObj1 = CppScriptMgr:AddEffect("fire-bomb_1",337,433);
local effectObj2 = CppScriptMgr:AddEffect("fire-bomb_1",352,433);
local effectObj3 = CppScriptMgr:AddEffect("fire-bomb_1",351,447);
local effectObj4 = CppScriptMgr:AddEffect("fire-bomb_1",337,448);
local effectObj5 = CppScriptMgr:AddEffect("fire-bomb_1",341,444);
local effectObj6 = CppScriptMgr:AddEffect("fire-bomb_1",347,444);
local effectObj7 = CppScriptMgr:AddEffect("fire-bomb_1",343,435);

--出现半身像
CppScriptMgr:NpcCallOut("Welcome to my Thanksgiving dinner! Help yourselves... Oh my god! Fire! Fire! My friends are still in the city!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27389", 150, 430, "FarmerLincoln", 250, 655);
 -- 镜头一

local effectObj8 = CppScriptMgr:AddEffect("fire-bomb_1",337,337);
local effectObj9 = CppScriptMgr:AddEffect("fire-bomb_1",352,433);
local effectObj10 = CppScriptMgr:AddEffect("fire-bomb_1",351,447);
local effectObj11 = CppScriptMgr:AddEffect("fire-bomb_1",337,448);
local effectObj12 = CppScriptMgr:AddEffect("fire-bomb_1",341,444);
local effectObj13 = CppScriptMgr:AddEffect("fire-bomb_1",347,444);
local effectObj14 = CppScriptMgr:AddEffect("fire-bomb_1",343,435);

CppScriptMgr:WaitMilSec(1000);


player1:SetAction(170)
player1:RunTo(342,443);
player1:Say("#07Oh lord! Where did the fire come from?",1500);
CppScriptMgr:WaitMilSec(1000);

player3:SetAction(170)
player3:RunTo(360,443);
player3:Say("Who is it? How dare you set fire in Twin City!",1500);
CppScriptMgr:WaitMilSec(2000);


player2:Say("#02I`m so sacred!",1500);
CppScriptMgr:WaitMilSec(2000);



-- 镜头二
local effectObj15 = CppScriptMgr:AddEffect("fire-bomb_1",294,436);
local effectObj16 = CppScriptMgr:AddEffect("fire-bomb_1",294,470);
local effectObj17 = CppScriptMgr:AddEffect("fire-bomb_1",299,453);
local effectObj18 = CppScriptMgr:AddEffect("fire-bomb_1",304,449);
CppScriptMgr:WaitMilSec(1000);



local player4 = CppScriptMgr:AddSimplePlayer(1054626,305,434, "Shopboy", 400300004,1);
player4:SetZoomPercent(100);
player4:SetDir(0);

local player5 = CppScriptMgr:AddSimplePlayer(36, 307,438, "Pharmacist", 400300005,1);
player5:SetZoomPercent(100);
player5:SetDir(0);

local player6 = CppScriptMgr:AddSimplePlayer(1055186, 307,443, "MerchantClerk", 400300006,1);
player6:SetCtrlMapView(1);
player6:SetZoomPercent(100);
player6:SetDir(0);

CppScriptMgr:SetViewPosByCell(313,444);
--出现半身像
CppScriptMgr:NpcCallOut("It`s terrible! The fire is going to swallow the whole Twin City! I need to find a way to put it out!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27389", 150, 430, "FarmerLincoln", 250, 655);
CppScriptMgr:WaitMilSec(3000);
player5:Say("#08Wah! Wah! I got an old mother and a young kid at home.",1500);
CppScriptMgr:WaitMilSec(2000);

player4:Say("Go get some help!",1500);
CppScriptMgr:WaitMilSec(2000);

player6:SetAction(170)
player6:Say("On my way!",1500);
CppScriptMgr:WaitMilSec(2000);

-- 镜头三
local effectObj19 = CppScriptMgr:AddEffect("2020ganenjieDX",372,437);


local playerLinKen = CppScriptMgr:AddSimplePlayer(1051260,372,443, "FarmerLincoln", 400300010,1);
playerLinKen:SetCtrlMapView(1);
playerLinKen:SetZoomPercent(130);
playerLinKen:SetDir(4);

--星级战鸡
local playerXJZJ = CppScriptMgr:AddSimplePlayer(34680,381,443, "GreatCourage", 400300011,1);
playerXJZJ:SetZoomPercent(80);
playerXJZJ:SetDir(0);

local hero = CppScriptMgr:QueryHero()

hero:SetPos(374,450);
hero:SetDir(4);
--切镜头
CppScriptMgr:SetViewPosByCell(373,443);

player6:SetPos(356,441);
player6:RunTo(371,446);
CppScriptMgr:WaitMilSec(500);
player6:Say("#02Fire! Fire! Twin City is on fire!",1500);
CppScriptMgr:WaitMilSec(2000);

player6:SetAction(200)
player6:Say("#02The fire is growing bigger and moving faster now! Hurry up and do something!",1500);
CppScriptMgr:WaitMilSec(2000);


--出现半身像
CppScriptMgr:NpcCallOut("Dame it! My Thanksgiving dinner is ruined by the fire! I need to send my Star Rooster to put it out!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27389", 150, 430, "FarmerLincoln", 250, 655);
CppScriptMgr:WaitMilSec(3000);

-- 农场主林肯
playerLinKen:Say("Come on! Star Rooster!",1500);
CppScriptMgr:WaitMilSec(2000);

playerXJZJ:AddEffect("accession")
CppScriptMgr:WaitMilSec(2000);

playerXJZJ:Say("Starting up...",1500);
CppScriptMgr:WaitMilSec(2000);
playerXJZJ:Say("Di di di...",1500);
CppScriptMgr:WaitMilSec(2000);
playerXJZJ:Say("Insufficient energy. Failed to start.",1500);
CppScriptMgr:WaitMilSec(2000);
--出现半身像
CppScriptMgr:NpcCallOut("Crap! I forgot to recharge the Star Rooster! Now we can only use the Ice Crystals to put out the fire first. Please help me!\n\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc27389", 150, 430, "FarmerLincoln", 250, 655);
CppScriptMgr:WaitMilSec(3000);

hero:RunTo(374,446);
hero:SetDir(4);
CppScriptMgr:WaitMilSec(2000);

-- 农场主林肯
playerLinKen:Say("There is no energy left. Please bring the Ice Crytals to help me put out the fire.",1500);
CppScriptMgr:WaitMilSec(2000);

hero:Say("Don`t worry. Just count on me.", 1500);
CppScriptMgr:WaitMilSec(2000);





