Skip to content

Commit

Permalink
Interaction - Battlefields: Stellar Fulcrum
Browse files Browse the repository at this point in the history
  • Loading branch information
claywar committed May 12, 2024
1 parent dc7a35f commit 213131a
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 88 deletions.
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()
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

0 comments on commit 213131a

Please sign in to comment.