Bug - Fixed Hippy store not detected as available immediately after finishing quest

picklish

Member
This has happened for repeated ascensions. I defeat the filthworm queen and collect my reward, but mafia does not think that the hippy store is available.

Code:
> buy orange

[color=red]You are not yet out of ronin, and are unable to buy this item from a NPC store.[/color]
This is also reflected in the item manager's list of things that I can make. If I buy an item from the store directly from the relay browser, then the hippy store becomes available again.
 

Veracity

Developer
Staff member
I have never, ever had that problem. Not once. I'm two days into a new ascension, so I'll be able to check myself soon enough, but I need to you to tell me exactly what you do to get this so I can try to reproduce it. Do you do the Orchard quest 100% in the Relay Browser (as I do), or do you automate it, somehow?

What do you do?
 

picklish

Member
I'm using bumcheekcity's ascending script. I can try doing this by hand via the CLI next time to get a more exact repro case, but after it gets the guard stench, it's doing:

Code:
conditions add 1 heart of the filthworm queen
adventure * queen's chamber
outfit frat warrior
ash visit_url("bigisland.php?place=orchard&action=stand&pwd=");
ash visit_url("bigisland.php?place=orchard&action=stand&pwd="); // Yes, twice.
 

Nifft

Member
Using a script, I've long had an issue trying to do the final visit using visit_url - the currentHippyStore and lastFilthClearance prefs do not get set.

Instead for just the final visit try: cli_execute("text bigisland.php?place=orchard&action=stand&pwd");

That's worked in my scripts for ages.

~ Nifft
 
I've had this problem as well. I use (a customised version of) Zarqon's Wossname script, which has the same pair of visit_url calls as picklish's post above. Looking forward to trying Nifft's suggestion next ascension.
 

Veracity

Developer
Staff member
Try revision 9257. That will set currentHippyStore and lastFilthClearance when you turn in the heart of the filthworm queen.
For good measure, it does a refreshConcotions, which will hopefully make all the recipes that depend on items from the hippy store available.
I should be able to test this myself, tomorrow.
 

Bale

Minion
For good measure, it does a refreshConcotions, which will hopefully make all the recipes that depend on items from the hippy store available.

I've sometimes had to refresh to get my recipes to show up in the booze manager after turning in her filthy heart, so I'm happy to hear about this.
 

BleedingFingers

New member
I'm using r9433 and I'm getting weird behaviour with the hippy store. I've noticed this since r9439. I complete the filthworm quest and mafia recognises that I can use the store. Then after 1 use it seems to forget that I can use the store.

I've just done a test and typed "buy plum" at the Cli. That worked. If I run that command again I get "You are not yet out of ronin, and are unable to buy this item from a NPC store."

If I then go to the store in the relay browser and buy a plum there, then the Cli works again (once). This working/not working alternates and each time I have to go to the relay browser and use the store manually.

Edit: I forgot to mention that I'm using Mafia in 2 different locations, I completed the filthworm quest in 1 location and I'm testing this out in another - but this hasn't been an issue before. Normally I just use the relay browser and visit each of the side quests so that mafia can learn that I've completed it...
 
Last edited:

slyz

Developer
Try with r9457.

EDIT: in retrospect, checking for
PHP:
urlString.indexOf( "ajax" ) != -1
instead of
PHP:
responseText.indexOf( "You acquire an item" ) != -1
might have been better.

If anyone still runs into problems, I'll change it.
 
Last edited:

roippi

Developer
In your preferences file, what is lastFilthClearance? Try to see what it is in both states.

slyzninjas
 

Veracity

Developer
Staff member
EDIT: in retrospect, checking for
PHP:
urlString.indexOf( "ajax" ) != -1
instead of
PHP:
responseText.indexOf( "You acquire an item" ) != -1
might have been better.
In general, yes. The "ajax" versions of all sorts of pages does not show the full page you'd see without ajax, and therefore we don't go looking for what is not there.

If this is another such case, then, yes - check for ajax in the URLstring ( a very quick string match) rather than (anything) in the responseText (almost guaranteed to be a much long string match.)
 

Darzil

Developer
Sorry, should have done more investigation, but I was having weird behaviour on Tuesday with this, which I hadn't seen before. When I finished the quest as Hippy, and it marked it complete I was able to use the hippy store. Then later I went to drink, and found few options, went to look at the map, saw it no longer marked complete. Visited it, it marked complete, I was able to make drinks again. A few turns later I checked again and it was no longer marked complete.

Have done many ascensions, but the first time I've seen this.
 

Veracity

Developer
Staff member
That's a puzzler. There is no mechanism, that I can see, for UN-marking a sidequest as being complete..
 

Nifft

Member
Using r9452 people in my clan were losing the sidequest pref as well. Updating to r9457 has provided the needed fix. Thanks Slyz/Veracity.
~ Nifft
 

roippi

Developer
That's a puzzler. There is no mechanism, that I can see, for UN-marking a sidequest as being complete..

Line 700 of MallPurchaseRequest:

Code:
[B]String side = "none";[/B]

			if ( responseText.indexOf( "peach" ) != -1 ||
			     responseText.indexOf( "pear" ) != -1 ||
			     responseText.indexOf( "plum" ) != -1 )
			{
				Preferences.setInteger( "lastFilthClearance", KoLCharacter.getAscensions() );
				side = "hippy";
			}
			else if ( responseText.indexOf( "bowl of rye sprouts" ) != -1 ||
				  responseText.indexOf( "cob of corn" ) != -1 ||
				  responseText.indexOf( "juniper berries" ) != -1 )
			{
				Preferences.setInteger( "lastFilthClearance", KoLCharacter.getAscensions() );
				side = "fratboy";
			}

			Preferences.setString( "currentHippyStore", side );
			Preferences.setString( "sidequestOrchardCompleted", side );

If the two "if" checks fail (as they were doing during purchases), currentHippyStore and sidequestOrchardCompleted are set to "none". With slyz' fix, those if checks should never fail, but a better way of initializing side might be String side = Preferences.getString( "sidequestOrchardCompleted" ); .
 

Veracity

Developer
Staff member
A better way of initializing side might be String side = Preferences.getString( "sidequestOrchardCompleted" ); .
I don't think so. If we really do not see "special" items in the store, you did not finish the sidequest for either side. The issue was only looking for items in the store when KoLmafia is showing them to you - which does not happen when you buy things with ajax, it seems.
 

Veracity

Developer
Staff member
Revision 9458 will not search the result of an npc store purchase done via ajax, since the store inventory is not refreshed.
That also includes not looking for "pirate tract" and such in the pirate book store, in addition to not looking for "peach" in the hippy store.
 
Top