diff --git a/scripts/enum/item.lua b/scripts/enum/item.lua index 43574872fc2..eff563b781e 100644 --- a/scripts/enum/item.lua +++ b/scripts/enum/item.lua @@ -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, diff --git a/scripts/quests/jeuno/In_the_Mood_for_Love.lua b/scripts/quests/jeuno/In_the_Mood_for_Love.lua new file mode 100644 index 00000000000..12f7e107bd4 --- /dev/null +++ b/scripts/quests/jeuno/In_the_Mood_for_Love.lua @@ -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 diff --git a/scripts/zones/Lower_Jeuno/DefaultActions.lua b/scripts/zones/Lower_Jeuno/DefaultActions.lua index 0108f7b9298..70d27ed13fa 100644 --- a/scripts/zones/Lower_Jeuno/DefaultActions.lua +++ b/scripts/zones/Lower_Jeuno/DefaultActions.lua @@ -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 }, diff --git a/scripts/zones/Lower_Jeuno/npcs/Odasel.lua b/scripts/zones/Lower_Jeuno/npcs/Odasel.lua index c4415ebb01d..e2ca28a4f14 100644 --- a/scripts/zones/Lower_Jeuno/npcs/Odasel.lua +++ b/scripts/zones/Lower_Jeuno/npcs/Odasel.lua @@ -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)