Bug - Fixed Shopping at Big Brother doesn't deduct sand dollars from inventory

ereinion

Member
After shopping the boot from Big Brother, and then exchanging it for a wallet at the old man, I was a bit surprised to see that mafia thought I had more sand dollars in my inventory than I myself thought I had.

I had a look in the gcli, and got this output:

Code:
[COLOR=olive]> acquire 50 sand dollar[/COLOR]

Searching      for "sand dollar"...
Search complete.
Purchasing sand      dollar (50 @ 600)...
Purchases complete.
You acquire an item: damp      old boot

Talking to the Old Man

Talking to the Old Man
You      acquire an item: damp old wallet
You acquire sand dollar (60)

[COLOR=olive]>      inv sand dollar[/COLOR]

sand dollar (110)

[COLOR=olive]>      refresh inv[/COLOR]

Updating inventory...
Requests complete.

[COLOR=olive]>      inv sand dollar[/COLOR]

sand dollar (60)
Seeming to indicate that the 50 sand dollars I spent at Big Brother didn't get deducted from my inventory total.

To confirm, I bought a dolphin whistle from Big Brother, and the sand dollar for this wasn't deducted either, until I refreshed my inventory.

This is the html I have in the main frame after buying the sand whistle. Note that this is while using mafia, if you'd rather I got the html I get when using vanilla kol, please let me know, and I'll fetch it.
HTML:
<html><head>
<script language=Javascript>
<!--
if (parent.frames.length == -1) location.href="game.php";
//-->
</script>
<script language=Javascript src="//images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script>
<script language=Javascript src="//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="//images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="//images.kingdomofloathing.com/styles.20150113.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 language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head>

<body>
<centeR><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You place your 1 sand dollars on the counter and buy yourself a new item.<center><table class="item" style="float: none" rel="id=3997&s=10&q=0&d=1&g=0&t=1&n=1&m=0&p=0&u=u"><tr><td><img src="/images/itemimages/whistle.gif" alt="dolphin whistle" title="dolphin whistle" class=hand onClick='descitem(848334943)'></td><td valign=center class=effect>You acquire an item: <b>dolphin whistle</b> <font size=1>[<a href="inv_use.php?which=3&whichitem=3997&pwd=053ad12ce981cde64e82953a25e9f35a">use</a>]</font></td></tr></table></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Big Brother</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="/images/adventureimages/sm_bigbrotherwindow.gif" width=100 height=100></center>"Oh, hey there.  Wanna buy something?"<center><p>You've got <b>59</b> sand dollars.<p><form action=monkeycastle.php method=post><input type=hidden name=pwd value=053ad12ce981cde64e82953a25e9f35a><input type=hidden name=action value=buyitem><table><tr><td></td><td colspan=2 align=center><b><u>Item</u></b></td><td colspan=2 align=center><b><u>Cost</u></b></td></tr><tr><td valign=center><input type=radio name=whichitem value=3997></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/whistle.gif' onclick='descitem(848334943)' alt="dolphin whistle" title="dolphin whistle"></td><td><b>dolphin whistle</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>1</b></td><tr><td valign=center><input type=radio name=whichitem value=3611></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/balm.gif' onclick='descitem(285153209)' alt="sea grease" title="sea grease"></td><td><b>sea grease</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>5</b></td><tr><td valign=center><input type=radio name=whichitem value=3703></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/valvewheel.gif' onclick='descitem(581289316)' alt="rusty valve wheel" title="rusty valve wheel"></td><td><b>rusty valve wheel</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>10</b></td><tr><td valign=center><input type=radio name=whichitem value=3704></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/bootstraps.gif' onclick='descitem(696657364)' alt="waterlogged bootstraps" title="waterlogged bootstraps"></td><td><b>waterlogged bootstraps</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>10</b></td><tr><td valign=center><input type=radio name=whichitem value=3717></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/oar.gif' onclick='descitem(827016673)' alt="decaying wooden oar" title="decaying wooden oar"></td><td><b>decaying wooden oar</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>20</b></td><tr><td valign=center><input type=radio name=whichitem value=3718></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/fishhook.gif' onclick='descitem(750940122)' alt="giant fishhook" title="giant fishhook"></td><td><b>giant fishhook</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>20</b></td><tr><td valign=center><input type=radio name=whichitem value=3719></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/lantern.gif' onclick='descitem(582874358)' alt="rusty old lantern" title="rusty old lantern"></td><td><b>rusty old lantern</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>20</b></td><tr><td valign=center><input type=radio name=whichitem value=3649></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/map.gif' onclick='descitem(410531723)' alt="map to Madness Reef" title="map to Madness Reef"></td><td><b>map to Madness Reef</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>50</b></td><tr><td valign=center><input type=radio name=whichitem value=3701></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/map.gif' onclick='descitem(680600410)' alt="map to Anemone Mine" title="map to Anemone Mine"></td><td><b>map to Anemone Mine</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>50</b></td><tr><td valign=center><input type=radio name=whichitem value=3774></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/map.gif' onclick='descitem(872146103)' alt="map to the Dive Bar" title="map to the Dive Bar"></td><td><b>map to the Dive Bar</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>50</b></td><tr><td valign=center><input type=radio name=whichitem value=4222></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/map.gif' onclick='descitem(552478290)' alt="map to the Skate Park" title="map to the Skate Park"></td><td><b>map to the Skate Park</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>25</b></td><tr><td valign=center><input type=radio name=whichitem value=3581></td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sushimat.gif' onclick='descitem(345932481)' alt="sushi-rolling mat" title="sushi-rolling mat"></td><td><b>sushi-rolling mat</b>    </td><td><img style='vertical-align: middle' class=hand src='/images/itemimages/sanddollar.gif' onclick='descitem(613536361)' alt="sand dollar" title="sand dollar"><td><b>50</b></td></table>Qty: <input class=text type=text size=3 name=quantity value=1> <input class=button type=submit value="Buy Item"></center></form></td></tr></table></center></td></tr><tr><td height=4></td></tr></table><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>The Sea Monkee Castle</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><img src="/images/otherimages/monkeycastle/castlebb.gif" usemap="#brothers" border="0"><map name="brothers"><area shape="rect" coords="54,397,153,496" href="monkeycastle.php?who=1"><area shape="rect" coords="231,397,330,496" href="monkeycastle.php?who=2"></map><p><center><a href="seafloor.php">Back to the Sea Floor</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body><script src="/onfocus.1.js"></script></html>
 
I've noticed that as well. I believe it'll update your coin count when you revisit the store, as well as on inventory refresh.
 
Code:
Purchasing sand dollar (50 @ 600)...
Purchases complete.
You acquire an item: damp old boot
What is missing is "trading 50 sand dollars for 1 damp old boot". We are failing to let BigBrotherRequest handle the transaction and log the purchase and handle the result.

It would have been nice to have a DEBUG log of the attempt.

Hmm. I have some characters who have access to Big Brother. You can still visit him overdrunk, so, I'll see what I can figure out.
 
You didn't outright say that you were buying in the Relay Browser, but that turned out to be the key factor: we assumed/required that the request include "who=2", but that is not currently required. Therefore, purchases via he Coinmaster Frame (which included that field) worked, but those in the Relay Browser failed.

Recision 15813 should fix this.
 
Back
Top