Skip to content

Commit

Permalink
Merge pull request #4824 from Flibe-XI/mission-work
Browse files Browse the repository at this point in the history
[AMK, Lua] Corrected missions cutscenes
  • Loading branch information
zach2good authored Dec 9, 2023
2 parents 10f79a1 + 826fa06 commit c95840a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 34 deletions.
49 changes: 43 additions & 6 deletions scripts/missions/amk/06_An_Errand_The_Professors_Price.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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] =
Expand Down Expand Up @@ -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,
Expand All @@ -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,
},
Expand All @@ -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
29 changes: 1 addition & 28 deletions scripts/missions/amk/07_Shock_Arrant_Abuse_of_Authority.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit c95840a

Please sign in to comment.