mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
- man0g0 - Majority of the work ported from the old quest system. Still polish to be had and fringe cases to deal with (especially relogging)
- man0g1 - Initial privateArea mostly scripted. - SimpleContent30010 - Fixed Yda/Papalymo Id being backwards, added Active states to match retail - QuestDirectorMan0g001- Updated to play itself out (this is a mess to wrap my head around). Mostly sorta kinda working on both DoW & DoM tutorials. End cutscene on DoW not firing currently, will fix later.
This commit is contained in:
parent
682ddd9cae
commit
a87244d13b
5 changed files with 582 additions and 164 deletions
|
@ -1,79 +1,34 @@
|
|||
require ("global")
|
||||
require ("modifiers")
|
||||
|
||||
function onCreate(starterPlayer, contentArea, director)
|
||||
--papalymo = contentArea:SpawnActor(2290005, "papalymo", 365.89, 4.0943, -706.72, -0.718);
|
||||
--yda = contentArea:SpawnActor(2290006, "yda", 365.266, 4.122, -700.73, 1.5659);
|
||||
|
||||
--mob1 = contentArea:SpawnActor(2201407, "mob1", 374.427, 4.4, -698.711, -1.942);
|
||||
--mob2 = contentArea:SpawnActor(2201407, "mob2", 375.377, 4.4, -700.247, -1.992);
|
||||
--mob3 = contentArea:SpawnActor(2201407, "mob3", 375.125, 4.4, -703.591, -1.54);
|
||||
yda = GetWorldManager().SpawnBattleNpcById(6, contentArea);
|
||||
papalymo = GetWorldManager().SpawnBattleNpcById(7, contentArea);
|
||||
--yda:ChangeState(2);
|
||||
mob1 = GetWorldManager().SpawnBattleNpcById(3, contentArea);
|
||||
mob2 = GetWorldManager().SpawnBattleNpcById(4, contentArea);
|
||||
mob3 = GetWorldManager().SpawnBattleNpcById(5, contentArea);
|
||||
starterPlayer.currentParty:AddMember(papalymo.Id);
|
||||
starterPlayer.currentParty:AddMember(yda.Id);
|
||||
starterPlayer:SetMod(modifiersGlobal.MinimumHpLock, 1);
|
||||
|
||||
|
||||
openingStoper = contentArea:SpawnActor(1090384, "openingstoper", 356.09, 3.74, -701.62, -1.41);
|
||||
|
||||
director:AddMember(starterPlayer);
|
||||
papalymo = contentArea:SpawnActor(2290005, "papalymo", 365.89, 4.0943, -706.72, -0.718);
|
||||
yda = contentArea:SpawnActor(2290006, "yda", 365.266, 4.122, -700.73, 1.5659);
|
||||
|
||||
mob1 = contentArea:SpawnActor(2201407, "mob1", 374.427, 4.4, -698.711, -1.942);
|
||||
mob2 = contentArea:SpawnActor(2201407, "mob2", 375.377, 4.4, -700.247, -1.992);
|
||||
mob3 = contentArea:SpawnActor(2201407, "mob3", 375.125, 4.4, -703.591, -1.54);
|
||||
|
||||
openingStoper = contentArea:SpawnActor(1090384, "openingstoper", 356.09, 3.74, -701.62, -1.41);
|
||||
|
||||
yda:ChangeState(2);
|
||||
mob1:ChangeState(2);
|
||||
mob2:ChangeState(2);
|
||||
mob3:ChangeState(2);
|
||||
|
||||
|
||||
|
||||
|
||||
director:AddMember(starterPlayer);
|
||||
director:AddMember(director);
|
||||
director:AddMember(papalymo);
|
||||
director:AddMember(yda);
|
||||
director:AddMember(yda);
|
||||
director:AddMember(papalymo);
|
||||
director:AddMember(mob1);
|
||||
director:AddMember(mob2);
|
||||
director:AddMember(mob3);
|
||||
|
||||
--director:StartContentGroup();
|
||||
|
||||
director:StartContentGroup();
|
||||
end
|
||||
|
||||
function onDestroy()
|
||||
|
||||
end
|
||||
|
||||
function onUpdate(tick, area)
|
||||
if area then
|
||||
local players = area:GetPlayers()
|
||||
local mobs = area:GetMonsters()
|
||||
local allies = area:GetAllies()
|
||||
local resumeChecks = true
|
||||
for player in players do
|
||||
if player then
|
||||
local exitLoop = false
|
||||
|
||||
if allies then
|
||||
for i = 0, #allies - 1 do
|
||||
if allies[i] then
|
||||
if not allies[i]:IsEngaged() then
|
||||
if player:IsEngaged() and player.target then
|
||||
|
||||
allies[i].neutral = false
|
||||
allies[i].isAutoAttackEnabled = true
|
||||
allies[i]:SetMod(modifiersGlobal.Speed, 8)
|
||||
allyGlobal.EngageTarget(allies[i], player.target)
|
||||
exitLoop = true
|
||||
break
|
||||
-- todo: support scripted paths
|
||||
elseif allies[i]:GetSpeed() > 0 then
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if exitLoop then
|
||||
resumeChecks = false
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not resumeChecks then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue