Fix for stream images:
First add this to your htaccess
PHP Code:
RewriteRule ^habbo-imaging/head/([^/]+) /habbo-imaging/head.php?figure=$1
In GameClientMessageHandler.cs find
PHP Code:
if (((int) row["Type"]) == 0)
{
message.AppendString("http://localhost/heads/look.gif");
}
Replace that with
PHP Code:
if (((int)row["Type"]) == 0)
{
string im = ButterflyEnvironment.StreamLink + ButterflyEnvironment.GetGame().GetClientManager().GetLookById(Convert.ToUInt32(row["FriendId"])) + ".gif";
message.AppendString((string)im);
}
In GameClientManager.cs find
PHP Code:
private void GiveAllOnlineCredits(int amount)
Above that add
PHP Code:
internal string GetLookById(uint Id)
{
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
adapter.setQuery("SELECT look FROM users WHERE id = " + Id);
return adapter.getString();
}
}
In Habbo-Imaging create a file called head.php and put this PHP code in there
PHP Code:
<?php
header('Content-Type: image/gif');
$figure = str_replace(".gif","",$_GET['figure']);
$url = 'http://habbo.com/habbo-imaging/avatarimage?figure='.$figure;
$image = imagecreatetruecolor(64, 60);
imagealphablending($image, false);
$col=imagecolorallocatealpha($image,255,255,255,127);
imagefilledrectangle($image,0,0,485, 500,$col);
imagealphablending($image,true);
$img_avatar = imagecreatefrompng($url);
imagecopyresampled($image, $img_avatar, 0, 0, 0, 0, 64, 60, 64, 60);
imagealphablending($image,true);
imagealphablending($image,false);
imagesavealpha($image,true);
imagepng($image);
imagedestroy($image);
?>
In your emulator configuration
PHP Code:
stream.link=http://YOUR_URL/habbo-imaging/head.php?figure=