Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lua][quest] The Rumor to IF #7073

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/globals/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ xi.quest.id =
GROWING_FLOWERS = 58, -- ± Converted
TRIAL_BY_ICE = 59, -- +
THE_GENERALS_SECRET = 60, -- ± Converted
THE_RUMOR = 61, -- ±
THE_RUMOR = 61, -- ± Converted
HER_MAJESTYS_GARDEN = 62, -- +
INTRODUCTION_TO_TEAMWORK = 63,
INTERMEDIATE_TEAMWORK = 64,
Expand Down
84 changes: 84 additions & 0 deletions scripts/quests/sandoria/The_Rumor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
-----------------------------------
-- The Rumor
-----------------------------------
-- Log ID: 0, Quest ID: 61
-----------------------------------
-- Novalmauge !pos 70 -24 21 167
-----------------------------------

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

quest.reward =
{
item = xi.item.SCROLL_OF_DRAIN,
}

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:getFameLevel(xi.fameArea.SANDORIA) >= 3 and
player:getMainLvl() >= 10
end,

[xi.zone.BOSTAUNIEUX_OUBLIETTE] =
{
['Novalmauge'] =
{
onTrigger = function(player, npc)
return quest:progressEvent(13)
end,
},

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

[xi.zone.BOSTAUNIEUX_OUBLIETTE] =
{
['Novalmauge'] =
{
onTrigger = quest:event(11),

onTrade = function(player, npc, trade)
if npcUtil.tradeHasExactly(trade, xi.item.VIAL_OF_BEASTMAN_BLOOD) then
return quest:progressEvent(12)
end
end,
},

onEventFinish =
{
[12] = function(player, csid, option, npc)
if quest:complete(player) then
player:confirmTrade()
end
end,
},
},
},
{
check = function(player, status)
return status == xi.quest.status.COMPLETED
end,

[xi.zone.BOSTAUNIEUX_OUBLIETTE] =
{
['Novalmauge'] = quest:event(14):replaceDefault(),
},
},
}

return quest
3 changes: 2 additions & 1 deletion scripts/zones/Bostaunieux_Oubliette/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ return {
['_4nj'] = { special = ID.text.SEEMS_LOCKED },
['_4nk'] = { special = ID.text.SEEMS_LOCKED },
['Chumia'] = { text = ID.text.CHUMIA_DIALOG },
['Couchatorage'] = { event = 9 },
['Couchatorage'] = { event = 9 },
['Novalmauge'] = { event = 10 },
['qm1'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY },
}
27 changes: 0 additions & 27 deletions scripts/zones/Bostaunieux_Oubliette/npcs/Novalmauge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ entity.onTrade = function(player, npc, trade)
npcUtil.tradeHas(trade, xi.item.DAHLIA)
then
player:startEvent(17)
elseif
player:getQuestStatus(xi.questLog.SANDORIA, xi.quest.id.sandoria.THE_RUMOR) == xi.questStatus.QUEST_ACCEPTED and
npcUtil.tradeHas(trade, xi.item.VIAL_OF_BEASTMAN_BLOOD)
then
player:startEvent(12)
end
end

entity.onTrigger = function(player, npc)
local troubleAtTheSluiceStat = player:getCharVar('troubleAtTheSluiceVar')
local theHolyCrestStat = player:getCharVar('TheHolyCrest_Event')
local theRumor = player:getQuestStatus(xi.questLog.SANDORIA, xi.quest.id.sandoria.THE_RUMOR)

-- THE HOLY CREST
if theHolyCrestStat == 1 then
Expand All @@ -58,20 +52,6 @@ entity.onTrigger = function(player, npc)
player:startEvent(15)
elseif troubleAtTheSluiceStat == 2 then
player:startEvent(16)

-- THE RUMOR
elseif
theRumor == xi.questStatus.QUEST_AVAILABLE and
player:getFameLevel(xi.fameArea.SANDORIA) >= 3 and
player:getMainLvl() >= 10
then
player:startEvent(13)
elseif theRumor == xi.questStatus.QUEST_ACCEPTED then
player:startEvent(11)
elseif theRumor == xi.questStatus.QUEST_COMPLETED then
player:startEvent(14) -- Standard dialog after "The Rumor"
else
player:startEvent(10) -- Standard dialog
end
end

Expand All @@ -80,13 +60,6 @@ entity.onEventFinish = function(player, csid, option, npc)
player:setCharVar('TheHolyCrest_Event', 2)
elseif csid == 7 then
player:setCharVar('theHolyCrestCheck', 1)
elseif
csid == 12 and
npcUtil.completeQuest(player, xi.questLog.SANDORIA, xi.quest.id.sandoria.THE_RUMOR, { item = xi.item.SCROLL_OF_DRAIN })
then
player:confirmTrade()
elseif csid == 13 and option == 1 then
player:addQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.THE_RUMOR)
elseif csid == 14 then
player:setCharVar('theHolyCrestCheck', 0)
elseif csid == 15 then
Expand Down