Bug - Fixed Hobopolis boss drops awarded to clan are being added to my inventory after fight

Spiny

Member
r8419

I don't know that this is a bug exactly, because it's easily resolved with a refresh of inventory in mafia if one is aware of the situation. I came to the realization today that when killing the boss mobs in hobopolis, mafia thinks the clan-awarded boss drops are being added to my inventory. Basically I killed the boss mobs and ran HoboNeeds.ash. The script told me that I had 2 Wands of Oscus and 2 Hodgman's canes which had me puzzled as I was almost certain that I got my first and only Hodgman's cane during my last hobo run. I got excited thinking I had 2 wands of Oscus that I forgot to zap into a 3rd outfit piece so I zapped the wand into a 2nd pair of pants. I ran the script again and it showed I had 2 pairs of pants and 1 wand, but doing a count in KoL showed I had no wands. That's when I noticed, the things I apparently had multiples of were the items that dropped from killing the boss mobs in the current run. I refreshed mafia's inventory and then the script ran true.
 

fronobulax

Developer
Staff member
This happened to me sometime in April. Chester's Bag of Candy Dropped, showed up in my inventory and then I couldn't use it. I'm not sure how much effort ought to be expended to fix it, but at least we know it is not an isolated incident.
 

jasonharper

Developer
It would help if someone could supply the HTML from the end of a clan dungeon boss fight, showing the clan item drop.
 

Spiny

Member
I have the HTML from tonight's Hodgman's kill during our hamster run. I hope this includes the requested part of the html. :)

Code:
<center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Combat: Round 10!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td><img id='monpic' src="http://images.kingdomofloathing.com/adventureimages/hodgman.gif" width=100 height=100></td><td valign=center>You're fighting <span id='monname'> Hodgman, The Hoboverlord</span><font size=2 color=gray><br />HP: 25014, Atk: 14, Def: 14</font></td></tr></table><br><table><tr><td valign=center><img src="http://images.kingdomofloathing.com/itemimages/spine.gif" width=30 height=30 alt="pufferfish spine" title="pufferfish spine"></td><td valign=center><p>You jam another pufferfish spine into your opponent.  He winces and gets even greener.</td></tr></table><table><tr><td valign=center><img src="http://images.kingdomofloathing.com/itemimages/spine.gif" width=30 height=30 alt="pufferfish spine" title="pufferfish spine"></td><td valign=center><p>You jam another pufferfish spine into your opponent.  He winces and gets even greener.</td></tr></table><p><!--familiarmessage--><center><table><tr><td align=center valign=center><img src="http://images.kingdomofloathing.com/itemimages/brimbludgeon.gif" width=30 height=30></td><td valign=center>Trobert won't join any club that would have it for a member, but happily clubs him for 2 damage.</td></tr></table></center><p>He takes 28010 damage from the pufferfish poison.<p>You fade back into view...<center><table><tr><td><img class=hand src="http://images.kingdomofloathing.com/itemimages/specjelly.gif" onClick='eff("810bbc77f3ef220d9d77ed395b9cc70c");' width=30 height=30></td><td valign=center class=effect>You lose an effect: <b>Spectral</b></td></tr></table></center><p><center>You win the fight!<!--WINWINWIN--><p><center><table class="item" style="float: none" rel="id=3413&s=0&q=0&d=0&g=0&t=1&n=1&m=0&u=u"><tr><td><img src="http://images.kingdomofloathing.com/itemimages/blacknotebook.gif" alt="Hodgman's journal #2:  Entrepreneurythmics" title="Hodgman's journal #2:  Entrepreneurythmics" class=hand onClick='descitem(359048124)'></td><td valign=center class=effect>You acquire an item: <b>Hodgman's journal #2:  Entrepreneurythmics</b> <font size=1>[<a href="javascript:singleUse('inv_use.php','which=3&whichitem=3413&pwd=b405a1fcd5d86fcef06d8be1d79057aa&ajax=1');void(0);">use</a>]</font></td></tr></table></center><center><table><tr><td><img src="http://images.kingdomofloathing.com/itemimages/blank.gif" class=hand onClick='descitem(648809275)'></td><td valign=center class=effect>An item drops: <b>Hodgman's imaginary hamster</b></td></tr></table>(This item goes to your clan's basement, and may be distributed to anyone who participated in this Clan Dungeon.)</center><center><table><tr><td><img src="http://images.kingdomofloathing.com/itemimages/tubesock.gif" class=hand onClick='descitem(494251681)'></td><td valign=center class=effect>An item drops: <b>Hodgman's lucky sock</b></td></tr></table>(This item goes to your clan's basement, and may be distributed to anyone who participated in this Clan Dungeon.)</center><center><table><tr><td><img src="http://images.kingdomofloathing.com/itemimages/picker.gif" class=hand onClick='descitem(874739671)'></td><td valign=center class=effect>An item drops: <b>Hodgman's garbage sticker</b></td></tr></table>(This item goes to your clan's basement, and may be distributed to anyone who participated in this Clan Dungeon.)</center><center><table><tr><td><img src="http://images.kingdomofloathing.com/itemimages/bpcords.gif" class=hand onClick='descitem(159000068)'></td><td valign=center class=effect>An item drops: <b>Hodgman's lobsterskin pants</b></td></tr></table>(This item goes to your clan's basement, and may be distributed to anyone who participated in this Clan Dungeon.)</center><table><tr><td valign=center>You acquire a clan trophy:</td><td><img class=hand onClick='javascript:window.open("desc_clantrophy.php?whichtrophy=0g5j7u3f5n6kl9o4","","height=200, width=300")' src="http://images.kingdomofloathing.com/itemimages/skivvies.gif" width=30 height=30></td><td valign=center><b>Hodgman's skivvies</b></td></tr></table><p>You gain 98 Strengthliness.<bR>You gain 52 Enchantedness.<bR>You gain 52 Smarm.<bR><p><a name="end"></a><p><a href="adventure.php?snarfblat=167">Adventure Again (Hobopolis Town Square)</a><p><a href="clan_hobopolis.php?place=2">Go back to Central Hobopolis</a></center><script>parent.charpane.location.href="charpane.php";</script></td></tr></table></center></td></tr><tr><td height=4></td></tr></table><table><tr><td>[<a href="/account_combatmacros.php">edit macros</a>]</td></tr></table></center></body><script src="/onfocus.js"></script></html>
 

Spiny

Member
The fix doesn't appear to have worked. Clanmate killed Frosty today and mafia thinks she owns the hat that dropped.

Sorry I forgot to alert her to check the html and was only reminded after she said mafia thinks she has 2 hats when in fact she only has 1 and that is what dropped.
 

heeheehee

Developer
Staff member
My guess as to why this wouldn't work is that the clannie in question wasn't using one of the recent daily builds.

It should include slime tube items, as (if I'm reading the code correctly) it checks clan_basement.php to see if the item is present there.
 

Spiny

Member
My guess as to why this wouldn't work is that the clannie in question wasn't using one of the recent daily builds.

I can assure you that she does as she is one of two people I live with who play KoL and I pull daily builds for us almost as soon as it's available.
 

Spiny

Member
Using 8485, mafia thinks that mother slime gear drops were given to the slayer when they weren't. I don't have HTML for this as I wasn't the slayer. But it doesn't appear to be fixed yet :(
 

heeheehee

Developer
Staff member
Relevant HTML here.

(Now that I'm looking at it somewhat carefully, it -does- say "An item drops:" as opposed to "You acquire an item:"...)

Okay, what I'm understanding is that the current version doesn't work because the </table> occurs before the appearance of "clan's basement". My proposed fix is changing lines 3888-3889 of FightRequest.java to
PHP:
if ( onclick.startsWith( "descitem" ) &&
        str.indexOf( "You acquire" )>-1 )
or something like that.
 

Attachments

  • mom.txt
    3.2 KB · Views: 39
Last edited:

jasonharper

Developer
Looking specifically for "You acquire" to detect a normal drop would fail in the presence of haiku combat, Can Has Cyborger, and probably other text-changing effects. r8486 tries to detect clan drops by the presence of "An item drops:", which should work since it's in the same table as the item image.
 

Spiny

Member
It looks like this fix may have done the trick. Two hobopolis side bosses defeated and mafia doesn't think the wrong things have gone to inventory. Nice job and thanks. :D
 
Top