Skip to content

Commit

Permalink
Quest Merchants bidding to IF
Browse files Browse the repository at this point in the history
  • Loading branch information
KnowOne134 committed Feb 21, 2025
1 parent 8db0094 commit 53f4573
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 47 deletions.
2 changes: 1 addition & 1 deletion scripts/globals/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ xi.quest.id =
GRIMY_SIGNPOSTS = 66, -- + Converted
A_JOB_FOR_THE_CONSORTIUM = 67,
TROUBLE_AT_THE_SLUICE = 68, -- + Converted
THE_MERCHANTS_BIDDING = 69, -- ±
THE_MERCHANTS_BIDDING = 69, -- ± Converted
UNEXPECTED_TREASURE = 70,
BLACKMAIL = 71, -- +
THE_SETTING_SUN = 72, -- +
Expand Down
71 changes: 71 additions & 0 deletions scripts/quests/sandoria/The_Merchants_Bidding.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
-----------------------------------
-- The Merchants Bidding
-----------------------------------
-- Log ID: 0, Quest ID: 69
-----------------------------------
-- Parvipon : !pos -169 -1 13 230
-----------------------------------

local quest = Quest:new(xi.questLog.SANDORIA, xi.quest.id.sandoria.THE_MERCHANTS_BIDDING)

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE
end,

[xi.zone.SOUTHERN_SAN_DORIA] =
{
['Parvipon'] = quest:progressEvent(90),

onEventFinish =
{
[90] = function(player, csid, option, npc)
if option == 1 then
quest:begin(player)
end
end,
},
},
},
{
check = function(player, status, vars)
return status ~= xi.questStatus.QUEST_AVAILABLE
end,

['Parvipon'] =
{
onTrade = function(player, npc, trade)
if npcUtil.tradeHas(trade, { { xi.item.RABBIT_HIDE, 3 } }) then
return quest:progressEvent(89)
end
end,

onTrigger = function(player, npc)
if player:getQuestStatus(xi.quest.Sandoria.THE_MERCHANT_S_BIDDING) == xi.questStatus.QUEST_ACCEPTED then
return quest:event(88)
else
return quest:event(90, { [7] = 1 })
end
end,
},

onEventFinish =
{
[89] = function(player, csid, option, npc)
if quest:complete(player) then
player:addFame(xi.fameArea.SANDORIA, 30)
else
player:addFame(xi.fameArea.SANDORIA, 5)
end

npcUtil.giveCurrency(player, 'gil', 120)
player:confirmTrade()
end,
},
},
},
}

return quest
46 changes: 0 additions & 46 deletions scripts/zones/Southern_San_dOria/npcs/Parvipon.lua

This file was deleted.

0 comments on commit 53f4573

Please sign in to comment.