------------------------------------------------------------------------------------
--Name:			191227[简体征服][任务脚本]忍者觉醒版本-忍者觉醒剧情任务
--Creator:		兰瑞妹
--Created:		2020/01/02
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>21
-- /chgmap 10764 176 274
-- 1.背景为妙木山
-- 2.玩家站在屏幕中，周围站着10个ToadNinjaNPC
-- 3.对家对话至想见TaekoSensei时，最右边的ToadNinja向右移动至屏幕外
-- 4.ToadNinja离开后1秒后，ToadNinja重新从屏幕外移动回原位置

-- 设置摄像机指向位置(网格坐标)
CppScriptMgr:SetViewPosByCell(173, 269)
------------------------------------------------------------
--玩家对象操作接口,Hero、Player、Npc接口都一样
-- 查询/创建，玩家自己
-- 参数：无
local hero = CppScriptMgr:QueryHero()
-- 创建人物接口：CppScriptMgr:AddPlayer(外观look, 坐标x, 坐标y, "Name", id, 角色类型luaPlayerType)
-- local player = CppScriptMgr:AddPlayer(276, 325, 345, "Newbie", 4003000001)

hero:SetPos(173, 269)
-- 等待1000毫秒
-- CppScriptMgr:WaitMilSec(1000)
-- 设置玩家方向，[0, 7]-八方向
-- hero:SetDir(4)
-- hero:SetCtrlMapView(1)

local player0 = CppScriptMgr:AddSimplePlayer(23530, 162, 268, "ToadJim", 4003000090,1)
local player1 = CppScriptMgr:AddSimplePlayer(23540, 166, 274, "ToadRoan", 4003000091,1)
local player2 = CppScriptMgr:AddSimplePlayer(23554, 180, 281, "ToadYemon", 4003000092,1)
local player3 = CppScriptMgr:AddSimplePlayer(23596, 182, 276, "ToadCole", 4003000093,1)
local player4 = CppScriptMgr:AddSimplePlayer(23612, 183, 270, "ToadLulu", 4003000094,1)
local player5 = CppScriptMgr:AddSimplePlayer(23631, 178, 260, "ToadFaye", 4003000095,1)
local player6 = CppScriptMgr:AddSimplePlayer(23530, 172, 258, "ToadKen", 4003000096,1)
local player7 = CppScriptMgr:AddSimplePlayer(23542, 166, 259, "ToadKwong", 4003000097,1)
local player8 = CppScriptMgr:AddSimplePlayer(23552, 164, 262, "ToadJohn", 4003000098,1)
local player9 = CppScriptMgr:AddSimplePlayer(23592, 171, 279, "ToadLil", 4003000099,1)

player0:SetDir(6)
player1:SetDir(6)
player2:SetDir(3)
player3:SetDir(3)
player4:SetDir(2)
player5:SetDir(1)
player6:SetDir(0)
player7:SetDir(7)
player8:SetDir(7)
player9:SetDir(5)

CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:NpcCallOut("    Why do you look so pale?\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc198", 150, 430, "ToadJim", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    He is hungry!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc201", 150, 430, "ToadCole", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    Go to have a meal with us! We can`t wait!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc199", 150, 430, "ToadLulu", 250, 655)
CppScriptMgr:WaitMilSec(2000)
-- CppScriptMgr:NpcCallOut("    I have no appetite.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("    I have no appetite.", 2000)
-- 跑出地图
local effectObj11 = CppScriptMgr:AddEffect("daqingwa", 178, 260)
CppScriptMgr:WaitMilSec(100)
player5:SetHide(1)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    You don`t know how tasty the caterpillar is!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc198", 150, 430, "ToadJim", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    Yes! With a slight bite, the white juice will burst inside your mouth!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc201", 150, 430, "ToadCole", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    That`s great!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc199", 150, 430, "ToadLulu", 250, 655)
CppScriptMgr:WaitMilSec(2000)
-- CppScriptMgr:NpcCallOut("    (So horrible!)\n    I`m not hungry. You can eat first.\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("(So horrible!)\nI`m not hungry. You can eat first.", 2000)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    Make yourself at home! We are very obliged to you!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc198", 150, 430, "ToadJim", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    Right! We will wait until you start to eat!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc201", 150, 430, "ToadCole", 250, 655)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    Come on! Come on!\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc199", 150, 430, "ToadLulu", 250, 655)
CppScriptMgr:WaitMilSec(2000)
-- CppScriptMgr:NpcCallOut("    I...\n(You feel hard to refuse.)\n(Oh my god! Help!)\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("I...\n(It`s hard to refuse.)\n(Oh my god! Help!)", 2000)
-- 跑回地图
CppScriptMgr:WaitMilSec(2000)
local effectObj12 = CppScriptMgr:AddEffect("daqingwa", 178, 260)
CppScriptMgr:WaitMilSec(1000)
player5:SetHide(0)
CppScriptMgr:NpcCallOut("    Taeko Sensei said that he has been waiting for you! You can see him now.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc200", 150, 430, "ToadFaye", 250, 655)
CppScriptMgr:WaitMilSec(2000)
-- CppScriptMgr:NpcCallOut("    (Taeko Sensei is my savior!)\nI want to have the meal with you, but this thing is urgent. Let`s do it next time, OK?\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc208", 150, 430, "Me", 250, 655)
hero:Say("(Taeko Sensei is my god!)\nI want to have the meal with you, but this thing is urgent. Let`s do it next time, OK?", 2000)
CppScriptMgr:WaitMilSec(2000)
CppScriptMgr:NpcCallOut("    <Disappointed> Well, Taeko Sensei`s meeting is the top priority.\n\n\n\n                                     Press ESC to skip the story.", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc198", 150, 430, "ToadJim", 250, 655)
CppScriptMgr:WaitMilSec(2000)



