Skip to content

Commit

Permalink
Merge branch 'LandSandBoat:base' into For-the-Birds
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbradleym authored May 31, 2024
2 parents 0562d0c + 1242529 commit 74ccdbc
Show file tree
Hide file tree
Showing 57 changed files with 682 additions and 729 deletions.
19 changes: 19 additions & 0 deletions scripts/actions/mobskills/bionic_boost.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-----------------------------------
-- Bionic Boost
-- Description:
-- Gives the user the effect of counterstance
-----------------------------------
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local typeEffect = xi.effect.COUNTERSTANCE

skill:setMsg(xi.mobskills.mobBuffMove(mob, typeEffect, 1, 0, 60))
return typeEffect
end

return mobskillObject
40 changes: 40 additions & 0 deletions scripts/battlefields/La_Vaule_[S]/purple_the_new_black.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-----------------------------------
-- Area: La Vaule [S]
-- BCNM: Purple, The New Black (WOTG07)
-- Mob: Galarhigg (17125681 or 17125682 or 17125683)
-----------------------------------
local laVauleID = zones[xi.zone.LA_VAULE_S]
-----------------------------------

local content = BattlefieldMission:new({
zoneId = xi.zone.LA_VAULE_S,
battlefieldId = xi.battlefield.id.PURPLE_THE_NEW_BLACK,
isMission = true,
maxPlayers = 6,
timeLimit = utils.minutes(30),
index = 1,
entryNpc = '_2d1',
exitNpcs = { '_2d3', '_2d5', '_2d7' },
missionArea = xi.mission.log_id.WOTG,
mission = xi.mission.id.wotg.PURPLE_THE_NEW_BLACK,
missionStatusArea = xi.mission.log_id.WOTG,
requiredMissionStatus = 1,
})

content.groups =
{
{
mobIds =
{
{ laVauleID.mob.GALARHIGG },
{ laVauleID.mob.GALARHIGG + 1 },
{ laVauleID.mob.GALARHIGG + 2 },
},

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

return content:register()
65 changes: 65 additions & 0 deletions scripts/battlefields/Monarch_Linn/ancient_vows.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
-----------------------------------
-- Area: Monarch Linn
-- Name: Ancient Vows
-----------------------------------
local monarchLinnID = zones[xi.zone.MONARCH_LINN]
-----------------------------------

local content = BattlefieldMission:new({
zoneId = xi.zone.MONARCH_LINN,
battlefieldId = xi.battlefield.id.ANCIENT_VOWS,
isMission = true,
maxPlayers = 6,
levelCap = 40,
timeLimit = utils.minutes(30),
index = 0,
entryNpc = 'SD_Entrance',
exitNpcs = { 'SD_BCNM_Exit_1', 'SD_BCNM_Exit_2', 'SD_BCNM_Exit_3' },
missionArea = xi.mission.log_id.COP,
mission = xi.mission.id.cop.ANCIENT_VOWS,
requiredVar = 'Mission[6][248]Status',
requiredValue = 2,

grantXP = 1000,
title = xi.title.TAVNAZIAN_TRAVELER,
})

function content:entryRequirement(player, npc, isRegistrant, trade)
-- NOTE: In cases for testing or something may have happened to the player's
-- prevZone value, ensure we entered the "correct" way by confirming that
-- they did not enter from Site B01.

return player:getPreviousZone() ~= xi.zone.RIVERNE_SITE_B01
end

content.groups =
{
{
mobIds =
{
{
monarchLinnID.mob.MAMMET_19_EPSILON,
monarchLinnID.mob.MAMMET_19_EPSILON + 1,
monarchLinnID.mob.MAMMET_19_EPSILON + 2,
},

{
monarchLinnID.mob.MAMMET_19_EPSILON + 3,
monarchLinnID.mob.MAMMET_19_EPSILON + 4,
monarchLinnID.mob.MAMMET_19_EPSILON + 5,
},

{
monarchLinnID.mob.MAMMET_19_EPSILON + 6,
monarchLinnID.mob.MAMMET_19_EPSILON + 7,
monarchLinnID.mob.MAMMET_19_EPSILON + 8,
},
},

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

return content:register()
51 changes: 51 additions & 0 deletions scripts/battlefields/Monarch_Linn/savage.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
-----------------------------------
-- Area: Monarch Linn
-- Name: The Savage
-----------------------------------
local monarchLinnID = zones[xi.zone.MONARCH_LINN]
-----------------------------------

local content = BattlefieldMission:new({
zoneId = xi.zone.MONARCH_LINN,
battlefieldId = xi.battlefield.id.SAVAGE,
isMission = true,
maxPlayers = 6,
levelCap = 50,
timeLimit = utils.minutes(30),
index = 1,
entryNpc = 'SD_Entrance',
exitNpcs = { 'SD_BCNM_Exit_1', 'SD_BCNM_Exit_2', 'SD_BCNM_Exit_3' },
missionArea = xi.mission.log_id.COP,
mission = xi.mission.id.cop.THE_SAVAGE,
requiredVar = 'Mission[6][418]Status',
requiredValue = 1,

grantXP = 1500,
title = xi.title.MIST_MELTER,
})

function content:entryRequirement(player, npc, isRegistrant, trade)
-- NOTE: In cases for testing or something may have happened to the player's
-- prevZone value, ensure we entered the "correct" way by confirming that
-- they did not enter from Site A01.

return player:getPreviousZone() ~= xi.zone.RIVERNE_SITE_A01
end

content.groups =
{
{
mobIds =
{
{ monarchLinnID.mob.OURYU },
{ monarchLinnID.mob.OURYU + 1 },
{ monarchLinnID.mob.OURYU + 2 },
},

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

return content:register()
49 changes: 49 additions & 0 deletions scripts/battlefields/Riverne_Site_B01/storms_of_fate.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
-----------------------------------
-- Area: Riverne Site #B01
-- Name: Storms of Fate
-- !pos 299 -123 345 146
-----------------------------------
local riverneID = zones[xi.zone.RIVERNE_SITE_B01]
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.RIVERNE_SITE_B01,
battlefieldId = xi.battlefield.id.STORMS_OF_FATE,
maxPlayers = 18,
timeLimit = utils.minutes(30),
index = 0,
area = 1,
entryNpc = 'Unstable_Displacement',
exitNpc = 'SD_BCNM_Exit',
questArea = xi.questLog.JEUNO,
quest = xi.quest.id.jeuno.STORMS_OF_FATE,
requiredVar = 'StormsOfFate',
requiredValue = 2,
})

function content:onEventFinishWin(player, csid, option, npc)
if
player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.STORMS_OF_FATE) == xi.questStatus.QUEST_ACCEPTED and
player:getCharVar('StormsOfFate') == 2
then
npcUtil.giveKeyItem(player, xi.ki.WHISPER_OF_THE_WYRMKING)
player:setCharVar('StormsOfFate', 3)
player:addTitle(xi.title.CONQUEROR_OF_FATE)
end
end

content.groups =
{
{
mobIds =
{
riverneID.mob.BAHAMUT,
},

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

return content:register()
50 changes: 50 additions & 0 deletions scripts/commands/uptime.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-----------------------------------
-- func: uptime
-- desc: prints zone uptime
-----------------------------------
local commandObj = {}

commandObj.cmdprops =
{
permission = 1,
parameters = ''
}

local function formatSeconds(seconds)
local days = math.floor(seconds / 86400)
seconds = seconds % 86400 -- Use modulo to get remaining seconds after days
local hours = math.floor(seconds / 3600)
seconds = seconds % 3600 -- Use modulo again for remaining seconds after hours
local minutes = math.floor(seconds / 60)
seconds = seconds % 60 -- And again for remaining seconds

local parts = {}

if days > 0 then
table.insert(parts, string.format('%d day%s', days, days > 1 and 's' or ''))
end

if hours > 0 then
table.insert(parts, string.format('%d hour%s', hours, hours > 1 and 's' or ''))
end

if minutes > 0 then
table.insert(parts, string.format('%d minute%s', minutes, minutes > 1 and 's' or ''))
end

if seconds > 0 or #parts == 0 then
table.insert(parts, string.format('%d second%s', seconds, seconds > 1 and 's' or ''))
end

return table.concat(parts, ' ')
end

commandObj.onTrigger = function(player)
local zone = player:getZone()
if zone then
local uptime = zone:getUptime()
player:printToPlayer('The zone has been up for ' .. formatSeconds(uptime), xi.msg.channel.SYSTEM_3)
end
end

return commandObj
6 changes: 3 additions & 3 deletions scripts/globals/battlefield.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ xi.battlefield.id =
DESIRES_OF_EMPTINESS = 864, -- Converted
PULLING_THE_PLUG = 865,
EMPTY_ASPIRATIONS = 866,
STORMS_OF_FATE = 896,
STORMS_OF_FATE = 896, -- Converted
WYRMKING_DESCENDS = 897,
OURYU_COMETH = 928,
ANCIENT_VOWS = 960,
ANCIENT_VOWS = 960, -- Converted
SAVAGE = 961,
FIRE_IN_THE_SKY = 962,
BAD_SEED = 963,
Expand Down Expand Up @@ -320,7 +320,7 @@ xi.battlefield.id =
CENTRAL_TEMENOS_3RD_FLOOR = 1305, -- Converted
CENTRAL_TEMENOS_4TH_FLOOR = 1306, -- Converted
CENTRAL_TEMENOS_4TH_FLOOR_II = 1307, -- Converted
PURPLE_THE_NEW_BLACK = 2721,
PURPLE_THE_NEW_BLACK = 2721, -- Converted
}

xi.battlefield.itemUses =
Expand Down
Loading

0 comments on commit 74ccdbc

Please sign in to comment.