Bug - Fixed questM19Hippy not finished until I refresh quests

Bale

Minion
When I get the junk junk and go back to the Hippy for Island access questM19Hippy is not finished. I complete the quest by clicking on
Code:
place.php?whichplace=woods&action=woods_hippy

Here's the html I get by clicking that when I have the junk junk:
HTML:
<body><img src='/images/itemimages/blank.gif' id='dragged'><div id='debug'></div><div class=contextmenu id='skillmenu'></div><div class=contextmenu id='itemsmenu'></div><div id=topbar><center><table class=actionbar cellpadding=0 cellspacing=1><tbody><tr class=label><td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr class=blueback><td><a href='island.php'><img src='/images/itemimages/plexpock.gif'></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif' id='skills'></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td class=spacer></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif'></td></tr><tr class=label><td>again</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table></center></div><div class='content' id='content_'><div id='effdiv' style='display: none;'></div><div style='overflow: auto;'>
<Center><centeR><!--faaaaaaart--><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Hippy Talkin'</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="/images/adventureimages/thathippy.gif" width=100 height=100></center><p><div></div><p>"Oh wow, man, that boat looks really eco-friendly!  Come on, hop in, I'll show you where I live!"<p>Before you can say no, you've set sail (well, you've set cigar billboard, at least) to the Mysterious Island, home of the hippies and who knows what other godawful nonsense.<p>"I don't know how to thank you, man.  We, like, don't have any possessions, or I'd give you a reward."<p>"You've got this cool boat," you suggest, trying to be helpful.<p>"Great idea, man!  You should totally keep it!  I probably oughtta stick closer to home from now on anyway, man."<center></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Adventure Again:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><p><a href="island.php">Check out the Mysterious Island of Mystery</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><!--faaaaaaart--><script>top.charpane.location.href="charpane.php";</script>
</div></div></body>

questM19Hippy properly updates to finished when I refresh quests.
 

lostcalpolydude

Developer
Staff member
From PlaceRequest:
Code:
		else if ( place.equals( "woods" ) )
		{
			if ( action.equals( "woods_hippy" ) && responseText.contains( "You've got this cool boat" ) )
			{
				QuestDatabase.setQuestProgress( Quest.HIPPY, QuestDatabase.FINISHED );
			}
		}
I don't see how that doesn't handle it.
 

Bale

Minion
I have to admit that I also don't see how that could fail.

After completing the quest I checked the value of questM19Hippy and it was step2 or step3 instead of finished. So I typed "refresh quests" in the CLI and checked it again. After the refresh it was finished.

I know it happened, though looking at this it doesn't seem possible. Yeah, I'm clueless, but I'll try it again with a spading character who hasn't completed that quest.
 

Bale

Minion
Using KoLmafia v17.4 r17193.

Okay. Let's start the quest: http://127.0.0.1:60081/place.php?whichplace=woods&action=woods_smokesignals

Code:
> get questM19Hippy

unstarted

Investigating the Smoke Signals
Encounter: Hippy Talkin'
Encounter: Hippy Talkin'

> get questM19Hippy

unstarted

Whoa. It didn't recognize starting the quest. I'll post my html for you.

HTML:
<body><img src='/images/itemimages/blank.gif' id='dragged'><div id='debug'></div><div class=contextmenu id='skillmenu'></div><div class=contextmenu id='itemsmenu'></div><div id=topbar><center><table class=actionbar cellpadding=0 cellspacing=1><tbody><tr class=label><td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr class=blueback><td><a href='woods.php'><img src='/images/itemimages/plexpock.gif'></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif' id='skills'></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td class=spacer></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif'></td></tr><tr class=label><td>again</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table></center></div><div class='content' id='content_'><div id='effdiv' style='display: none;'></div><div style='overflow: auto;'>
<Center><centeR><!--faaaaaaart--><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Hippy Talkin'</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="/images/adventureimages/thathippy.gif" width=100 height=100></center><p><div></div><p>"Okay, okay, okay," you say.  "What, specifically, do you need from me?"<p>"Oh, you're like, in a hurry?  That's totally cool, man, I get that.  I need you to go over to the landfill and find me a sustainable boat.  Y'know, like reused, or recycled, or reduced or something.  I'd do it myself, but the whole place is lousy with junksprites, and, like, I'm a relaxer, not a fighter, man."<p>"Alright.  Point me at the landfill, and I'll see what I can do."<P><center><table  width=400  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>New Area Unlocked</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td valign=center><a href="adventure.php?snarfblat=356"><img src="/images/adventureimages/bigmap.gif"></a></td><td valign=center class=small><a class=nounder href="adventure.php?snarfblat=356"><b>The Old Landfill</b></a>, in <a class=nounder href=woods.php><b>The Distant Woods</b></a>.</td></tr></table></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><p><center></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Adventure Again:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><p><a href="woods.php">Back to the Distant Woods</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><!--faaaaaaart--><script>top.charpane.location.href="charpane.php";</script>
</div></div></body>

Visiting woods.php and seeing the Old Landfill is present also doesn't update questM19Hippy, though I don't know if it should.

I get the old claw-foot bathtub, still unstarted. I get the old clothesline pole, still unstarted. I get my third funky junk key and check questM19Hippy before using it, the quest is now at step1. Huh? I get the antique cigar sign, quest is step1. Time to get the junk junk.

Code:
> get questM19Hippy

step1
You acquire an item: junk junk

> get questM19Hippy

step3

That worked! I return to "That Hippy" and click on http://127.0.0.1:60081/place.php?whichplace=woods&action=woods_hippy

Code:
> get questM19Hippy

step3

Talking to that Hippy

> get questM19Hippy

step3

> refresh quests

Retrieving quest data...
Requests complete.

> get questM19Hippy

finished

Yup. Something is definitely wrong. Just for the record, here's the html of me completing the quest. Again.

HTML:
<body><img src='/images/itemimages/blank.gif' id='dragged'><div id='debug'></div><div class=contextmenu id='skillmenu'></div><div class=contextmenu id='itemsmenu'></div><div id=topbar><center><table class=actionbar cellpadding=0 cellspacing=1><tbody><tr class=label><td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr class=blueback><td><a href='island.php'><img src='/images/itemimages/plexpock.gif'></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif' id='skills'></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td><img src='/images/itemimages/blank.gif'></td><td class=spacer></td><td class=spacer></td><td><img src='/images/itemimages/blank.gif'></td></tr><tr class=label><td>again</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table></center></div><div class='content' id='content_'><div id='effdiv' style='display: none;'></div><div style='overflow: auto;'>
<Center><centeR><!--faaaaaaart--><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Hippy Talkin'</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="/images/adventureimages/thathippy.gif" width=100 height=100></center><p><div></div><p>"Oh wow, man, that boat looks really eco-friendly!  Come on, hop in, I'll show you where I live!"<p>Before you can say no, you've set sail (well, you've set cigar billboard, at least) to the Mysterious Island, home of the hippies and who knows what other godawful nonsense.<p>"I don't know how to thank you, man.  We, like, don't have any possessions, or I'd give you a reward."<p>"You've got this cool boat," you suggest, trying to be helpful.<p>"Great idea, man!  You should totally keep it!  I probably oughtta stick closer to home from now on anyway, man."<center></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Adventure Again:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><p><a href="island.php">Check out the Mysterious Island of Mystery</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><!--faaaaaaart--><script>top.charpane.location.href="charpane.php";</script>
</div></div></body>

Updating the thread from "Feature" to "Bug" since this is supposed to work.
 
Last edited:

Darzil

Developer
r17196 fixes started (wasn't ever checked) and step2 (wasn't hit due to redirect to shop.php).

The issue with tracking the completion is that it redirects to choice.php?forceoption=0 before displaying the result. It never seems to redirect to an actual choice. Not sure the best place/way to track this.

View attachment DEBUG_20160914.txt
 

lostcalpolydude

Developer
Staff member
ResultProcessor is improperly updating lastIslandUnlock when the junk junk drops. That's an easy fix, but I don't really want to fix it before figuring out how to recognize the quest being finished.
 

Bale

Minion
This is kinda funny. The code has been there for ages, but nobody has ever noticed that it doesn't work until now because there's just no reason to ever complete that quest except for laughs or factoids. Until Nuclear Autumn appeared. Hello, relevance!
 

Bale

Minion
Well, on aother character lets start the quest...

Code:
> version

KoLmafia v17.4 r17198

> get questM19Hippy

unstarted

Investigating the Smoke Signals
Encounter: Hippy Talkin'
Encounter: Hippy Talkin'

> get questM19Hippy

unstarted

> refresh quests

Retrieving quest data...
Requests complete.

> get questM19Hippy

started
Oh heck.

Somewhere between the second item and the thrid the quest advanced to step1. Sometime after getting the third item (not immediately) it advanced to step2. I have no idea why. Let's buy the junk junk in the relay browser!

Code:
> get questM19Hippy

step2
Requests complete.

You acquire an item: junk junk

> get questM19Hippy

step3

Hooray! That worked! Now, I'm off to see that hippy again...

Code:
> get questM19Hippy

step3

Talking to that Hippy

> get questM19Hippy

step3

> refresh quests

Retrieving quest data...
Requests complete.

> get questM19Hippy

finished

Oh, heck... This was mostly a failure, but at least buying the junk junk advances to step3 now.
 
Last edited:

lostcalpolydude

Developer
Staff member
Getting Worse Homes and Gardens advances to step1. Visiting the shop advances to step2. That's how KoL advances the quest, best seen by watching the Quest Tracker while working on a quest.
 

Darzil

Developer
Well lets try r17199. Rather than moving the checking for getting the quest started to initially encountering the choice, and not putting in a check for finish at all, put the checking for quest start back and just check for finish when initially encountering it later!

Who knows, it might work !
 

Bale

Minion
Once more into the breach...

Code:
> version

KoLmafia v17.4 r17199

> get questM19Hippy

unstarted

Investigating the Smoke Signals
Encounter: Hippy Talkin'
Encounter: Hippy Talkin'
Using 1 map to a hidden booze cache...
Finished using 1 map to a hidden booze cache.

> get questM19Hippy

started

What-ha– Wow! It worked! It worked!

Let's try out the rest of the quest... When I find the magazine it advances to step1. When I read the magazine to visit the junk shop it advances to step2. I make the junk junk it advances to step3. Only one more test to go. What will happen when I talk to that hippy again... Oh dear. I'm very nervous...

Code:
> get questM19Hippy

step3

Talking to that Hippy

> get questM19Hippy

finished

WHA-HOOOOOOOOO!

This bug is now officially fixed. :D :D :D :D
 

Theraze

Active member
FYI, I still had it marked as unstarted with r17200 when I took choices 1/2 for the hippy, to save 5 server hits. Refreshing the questlog does realize that the zone is unlocked.

I'm doing the following:
Code:
			if (get_property("questM19Hippy") == "unstarted") {
				visit_url("place.php?whichplace=woods&action=woods_smokesignals");
				run_choice(1);
				run_choice(2);
			}
 

Theraze

Active member
Looks like it should be the same, but...
HTML:
<center><img src="/images/adventureimages/thathippy.gif" width=100 height=100></center><p><div></div><p>"Okay, okay, okay," you say.  "What, specifically, do you need from me?"<p>"Oh, you're like, in a hurry?  That's totally cool, man, I get that.  I need you to go over to the landfill and find me a sustainable boat.  Y'know, like reused, or recycled, or reduced or something.  I'd do it myself, but the whole place is lousy with junksprites, and, like, I'm a relaxer, not a fighter, man."<p>"Alright.  Point me at the landfill, and I'll see what I can do."<P><center><table  width=400  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>New Area Unlocked</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td valign=center><a href="adventure.php?snarfblat=356"><img src="/images/adventureimages/bigmap.gif"></a></td>

And the whole page, which may have extra junk from some relay script:
HTML:
<html><head>
<script language=Javascript>
<!--
if (parent.frames.length == -1) location.href="game.php";
//-->
</script>
<script language=Javascript src="/images/scripts/jquery-1.5.1.js"></script>
<script language=Javascript src="/images/scripts/keybinds.min.2.js"></script>
<script language=Javascript src="/images/scripts/window.20111231.js"></script>
<script language="javascript">function chatFocus(){if(top.chatpane.document.chatform.graf) top.chatpane.document.chatform.graf.focus();}
if (typeof defaultBind != 'undefined') { defaultBind(47, 2, chatFocus); defaultBind(190, 2, chatFocus);defaultBind(191, 2, chatFocus); defaultBind(47, 8, chatFocus);defaultBind(190, 8, chatFocus); defaultBind(191, 8, chatFocus); }</script><script>
function switchFocus()
{
	if (top.chatpane.document.chatform.graf.focus) 
		top.chatpane.document.chatform.graf.focus(); 
	return false;
}
function repeat()
{
	var linx = document.getElementsByTagName("A");
	for (var i = 0; i < linx.length; i++)
	{
		if (typeof timersfunc != 'undefined') {
			if (!timersfunc()) { 
				return; 
			}
			timersfunc = null;
		}
		var link = linx[i];
		if (link.innerHTML.match(/Adventure Again/) || link.innerHTML.match(/Do it again/))
			location.href = link.href;
	}
}

defaultBind(47, CTRL, switchFocus);
defaultBind(191, CTRL, switchFocus);
defaultBind(47, META, switchFocus);
defaultBind(191, META, switchFocus);
defaultBind(192, NONE, repeat);
defaultBind(220, NONE, repeat);
</script><script language="javascript">
	function updateParseItem(iid, field, info) {
		var tbl = $('#ic'+iid);
		var data = parseItem(tbl);
		if (!data) return;
		data[field] = info;
		var out = [];
		for (i in data) {
			if (!data.hasOwnProperty(i)) continue;
			out.push(i+'='+data[i]);
		}
		tbl.attr('rel', out.join('&'));
	}
	function parseItem(tbl) {
		tbl = $(tbl);
		var rel = tbl.attr('rel');
		var data = {};
		if (!rel) return data;
		var parts = rel.split('&');
		for (i in parts) {
			if (!parts.hasOwnProperty(i)) continue;
			var kv = parts[i].split('=');
			tbl.data(kv[0], kv[1]);
			data[kv[0]] = kv[1];
		}
		return data;
	}
</script><script type="text/javascript" src="/images/scripts/pop_query.20130705.js"></script>
<script type="text/javascript"> function pop_ircm(clicked) { return false; } </script><script>

var currentkey = 49;
$(document).ready(function () {
	$('form').each(function () {
		var form = this;
		defaultBind(currentkey++, NONE, function () { form.submit(); });
		return currentkey < 58;
	});
});

</script>	<link rel="stylesheet" type="text/css" href="/images/styles.20151006.css">
<style type='text/css'>
.faded {
	zoom: 1;
	filter: alpha(opacity=35);
	opacity: 0.35;
	-khtml-opacity: 0.35; 
    -moz-opacity: 0.35;
}
</style>

<script src="/images/jquery-1.9.1.js"></script><script src="/stationarybuttons.1.js"></script><link rel="stylesheet" type="text/css" href="/stationarybuttons.1.css"><script src="/hotkeys.js"></script><script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head>

<body onkeyup="handleCombatHotkey(event,false);" onkeydown="handleCombatHotkey(event,true);" ><div id="page"><div id="mafiabuttons"><center><table width="95%"><tr><td align=left><div id="btnwrap"><input type="button" onClick="document.location.href='woods.php';void(0);" value="again" id="defaultButton"> </div></td><td align=right valign=top><select id="hotkeyViewer" onchange="updateCombatHotkey();"><option>- update hotkeys -</option></select></td></tr></table></center></div><div class='content' id='content_'><div id='effdiv' style='display: none;'></div><div>
<Center><centeR><!--faaaaaaart--><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Hippy Talkin'</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="/images/adventureimages/thathippy.gif" width=100 height=100></center><p><div></div><p>"Okay, okay, okay," you say.  "What, specifically, do you need from me?"<p>"Oh, you're like, in a hurry?  That's totally cool, man, I get that.  I need you to go over to the landfill and find me a sustainable boat.  Y'know, like reused, or recycled, or reduced or something.  I'd do it myself, but the whole place is lousy with junksprites, and, like, I'm a relaxer, not a fighter, man."<p>"Alright.  Point me at the landfill, and I'll see what I can do."<P><center><table  width=400  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>New Area Unlocked</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td valign=center><a href="adventure.php?snarfblat=356"><img src="/images/adventureimages/bigmap.gif"></a></td><td valign=center class=small><a class=nounder href="adventure.php?snarfblat=356"><b>The Old Landfill</b></a>, in <a class=nounder href=woods.php><b>The Distant Woods</b></a>.</td></tr></table></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><p><center></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Adventure Again:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><p><a href="woods.php">Back to the Distant Woods</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><!--faaaaaaart--><script>top.charpane.location.href="charpane.php";</script>
</div></div></div></body><script src="/onfocus.1.js"></script></html>
 

Theraze

Active member
Of course, this time when I did it manually in the relay browser, it worked fine. I'm going to be really annoyed if it's just dealing with forgetting to remove the Staph before running the script... Did that once, but could have sworn I got it right the second time. Ugh. Guess I'm going to have to do more testing, if nothing leaps out. Might be PEBKAC.
 

Theraze

Active member
So I've run it twice more and it worked fine. I have one more go tomorrow, but I'm expecting this to be PEBKAC. Sorry. :(
 

Theraze

Active member
Third confirmation that my ability to not mess up everything when I run SC is still in place. Sorry for the confirmation that the staph breaks this quest detection, like with so many others, in a non-fixable way.
 

Bale

Minion
For what it is worth, another confirmation that it works perfectly. Almost certainly the staph. By all that you hold sacred, put a line in your loginScript to automatically unequip that curséd thing!

> get questM19Hippy

step3

Talking to that Hippy

> get questM19Hippy

finished

> get lastIslandUnlock

441

> ash my_ascensions()

Returned: 441
 
Top