i only need the Avatar picture then i got it done :D
i only need the Avatar picture then i got it done :D
You can create a (relatively) simple avatarimage script with PHP, clothes from Shockwave Habbo are ok, but for Flash Habbo you would need to extract the images and declare their sprites' registry point.i only need the Avatar picture then i got it done :D
who can make this?
Im bad in PHP?
I coded everything, except that part.
I'm coding it now but I don't know the types to work I only can do achievements.
I made a verry basic php script for the heads
It will output something like this:Code:<?php //Base from http://www.php.net/manual/en/function.imagecopy.php $base = 'http://www.habbo.nl/habbo-imaging/avatarimage?figure='; $figure = $_GET['figure']; // Create image instances $src = imagecreatefrompng($base.$figure); $dest = imagecreate(54, 62); // Copy imagecopy($dest, $src, 0, 0, 6, 8, 54, 51); // Output and free from memory header('Content-Type: image/gif'); imagegif($dest); imagedestroy($dest); imagedestroy($src); ?>
![]()
Last edited by Joopie; 05-08-11 at 10:21 PM.
Tried something similar, wont work. If you pull an image from habbos avatar generator when using a hash (how habbo does it for the stream), then check the .gif data, you'll find something like this:
If client checks for that, that's probably why it's breaking.GIF89a6>óÿÿÿB0#+V>.þÊ—õõõ‡c:Ë¡y˜yZô‘!þ
(c) sulake
Fixed the image, do the following to get it yourself.
.htaccess
Create two files, in where-ever you want (update .htaccess to suit where-ever you put the file) index.gif, index.php. index.gif you can leave blank, inside index.php putCode:RewriteEngine On RewriteRule c_images/friendstream/index.gif c_images/friendstream/index.php
Request: 127.0.0.1/c_images/friendstream/index.gif?figure={figure}.gifPHP Code:<?php
// Authors: Joopie, PEJump, Dominic Gunn
$base = 'http://www.habbo.com/habbo-imaging/avatarimage?figure=';
$figure = $_GET['figure'];
// Create image instances
$src = imagecreatefrompng($base.$figure);
imagealphablending($src, true); // setting alpha blending on
imagesavealpha($src, true); // save alphablending setting (important)
$dest = imagecreate(54, 65);
// Copy
imagecopy($dest, $src, 0, 0, 6, 8, 54, 51);
imagealphablending($dest, true); // setting alpha blending on
imagesavealpha($dest, true); // save alphablending setting (important)
// Output and free from memory
header('Content-Type: image/png');
$outputString = imagepng($dest);
$outputString .= "(c) sulake!"; // copyright shit, should work![/B]
echo $outputString;
imagedestroy($dest);
imagedestroy($src);
?>
Last edited by Dominic A Gunn; 06-08-11 at 12:53 AM.