mirror of
https://gitlab.com/YuukiPS/GSServer-CBT.git
synced 2025-08-03 18:30:11 +03:00
melon
This commit is contained in:
48
soggy_resources/lua/Actor/Quest/Q301/Ambor301.lua
Normal file
48
soggy_resources/lua/Actor/Quest/Q301/Ambor301.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
require('Actor/ActorCommon')
|
||||
local quest301 = require('Actor/Quest/MQ301')
|
||||
local npcActorProxy = require('Actor/Npc/NpcActorProxy')
|
||||
|
||||
local Ambor301 = class("Ambor301", npcActorProxy)
|
||||
|
||||
Ambor301.defaultAlias = "Ambor"
|
||||
|
||||
-- local config begin
|
||||
local q301Cfg = require('Actor/Quest/Q301/Config/Q301Config')
|
||||
local amborData = q301Cfg.AmborData
|
||||
-- local config end
|
||||
|
||||
function Ambor301:Start()
|
||||
print("start!Ambor301")
|
||||
|
||||
end
|
||||
|
||||
function Ambor301:ShowStart()
|
||||
print("Ambor301:ShowStart")
|
||||
self:SetPos(amborData.bornPos)
|
||||
self:RunToTask(amborData.arguePos,
|
||||
function(self, task)
|
||||
self:TurnTo(M.Euler2DirXZ(amborData.argueDir))
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Ambor301:Vanish()
|
||||
print("Ambor301:Vanish()")
|
||||
self:RunToTask(amborData.vanishPos,
|
||||
function(self, task)
|
||||
self:Destroy(false)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Ambor301:VanishDirect(task)
|
||||
print("Ambor301:VanishDirect()")
|
||||
self:Destroy(false)
|
||||
end
|
||||
|
||||
function Ambor301:OnDestroy()
|
||||
print("ambor " .. self.configID .. " destroied")
|
||||
end
|
||||
|
||||
return Ambor301
|
185
soggy_resources/lua/Actor/Quest/Q301/Gaia301.lua
Normal file
185
soggy_resources/lua/Actor/Quest/Q301/Gaia301.lua
Normal file
@@ -0,0 +1,185 @@
|
||||
require('Actor/ActorCommon')
|
||||
local npcActorProxy = require('Actor/Npc/NpcActorProxy')
|
||||
local Gaia301 = class("Gaia301", npcActorProxy)
|
||||
|
||||
local q301Cfg = require('Actor/Quest/Q301/Config/Q301Config')
|
||||
local gaiaData = q301Cfg.GaiaData
|
||||
|
||||
Gaia301.defaultAlias = "Gaia"
|
||||
|
||||
-- local method
|
||||
function Gaia301:StartBeFollow1()
|
||||
self:ClearFollowTask()
|
||||
self:BeFollowTask(gaiaData.firstPos, gaiaData.BeFollowLen, gaiaData.BeFollowFailedLen,
|
||||
function(self, task)
|
||||
if self.BeFollowState == BeFollowState.FAILED then
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(true, nil)
|
||||
end
|
||||
--self:Destroy(false)
|
||||
elseif self.BeFollowState == BeFollowState.SUCCESS then
|
||||
self:TurnTo(M.Euler2DirXZ(gaiaData.bornDir))
|
||||
self:Standby()
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
self:CheckNpcTalk()
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Gaia301:Sleep()
|
||||
self:DoFreeStyle(1)
|
||||
end
|
||||
|
||||
function Gaia301:OnSleep()
|
||||
print("OnSleep")
|
||||
self:ClearFollowTask()
|
||||
local task = self:CreateTask(TaskID.MOVE_TASK_ID, LuaTaskType.NORMAL)
|
||||
task:StartEvent('+',self.Sleep)
|
||||
task:PauseEvent('+', self.Sleep)
|
||||
task:ResumeEvent('+', self.Sleep)
|
||||
task:FinishEvent('+', self.Sleep)
|
||||
end
|
||||
|
||||
function Gaia301:StartBeFollow2()
|
||||
self:ClearFollowTask()
|
||||
self:BeFollowTask(gaiaData.secondPos, gaiaData.BeFollowLen, gaiaData.BeFollowFailedLen,
|
||||
function(self, task)
|
||||
if self.BeFollowState == BeFollowState.FAILED then
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(true, nil)
|
||||
end
|
||||
--self:Destroy(false)
|
||||
elseif self.BeFollowState == BeFollowState.SUCCESS then
|
||||
self:TurnTo(M.Euler2DirXZ(gaiaData.bornDir))
|
||||
self:OnSleep()
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Gaia301:StartBeFollow5()
|
||||
print("GaiaFollow5")
|
||||
self:ClearFollowTask()
|
||||
self:BeFollowTask(gaiaData.fifthPos, gaiaData.BeFollowLen, gaiaData.BeFollowFailedLen,
|
||||
function(self, task)
|
||||
if self.BeFollowState == BeFollowState.FAILED then
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(true, nil)
|
||||
end
|
||||
elseif self.BeFollowState == BeFollowState.SUCCESS then
|
||||
self:StartBeFollow3()
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Gaia301:StartBeFollow3()
|
||||
self:ClearFollowTask()
|
||||
self:BeFollowTask(gaiaData.thirdPos, gaiaData.BeFollowLen, gaiaData.BeFollowFailedLen,
|
||||
function(self, task)
|
||||
if self.BeFollowState == BeFollowState.FAILED then
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(true, nil)
|
||||
end
|
||||
--self:Destroy(false)
|
||||
elseif self.BeFollowState == BeFollowState.SUCCESS then
|
||||
self:TurnTo(M.Euler2DirXZ(gaiaData.bornDir))
|
||||
self:Standby()
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Gaia301:StartBeFollow6()
|
||||
print("GaiaFollow5")
|
||||
self:ClearFollowTask()
|
||||
self:BeFollowTask(gaiaData.sixthPos, gaiaData.BeFollowLen, gaiaData.BeFollowFailedLen,
|
||||
function(self, task)
|
||||
if self.BeFollowState == BeFollowState.FAILED then
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(true, nil)
|
||||
end
|
||||
elseif self.BeFollowState == BeFollowState.SUCCESS then
|
||||
self:StartBeFollow4()
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Gaia301:StartBeFollow4()
|
||||
self:ClearFollowTask()
|
||||
self:BeFollowTask(gaiaData.fourthPos, gaiaData.BeFollowLen, gaiaData.BeFollowFailedLen,
|
||||
function(self, task)
|
||||
if self.BeFollowState == BeFollowState.FAILED then
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(true, nil)
|
||||
end
|
||||
--self:Destroy(false)
|
||||
elseif self.BeFollowState == BeFollowState.SUCCESS then
|
||||
self:TurnTo(M.Euler2DirXZ(gaiaData.bornDir))
|
||||
self:Standby()
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Gaia301:Show()
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(gaiaData.showPos,
|
||||
function(self, task)
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
self:TurnTo(M.Euler2DirXZ(gaiaData.showDir))
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
-- local method end
|
||||
|
||||
function Gaia301:Start()
|
||||
|
||||
end
|
||||
|
||||
return Gaia301
|
80
soggy_resources/lua/Actor/Quest/Q301/Robam301.lua
Normal file
80
soggy_resources/lua/Actor/Quest/Q301/Robam301.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
require('Actor/ActorCommon')
|
||||
local quest301 = require('Actor/Quest/MQ301')
|
||||
local npcActorProxy = require('Actor/Npc/NpcActorProxy')
|
||||
|
||||
local Robam301 = class("Robam301", npcActorProxy)
|
||||
|
||||
Robam301.defaultAlias = "Robam301"
|
||||
|
||||
-- local config begin
|
||||
local q301Cfg = require('Actor/Quest/Q301/Config/Q301Config')
|
||||
local robamData = q301Cfg.RobamData
|
||||
function Robam301:PreGetAlias()
|
||||
local robam = robamData.Robam
|
||||
return robam
|
||||
end
|
||||
-- local config end
|
||||
|
||||
-- local param begin
|
||||
-- local param end
|
||||
|
||||
-- function Robam301:CreateUActor(alias)
|
||||
-- local uActor = actorUtils.CreateActor(self, ActorType.NPC_ACTOR, alias)
|
||||
-- uActor = actorUtils.CreateNpcActor(self.configID, self.bornPos, uActor)
|
||||
-- return uActor
|
||||
-- end
|
||||
|
||||
-- local method
|
||||
|
||||
-- local method end
|
||||
|
||||
function Robam301:Start()
|
||||
print("start!Robam301")
|
||||
self:StartDaily()
|
||||
end
|
||||
|
||||
function Robam301:ShowStart()
|
||||
print("Robam301:ShowStart")
|
||||
self:SetPos(robamData.bornPos)
|
||||
self:RunToTask(robamData.arguePos,
|
||||
function(self, task)
|
||||
self:TurnTo(M.Euler2DirXZ(robamData.argueDir))
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Robam301:StartDay()
|
||||
self:RunToTask(robamData.bornPos,
|
||||
function(self, task)
|
||||
self:TurnTo(M.Euler2DirXZ(robamData.bornDir))
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Robam301:StartNight()
|
||||
self:RunToTask(sceneData:GetDummyPoint(3,"Q301Folk1Home").pos,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function Robam301:StartDaily()
|
||||
print("Robam301:StartDaily()")
|
||||
self:RegisterSelfDayTime(self.StartDay)
|
||||
self:RegisterSelfNightTime(self.StartNight)
|
||||
if globalActor.isDay then
|
||||
self:StartDay()
|
||||
else
|
||||
self:StartNight()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function Robam301:OnDestroy()
|
||||
--print("robam " .. self.configID .. " destroied")
|
||||
end
|
||||
|
||||
return Robam301
|
33
soggy_resources/lua/Actor/Quest/Q301/Test301.lua
Normal file
33
soggy_resources/lua/Actor/Quest/Q301/Test301.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
require('Actor/ActorCommon')
|
||||
local quest301 = require('Actor/Quest/MQ301')
|
||||
local npcActorProxy = require('Actor/Npc/NpcActorProxy')
|
||||
|
||||
local Test301 = class("Test301", npcActorProxy)
|
||||
|
||||
Test301.defaultAlias = "Test301"
|
||||
|
||||
-- local config begin
|
||||
local q301Cfg = require('Actor/Quest/Q301/Config/Q301Config')
|
||||
local testData = q301Cfg.TestData
|
||||
-- local config end
|
||||
|
||||
-- local param begin
|
||||
-- local param end
|
||||
|
||||
-- local method
|
||||
|
||||
-- local method end
|
||||
|
||||
function Test301:Start()
|
||||
print("start!Test301")
|
||||
self:SetPos(testData.bornPos)
|
||||
print(testData.bornPos)
|
||||
self:TurnTo(M.Euler2DirXZ(self.bornDir))
|
||||
self:Standby()
|
||||
end
|
||||
|
||||
function Test301:OnDestroy()
|
||||
print("test " .. self.configID .. " destroied")
|
||||
end
|
||||
|
||||
return Test301
|
72
soggy_resources/lua/Actor/Quest/Q301/Wendy301.lua
Normal file
72
soggy_resources/lua/Actor/Quest/Q301/Wendy301.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
require('Actor/ActorCommon')
|
||||
local quest301 = require('Actor/Quest/MQ301')
|
||||
local npcActorProxy = require('Actor/Npc/NpcActorProxy')
|
||||
|
||||
local Wendy301 = class("Wendy301", npcActorProxy)
|
||||
|
||||
Wendy301.defaultAlias = "Wendy301"
|
||||
|
||||
-- local config begin
|
||||
local q301Cfg = require('Actor/Quest/Q301/Config/Q301Config')
|
||||
local wendyData = q301Cfg.WendyData
|
||||
local audienceInter = q301Cfg.AudienceInter
|
||||
local extrasData = q301Cfg.ExtrasData
|
||||
|
||||
function Wendy301:PreGetAlias()
|
||||
local wendy = wendyData.Wendy
|
||||
return wendy
|
||||
end
|
||||
-- local config end
|
||||
|
||||
-- local method
|
||||
function Wendy301:StartDance()
|
||||
self:TurnTo(M.Euler2DirXZ(wendyData.bornDir))
|
||||
self:DoFreeStyle(1)
|
||||
end
|
||||
function Wendy301:FinishDance(...)
|
||||
print("finish dance))))))))))))))))))")
|
||||
for i=1, #extrasData.ExtrasIDs do
|
||||
local alias = extrasData.Extras .. tostring(i)
|
||||
self:NotifyTo(alias, wendyData.EvtFinishDance)
|
||||
end
|
||||
self:Standby()
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
--self:Destroy(false)
|
||||
end
|
||||
|
||||
function Wendy301:Vanish()
|
||||
print("Wendy Vanish")
|
||||
local quest = actorMgr:GetActor(q301Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
globalActor:UnSpawn(wendyData.Wendy)
|
||||
self:Destroy(false)
|
||||
end
|
||||
|
||||
function Wendy301:Escape()
|
||||
print("escape begin")
|
||||
self:RunToTask(wendyData.vanishPos, nil)
|
||||
self:CallDelay(5, self.Vanish)
|
||||
for i=1, #extrasData.ExtrasIDs do
|
||||
local alias = extrasData.Extras .. tostring(i)
|
||||
self:NotifyTo(alias, wendyData.EvtFinishDance)
|
||||
end
|
||||
end
|
||||
-- local method end
|
||||
|
||||
function Wendy301:Start()
|
||||
print("start!wendy301")
|
||||
--self:SetPos(wendyData.bornPos)
|
||||
-- self:StartDance()
|
||||
-- self:CallDelay(10, self.FinishDance)
|
||||
end
|
||||
|
||||
function Wendy301:OnDestroy()
|
||||
print("wendy " .. wendyData.WendyID .. " destroied")
|
||||
end
|
||||
|
||||
return Wendy301
|
215
soggy_resources/lua/Actor/Quest/Q301/WendyAudience.lua
Normal file
215
soggy_resources/lua/Actor/Quest/Q301/WendyAudience.lua
Normal file
@@ -0,0 +1,215 @@
|
||||
require('Actor/ActorCommon')
|
||||
local npcActorProxy = require('Actor/Npc/NpcActorProxy')
|
||||
|
||||
local WendyAudience = class("WendyAudience", npcActorProxy)
|
||||
|
||||
WendyAudience.defaultAlias = "WendyAudience"
|
||||
|
||||
WendyAudience.seatPos = nil
|
||||
WendyAudience.seatDir = nil
|
||||
WendyAudience.bornPos = nil
|
||||
WendyAudience.bornDir = nil
|
||||
WendyAudience.returnCallback = nil
|
||||
WendyAudience.pointID = 1
|
||||
WendyAudience.currWeather = WeatherType.ClearSky
|
||||
|
||||
-- local config begin
|
||||
local q301Cfg = require('Actor/Quest/Q301/Config/Q301Config')
|
||||
local q401Cfg = require('Actor/Quest/Q401/Q401Config')
|
||||
local wendyData = q301Cfg.WendyData
|
||||
local audienceInter = q301Cfg.AudienceInter
|
||||
local extrasData = q301Cfg.ExtrasData
|
||||
|
||||
function WendyAudience:PreGetAlias()
|
||||
local extraAlias = extrasData.Extras .. tostring(self.dataIndex)
|
||||
return extraAlias
|
||||
end
|
||||
|
||||
-- local config end
|
||||
|
||||
function WendyAudience:MoveToSeat()
|
||||
print("move to seat ")
|
||||
self:AddPriorityInter(InterTimingType.BTN, audienceInter)
|
||||
self:RunToTask(self.seatPos,
|
||||
function(self, task)
|
||||
self:TurnTo(M.Euler2DirXZ(self.seatDir))
|
||||
self:Standby()
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function WendyAudience:ReturnToNormal()
|
||||
--print("ai return " .. tostring(self.configID))
|
||||
self:ClearPriorityInter(InterTimingType.BTN)
|
||||
self:WalkToTask(extrasData.ExtrasOriginPos[self.extrasIndex],
|
||||
function(self, task)
|
||||
self:TurnTo(M.Euler2DirXZ(extrasData.ExtrasOriginDir[self.extrasIndex]))
|
||||
self:Standby()
|
||||
if self.returnCallback ~= nil then
|
||||
self:returnCallback()
|
||||
end
|
||||
end,
|
||||
function(self, task)
|
||||
self:Standby()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
-- local method begin
|
||||
function WendyAudience:OnEvent(evt)
|
||||
if evt.evtType == wendyData.EvtFinishDance then
|
||||
self:ReturnToNormal()
|
||||
end
|
||||
end
|
||||
|
||||
function WendyAudience:IsRaining()
|
||||
if self.currWeather == WeatherType.Rain or
|
||||
self.currWeather == WeatherType.Storm then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function WendyAudience:FinishBehave()
|
||||
if self.pointID == 1 then
|
||||
self.pointID = 2
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasDaily2Pos[self.extrasIndex],self.Behave,self.Standby)
|
||||
elseif self.pointID == 2 then
|
||||
self.pointID =3
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasDaily3Pos[self.extrasIndex],self.Behave,self.Standby)
|
||||
elseif self.pointID == 3 then
|
||||
self.pointID = 4
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasDaily4Pos[self.extrasIndex],self.Behave,self.Standby)
|
||||
elseif self.pointID == 4 then
|
||||
self.pointID = 1
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasDaily1Pos[self.extrasIndex],self.Behave,self.Standby)
|
||||
end
|
||||
end
|
||||
|
||||
function WendyAudience:Behave()
|
||||
if self.pointID == 1 or self.pointID == 3 then
|
||||
self:DoFreeStyle(1)
|
||||
self:CallDelay(5,self.FinishBehave)
|
||||
else
|
||||
self:DoFreeStyle(0)
|
||||
self:CallDelay(5,self.FinishBehave)
|
||||
end
|
||||
end
|
||||
|
||||
function WendyAudience:StartDay()
|
||||
--print("audience StartDay")
|
||||
-- if IsRaining() then
|
||||
-- return
|
||||
-- end
|
||||
self.pointID = 1
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasDaily1Pos[self.extrasIndex],self.Behave,self.Standby)
|
||||
end
|
||||
|
||||
function WendyAudience:StartNight()
|
||||
--print("audience StartNight")
|
||||
-- if IsRaining() then
|
||||
-- return
|
||||
-- end
|
||||
--print("天黑了,回家")
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasHomePos[self.extrasIndex],self.Standby,self.Standby)
|
||||
end
|
||||
|
||||
function WendyAudience:OnWeather(weatherType)
|
||||
--print("OnWeather")
|
||||
--本来就在下雨
|
||||
if self:IsRaining() then
|
||||
--现在不下了
|
||||
if weatherType ~= WeatherType.Rain and
|
||||
weatherType ~= WeatherType.Storm then
|
||||
--是白天,就跑出来
|
||||
if globalActor.isDay then
|
||||
self.currWeather = weatherType
|
||||
print("雨停了,是白天,跑出来")
|
||||
self:StartDay()
|
||||
end
|
||||
end
|
||||
self.currWeather = weatherType
|
||||
return
|
||||
end
|
||||
|
||||
self.currWeather = weatherType
|
||||
|
||||
--本来没下雨,现在也不下雨了
|
||||
if weatherType ~= WeatherType.Rain and
|
||||
weatherType ~= WeatherType.Storm then
|
||||
return
|
||||
end
|
||||
|
||||
--本来没下雨,现在下雨了,而且是白天
|
||||
if globalActor.isDay then
|
||||
--print("下雨了,躲雨")
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasOriginPos[self.extrasIndex],self.Standby,self.Standby)
|
||||
end
|
||||
end
|
||||
|
||||
function WendyAudience:MoveHome()
|
||||
--print("任务401,回家")
|
||||
self:ClearFollowTask()
|
||||
self:WalkToTask(extrasData.ExtrasHomePos[self.extrasIndex],
|
||||
function(self,task)
|
||||
local quest = actorMgr:GetActor(q401Cfg.ActorAlias)
|
||||
if quest ~= nil then
|
||||
quest:FinishQuest(false, nil)
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function WendyAudience:StartDaily()
|
||||
--print("audience StartDaily")
|
||||
self:RegisterSelfDayTime(self.StartDay)
|
||||
self:RegisterSelfNightTime(self.StartNight)
|
||||
self:RegisterSelfWeatherChange(self.OnWeather)
|
||||
if globalActor.isDay then
|
||||
self:StartDay()
|
||||
else
|
||||
self:StartNight()
|
||||
end
|
||||
end
|
||||
|
||||
function WendyAudience:ShowStart()
|
||||
print("audience ShowStart")
|
||||
self:SetPos(self.bornPos)
|
||||
self:RegisterActorEvent(self.OnEvent)
|
||||
self:MoveToSeat()
|
||||
end
|
||||
|
||||
-- local method end
|
||||
|
||||
function WendyAudience:OnPostDataPrepare()
|
||||
self.extrasIndex = self.dataIndex
|
||||
self.seatPos = extrasData.ExtrasSeatPos[self.extrasIndex]
|
||||
self.seatDir = extrasData.ExtrasSeatDir[self.extrasIndex]
|
||||
self.bornPos = extrasData.ExtrasOriginPos[self.extrasIndex]
|
||||
self.bornDir = extrasData.ExtrasOriginDir[self.extrasIndex]
|
||||
self.returnCallback = extrasData.ExtrasReturnCallback[self.extrasIndex]
|
||||
end
|
||||
|
||||
function WendyAudience:Start()
|
||||
--print("start!wendy audience " .. self.configID)
|
||||
self:StartDaily()
|
||||
end
|
||||
|
||||
function WendyAudience:OnDestroy()
|
||||
--print("wendy audience " .. self.configID .. " destroied")
|
||||
-- self:UnregisterSelfNightTime(self.StartDay)
|
||||
-- self:UnregisterSelfNightTime(self.StartNight)
|
||||
-- self:UnregisterSelfWeatherChange(self.OnWeather)
|
||||
end
|
||||
|
||||
return WendyAudience
|
306
soggy_resources/lua/Actor/Quest/Q301/config/Q301Config.lua
Normal file
306
soggy_resources/lua/Actor/Quest/Q301/config/Q301Config.lua
Normal file
@@ -0,0 +1,306 @@
|
||||
require('Actor/ActorCommon')
|
||||
|
||||
local Q301Config = {}
|
||||
|
||||
Q301Config.MainID = 301
|
||||
Q301Config.ActorAlias = "301"
|
||||
|
||||
Q301Config.SubIDs =
|
||||
{
|
||||
q30100 = 30100,
|
||||
q30101 = 30101,
|
||||
q30102 = 30102,
|
||||
q30103 = 30103,
|
||||
q30104 = 30104,
|
||||
q30105 = 30105,
|
||||
q30106 = 30106,
|
||||
q30107 = 30107,
|
||||
q30108 = 30108,
|
||||
q30109 = 30109,
|
||||
q30110 = 30110,
|
||||
q30111 = 30111,
|
||||
q30112 = 30112,
|
||||
q30113 = 30113,
|
||||
q30114 = 30114,
|
||||
q30115 = 30115,
|
||||
q30116 = 30116,
|
||||
q30117 = 30117,
|
||||
q30118 = 30118,
|
||||
}
|
||||
|
||||
Q301Config.WendyData =
|
||||
{
|
||||
Wendy = "Wendy",
|
||||
WendyScript = "Actor/Quest/Q301/Wendy301",
|
||||
WendyID = 1001,
|
||||
-- bornPos = M.Pos(1444.513, 60.50317, 136.6221),
|
||||
-- bornDir = M.Dir(0, 0, 0),
|
||||
-- vanishPos = M.Pos(1449, 65, 116),
|
||||
|
||||
bornPos = sceneData:GetDummyPoint(3, "Q301WendyPlay").pos,
|
||||
bornDir = sceneData:GetDummyPoint(3, "Q301WendyPlay").rot,
|
||||
vanishPos = sceneData:GetDummyPoint(3,"Q301WendyVanish").pos,
|
||||
|
||||
EvtFinishDance = 10079,
|
||||
}
|
||||
|
||||
Q301Config.RobamData =
|
||||
{
|
||||
Robam = "Robam",
|
||||
RobamScript = "Actor/Quest/Q301/Robam301",
|
||||
RobamID = 1003,
|
||||
-- bornPos = M.Pos(1440, 60.3, 136),
|
||||
-- bornDir = M.Dir(0, 76, 0),
|
||||
-- arguePos = M.Pos(1440, 60.3, 136),
|
||||
-- argueDir = M.Dir(0, 76, 0),
|
||||
EvtFinishDance = 10079,
|
||||
|
||||
bornPos = sceneData:GetDummyPoint(3,"Q301RobamBorn").pos,
|
||||
bornDir = sceneData:GetDummyPoint(3,"Q301RobamBorn").rot,
|
||||
arguePos = sceneData:GetDummyPoint(3,"Q301RobamArgue").pos,
|
||||
argueDir = sceneData:GetDummyPoint(3,"Q301RobamArgue").rot,
|
||||
}
|
||||
|
||||
Q301Config.AmborData =
|
||||
{
|
||||
Ambor = "Ambor",
|
||||
AmborScript = "Actor/Quest/Q301/Ambor301",
|
||||
AmborID = 1002,
|
||||
|
||||
-- bornPos = M.Pos(1443, 59.4, 142.7),
|
||||
-- bornDir = M.Dir(0, 170, 0),
|
||||
-- arguePos = M.Pos(1443, 59.4, 142.7),
|
||||
-- argueDir = M.Dir(0, 170, 0),
|
||||
-- vanishPos = M.Pos(1449, 65, 116),
|
||||
|
||||
EvtFinishDance = 10079,
|
||||
|
||||
bornPos = sceneData:GetDummyPoint(3,"Q301AmborBorn").pos,
|
||||
bornDir = sceneData:GetDummyPoint(3,"Q301AmborBorn").rot,
|
||||
arguePos = sceneData:GetDummyPoint(3,"Q301AmborArgue").pos,
|
||||
argueDir = sceneData:GetDummyPoint(3,"Q301AmborArgue").rot,
|
||||
vanishPos = sceneData:GetDummyPoint(3,"Q301AmborVanish").pos,
|
||||
}
|
||||
|
||||
Q301Config.GaiaData =
|
||||
{
|
||||
Gaia = "Gaia",
|
||||
GaiaScript = "Actor/Quest/Q301/Gaia301",
|
||||
GaiaID = 1004,
|
||||
-- bornPos = M.Pos(1455, 62.6, 156.5),
|
||||
-- bornDir = M.Dir(0, 0, 0),
|
||||
-- showPos = M.Pos(1448.2, 60.3, 139.9),
|
||||
-- showDir = M.Dir(0, 0, 0),
|
||||
-- firstPos = M.Pos(1433, 57, 169),
|
||||
-- secondPos = M.Pos(1415, 56, 182),
|
||||
-- thirdPos = M.Pos(1411, 56, 192),
|
||||
-- fourthPos = M.Pos(1407, 55, 202),
|
||||
|
||||
BeFollowLen = 10,
|
||||
BeFollowFailedLen = 50,
|
||||
|
||||
bornPos = sceneData:GetDummyPoint(3,"Q301GaiaBorn").pos,
|
||||
bornDir = sceneData:GetDummyPoint(3,"Q301GaiaBorn").rot,
|
||||
showPos = sceneData:GetDummyPoint(3,"Q301GaiaShow").pos,
|
||||
showDir = sceneData:GetDummyPoint(3,"Q301GaiaShow").rot,
|
||||
firstPos = sceneData:GetDummyPoint(3,"Q301GaiaFollow1").pos,
|
||||
secondPos = sceneData:GetDummyPoint(3,"Q301GaiaFollow2").pos,
|
||||
thirdPos = sceneData:GetDummyPoint(3,"Q301GaiaFollow3").pos,
|
||||
fifthPos = sceneData:GetDummyPoint(3,"Q301GaiaFollow4").pos,
|
||||
sixthPos = sceneData:GetDummyPoint(3,"Q301GaiaFollow5").pos,
|
||||
fourthPos = sceneData:GetDummyPoint(3,"Q301GaiaFollowFinal").pos,
|
||||
}
|
||||
|
||||
Q301Config.ExtrasData =
|
||||
{
|
||||
Extras = "Extras",
|
||||
ExtrasAudience = "Actor/Quest/Q301/WendyAudience",
|
||||
ExtrasIDs =
|
||||
{
|
||||
1101,
|
||||
1102,
|
||||
1103,
|
||||
1104,
|
||||
},
|
||||
ExtrasOriginPos =
|
||||
{
|
||||
-- M.Pos(1463, 64, 141),
|
||||
-- M.Pos(1436, 61, 131),
|
||||
-- M.Pos(1429, 60, 136),
|
||||
-- M.Pos(1436, 60, 143),
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Born").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Born").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Born").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Born").pos,
|
||||
},
|
||||
ExtrasOriginDir =
|
||||
{
|
||||
-- M.Dir(0, 219, 0),
|
||||
-- M.Dir(0, 181, 0),
|
||||
-- M.Dir(0, 147, 0),
|
||||
-- M.Dir(0, 129, 0),
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Born").rot,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Born").rot,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Born").rot,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Born").rot,
|
||||
},
|
||||
ExtrasSeatPos =
|
||||
{
|
||||
-- M.Pos(1448.2, 60.3, 139.9),
|
||||
-- M.Pos(1445.1, 59.8, 140.9),
|
||||
-- M.Pos(1441.9, 59.8, 140.7),
|
||||
-- M.Pos(1439.5, 60.1, 139.5),
|
||||
sceneData:GetDummyPoint(3,"Q301Audience1").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Audience2").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Audience3").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Audience4").pos,
|
||||
},
|
||||
ExtrasSeatDir =
|
||||
{
|
||||
-- M.Dir(0, 219, 0),
|
||||
-- M.Dir(0, 181, 0),
|
||||
-- M.Dir(0, 147, 0),
|
||||
-- M.Dir(0, 129, 0),
|
||||
sceneData:GetDummyPoint(3,"Q301Audience1").rot,
|
||||
sceneData:GetDummyPoint(3,"Q301Audience2").rot,
|
||||
sceneData:GetDummyPoint(3,"Q301Audience3").rot,
|
||||
sceneData:GetDummyPoint(3,"Q301Audience4").rot,
|
||||
},
|
||||
ExtrasDaily1Pos =
|
||||
{
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Pos1").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Pos1").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Pos1").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Pos1").pos,
|
||||
},
|
||||
ExtrasDaily2Pos =
|
||||
{
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Pos2").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Pos2").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Pos2").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Pos2").pos,
|
||||
},
|
||||
ExtrasDaily3Pos =
|
||||
{
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Pos3").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Pos3").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Pos3").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Pos3").pos,
|
||||
},
|
||||
ExtrasDaily4Pos =
|
||||
{
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Pos4").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Pos4").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Pos4").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Pos4").pos,
|
||||
},
|
||||
ExtrasHomePos =
|
||||
{
|
||||
sceneData:GetDummyPoint(3,"Q301Folk1Home").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk2Home").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk3Home").pos,
|
||||
sceneData:GetDummyPoint(3,"Q301Folk4Home").pos,
|
||||
},
|
||||
ExtrasReturnCallback =
|
||||
{
|
||||
function(self)
|
||||
self:StartDaily()
|
||||
end,
|
||||
function(self)
|
||||
self:StartDaily()
|
||||
end,
|
||||
function(self)
|
||||
self:StartDaily()
|
||||
end,
|
||||
function(self)
|
||||
self:StartDaily()
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
Q301Config.MeiData =
|
||||
{
|
||||
Mei = "Mei",
|
||||
MeiScript = "Actor/Npc/Npc101Test",
|
||||
MeiID = 101,
|
||||
bornPos = M.Pos(1460, 65, 152),
|
||||
bornDir = M.Dir(0, 0, 0),
|
||||
}
|
||||
|
||||
Q301Config.TestData =
|
||||
{
|
||||
Test = "Test",
|
||||
TestScript = "Actor/Quest/Q301/Test301",
|
||||
TestID = 1105,
|
||||
|
||||
bornPos = M.Pos(1443, 59.4, 162.7),
|
||||
bornDir = M.Dir(0, 170, 0),
|
||||
|
||||
vanishPos = M.Pos(1449, 65, 116),
|
||||
|
||||
EvtFinishDance = 10079
|
||||
}
|
||||
|
||||
Q301Config.AudienceInter =
|
||||
{
|
||||
{
|
||||
{
|
||||
type = InteractionType.STEER_TO,
|
||||
steerType = DialogSteerType.TO_LOCAL_AVATAR,
|
||||
duration = 1.0
|
||||
},
|
||||
{
|
||||
type = InteractionType.CAMERA_MOVE,
|
||||
cameraPosType = StoryCameraPosType.RELATIVE_TO_INTER,
|
||||
camPosOffset = {x = 0, y = 0.5, z = 0},
|
||||
nearLength = 2,
|
||||
camTargetType = StoryCameraTargetType.TO_INTEE,
|
||||
camForwardTargetOffset = {x = 0, y = 0.5, z = 0},
|
||||
duration = 1.0,
|
||||
lerpRatio = 5.0,
|
||||
lerpPattern = 0
|
||||
},
|
||||
{
|
||||
type = InteractionType.DIALOG,
|
||||
dialogType = DialogType.LOCK_FRAME,
|
||||
talkerName = "市民",
|
||||
content = "唱的真好听啊,只是风魔龙已经不再守护我们了啊"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
type = InteractionType.DIALOG_FINISH,
|
||||
},
|
||||
{
|
||||
type = InteractionType.STEER_TO,
|
||||
steerType = DialogSteerType.RETURN,
|
||||
duration = 1.0
|
||||
},
|
||||
{
|
||||
type = InteractionType.CAMERA_MOVE,
|
||||
cameraPosType = StoryCameraPosType.EXIT,
|
||||
camPosOffset = {x = 0, y = 0, z = 0},
|
||||
nearLength = 0,
|
||||
camTargetType = StoryCameraTargetType.TO_INTEE,
|
||||
camForwardTargetOffset = {x = 0, y = 0, z = 0},
|
||||
duration = 1.0,
|
||||
lerpRatio = 5.0,
|
||||
lerpPattern = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Q301Config.MonsterData =
|
||||
{
|
||||
MonsterIDs = {21010301, 21010301},
|
||||
}
|
||||
|
||||
Q301Config.Mq1TimeCfg =
|
||||
{
|
||||
type = CutsceneType.TIME_LINE_PREFAB,
|
||||
roleSheetPath = "",
|
||||
resPath = "ART/Cutscene/Cs_MD_MQ1_Cutscene01",
|
||||
startPosType = CutsceneInitPosType.FREE,
|
||||
startOffset = {0, 0, 0}
|
||||
}
|
||||
return Q301Config
|
Reference in New Issue
Block a user