Bug - Fixed Nemesis Quest tracking property is not updated upon quest start

philmasterplus

Active member
  • KoLmafia version: r20783
When starting the Nemesis Quest by visiting your guild's "same class guy" (guild.php?place=scg) NPC as an Accordion Thief, the quest property (questG04Nemesis) is not set to started.

Looking at QuestManager.java, it appears that some checks are missing or handled incorrectly:
Java:
        if ( responseText.contains( "not recovered the Epic Weapon yet" ) ||
             responseText.contains( "The Tomb is within the Misspelled Cemetery" ) ||
             responseText.contains( "the Tomb, which is within the Misspelled Cemetery" ) )
        {
            QuestDatabase.setQuestProgress( Quest.NEMESIS, QuestDatabase.STARTED );
        }

Replacing the above with the following fixes the issue for DBs and ATs. This also fixes minor glitches that occur when visiting the NPC again:
Java:
        if (
            // Muscle classes
            responseText.contains( "The Tomb is within the Misspelled Cemetery" ) ||
            // Mysticality classes
            responseText.contains( "the Tomb, which is within the Misspelled Cemetery" ) ||
            // Moxie classes
            responseText.contains( "the Tomb is in the Misspelled Cemetary" ) )
        {
            QuestDatabase.setQuestProgress( Quest.NEMESIS, QuestDatabase.STARTED );
        }
        if (
            // Muscle classes
            responseText.contains( "not recovered the Epic Weapon yet" ) ||
            // Mysticality classes
            responseText.contains( "not yet claimed the Epic Weapon" ) ||
            // Moxie classes
            responseText.contains( "the delay on that Epic Weapon" )
        )
        {
            QuestDatabase.setQuestIfBetter( Quest.NEMESIS, QuestDatabase.STARTED );
        }

I got the texts from the KoL wiki page for the Legendary Epic Weapon Quest.

Edit: Added a patch file
 

Attachments

  • nemesis-quest-start-fix.patch
    1.8 KB · Views: 1
Last edited:

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
r20786. Thanks!
 

philmasterplus

Active member
Erm, it looks like the wiki was incorrect on the text. Apparently, even TPTB are confused on how to spell the Misspelled Cemetery--the Mysticality guild NPC dialogue uses "Cemetary", which causes the text comparison to fail.

This patch should finally fix it, regardless of the typo:

Diff:
Index: src/net/sourceforge/kolmafia/session/QuestManager.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/net/sourceforge/kolmafia/session/QuestManager.java b/src/net/sourceforge/kolmafia/session/QuestManager.java
--- a/src/net/sourceforge/kolmafia/session/QuestManager.java	(revision 20810)
+++ b/src/net/sourceforge/kolmafia/session/QuestManager.java	(date 1628417492860)
@@ -650,11 +650,11 @@
 		}
 		if (
 			// Muscle classes
-			responseText.contains( "The Tomb is within the Misspelled Cemetery" ) ||
+			responseText.contains( "The Tomb is within the Misspelled" ) ||
 			// Mysticality classes
-			responseText.contains( "the Tomb, which is within the Misspelled Cemetery" ) ||
+			responseText.contains( "the Tomb, which is within the Misspelled" ) ||
 			// Moxie classes
-			responseText.contains( "the Tomb is in the Misspelled Cemetary" ) )
+			responseText.contains( "the Tomb is in the Misspelled" ) )
 		{
 			QuestDatabase.setQuestProgress( Quest.NEMESIS, QuestDatabase.STARTED );
 		}
 

philmasterplus

Active member
Sorry to keep bumping, but there is another minor bug.

The Legendary Epic Weapon quest involves the following steps:
  1. Defeat the Clownlord, Beelzebozo who drops the ingredient for the legendary epic weapon
  2. Visit the same-class NPC who gives you 1000 meat to buy the tenderizing hammer
  3. Smith the legendary epic weapon and visit the NPC to progress the quest
Normally, the player is expected to do these tasks in order. However, when the player skips step 2, visiting the NPC in step 3 results in a special dialogue that reimburses the player for the front cost of the hammer.

The problem is that, while this special dialogue indicates completion of step 3, KoLmafia incorrectly matches this as step 2. This is because the dialogue contains the text "Meatsmithing Hammer" in both cases (1-2-3 or 1-3).

The following change should fix this:
Diff:
Index: src/net/sourceforge/kolmafia/session/QuestManager.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/net/sourceforge/kolmafia/session/QuestManager.java b/src/net/sourceforge/kolmafia/session/QuestManager.java
--- a/src/net/sourceforge/kolmafia/session/QuestManager.java	(revision 20810)
+++ b/src/net/sourceforge/kolmafia/session/QuestManager.java	(date 1628427719058)
@@ -673,7 +673,7 @@
 		{
 			QuestDatabase.setQuestProgress( Quest.NEMESIS, "step5" );
 		}
-		if ( responseText.contains( "Meatsmithing hammer" ) )
+		if ( responseText.contains( "a Meatsmithing hammer" ) )
 		{
 			QuestDatabase.setQuestIfBetter( Quest.NEMESIS, "step7" );
 		}
 
Last edited:

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Top