Bug - Fixed Bubblin' crude cannot be autosold

Veracity

Developer
Staff member
We do give it an autosell price of 60, and, therefore, attempt to autosell it if requested.
Perhaps that is a change from when we first added it - which would make this a "KoL change", for which the forum doesn't have a tag.
Or, perhaps, we really did just make up that number when we first entered it into the data file, in which case, this really is a "bug".
 

roippi

Developer
The autosell value is a real thing - it has a minimum sale price in the mall. There are a few of these things now where they are not discardable but do have an autosell value.
 

Veracity

Developer
Staff member
Well, that's cool - except we really do attempt to autosell it - and deduct it from inventory, as if it worked. It comes back if you refresh inventory.

So, perhaps there are two issues here:

- Do not attempt to autosell "non-discardable" things.
- If you force KoL to try to do it - visit_url(), say - recognize when autosell fails and do not remove from inventory.

Which is rather more general than just bubblin' crude.

Edit: here are the details of an attempted autosell of bubblin' crude:

Code:
Requesting: http://www.kingdomofloathing.com/sellstuff.php?action=sell&type=quant&howmany=2&whichitem[]=5789
Retrieved: http://www.kingdomofloathing.com/sellstuff.php?action=sell&type=quant&howmany=2&whichitem[]=5789
...
That doesn't make any sense.
...
 
Last edited:

Ioeth

Member
Ha, I didn't really notice the complexities with this item. What I was reporting is that bubblin' crude does show up as autosaleable in Mafia and that when you do attempt to autosell it, Mafia deducts it from inventory as Veracity describes. Sorry for not doing the research!
 
I'm with Veracity, here - this definitely needs fixing. Veracity, any ideas on how to tackle it? I'd be happy to look into this today.
 
Here's a little patch to fix this. All the patch does is modifies AutoSellRequest to not try and autosell items that do not have the "d" (discard) flag set in the item data file. (I also formatted the code using KoLmafia's formatting rules.)

Tested it, and it works for the bubblin' crude case, at least. :D
 
Top