From 826fa06d5a41dcd22e7cbd5701f243a466732e33 Mon Sep 17 00:00:00 2001 From: Flibe Date: Mon, 4 Dec 2023 01:00:14 -0500 Subject: [PATCH] technically correct cs mission order --- .../amk/06_An_Errand_The_Professors_Price.lua | 49 ++++++++++++++++--- .../07_Shock_Arrant_Abuse_of_Authority.lua | 29 +---------- 2 files changed, 44 insertions(+), 34 deletions(-) diff --git a/scripts/missions/amk/06_An_Errand_The_Professors_Price.lua b/scripts/missions/amk/06_An_Errand_The_Professors_Price.lua index 5bf54388f18..15db409d79f 100644 --- a/scripts/missions/amk/06_An_Errand_The_Professors_Price.lua +++ b/scripts/missions/amk/06_An_Errand_The_Professors_Price.lua @@ -36,7 +36,6 @@ local orbKeyItems = } local beginCardianFight = function(player, npc) - -- TODO: Increase default number of cardians to 20 as is required. Mob IDs missing local numToSpawn = 15 local modsToAdd = {} @@ -94,7 +93,9 @@ mission.sections = -- Go get the Starfruit { check = function(player, currentMission, missionStatus, vars) - return currentMission >= mission.missionId and not player:hasKeyItem(xi.ki.RIPE_STARFRUIT) + return currentMission >= mission.missionId and + missionStatus == 0 and + not player:hasKeyItem(xi.ki.RIPE_STARFRUIT) end, [xi.zone.WINDURST_WALLS] = @@ -144,6 +145,7 @@ mission.sections = { check = function(player, currentMission, missionStatus, vars) return currentMission >= mission.missionId and + missionStatus == 0 and player:hasKeyItem(xi.ki.RIPE_STARFRUIT) and not player:needToZone() end, @@ -164,10 +166,9 @@ mission.sections = if option == 0 then -- Dont Pay player:needToZone(true) elseif option == 1 then -- Pay - if mission:complete(player) then - player:delGil(5000) - player:delKeyItem(xi.ki.RIPE_STARFRUIT) - end + player:delGil(5000) + player:delKeyItem(xi.ki.RIPE_STARFRUIT) + player:setMissionStatus(xi.mission.log_id.AMK, 1) end end, }, @@ -183,6 +184,42 @@ mission.sections = }, }, }, + + -- Watch Shantotto uncurse the moogle and get digging instructions + { + check = function(player, currentMission, missionStatus, vars) + return currentMission == mission.missionId and missionStatus == 1 + end, + + [xi.zone.WINDURST_WALLS] = + { + ['Shantotto'] = + { + onTrigger = function(player, npc) + return mission:progressEvent(509) + end, + }, + }, + + [xi.zone.UPPER_JEUNO] = + { + ['Inconspicuous_Door'] = + { + onTrigger = function(player, npc) + local diggingZone = xi.amk.helpers.getDiggingZone(player) + local diggingZoneCsId = xi.amk.helpers.digSites[diggingZone].eventID + return mission:progressEvent(10182, diggingZoneCsId) + end, + }, + + onEventFinish = + { + [10182] = function(player, csid, option, npc) + mission:complete(player) + end, + }, + }, + }, } return mission diff --git a/scripts/missions/amk/07_Shock_Arrant_Abuse_of_Authority.lua b/scripts/missions/amk/07_Shock_Arrant_Abuse_of_Authority.lua index 74da0d23e93..da1d80628c8 100644 --- a/scripts/missions/amk/07_Shock_Arrant_Abuse_of_Authority.lua +++ b/scripts/missions/amk/07_Shock_Arrant_Abuse_of_Authority.lua @@ -20,37 +20,10 @@ mission.reward = mission.sections = { - -- Intro - { - check = function(player, currentMission, missionStatus, vars) - return currentMission == mission.missionId and missionStatus == 0 - end, - - [xi.zone.UPPER_JEUNO] = - { - ['Inconspicuous_Door'] = - { - -- Reminder - onTrigger = function(player, npc) - local diggingZone = xi.amk.helpers.getDiggingZone(player) - local diggingZoneCsId = xi.amk.helpers.digSites[diggingZone].eventID - return mission:progressEvent(10182, diggingZoneCsId) - end, - }, - - onEventFinish = - { - [10182] = function(player, csid, option, npc) - player:setMissionStatus(xi.mission.log_id.AMK, 1) - end, - }, - }, - }, - -- Digging minigame, handled in xi.amk.helpers and chocobo_digging.lua { check = function(player, currentMission, missionStatus, vars) - return currentMission == mission.missionId and missionStatus == 1 and + return currentMission == mission.missionId and not player:hasKeyItem(xi.ki.MOLDY_WORM_EATEN_CHEST) end,