Skip to content

Commit

Permalink
Merge pull request #5836 from hooksta4/in_the_mood_for_love
Browse files Browse the repository at this point in the history
[Quest]In the mood for love impl.
  • Loading branch information
claywar authored May 30, 2024
2 parents dba986e + 2b49999 commit 3a93950
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/enum/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ xi.item =
CORAL_CREST_KEY = 1659,
BRONZE_KEY = 1660,
CATHEDRAL_TAPESTRY = 1662,
CHAMELEON_DIAMOND = 1666,
CLUSTER_CORE = 1667,
CLEAN_SNAP_ROD = 1668,
PINCH_OF_HOARY_BOMB_ASH = 1669,
Expand Down
98 changes: 98 additions & 0 deletions scripts/quests/jeuno/In_the_Mood_for_Love.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
-----------------------------------
-- In the Mood for Love
-----------------------------------
-- Log ID: 3, Quest ID: 69
-- Odasel !pos -58 -6 -111 245
-- Matoaka !pos -37 -6 -122 245
-----------------------------------
local quest = Quest:new(xi.questLog.JEUNO, xi.quest.id.jeuno.IN_THE_MOOD_FOR_LOVE)

quest.reward =
{
gil = 4800,
fame = 30,
fameArea = xi.fameArea.JEUNO,
title = xi.title.PICK_UP_ARTIST,
}

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:getCurrentMission(xi.mission.log_id.COP) > xi.mission.id.cop.A_VESSEL_WITHOUT_A_CAPTAIN
end,

[xi.zone.LOWER_JEUNO] =
{
['Odasel'] = quest:progressEvent(10035, 0, xi.item.CHAMELEON_DIAMOND),

onEventFinish =
{
[10035] = function(player, csid, option, npc)
quest:begin(player)
end,
},
},
},

{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED
end,

[xi.zone.LOWER_JEUNO] =
{
['Odasel'] =
{
onTrigger = function(player, npc)
return quest:event(10037, 0, xi.item.CHAMELEON_DIAMOND)
end,

onTrade = function(player, npc, trade)
if npcUtil.tradeHasExactly(trade, xi.item.CHAMELEON_DIAMOND) then
return quest:progressEvent(10036, 0, xi.item.CHAMELEON_DIAMOND)
end
end,
},
onEventFinish =
{
[10036] = function(player, csid, option, npc)
if quest:complete(player) then
player:confirmTrade()
quest:setVar(player, 'Option', 1)
end
end,
},
},
},

{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_COMPLETED
end,

[xi.zone.LOWER_JEUNO] =
{
['Odasel'] = quest:event(10038):replaceDefault(),

['Matoaka'] =
{
onTrigger = function(player, npc)
if quest:getVar(player, 'Option') == 1 then
-- Additional Cutscene
return quest:progressEvent(10039)
end
end,
},
onEventFinish =
{
[10039] = function(player, csid, option, npc)
quest:setVar(player, 'Option', 0)
end,
},
},
},
}

return quest
1 change: 1 addition & 0 deletions scripts/zones/Lower_Jeuno/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ return {
['Gurdern'] = { event = 112 },
['Harnek'] = { event = 217 },
['Muckvix'] = { event = 15 },
['Odasel'] = { event = 162 },
['Omer'] = { event = 206 },
['Saprut'] = { event = 224 },
['Sattal-Mansal'] = { event = 96 },
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Lower_Jeuno/npcs/Odasel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:startEvent(162)
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down

0 comments on commit 3a93950

Please sign in to comment.