<?
define('PROTECTOR', 1);
@include('files/path.php');
@include($path.'files/db.php');
@include($path.'files/auth.php');
@include($path.'files/func.php');
@include($path.'files/core.php');

$max = $udata[hpall];
$now = $udata[hp];
$health = 130 / ($max / $now);


$img="pic/hp.gif";
$pic = ImageCreateFromgif($img);
header('Content-Type: image/gif');
$black = imagecolorallocate($pic, 999, 999, 999);
$white = imagecolorallocate($pic, 557, 667, 998);
imagefilledpolygon($pic, array(255,0, 0,22, $health,22, $health,0), 4, $black);
imagestring($pic, 1, 3, 2, 'HP:  '.number_format($now).'/'.number_format($max).'', $white);
imagepolygon($pic, array(0,0, 0,11, 129,11, 129,0), 4, $white);
ob_end_clean();
imagegif($pic);

?>