Bug price requests during choice adventures cause automation

bleary

Member
I got this today:

Screen Shot 2014-02-28 at 11.51.59 AM.PNG

And my reaction was (a) that's weird, I didn't know it could appear for this nightstand; followed by (b) I wonder what "Engorged Sausages and You" is going for these days.

Typing "cheapest engorged" into the CLI resulted in:

Code:
[55] The Haunted Bedroom
Encounter: One Nightstand

> cheapest engorged

Searching for "Engorged Sausages and You"...
Encounter: One Nightstand
You gain 21 Wizardliness
You gain a Mysticality point!
Search complete.
No tradeable items!

Which is exactly the thing I didn't want to happen.
 

bleary

Member
If you can't search the Mall whilst being in an adventure in KoL, why do you think Mafia can ?

I don't think it can. My thought was that since Mafia caches mall prices somewhere, and there is a "Share recent Mall price data with other users" preference, Mafia would, if unable to check the mall, perhaps report the most recently cached mall price for the thing. Alternatively, I thought it would fail without doing anything. What I really didn't expect was for Mafia to choose a choice in an adventure because I asked for a mall price.
 

Theraze

Active member
So then you can check historical_price rather than mall_price (through cheapest) and tell mafia not to do server hits.

I think this is one of those "behaving as designed" cases - you told it to do automation and get to where it could do a mall search and it did.
 

bleary

Member
So then you can check historical_price rather than mall_price (through cheapest) and tell mafia not to do server hits.

I think this is one of those "behaving as designed" cases - you told it to do automation and get to where it could do a mall search and it did.

Code:
> help price

cheapest[?] [+]item [,[-]item]... [; cmds] - compare prices, do cmds with "it" replaced with best.
expensive[?] [+]item [,[-]item]... [; cmds] - compare prices, do cmds with "it" replaced with best.
mallsell item [[@] price [[limit] num]] [, another]... - sell in Mall.
reprice - price all max-priced items at or below current Mall minimum price.
shop put item [[@] price [[limit] num]] [, another] | take [all|num] item [, another] - sell or remove from Mall..
spade [prices URL] - submit automatically gathered data.
undercut - price all max-priced items at or below current Mall minimum price.
update clear | save | prices URL or filename - revert to built-in data or save override files for new objects.

> help historical_price

No matching commands found!

Is there some way of knowing in advance which CLI commands will cause automation and which won't?
 

lostcalpolydude

Developer
Staff member
PurchaseRequest.run() could have GenericRequest.abortIfInFightOrChoice() added. So could other Request classes, I guess, I don't know if Veracity had other ideas about that when it was added though.

> ashref price

int autosell_price( item )
int buy_price( coinmaster, item )
int historical_price( item )
int mall_price( item )
int npc_price( item )
int sell_price( coinmaster, item )
int shop_price( item )
 

Veracity

Developer
Staff member
It was intended to prevent KoLmafia from getting confused about the state of inventory, equipment, familiar, etc. when a request is made during a fight and ends up getting redirected back to the fight. Yes, we should only update our model when we get positive feedback that a request worked, rather than when we submit it, but that method was intended to not even bother submitting a request that we knew would fail.

So, yes, we could also add calls to other request classes, as you said.

I am confused about why we supposedly "automate through the choice" when attempting to do a mall search, rather than submitting the request and getting redirected back to the choice. That sounds like something funky in that specific request class, or, perhaps, in the "cheapest" command, which the OP used. It wouldn't hurt to make the request abort without trying anything using the method you mention, but it would be nice to understand why this request class behaves differently than attempting to change equipment or familiar, say.
 

Erich

Member
I got this today:

View attachment 8191

And my reaction was (a) that's weird, I didn't know it could appear for this nightstand; followed by (b) I wonder what "Engorged Sausages and You" is going for these days.

If it makes you feel better, that's the choice for the new palindome item, "disposable instant camera". So you didn't lose any potential meat gain :) Sausages is still from the Wooden stand.
 
Top