Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Windurst Quest "Rubbish Day" Wrong choices displayed in dialog #1383

Open
2 tasks done
eyes-and-brain opened this issue Oct 17, 2020 · 1 comment
Open
2 tasks done

Comments

@eyes-and-brain
Copy link

eyes-and-brain commented Oct 17, 2020

I have:

  • searched existing issues (http://project-topaz.com/issues/) to see if the issue has already been opened
  • 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.

  1. You have not received the Jeuno quest "Rubbish Day".
  2. You have received the Windurst quest "Making Amens!".
  3. Talk to "Mashira" in "Garlaige Citadel".
  4. 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)

function onTrigger(player, npc)
if (player:getQuestStatus(JEUNO, tpz.quest.id.jeuno.RUBBISH_DAY) == QUEST_ACCEPTED and player:getCharVar("RubbishDayVar") == 0) then
player:startEvent(11, 1) -- For the quest "Rubbish day"
elseif (player:getQuestStatus(WINDURST, tpz.quest.id.windurst.MAKING_AMENS) == QUEST_ACCEPTED) then
if (player:hasKeyItem(tpz.ki.BROKEN_WAND) == true) then
player:startEvent(11, 3)
else player:startEvent(11, 0) -- Making Amens dialogue
end
else
player:startEvent(11, 3) -- Standard dialog and menu
end
end

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

@eyes-and-brain
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant