Bug - Fixed Heavy Rains Health Reset to 0/0

preempalver

New member
I recently started up a Heavy Rains run and my health keeps resetting to 0/0 when I try to manually adventure in the browser. Kolmafia keeps thinking I am beaten up and asks if I want to continue for each adventure as the between battle actions have failed. I can refresh the program to show the correct health values but whenever I try to manually adventure again it will be reset back to 0/0 according to Kolmafia.

I tried this on the latest build (14666) and was able to repeat it multiple times.
 

lostcalpolydude

Developer
Staff member
If you right-click on the character pane, then in Firefox This Frame -> View Frame Source, or in Chrome just View frame source, you will get a window with lots of code. Pasting that here inside [code][/code] blocks will give something to look at, since it seems that your character pane has something different about it.

That will also have your password hash in it. If you log out of KoL and back in before posting again, that will change, and it won't matter.
 

preempalver

New member
Code:
<html><head>
<link rel="stylesheet" type="text/css" href="/images/styles.css">
<style type="text/css">
	#nudges div { position: relative; padding: 0px; }
	#nudges div .close { position: absolute; top: -2px; right: -10px; border: 1px solid black; }
</style>
<style type="text/css"> body, td { font-size: .8em;
 } </style>
<script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head>
<script language=Javascript src="/images/scripts/keybinds.min.2.js"></script>
<script language=Javascript src="/images/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/scripts/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="/images/scripts/pop_query.20130705.js"></script>
<script type="text/javascript">

	var CURFAM = 116;
	var FAMILIARFAVES = [["Isendre","Cuddlefish","cuddlefish",100],["Chel Vanin","Hobo Monkey","hobomonkey",89],["Silver Arches","Baby Sandworm","babyworm",111],["Thom Merrilin","Jumpsuited Hound Dog","hounddog",69],["Mat\'s Cool Hat","Hovering Sombrero","hat2",18],["Nasin","Llama Lama","llama",90],["Wit Congar","Spirit Hobo","ghobo",52],["Beslan","Green Pixie","pictsie",70],["Liandrin","Purse Rat","purserat",109],["Dream Ter\'angreal","Rogue Program","tronguy",135],["Shara","Li\'l Xenomorph","lilxeno",148],["Balthamel","Mini-Hipster","minihipster",136],["Andor","Dandy Lion","dandylion",66],["Herid Fel","Frumious Bandersnatch","bandersnatch",105],["Stepper","Pair of Stomping Boots","stompboots",150],["Daved Hanlon","Penguin Goodfella","goodfella",68],["Lady Shiaine","Fancypants Scarecrow","pantscrow2",152],["Half the Light of the World","He-Boulder","heboulder",113] ];
</script>
<script type="text/javascript" src="/images/scripts/familiarfaves.20120307.js"></script>
	<script type="text/javascript">
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;
			}			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); }
		}
	});
}
	var turnsplayed = 910109;
var turnsthisrun = 902;
var rollover = 1411097402;
var rightnow = 1411091555;
var playerid = 226698;
var pwdhash = "a77ec0bb0566545e5411b3be58029615";
var hide_nudges = true;
$(document).ready(function () {
	var multi = function  (e) {
		e.preventDefault();
		var link = this;
		pop_query($(this), 'How many times?', 'Do It!', function (res) {
			dojax(($(link).attr('href')+'&ajax=1').replace('qty=1', 'qty='+res));
		});
	};
	$('.upeffect').click(function (e) {
		e.preventDefault();
		if (e.shiftKey) multi.apply(this, [e]);
		else dojax($(this).attr('href')+'&ajax=1');
	});
	$('.upeffect').bind('contextmenu', multi);

	function add_close(el) {
		if (!hide_nudges) return;
		if ($(el).find('.close').length > 0) return;
		var ht = '<a href="#" class="close"><img alt="Hide" title="Hide"  src="/images/closebutton.gif" style="float: right;"/></a>';
		var c = $(ht);
		$(el).append(c);
		c.click(function () {
			var key = $(this).parents('tr:first').attr('rel');
			var nxt = $(this).parents('tr');
			if (nxt.next()) {
				add_close(nxt.next().find('td div'));
			}
			$(this).parents('tr:first').remove();
			$.get('charpane.php?hide='+escape(key)+'&pwd='+pwdhash);
			$('.showall').show();
		});
	}

	if (hide_nudges) $('#nudges td div').hover(
		function () {
			if (!hide_nudges) return;
			add_close(this);
		},
		function () {
			if (!hide_nudges) return;
			$(this).find('.close').remove();
		}
	);
});
</script>
<script language=Javascript src="/images/scripts/charpane.20130711.js"></script>
<script type="text/javascript" src="/images/scripts/cookie.20121112.js"></script>
<script type="text/javascript">
jQuery(function ($) {
	$(window).resize(function () {
		var winW = 300;
		if (document.body && document.body.offsetWidth) { winW = document.body.offsetWidth; }
		if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetWidth ) { winW = document.documentElement.offsetWidth; }
		if (window.innerWidth && window.innerHeight) { winW = window.innerWidth; }
		setCookie('charpwd', winW, 365, true);
	});
})
</script>
<body bgcolor=white text=black link=black alink=black vlink=black onload='startup();updateSafetyText();'>
<center id='rollover' class=tiny style='color: red; cursor: pointer;' onClick='doc("maintenance");'></center><center><b><a class=nounder target=mainpane href="charsheet.php">rehbdan</a></b><br>Lvl. 12<table title='10 / 23' align=center cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=26 bgcolor=#5A5A5A></td><td width=34 bgcolor=white></td></tr></table><hr width=50%><table cellpadding=1 cellspacing=0 align=center><tr><td align=right>Mus:</td><td align=left><b><font color=blue>170</font> (135)</b></td></tr><tr><td></td><td><table width=100% title='202 / 271' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=29 bgcolor=#5A5A5A></td><td width=11 bgcolor=white></td></tr></table></td></tr><tr><td align=right>Mys:</td><td align=left><b><font color=blue>105</font> (89)</b></td></tr><tr><td></td><td><table width=100% title='79 / 179' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=17 bgcolor=#5A5A5A></td><td width=23 bgcolor=white></td></tr></table></td></tr><tr><td align=right>Mox:</td><td align=left><b><font color=blue>103</font> (87)</b></td></tr><tr><td></td><td><table width=100% title='101 / 175' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=23 bgcolor=#5A5A5A></td><td width=17 bgcolor=white></td></tr></table></td></tr><tr><td align=right>Drunk:</td><td align=left><b>5</b></td></tr><tr><td align=right>Fury:</td><td align=left><b><font color=black><span alt="Your Fury is currently granting:
9 bonus Weapon Damage
3 HP regeneration" title="Your Fury is currently granting:
9 bonus Weapon Damage
3 HP regeneration">3 gal.</span></font></td></tr><tr><td align=right>Thunder:</td><td align=left><b><font color=black>100 dBs</font></b></td></tr><tr><td align=right>Rain:</td><td align=left><b><font color=black>100 drops</font></b></td></tr><tr><td align=right>Lightning:</td><td align=left><b><font color=black>100 bolts</font></b></td></tr></table><hr width=50%><table align=center cellpadding=1 cellspacing=1><tr><td align=right>HP:</td><td align=left><b><font color=black>222/448</font></b></td></tr><tr><td align=right>MP:</td><td align=left><b><a style="color:black" title="Restore your MP" href="/KoLmafia/sideCommand?cmd=restore+MP&pwd=a77ec0bb0566545e5411b3be58029615">33</a>/190</b></td></tr><tr><td align=right>Meat:</td><td align=left><b>40,368</b></td></tr><tr><td align=right><a onclick='if (top.mainpane.focus) top.mainpane.focus();' title="Last Adventure: Itznotyerzitz Mine (in Disguise)" target=mainpane href="mining.php?mine=1&intro=1">Adv</a>:</td><td align=left><b>45</b></td></tr><tr><td align=right><a class=nounder target=mainpane href="storage.php">Ronin</a>:</td><td align=left><b>98</b></td></tr></table><br><center id="nudgeblock"><font size=2><a class=nounder href=questlog.php target=mainpane><b>Current Quest:</b></a></font><br><a style="display: none" href="charpane.php?showall=1&pwd=a77ec0bb0566545e5411b3be58029615" class="showall"><font size="1">[show all]</font><br/></a><table id="nudges" width="100%"><tr rel="artist"><td class="small" colspan="2"><div>The <a class=nounder target=mainpane href=town_wrong.php?place=artist><b>Pretentious Artist</b></a> wants you to retrieve his supplies:<br>   * <s>Pretentious Palette</s><br>   * <s>Pretentious Paint</s><br>   * Pretentious Paintbrush</div></td></tr><tr rel="docg"><td class="small" colspan="2"><div><a class=nounder target=mainpane href=place.php?whichplace=town_market><b>Doc Galaktik</b> needs some medicinal herbs:<br>   *  Swindleblossoms from the <a class=nounder target=mainpane href=cobbsknob.php><b>Cobb's Knob Harem</b></a> (1/3)<br>   *  <s>3 Fraudwort (3/3)</s><br>   *  <s>3 Shysterweed (3/3)</s></div></td></tr><tr rel="l9"><td class="small" colspan="2"><div>The <a class=nounder target=mainpane href=place.php?whichplace=highlands><b>Highland Lord</b></a> wants you to light three signal fires:<br>   * A-boo Peak (currently 98% haunted)<br>   * <s>Twin Peak</s><br>   * <s>Oil Peak</s></div></td></tr><tr rel="hiddencity"><td class="small" colspan="2"><div>Solve the mystery of the <b><a class=nounder target=mainpane href=woods.php>Hidden City</a></b>.</div></td></tr><tr rel="hiddencitya"><td class="small" colspan="2"><div>Find the <b><a class=nounder target=mainpane href=place.php?whichplace=hiddencity>Thrice-Cursed Penthouse</a></b>.</div></td></tr><tr rel="hiddencityb"><td class="small" colspan="2"><div>Infiltrate the operating room in the <b><a class=nounder target=mainpane href=place.php?whichplace=hiddencity>Hidden Hospital</a></b>.</div></td></tr><tr rel="hiddencityc"><td class="small" colspan="2"><div>Find the McClusky file in the <b><a class=nounder target=mainpane href=place.php?whichplace=hiddencity>Hidden Office Building</a></b>.</div></td></tr><tr rel="hiddencityd"><td class="small" colspan="2"><div>Find the ghost from your vision in the <b><a class=nounder target=mainpane href=place.php?whichplace=hiddencity>Hidden Bowling Alley</a></b>.</div></td></tr><tr rel="desert"><td class="small" colspan="2"><div>Explore the <a class=nounder target=mainpane href=place.php?whichplace=desertbeach><b>Arid, Extra-Dry Desert</b></a> to find the pyramid mentioned in your father's journal. (10% explored)<p>The Fremegn Gnasir will help you explore if you bring him:<br>   *  a stone rose from the nearby Oasis.<br>   *  a banshee's killing jar<br>   *  a can of black paint<br>   *  the 15 pages of his worm-riding manual (you have 0)</div></td></tr><tr rel="copperhead"><td class="small" colspan="2"><div>Go to the <a class=nounder target=mainpane href=place.php?whichplace=town_wrong><b>Copperhead Club</b></a> and find Shen, the man mentioned in your father's diary.</div></td></tr><tr rel="zeppelin"><td class="small" colspan="2"><div>Search for Ron Copperhead on the <a class=nounder target=mainpane href=place.php?whichplace=mountains><b>Red Zeppelin</b></a>.</div></td></tr><tr rel="srcellar"><td class="small" colspan="2"><div>Enter the <a class=nounder target=mainpane href=place.php?whichplace=manor4><b>chamber</b></a> and confront Lord Spookyraven.</div></td></tr><tr rel="melvin"><td class="small" colspan="2"><div>Go to the <a class=nounder target=mainpane href=place.php?whichplace=mountains><b>Thinknerd Warehouse</b></a> and find Melvign's "shirt."</div></td></tr></table><p></center><hr width=50%><font size=2 color=black>[<a title="I'm feeling moody" href="/KoLmafia/sideCommand?cmd=save+as+mood&pwd=a77ec0bb0566545e5411b3be58029615" style="color:black">save as mood</a>]</font><br><br><table cellpadding=1 cellspacing=0><tr><td valign="middle"><a href="upeffect.php?efid=131&qty=1&pwd=a77ec0bb0566545e5411b3be58029615" target="mainpane" class="upeffect" rel="Rage of the Reindeer"><span style="font-weight: bold"><img  alt="Click to cast Rage of the Reindeer.  Right-click to cast multiple times." title="Click to cast Rage of the Reindeer.  Right-click to cast multiple times." src="/images/otherimages/smallarrow_up.gif" height="15" width="15" /></span></a></td><td valign='middle' align=right><img src="/images/itemimages/reindeer.gif" width=30 height=30 alt="Rage of the Reindeer" title="Rage of the Reindeer" onClick='eff("5c8d3b5b4a6d403f95f27f5d29528c59");' oncontextmenu='return hardshrug(131, "Rage of the Reindeer");'></td><td>(<a href="/KoLmafia/sideCommand?cmd=uneffect+Rage+of+the+Reindeer&pwd=a77ec0bb0566545e5411b3be58029615" title="Use a remedy to remove the Rage of the Reindeer effect">2</a>) <a href="/KoLmafia/sideCommand?cmd=cast+1+Rage+of+the+Reindeer&pwd=a77ec0bb0566545e5411b3be58029615" title="Increase rounds of Rage of the Reindeer"><img src="/images/redup.gif" border=0></a></td></tr><tr><td valign="middle"><a href="upeffect.php?efid=16&qty=1&pwd=a77ec0bb0566545e5411b3be58029615" target="mainpane" class="upeffect" rel="Leash of Linguini"><span style="font-weight: bold"><img  alt="Click to cast Leash of Linguini.  Right-click to cast multiple times." title="Click to cast Leash of Linguini.  Right-click to cast multiple times." src="/images/otherimages/smallarrow_up.gif" height="15" width="15" /></span></a></td><td valign='middle' align=right><img src="/images/itemimages/string.gif" width=30 height=30 alt="Leash of Linguini" title="Leash of Linguini" onClick='eff("2d6d3ab04b40e1523aa9c716a04b3aab");' oncontextmenu='return hardshrug(16, "Leash of Linguini");'></td><td>(<a href="/KoLmafia/sideCommand?cmd=uneffect+Leash+of+Linguini&pwd=a77ec0bb0566545e5411b3be58029615" title="Use a remedy to remove the Leash of Linguini effect">107</a>) <a href="/KoLmafia/sideCommand?cmd=cast+1+Leash+of+Linguini&pwd=a77ec0bb0566545e5411b3be58029615" title="Increase rounds of Leash of Linguini"><img src="/images/up.gif" border=0></a></td></tr><tr><td valign="middle"><a href="upeffect.php?efid=1724&qty=1&pwd=a77ec0bb0566545e5411b3be58029615" target="mainpane" class="upeffect" rel="Rain Dancin'"><span style="font-weight: bold"><img  alt="Click to cast Rain Dance.  Right-click to cast multiple times." title="Click to cast Rain Dance.  Right-click to cast multiple times." src="/images/otherimages/smallarrow_up.gif" height="15" width="15" /></span></a></td><td valign='middle' align=right><img src="/images/itemimages/blooddrops.gif" width=30 height=30 alt="Rain Dancin'" title="Rain Dancin'" onClick='eff("eb5fab54becaa51c9ef83888338b867f");' oncontextmenu='return hardshrug(1724, "Rain Dancin'");'></td><td>(<a href="/KoLmafia/sideCommand?cmd=uneffect+Rain+Dancin%27&pwd=a77ec0bb0566545e5411b3be58029615" title="Use a remedy to remove the Rain Dancin' effect">367</a>) <a href="/KoLmafia/sideCommand?cmd=cast+1+Rain+Dance&pwd=a77ec0bb0566545e5411b3be58029615" title="Increase rounds of Rain Dancin'"><img src="/images/up.gif" border=0></a></td></tr></table><hr width=50%><centeR><a target=mainpane href="familiar.php" class="familiarpick"><img src="/images/itemimages/grouper2.gif" width=30 height=30 border=0></a><br>30 lbs.</center></center><center><font size=1>[<a href="charpane.php">refresh</a>]</font></center></body></html>

I also tried logging in with a different computer but got the same result.
 

lostcalpolydude

Developer
Staff member
I can't figure it out. The HTML showing your HP looks completely normal. Mafia knows you're using the compact charpane since it parsed MP properly.
 

MPRobot

New member
I had the same problem with build 14603.

Here are the character pane options I have selected:
Code:
Use Compact Character Pane
Display Familiar Below Effects
Show effect replenishment arrows
all "Progress Bars" options are checked
Remember the size of the character pane and chat

I'm running Win 7 and Fire Fox (if that's relevant).
 
Last edited:

Veracity

Developer
Staff member
I took your charpane and put it in to charpane.bug.html.

> test load charpane.bug.html

Read 16,101 bytes into a 16,101 character string

> test charpane

7700566545541135802961533190 is out of range, returning 0
And on the GUI's sidepane it now says HP 0 / 0 and MP 0 / 0.

Should be debuggable.
 

lostcalpolydude

Developer
Staff member
That's the HTML after mafia has modified it, unfortunately. Once
Code:
<a style="color:black" title="Restore your MP" href="/KoLmafia/sideCommand?cmd=restore+MP&pwd=a77ec0bb0566545e5411b3be58029615">
is removed, and replaced with
Code:
<font color=black>
(along with the closing tag, though that seems to not matter), the error goes away. However, HP still shows as 0/0.
 

Veracity

Developer
Staff member
The problem is the following:

Code:
<span alt="Your Fury is currently granting:
9 bonus Weapon Damage
3 HP regeneration" title="Your Fury is currently granting:
9 bonus Weapon Damage
3 HP regeneration">
It has the string "HP" in it and the pattern is looking for the next <b>ANYTHING/ANYTHING</b>

- We could insist on HP:
- We could insist on NUMBER rather than ANYTHING
 

lostcalpolydude

Developer
Staff member
I changed it to look for HP: in 14668. Strangely, I couldn't recreate this issue on a devster account, and after finding the cause of the problem I don't understand why.
 

lostcalpolydude

Developer
Staff member
Also, it isn't just looking for numbers there, there's a <font color=black> tag before the first number, and </font> after the second, except black can be red instead.
 

xKiv

Active member
I changed it to look for HP: in 14668. Strangely, I couldn't recreate this issue on a devster account, and after finding the cause of the problem I don't understand why.

Because
Code:
<b><font color=black>100 dBs</font></b><
matches, and so does rain and lightning, and those are between fury and hp?
 
Top