Skip to content

Commit

Permalink
Merge pull request #5824 from hooksta4/minstrel_in_despair
Browse files Browse the repository at this point in the history
[Quest]A Minstrel in Despair to IF
  • Loading branch information
claywar authored May 28, 2024
2 parents dbea7e2 + ba7864d commit a9dd8f4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 24 deletions.
47 changes: 47 additions & 0 deletions scripts/quests/jeuno/A_Minstrel_In_Despair.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
-----------------------------------
-- A Minstrel in Despair
-----------------------------------
-- Log ID: 3, Quest ID: 12
-- Mertaire : !pos -17 0 -61 245
-----------------------------------
local quest = Quest:new(xi.questLog.JEUNO, xi.quest.id.jeuno.A_MINSTREL_IN_DESPAIR)

quest.reward =
{
fame = 30,
fameArea = xi.fameArea.JEUNO,
gil = 2100,
}

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.THE_OLD_MONUMENT) == xi.questStatus.QUEST_COMPLETED
end,

[xi.zone.LOWER_JEUNO] =
{
['Mertaire'] =
{
onTrade = function(player, npc, trade)
if npcUtil.tradeHasExactly(trade, { xi.item.POETIC_PARCHMENT }) then
return quest:progressEvent(101)
end
end,
},

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

return quest
2 changes: 1 addition & 1 deletion scripts/quests/jeuno/The_Old_Monument.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-----------------------------------
-- The Old Monument
-----------------------------------
-- Log ID: 3, Quest ID: 20
-- Log ID: 3, Quest ID: 11
-- Mertaire : !pos -17 0 -61 245
-- Bki Tbujhja : !pos -22 0 -60 245
-- Song Runes : !pos -244 16 -280 118
Expand Down
24 changes: 1 addition & 23 deletions scripts/zones/Lower_Jeuno/npcs/Mertaire.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,7 @@ local ID = zones[xi.zone.LOWER_JEUNO]
-----------------------------------
local entity = {}

local poeticParchmentID = 634

entity.onTrade = function(player, npc, trade)
-- A MINSTREL IN DESPAIR (poetic parchment)
if
trade:hasItemQty(poeticParchmentID, 1) and
trade:getItemCount() == 1 and
player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.THE_OLD_MONUMENT) == xi.questStatus.QUEST_COMPLETED and
player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.A_MINSTREL_IN_DESPAIR) == xi.questStatus.QUEST_AVAILABLE
then
player:startEvent(101)
end
end

entity.onTrigger = function(player, npc)
Expand Down Expand Up @@ -68,19 +57,8 @@ entity.onEventUpdate = function(player, csid, option, npc)
end

entity.onEventFinish = function(player, csid, option, npc)
-- A MINSTREL IN DESPAIR
if csid == 101 then
npcUtil.giveCurrency(player, 'gil', 2100)
player:tradeComplete()
player:completeQuest(xi.questLog.JEUNO, xi.quest.id.jeuno.A_MINSTREL_IN_DESPAIR)
player:addFame(xi.fameArea.JEUNO, 30)

-- Placing this here allows the player to get additional poetic
-- parchments should they drop them until this quest is complete
player:setCharVar('TheOldMonument_Event', 0)

-- PAINFUL MEMORY (Bard AF1)
elseif csid == 138 and option == 0 then
if csid == 138 and option == 0 then
player:setCharVar('PainfulMemoryCS', 1) -- player declined quest

elseif
Expand Down

0 comments on commit a9dd8f4

Please sign in to comment.