<? 
if ($pers["cpage"]<>'fight'):
if ($pers["last_query"]>0):
	$passed = time() - $pers["last_query"];
	$speed = round(300/$pers["mx_hp"]);
	while ($passed>=$speed && $pers["is_hp"]<$pers["mx_hp"]):
		$passed = $passed - $speed;
		$pers["is_hp"]++;
	endwhile;
endif;
if ($pers["is_hp"]>$pers["mx_hp"]): $pers["is_hp"] = $pers["mx_hp"]; endif;
query ("UPDATE users SET is_hp=".$pers["is_hp"].", last_query=".time()." WHERE uid=".UID);
endif;
?>