Skip to content

Commit

Permalink
Merge pull request #6394 from Flibe-XI/the_gift
Browse files Browse the repository at this point in the history
[Lua, Fishing, Quest] Converted Quest "The Gift" to IF format
  • Loading branch information
zach2good authored Nov 3, 2024
2 parents 9398a3d + 71b4512 commit 7420bb6
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 2 deletions.
89 changes: 89 additions & 0 deletions scripts/quests/otherAreas/The_Gift.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
-----------------------------------
-- The Gift
-----------------------------------
-- Log ID: 4, Quest ID: 21
-- !addquest 4 21
-- !additem 4375
-- Oswald : !pos 47.119 -15.273 7.989 248
-----------------------------------

local quest = Quest:new(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_GIFT)

quest.reward =
{
item = xi.item.SLEEP_DAGGER,
title = xi.title.SAVIOR_OF_LOVE,
fameArea = xi.fameArea.SELBINA_RABAO,
}

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:getQuestStatus(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.UNDER_THE_SEA) == xi.questStatus.QUEST_COMPLETED and
player:getQuestStatus(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_SAND_CHARM) >= xi.questStatus.QUEST_ACCEPTED and
xi.settings.map.FISHING_ENABLE == true
end,

[xi.zone.SELBINA] =
{
['Oswald'] = quest:progressEvent(70, xi.item.DANCESHROOM), -- Girlfriend needs a shroom

onEventFinish =
{
[70] = function(player, csid, option, npc)
if option == 50 then
quest:begin(player)
end
end,
},
},
},

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

[xi.zone.SELBINA] =
{
['Oswald'] =
{
onTrigger = function(player, npc)
return quest:event(71) -- They are really hard to come by
end,

onTrade = function(player, npc, trade)
if npcUtil.tradeHasExactly(trade, xi.item.DANCESHROOM) then
return quest:progressEvent(72, 0, xi.item.DANCESHROOM) -- You found it! Please take this reward
end
end,
},

onEventFinish =
{
[72] = function(player, csid, option, npc)
if quest:complete(player) then
player:confirmTrade()
end
end,
},
},
},

{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_COMPLETED and
player:getQuestStatus(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_REAL_GIFT) == xi.questStatus.QUEST_AVAILABLE
end,

[xi.zone.SELBINA] =
{
['Oswald'] = quest:progressEvent(78):replaceDefault(),
-- I've been all over Vana'diel, but the inn is my favorite.
},
},
}

return quest
5 changes: 3 additions & 2 deletions scripts/quests/otherAreas/Under_the_Sea.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ local quest = Quest:new(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.UNDER_TH

quest.reward =
{
item = xi.item.AMBER_EARRING,
title = xi.title.LIL_CUPID,
item = xi.item.AMBER_EARRING,
title = xi.title.LIL_CUPID,
fameArea = xi.fameArea.SELBINA_RABAO,
}

quest.sections =
Expand Down

0 comments on commit 7420bb6

Please sign in to comment.