Show your progress(([LOW LD]+[HIGH LD])/2 + [LOW MP])/2
Jacked-Up Shirt

66609-74559 / 752000 Gold
Search Marketplace
Kandy Korn Hat

66609-74559 / 224500 Gold
Search Marketplace
Dicy Tuna Helmet

% of 100 Dicy Tunas
Description: A hard shell helmet made from tuna scales. This one is shaped in the image of a Dicy Tuna.
Sell Back Value: 1,700 Gold
Equip: Head Save the code below as a PHP file. Create another file named 'current.txt'. In the text file, put your current gold and how much you need... like this:
1337 1337 6969
^this is how you do it if you have just pure.
If the value of your savings has a minimum and maximume (like donation items, for example, where the value varies) the first number will be your minimum and the second your maximum. Like:
455 1337 6969
And save the text file. Next, go the fonts folder, in the Windows folder on harddrive. Copy the Verdena file to your desktop.
Now, before going further. If you're working with pure gold, go into the PHP file and find where it says 'dual'. Change it to 'single', since you're only working with one value, and not a minimum/maximum. If you're saving donation items or something towards the item you want, keep it at single, since those have a price range.
Next, upload the PHP file, text file, and font file to your host. You have to have a certain level of PHP support or it won't work. To link to the progress bar, put the URL of the PHP file in image tags. If it doesn't work... you don't have the right level of PHP support.
If you use it, it would be a good idea to somewhere give thanks to Rayquazza for creating it.
header("Content-type: image/png")
$width = 202;
$height = 10;
$image = imagecreate($width,$height) // Create the image
imagecolorallocate($image, 255, 255, 255) // White background
$logfile = "current.txt"; // Where you store your current gold saved
$mode = "dual"; // Change to $mode = "dual" for the extra stuff
$cur = file_get_contents($logfile) // Get file contents
$numbers = explode(" ",$cur) // Split it by spaces
$min = $numbers[0]
$max = $numbers[1]
$price = $numbers[2]
// Filled some vars
switch($mode)
{
case "dual":
$percentagemax = round(($max * $width) / $price, 1) // Get how big the rectangles will be
$percentagemin = round(($min * $width) / $price, 1)
$border = imagecolorallocate($image, 0, 0, 0)
// Awesomacolorsa :D
$colormin = imagecolorallocate($image, 97, 167, 226) // Blue
$colormax = imagecolorallocate($image, 162, 203, 238) // Light-Blue
imagefilledrectangle($image, 0,0, $percentagemax, $height, $colormax)
imagefilledrectangle($image, 0,0, $percentagemin, $height, $colormin)
//create the box surrounding the image
imagerectangle($image, 0,0,$width - 1,$height - 1,$border)
$str = round(($min * 100) / $price,0).'% - '. round(($max * 100) / $price,0) .'%';
imagettftext($image, 6.1, 0,2, 8, $border, 'verdana.ttf', $str)
break;
case "single":
$num = ($max + $min) / 2;
$percentage = ($num * $width) / $price;
$border = imagecolorallocate($image, 0, 0, 0)
$color = imagecolorallocate($image, 97, 167, 226)
imagefilledrectangle($image, 0,0, $percentage, $height, $color)
//create the box surrounding the image
imagerectangle($image, 0,0,$width - 1,$height - 1,$border)
imagettftext($image, 6.1, 0,2, 8, $border, 'verdana.ttf', round(($num * 100) / $price,0).'%')
break;
}
imagepng($image)
imagedestroy($image)
?>
Credit for PHP progress goes to: Rayquazza & SykoSilver