Issue information

Issue ID
#1025
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Feb 21, 2008 19:17
Last Post
Hercules Elf Bot
Feb 21, 2008 19:17
Confirmation
N/A

Hercules Elf Bot - Feb 21, 2008 19:17

Originally posted by [b]Etin[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1025

Hello.

There seems to be a bug in the Poison King quest that prevents most people to complete it. They keep on getting the first dialog from the main Poison King NPC. This concerns Stable branch, and probably Trunk as well since this comes from the recent merge from Trunk.

Script:
http://svn.eathena.ws/svn/ea/branches/stab...sts_louyang.txt
http://svn.eathena.ws/svn/ea/trunk/npc/que...sts_louyang.txt

Here is the script fragment to blame I guess:

CODE
// Poison King Quest
//============================================================
lou_in02,123,39,4    script    Poison King#lou    824,{
    //Remove outdated variables and attempt to preserve prior quest progress.
    if (QL_POISONKING <= 12) set ch_poison,QL_POISON;
    else if (QL_POISONKING == 16) set ch_poison,19;
    else if (QL_POISONKING >= 17) set ch_poison,20;
    set QL_POISONKING,0;


The bug is simple, because of the last line, the next dialogs with the NPC will always start with a:
CODE
set ch_poison,0;

And unfortunately, the next dialogs are only accessible when ch_poison is positive.

QL_POISON also seems to be a typo, would probably be QL_POISONKING.

Fix proposal:

CODE
// Poison King Quest
//============================================================
lou_in02,123,39,4    script    Poison King#lou    824,{
    //Remove outdated variables and attempt to preserve prior quest progress.
    if (ch_poison == 0) {
        if (QL_POISONKING <= 12) set ch_poison,QL_POISONKING;
        else if (QL_POISONKING == 16) set ch_poison,19;
        else if (QL_POISONKING >= 17) set ch_poison,20;
        set QL_POISONKING,0;
    }


Thank you.