Bug - Fixed Can't purchase from mall in Fistcore

Bale

Minion
If you are in hardcore/ronin and ascend in the path, "Way of the Surprising Fist" KoLmafia will report your current meat in storage as -1000 or 0. (I cannot account for the inconsistency.) I presume this is intended to keep mafia from pulling meat from Hangks, but it also (unfortunately) keeps the player from using the mall using Hagnks meat.

I can verify that KoL allows the player to buy from the mall in Fistcore.

Amusingly, if you use the mall interface to purchase an item from the mall, mafia notices KoL's response and reports the correct value of meat which can lead to mafia believing that you can withdraw meat from Hangks. (I tried it! Mafia failed to withdraw the meat, of course, but it did not recognize its failure.)

Refresh session will not inspire mafia to recheck the meat in storage.
 

Veracity

Developer
Staff member
There is no code in KoLmafia to do anything differently with storage Meat in Fistcore vs. any other path.

With the recent addition of api.php?what=storage, we no longer look at Storage to find the items that are in it. We still do, however, go to the main page of Storage to see how much Meat you have and how many pulls you have left. Perhaps there is something different about what that page says about Meat when you are in Fistcore. DEBUG log, please?
 

Bale

Minion
Perhaps there is something different about what that page says about Meat when you are in Fistcore. DEBUG log, please?

Ah! That would definitely be the case! I'll alter the actual amount of meat to protect my privacy.

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v16.1 r13205, Windows XP, Java 1.6.0_35
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Mon Nov 18 17:36:19 EST 2013
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


class net.sourceforge.kolmafia.request.RelayRequest
Connecting to storage.php...

Requesting: http://www.kingdomofloathing.com/storage.php?which=5
2 request properties
Field: Cookie = [appserver=www9; PHPSESSID=gh2i92p7shn4sebkr4iv79g761]
Field: User-Agent = [KoLmafia v16.1]

Retrieving server reply...

Retrieved: http://www.kingdomofloathing.com/storage.php?which=5
10 header fields
Field: null = [HTTP/1.1 200 OK]
Field: Date = [Mon, 18 Nov 2013 22:36:23 GMT]
Field: Transfer-Encoding = [chunked]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Content-Type = [text/html; charset=UTF-8]
Field: Connection = [keep-alive]
Field: Server = [nginx/1.0.15]
Field: X-Powered-By = [PHP/5.3.3]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Pragma = [no-cache]

Retrieving server reply
ResponseText has 18332 characters.
<html><head><script language=Javascript><!--if (parent.frames.length == 0) location.href="game.php";var actions = { "sendmessage.php" : { "action" : 1, "title" : "Send Message", "arg" : "toid" }, "makeoffer.php" : { "action" : 1, "title" : "Propose Trade", "arg" : "towho" }, "skills.php" : { "action" : 1, "title" : "Buff", "arg" : "towho" }, "mallstore.php" : { "action" : 1, "title" : "Mall Store", "arg" : "whichstore" }, "displaycollection.php" : { "action" : 1, "title" : "Display Case", "arg" : "who" }, "ascensionhistory.php" : { "action" : 1, "title" : "Ascension History", "arg" : "back=other&who" }, "curse.php" : { "action" : 1, "title" : "Brick 'Em, Dano", "arg" : "whichitem=1649&targetplayer" }, "/./curse.php" : { "action" : 1, "title" : "Throw TP", "arg" : "whichitem=1923&targetplayer" }, "/./././curse.php" : { "action" : 1, "title" : "Send Candy Heart", "arg" : "randomheart=1&targetplayer" }, "/whois" : { "action" : 2, "useid" : true, "submit" : true}, "/msg" : { "action" : 3, "useid" : true, "query" : "Enter message to send to %:" } }var notchat = true;//--></script><script language=Javascript src="http://images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script><script language=Javascript src="http://images.kingdomofloathing.com/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 language=Javascript src="http://images.kingdomofloathing.com/scripts/core.js"></script><script language=Javascript src="http://images.kingdomofloathing.com/scripts/cookie.20130818.js"></script><script language=Javascript src="http://images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></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="http://images.kingdomofloathing.com/scripts/pop_query.20130705.js"></script><script type="text/javascript" src="http://images.kingdomofloathing.com/scripts/ircm.20120523.js"></script><script type="text/javascript">function pop_ircm_contents(i, some) {var contents = '',shown = 0,da = ' <a href="#" rel="?" class="small dojaxy">[some]</a> <a href="#" rel="',db = '" class="small dojaxy">[all]</a>',dc = '<div style="width:100%; padding-bottom: 3px;" rel="',dd = '<a href="#" rel="1" class="small dojaxy">[';one = 'just do it!'; ss = false;if (1) { shown++;contents += dc + 'inventory.php?action=tabit&ajax=1&whichitem=IID&tab=0&pwd=5866f0afffaa5b39d63cb864b2e6c6c6" id="pircm_'+i.id+'"><b>'+"Add to favorites"+':</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'just do it!'; ss = false;if (1) { shown++;contents += dc + 'inventory.php?action=tabit&ajax=1&whichitem=IID&tab=1&pwd=5866f0afffaa5b39d63cb864b2e6c6c6" id="pircm_'+i.id+'"><b>'+"Add to Jarlsberg"+':</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}return [contents, shown];}var todo = [];function nextAction() {var next_todo = todo.shift();if (next_todo) {eval(next_todo);}}function dojax(dourl, afterFunc, hoverCaller, failureFunc, method, params) {$.ajax({type: method || 'GET', url: dourl, cache: false,data: params || null,global: false,success: function (out) {nextAction();if (out.match(/no\|/)) {var parts = out.split(/\|/);if (failureFunc) failureFunc(parts[1]);else $('#ChatWindow').append('<font color="green">Oops!  Sorry, Dave, you appear to be ' + parts[1] + '.</font><br />' + "\n");return;}if (hoverCaller)  {float_results(hoverCaller, out);if (afterFunc) { afterFunc(out); }return;}$(top.mainpane.document).find("#effdiv").remove(); if(!window.dontscroll || (window.dontscroll && dontscroll==0)) { window.scroll(0,0);}var $eff = $(top.mainpane.document).find('#effdiv');if ($eff.length == 0) {var d = top.mainpane.document.createElement('DIV');d.id = 'effdiv';var b = top.mainpane.document.body;if ($('#content_').length > 0) {b = $('#content_ div:first')[0];}b.insertBefore(d, b.firstChild);$eff = $(d);}$eff.find('a[name="effdivtop"]').remove().end().prepend('<a name="effdivtop"></a><center>' + out + '</center>').css('display','block');if (!window.dontscroll || (window.dontscroll && dontscroll==0)) {top.mainpane.document.location = top.mainpane.document.location + "#effdivtop";}if (afterFunc) { afterFunc(out); }}});}</script><script language="javascript">var pwd = "5866f0afffaa5b39d63cb864b2e6c6c6";function loadingDiv() {$(top.mainpane.document).find("#effdiv").remove();if(!window.dontscroll || (window.dontscroll && dontscroll==0)) {window.scroll(0,0);}var d = document.createElement('DIV');d.id = 'effdiv';d.innerHTML = '<center><table cellspacing="0" width="95%"><tr><td align="center" style="color: white; background-color: blue">Results:</td></tr><tr><td align="center" style="border: 1px solid blue;">Loading Results...</td></tr></table></center><br />';var b = top.mainpane.document.body;if ($('#content_').length > 0) {b = $('#content_ div:first')[0];}b.insertBefore(d, b.firstChild);}function doEquip() {loadingDiv();var hidingtwo = ($('s[rel^=inv_equip]:first').length > 0);dojax($(this).attr('href') + '&ajax=1', function (r) {if ($('#curequip').size() > 0)$.get('inventory.php?ajax=1&curequip=1', function (r) {$('#curequip').replaceWith(r)if ($('#curequip a.twohand').length == 0 && hidingtwo) {$('s[rel^=inv_eq]').each(function () {$a = $(document.createElement('A'));$a.attr('href', $(this).attr('rel'));$a.html($(this).html());$(this).before($a).remove();});}$('a[href^="inv_eq"]').click(doEquip);});});return false;}function isRight(e) {var rightclick;if (!e) e = window.event;if (e.shiftKey) rightclick = true;else if (e.which) rightclick = (e.which == 3);else if (e.button) rightclick = (e.button == 2);return rightclick;}function doUse(e) {if (isRight(e)) {document.location = $(this).attr('href');e.stopPropagation();return false;}if (!$(this).attr('href').match(/multiuse/)) {loadingDiv();dojax($(this).attr('href') + '&ajax=1');}else {var href = $(this).attr('href');pop_query($(this), 'How Many?', 'Use', function (num) {if (num < 1 || isNaN(num)) { return false; }loadingDiv();dojax(href.replace("passitem","whichitem") + '&action=useitem&ajax=1&quantity=' + num + '&pwd=' + pwd);});}return false;}function activateUseLinks() {$('.stuffbox').live('click', function (e) {var target = $(e.target);var href = target.attr('href');var func = null;if (href && href.match(/multiuse/)) { func = doUse; }else if (!href || isRight(e)) { func = null; }else if (href.match(/inv_equip/)) { func = doEquip; }else if (href.match(/inv_(eat|booze|use|fam)/)) { func =  doUse; }else if (target.hasClass('closet')) { func = doCloset; }else if (target.hasClass('autosell')) { func = doAutoSell; }if (func) {return func.apply(target, arguments);}else { return true; }});}$(document).ready(function () { activateUseLinks() });function updateInv(chg) {var tofix = {};for (iid in chg) {var found = false;$('#i' + iid).each(function () {if ($(this).text() != '') found = true;var td = $(this);var num = td.text().match(/\((\d+)\)/);var addnum = false;if (!num) { addnum = true ;num = [1,1]; }var oldnum = parseInt(num[1]);var newnum = (oldnum + parseInt(chg[iid]));if (newnum <= 0) {tofix[td.parents('table.guts:first').attr('id')] = 1;td.parents('td.i:first').remove();}else if (newnum == 1) {td.find('span').html('');$('#mu' + iid).hide();}else {td.find('span').html('(' + newnum+ ')');$('#mu' + iid).show();}updateParseItem(iid, 'n', newnum);});if (!found) {$.get('inventory.php?ajax=1&which=' + whichpage + '&onlyitem=' + iid, addNewItem);}}for (i in tofix) { fixTable($('table#' + i)); }}function fixTable(oldtbl) {var tds = [];var tbl = $(oldtbl).clone().empty();var ncols = window.numcols || 2;$(oldtbl).find('td.i').each(function () {tds.push(this);if (tds.length == ncols) {var tr = $('<tr></tr>');for (i=0; i<tds.length; i++) { tr.append(tds[i]); }tbl.append(tr);tds = [];}});if (tds.length < ncols) {var tr = $('<tr></tr>');for (i=0; i<tds.length; i++) { tr.append(tds[i]); }tbl.append(tr);}$(oldtbl).replaceWith(tbl);}function addNewItem(inr) {var r = $(inr).find('div:first');var secname = r.attr('rel');var section = $('table#'+ secname);if (section.size() == 0) {return;}section.parents('table.stuffbox').show();var tbl = r.find('table.item');var toadd = $('<td class="i"></td>').append(tbl);var name = toadd.find('b').text().toLowerCase();var added = false;section.find('table.item').each(function () {var cmp = $(this).find('b').text().toLowerCase();if (cmp.localeCompare(name) > 0) {$(this).parent().before(toadd);added = true;return false;}});if (!added) {var tr = section.find('tr:last');if (tr.size() < 1) var tr = $('<tr></tr>').appendTo(section);tr.append(toadd);}fixTable(section);}</script><script type="text/javascript">		jQuery(function ($) {$('.takelink').click(function () {if ($(this).hasClass('some')) return;dojax($(this).attr('href') + '&ajax=1');return false;});});</script><style type="text/css">a.manage { padding-right: .5em; }table.item { padding: 0; margin: 0; float: left; }table.item tr { padding: 0; margin: 0; }table.item td { text-align: left; padding: 0; margin: 0; }table.item td.img { vertical-align: center; width: 30px; }table.item tr td.sl { vertical-align: center; width: 100px; }table.item tr td.sl img { width:100px; height: 100px; }.collapsed { padding-left: 1em; font-size: .8em; color: white; }form.filter { padding: 0; margin: 0; }</style><script>var whichpage = "5";var oninventory = 1;var numcols = 2;var autodiscard = false;var dontscroll = 1;var inrhc = 1;function discardconf(item){return autodiscard || confirm("Are you sure you want to discard your " + item + "?");}function no(power, word, item, shirt){var denial = "You need " + power + " base " + word + " points to equip your " + item + "."if (shirt)alert("You're not sexy enough for this shirt.\n" + denial);elsealert(denial);};function no2(){alert("You can't figure out how to put on this shirt.");};function no3(item){alert("You can't equip your " + item + " while in Hardcore mode.");};function no5(reqd){alert("You must be level " + reqd + " to be able to consume that.");};function no7(){alert("You cannot equip chefstaves.");};function no8(){alert("You can't use that right now.  Because of reasons.");};function eatsome(link, uselink) {var url = uselink + '&ajax=1&quantity=';pop_query($(link), 'How Many?', 'Consume', function (res) {res = parseInt(res);if (res > 0) dojax(url + res);});return false;}function closetsome(link) {var url = $(link).attr('href');pop_query($(link), 'How Many?', 'Closet', function (res) {res = parseInt(res);if (res > 0) dojax(url + res + '&ajax=1');});return false;}function storagesome(link) {var url = $(link).attr('href');pop_query($(link), 'How Many?', 'Pull', function (res) {res = parseInt(res);if (res > 0) dojax(url + res + '&ajax=1');});return false;}jQuery(function($) {var w = $('select[name="hidecantuse"]').css('width');$('input[name="ftext"]').css('width', w);$('#filter').submit(function (e) {var test = $(this).find('[name="ftext"]').val();test = test || '';if (test == '') {return true;}test = test.replace('*', '');if (test.length < 3) {e.preventDefault();alert('You must enter at least three charaters.');return false;}return true;});$('#action').submit(function (e) {var val = $('select', this).val();if (val == 'pulltab') {if (inrhc) {if (!confirm('Really pull all?  Hit OK to proceed.')) {e.preventDefault();$('select', this).val('');return false;}}}return true;});$('#addtab').click(function (e) {e.preventDefault();var name = prompt('Give your tab a name. (1-30 character)');if (!name) return;if (name.length < 1 || name.length > 30) {alert('Invalid Name!');return;}var pluslink = $(this);$.post('/inventory.php', {action: 'addtab', name: name}, function (res) {if (res.error) {alert(res.error);return;}document.location = 'storage.php?which='+res.which;}, 'json');});$('.deletetab').click(function (e) {if (!confirm('Delete this tab?')) {e.preventDefault();}});$('.renametab').click(function (e) {var name = prompt('Give your tab a name. (1-30 character)');if (!name) {e.preventDefault();return;}if (name.length < 1 || name.length > 30) {e.preventDefault();alert('Invalid Name!');return;}$(this).attr('href', $(this).attr('href') + escape(name));});});function no6(){alert("You can't consume that while on the Way of the Surprising Fist path.");};</script><script language=Javascript src='http://images.kingdomofloathing.com/scripts/rcm.20090915.js'></script><link rel="stylesheet" type="text/css" href="http://images.kingdomofloathing.com/styles.20130904.css"><style type='text/css'>.faded {zoom: 1;filter: alpha(opacity=35);opacity: 0.35;}</style></head><body><div id='menu' class=rcm></div><script><!--var sections = {};sections["Food and Drink"] = 1;sections["Booze"] = 2;sections["Miscellaneous"] = 4;sections["Miscellaneous Items"] = 262144;sections["Hats"] = 8;sections["Back Items"] = 16;sections["Shirts"] = 32;sections["Melee Weapons"] = 64;sections["Ranged Weapons"] = 65536;sections["Off-Hand Items"] = 128;sections["Pants"] = 16384;sections["Accessories"] = 256;sections["Familiar Equipment"] = 512;sections["Gift Packages"] = 1024;sections["(Mostly) Potions"] = 32768;sections["(Mostly) Combat Items"] = 4096;sections["Quest Items"] = 8192;sections["Bag Of Animal Bones"] = 131072;sections["Stuff & Things"] = 524288;sections["Alice's Army Cards"] = 1048576;sections["Avatar-Changing Potions"] = 2097152;var cookie = parseInt(getCookie("storage"));function toggle(section){var whichbit = sections[section];var div = getObj("section" + whichbit);if (!div)return;if (div.style.display == "none"){div.style.display = "inline";cookie = cookie & ~whichbit;$(div).parents('table.stuffbox').find('.collapsed').text("");$tab = $(div).find('table');if ($tab.length == 0) {window.foo = div;$(div).append('<b>Fetching '+$(div).parents('table.stuffbox').find('.tit').text().replace(/:.*/,'')+'...</b>');$.get('/storage.php?ajax=1&which=5&section='+whichbit, function (resp) {$(div).empty().append(resp);});}}else{div.style.display = "none";cookie = cookie | whichbit;$(div).parents('table.stuffbox').find('.collapsed').text("(click to open)");}setCookie("storage", cookie);}document.write('<style type="text/css">.tohide { display: none}</style>');//--></script><center><a name='top'></a><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=gray><b>Hagnk's Ancestral Mini-Storage:</b></td></tr><tr><td style="padding: 5px; border: 1px solid gray;"><center><table><tr><td><center>[Hagnk]  [<a href="storage.php?which=1">consumables</a>]  [<a href="storage.php?which=2">equipment</a>]  [<a href="storage.php?which=3">miscellaneous</a>]  [<a href="storage.php?which=f0">favorites</a>]  [<a href="storage.php?which=f1">Jarlsberg</a>]  [<a href="#" id="addtab">+</a>]<p><table><tr><td valign=top><img src="http://images.kingdomofloathing.com/adventureimages/hagnk_1arm.gif" width=100 height=100></td><!--<td>Hello, Tall One!  I'm Hagnk, the proprietor of Hagnk's Ancestral Mini-Storage.--><!--<td>I'm Admiral Hagnk, and to be perfectly honest, I don't have time for this right now.  I've got a war to fight!--><td>I'm Admiral Hagnk.  I'm a real war hero, y'kgnow.  Just ask my arm.  Oh wait, you cagn't, because it got blowgn off.<p>Anyway.  What can I help you with?  <p>You may take <span class="pullsleft">10</span> more items or <span class="pullsleft">10</span>,000 more Meat out of storage today. <center></center><p>Your vow of poverty prevents you from thinking about the 1,234,567 you currently have stored in Hagnk's. </td> </tr> </table> <p></center><p><table width=100%><tr><td colspan=2 width="210"></td><td width=20 rowspan=2></td><td class=small align=center valign=top rowspan=2></td><td width=20 rowspan=2></td><td colspan=2 width="210"></td></tr><tr><td colspan=2></td><td colspan=2></td></tr></table></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body></html>
Processing results...
 
Last edited:

lostcalpolydude

Developer
Staff member
13208 should parse your meat in storage now (I couldn't test that though), and mafia will also not try to pull meat from storage when it knows about it.
 

Bale

Minion
Tested! It works!

You cannot remove meat from storage in Fistcore

You forgot to end a sentence with a period. ;)

Time to drop Surprising Fist and complete the ascension since I got the Wu Tang factoid! I've never actually quit a challenge path before.
 

Bale

Minion
Huh. I was joking about the period. I really didn't expect you to add it. Or improve your grammar either.

r13210: Improved error message. Undocumented by changelog.
 
Top