From 5a37045c489d8542bc086720af0fca959d7dc8a6 Mon Sep 17 00:00:00 2001 From: slashtangent <78345197+slashtangent@users.noreply.github.com> Date: Tue, 11 Mar 2025 08:35:21 -0500 Subject: [PATCH] Add Quest The Flipside of Things --- scripts/globals/quests.lua | 2 +- .../crystalWar/The_Flipside_of_Things.lua | 98 +++++++++++++++++++ .../Garlaige_Citadel_[S]/DefaultActions.lua | 1 + 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 scripts/quests/crystalWar/The_Flipside_of_Things.lua diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index b90d99520c6..c096548927d 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -713,7 +713,7 @@ xi.quest.id = SNAKE_ON_THE_PLAINS = 8, -- + STEAMED_RAMS = 9, -- + SEEING_SPOTS = 10, -- + Converted - THE_FLIPSIDE_OF_THINGS = 11, + THE_FLIPSIDE_OF_THINGS = 11, -- + Converted BETTER_PART_OF_VALOR = 12, FIRES_OF_DISCONTENT = 13, HAMMERING_HEARTS = 14, -- + Converted diff --git a/scripts/quests/crystalWar/The_Flipside_of_Things.lua b/scripts/quests/crystalWar/The_Flipside_of_Things.lua new file mode 100644 index 00000000000..823a6977813 --- /dev/null +++ b/scripts/quests/crystalWar/The_Flipside_of_Things.lua @@ -0,0 +1,98 @@ +----------------------------------- +-- The Flipside of Things +----------------------------------- +-- !addquest 7 11 +-- Rarcasmeault : !pos 146.175 -6.000 93.04 +-- _qm2 : !pos -69.588 -1.415 57.695 +----------------------------------- + +local quest = Quest:new(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_FLIPSIDE_OF_THINGS) + +quest.reward = +{ + exp = 2000, + gil = 2000, + keyItem = xi.keyItem.MAP_OF_VUNKERL_INLET, +} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE + end, + + [xi.zone.GARLAIGE_CITADEL_S] = + { + ['Rarcasmeault'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(6) + end, + }, + + onEventFinish = + { + [6] = function(player, csid, option, npc) + if option == 1 then + quest:begin(player) + end + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.GARLAIGE_CITADEL_S] = + { + ['Rarcasmeault'] = + { + onTrigger = function(player, npc) + if player:hasKeyItem(xi.ki.FIREPOWER_CASE) then + return quest:progressEvent(9) + else + return quest:event(8) -- This is their default action until the quest is completed. + end + end, + }, + + ['_qm2'] = + { + onTrigger = function(player, npc) + if not player:hasKeyItem(xi.ki.FIREPOWER_CASE) then + return quest:progressEvent(7) + end + end, + }, + + onEventFinish = + { + [7] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.ki.FIREPOWER_CASE) + end, + + [9] = function(player, csid, option, npc) + quest:complete(player) + player:delKeyItem(xi.ki.FIREPOWER_CASE) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_COMPLETED + end, + + [xi.zone.GARLAIGE_CITADEL_S] = + { + ['Rarcasmeault'] = quest:event(4):replaceDefault(), + }, + }, +} + +return quest diff --git a/scripts/zones/Garlaige_Citadel_[S]/DefaultActions.lua b/scripts/zones/Garlaige_Citadel_[S]/DefaultActions.lua index 3c2906ff037..14ebd150015 100644 --- a/scripts/zones/Garlaige_Citadel_[S]/DefaultActions.lua +++ b/scripts/zones/Garlaige_Citadel_[S]/DefaultActions.lua @@ -5,4 +5,5 @@ return { ['Duchille'] = { event = 17 }, ['Loutille'] = { event = 16 }, ['Nelinnie'] = { event = 23 }, + ['_qm2'] = { event = 5 }, }