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

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


-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(177,51)
------------------------------------------------------------
--玩家对象操作接口,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 LBX  = CppScriptMgr:AddSimplePlayer(1059645, 170,51, "Robinson", 4003000521,1)
local WEX  = CppScriptMgr:AddSimplePlayer(1059664, 175,54, "Wilson", 4003000522,1)
local AN  = CppScriptMgr:AddSimplePlayer(1059673, 179,52, "Anna", 4003000523,1)
local XBD  = CppScriptMgr:AddSimplePlayer(1059682, 182,48, "Sinbad", 4003000524,1)

local effectObj1 = CppScriptMgr:AddEffect("moveback", 180,60);
CppScriptMgr:WaitMilSec(1000)

local hero = CppScriptMgr:QueryHero();
hero:SetLook(hero:GetLook(), false, true) ;
hero:SetZoomPercent(100)
hero:SetPos(180,60)
hero:SetDir(4)


LBX:SetAction(290)
CppScriptMgr:WaitMilSec(1000)
WEX:SetAction(290)
CppScriptMgr:WaitMilSec(1000)
XBD:SetAction(290)
CppScriptMgr:WaitMilSec(500)
LBX:SetAction(290)
CppScriptMgr:WaitMilSec(1000)
WEX:SetAction(290)
CppScriptMgr:WaitMilSec(500)
AN:SetAction(290)
CppScriptMgr:WaitMilSec(1000)
XBD:SetAction(290)
CppScriptMgr:WaitMilSec(500)

--出现半身像
CppScriptMgr:NpcCallOut("Look! The Searchers are busy digging treasures!\n\n\n                                     Press ESC to skip the story.", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc29893", 150, 430, "Captain Jake", 250, 655)

AN:SetAction(290)
CppScriptMgr:WaitMilSec(1000)
LBX:SetAction(290)
CppScriptMgr:WaitMilSec(1000)
WEX:SetAction(290)
CppScriptMgr:WaitMilSec(500)
AN:SetAction(290)

CppScriptMgr:WaitMilSec(1000)


LBX:SetAction(290)
LBX:Say("The granite underground is too hard. This shovel is not good enough.", 2000)
CppScriptMgr:WaitMilSec(1000)

WEX:SetAction(290)
WEX:Say("There must be something here! Keep digging!#17#17", 2000)
-- CppScriptMgr:WaitMilSec(2000)


AN:SetAction(170)
AN:Say("I shouldn`t have come here. I`ve been digging for days but got nothing!", 2000)
-- CppScriptMgr:WaitMilSec(2000)

XBD:SetAction(180)
CppScriptMgr:AddEffect("halo_jin_fir",182,48)
XBD:Say("Found it! I found it!#20#20", 2000)

CppScriptMgr:WaitMilSec(1500)


-- 黑屏, CppScriptMgr:SetDarkScreen(毫秒)
CppScriptMgr:SetDarkScreen(2500)
CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:SetViewPosByCell(128, 132)
--移动到主城
CppScriptMgr:SetLightScreen(2000);

--播放传送光效
local effectObj2 = CppScriptMgr:AddEffect("moveback", 130, 136);

CppScriptMgr:WaitMilSec(2000)

--创建玩家
local hero1 = CppScriptMgr:QueryHero();
hero1:SetLook(hero:GetLook(), false, true) ;
hero1:SetZoomPercent(100)
hero1:SetPos(130, 136)
hero1:SetDir(4)

--创建乌南
CppScriptMgr:AddEffect("zf2-e280-1",130,132)
local WN  = CppScriptMgr:AddSimplePlayer(1065517, 130,132, "Wu Nan", 4003000525,1)
WN:SetZoomPercent(100)

CppScriptMgr:WaitMilSec(500)
--杰克船长
CppScriptMgr:NpcCallOut("This is Wu Nana, the Gold Pirate, and the master of the Golden Island. Hey, buddy! How have you been?\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc29893", 150, 430, "Captain Jake", 250, 655);
CppScriptMgr:WaitMilSec(2000)


WN:SetAction(190)
WN:Say("Hey Jake! Yes, it`s been a long time. You`re still venturing out there. I`m kind of jealous.", 2000)
CppScriptMgr:WaitMilSec(2000)

--杰克船长
CppScriptMgr:NpcCallOut("Haha! This is my friend, an adventurer here for a treasure hunt. Could you do me a favor?\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc29893", 150, 430, "Captain Jake", 250, 655);
CppScriptMgr:WaitMilSec(2000)


WN:Say("Yes, sure! Your friend is my friend.", 2000)
CppScriptMgr:WaitMilSec(2000)


