Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction - Battlefields: Stellar Fulcrum #5707

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions scripts/battlefields/Stellar_Fulcrum/return_to_delkfutts_tower.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-----------------------------------
-- Area: Stellar Fulcrum
-- Name: ZM8 Return to Delkfutt's Tower
-- !pos -520 -4 17 179
-----------------------------------
local stellarFulcrumID = zones[xi.zone.STELLAR_FULCRUM]
-----------------------------------

local content = BattlefieldMission:new({
zoneId = xi.zone.STELLAR_FULCRUM,
battlefieldId = xi.battlefield.id.RETURN_TO_DELKFUTTS_TOWER,
isMission = true,
maxPlayers = 6,
levelCap = 75,
timeLimit = utils.minutes(30),
index = 0,
entryNpc = '_4z0',
exitNpcs = { '_4z1', '_4z2', '_4z3' },
missionArea = xi.mission.log_id.ZILART,
mission = xi.mission.id.zilart.RETURN_TO_DELKFUTTS_TOWER,
missionStatusArea = xi.mission.log_id.ZILART,
requiredMissionStatus = 2,
title = xi.title.DESTROYER_OF_ANTIQUITY,
})

content.groups =
{
{
mobIds =
{
{ stellarFulcrumID.mob.KAMLANAUT },
{ stellarFulcrumID.mob.KAMLANAUT + 1 },
{ stellarFulcrumID.mob.KAMLANAUT + 2 },
},

allDeath = function(battlefield, mob)
battlefield:setStatus(xi.battlefield.status.WON)
end,
},
}

return content:register()
10 changes: 0 additions & 10 deletions scripts/globals/bcnm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ local function checkReqs(player, npc, bfid, registrant)
local asaMission = player:getCurrentMission(xi.mission.log_id.ASA)

local nationStatus = player:getMissionStatus(player:getNation())
local zilartStatus = player:getMissionStatus(xi.mission.log_id.ZILART)
local promathiaStatus = player:getCharVar('PromathiaStatus')
local toauStatus = player:getMissionStatus(xi.mission.log_id.TOAU)

Expand Down Expand Up @@ -592,11 +591,6 @@ local function checkReqs(player, npc, bfid, registrant)
nationStatus == 2
end,

[256] = function() -- ZM8: Return to Delkfutt's Tower
return zilartMission == xi.mission.id.zilart.RETURN_TO_DELKFUTTS_TOWER and
zilartStatus == 2
end,

[320] = function() -- ZM16: The Celestial Nexus
return zilartMission == xi.mission.id.zilart.THE_CELESTIAL_NEXUS
end,
Expand Down Expand Up @@ -1177,10 +1171,6 @@ local function checkSkip(player, bfid)
)
end,

[256] = function() -- ZM8: Return to Delkfutt's Tower
return player:hasCompletedMission(xi.mission.log_id.ZILART, xi.mission.id.zilart.RETURN_TO_DELKFUTTS_TOWER)
end,

[320] = function() -- ZM16: The Celestial Nexus
return player:hasCompletedMission(xi.mission.log_id.ZILART, xi.mission.id.zilart.THE_CELESTIAL_NEXUS)
end,
Expand Down
1 change: 1 addition & 0 deletions scripts/zones/Stellar_Fulcrum/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ zones[xi.zone.STELLAR_FULCRUM] =
},
mob =
{
KAMLANAUT = GetFirstID('Kamlanaut'),
},
npc =
{
Expand Down
39 changes: 0 additions & 39 deletions scripts/zones/Stellar_Fulcrum/bcnms/return_to_delkfutts_tower.lua

This file was deleted.

1 change: 0 additions & 1 deletion scripts/zones/Stellar_Fulcrum/mobs/Kamlanaut.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ entity.onMobWeaponSkill = function(target, mob, skill)
end

entity.onMobDeath = function(mob, player, optParams)
player:addTitle(xi.title.DESTROYER_OF_ANTIQUITY)
end

return entity
7 changes: 1 addition & 6 deletions scripts/zones/Stellar_Fulcrum/npcs/_4z0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@
-----------------------------------
local entity = {}


entity.onTrade = function(player, npc, trade)
xi.bcnm.onTrade(player, npc, trade)
end

entity.onTrigger = function(player, npc)
xi.bcnm.onTrigger(player, npc)
end

entity.onEventUpdate = function(player, csid, option, extras)
xi.bcnm.onEventUpdate(player, csid, option, extras)
entity.onEventUpdate = function(player, csid, option, npc)
end

entity.onEventFinish = function(player, csid, option, npc)
xi.bcnm.onEventFinish(player, csid, option, npc)
end

return entity
14 changes: 0 additions & 14 deletions scripts/zones/Stellar_Fulcrum/npcs/_4z1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,12 @@ entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:startEvent(32003)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
end

entity.onEventFinish = function(player, csid, option, npc)
local pZone = player:getZoneID()

if csid == 32003 and option == 4 then
if player:getCharVar(tostring(pZone) .. '_Fight') == 100 then
player:setCharVar('BCNM_Killed', 0)
player:setCharVar('BCNM_Timer', 0)
end

player:setCharVar(tostring(pZone) .. '_Runaway', 1)
player:delStatusEffect(xi.effect.BATTLEFIELD)
player:setCharVar(tostring(pZone) .. '_Runaway', 0)
end
end

return entity
14 changes: 0 additions & 14 deletions scripts/zones/Stellar_Fulcrum/npcs/_4z2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,12 @@ entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:startEvent(32003)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
end

entity.onEventFinish = function(player, csid, option, npc)
local pZone = player:getZoneID()

if csid == 32003 and option == 4 then
if player:getCharVar(tostring(pZone) .. '_Fight') == 100 then
player:setCharVar('BCNM_Killed', 0)
player:setCharVar('BCNM_Timer', 0)
end

player:setCharVar(tostring(pZone) .. '_Runaway', 1)
player:delStatusEffect(xi.effect.BATTLEFIELD)
player:setCharVar(tostring(pZone) .. '_Runaway', 0)
end
end

return entity
14 changes: 0 additions & 14 deletions scripts/zones/Stellar_Fulcrum/npcs/_4z3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,12 @@ entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:startEvent(32003)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
end

entity.onEventFinish = function(player, csid, option, npc)
local pZone = player:getZoneID()

if csid == 32003 and option == 4 then
if player:getCharVar(tostring(pZone) .. '_Fight') == 100 then
player:setCharVar('BCNM_Killed', 0)
player:setCharVar('BCNM_Timer', 0)
end

player:setCharVar(tostring(pZone) .. '_Runaway', 1)
player:delStatusEffect(xi.effect.BATTLEFIELD)
player:setCharVar(tostring(pZone) .. '_Runaway', 0)
end
end

return entity
Loading