topaz
topaz copied to clipboard
Windurst Quest "Rubbish Day" Wrong choices displayed in dialog
Issue by eyes-and-brain
Saturday Oct 17, 2020 at 16:51:51
Originally opened as: project-topaz/topaz - Issue 1383
I have:
- [x] searched existing issues (http://project-topaz.com/issues/) to see if the issue has already been opened
- [x] checked the commit log to see if the issue has been resolved since my server was last updated
Additional Information (Steps to reproduce/Expected behavior) :
It occurs by the following procedure.
- You have not received the Jeuno quest "Rubbish Day".
- You have received the Windurst quest "Making Amens!".
- Talk to "Mashira" in "Garlaige Citadel".
- The dialog displays the option "I want to throw away Magic trash", which is strange. For reason 1, I don't have the Key item "Magic trash".
It seems that "2" is correct, not "0", as the parameter that changes the options. (L22) https://github.com/project-topaz/topaz/blob/e6001c7f89923cb9773e98c25daa72b230171371/scripts/zones/Garlaige_Citadel/npcs/Mashira.lua#L16-L27
I think that the following four patterns should be branched according to the state of the two quests.
function onTrigger(player, npc)
local rubbishDay = player:getQuestStatus(JEUNO, tpz.quest.id.jeuno.RUBBISH_DAY)
local makingAmens = player:getQuestStatus(WINDURST, tpz.quest.id.windurst.MAKING_AMENS)
if ((rubbishDay == QUEST_ACCEPTED and player:getCharVar("RubbishDayVar") == 0) and
(makingAmens ~= QUEST_ACCEPTED or player:hasKeyItem(tpz.ki.BROKEN_WAND) == true)) then
player:startEvent(11, 1) -- only For the quest "Rubbish day"
elseif ((rubbishDay ~= QUEST_ACCEPTED or player:getCharVar("RubbishDayVar") ~= 0) and
(makingAmens == QUEST_ACCEPTED and player:hasKeyItem(tpz.ki.BROKEN_WAND) == false)) then
player:startEvent(11, 2, 937) -- only For the quest "Making Amens"
elseif (rubbishDay == QUEST_ACCEPTED and player:getCharVar("RubbishDayVar") == 0 and
makingAmens == QUEST_ACCEPTED and player:hasKeyItem(tpz.ki.BROKEN_WAND) == false) then
player:startEvent(11) -- For the quest "Rubbish day" / "Making Amens"
else
player:startEvent(11, 3) -- Standard dialog and menu
end
end
Comment by eyes-and-brain
Saturday Oct 17, 2020 at 18:25:11
I'll fix it a little.
function onTrigger(player, npc)
local rubbishDay = player:getQuestStatus(JEUNO, tpz.quest.id.jeuno.RUBBISH_DAY)
local makingAmens = player:getQuestStatus(WINDURST, tpz.quest.id.windurst.MAKING_AMENS)
if (rubbishDay == QUEST_ACCEPTED and player:getCharVar("RubbishDayVar") == 0 and
makingAmens == QUEST_ACCEPTED and player:hasKeyItem(tpz.ki.BROKEN_WAND) == false) then
player:startEvent(11) -- For the quest "Rubbish day" / "Making Amens"
elseif (rubbishDay == QUEST_ACCEPTED and player:getCharVar("RubbishDayVar") == 0) then
player:startEvent(11, 1) -- only For the quest "Rubbish day"
elseif (makingAmens == QUEST_ACCEPTED and player:hasKeyItem(tpz.ki.BROKEN_WAND) == false) then
player:startEvent(11, 2, 937) -- only For the quest "Making Amens"
else
player:startEvent(11, 3) -- Standard dialog and menu
end
end