
Originally Posted by
Nate Curry
the user_info? whats what do with profiles in the client.
This:
Code:
internal void LoadProfile()
{
try
{
int num = this.Request.PopWiredInt32();
bool flag = this.Request.PopWiredBoolean();
Habbo habbo = ButterflyEnvironment.getHabboForId((uint)num);
if (habbo == null)
{
Console.WriteLine("can't get data for profile with userid = " + num);
}
else
{
DataRow Info;
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
adapter.setQuery("SELECT `reg_timestamp` FROM `user_info` WHERE user_id = '" + habbo.Id + "'");
Info = adapter.getRow();
}
TimeSpan span = (TimeSpan)(DateTime.Now - Convert.ToDateTime(habbo.LastOnline));
List<MyGuild> list = new List<MyGuild>();
foreach (int num2 in habbo.ImGuilds)
{
MyGuild item = ButterflyEnvironment.GetGame().GetGuilds().GetGuild(num2);
if (!((item == null) || list.Contains(item)))
{
list.Add(item);
}
}
this.Response.Init(Outgoing.ProfileInformation);
this.Response.AppendInt32(habbo.Id);
this.Response.AppendString(habbo.Username);
this.Response.AppendString(habbo.Look);
this.Response.AppendString(habbo.Motto);
this.Response.AppendString(UnixTimeStampToDateTime((double)Info["reg_timestamp"]).ToShortDateString());
this.Response.AppendInt32(habbo.AchievementPoints);
this.Response.AppendInt32(habbo.GetMessenger().myFriends);
this.Response.AppendBoolean(habbo.Id != this.Session.GetHabbo().Id);
this.Response.AppendBoolean(false);
this.Response.AppendBoolean(ButterflyEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id) != null);
this.Response.AppendInt32(list.Count);
foreach (MyGuild guild2 in list)
{
this.Response.AppendInt32(guild2.Id);
this.Response.AppendString(guild2.Name);
this.Response.AppendString(guild2.Image);
this.Response.AppendString(guild2.HtmlColor1);
this.Response.AppendString(guild2.HtmlColor2);
this.Response.AppendBoolean(habbo.FavoriteGuild == guild2.Id);
}
//this.Response.AppendInt32((int)span.TotalSeconds);
//this.Response.AppendBoolean(true);
this.Response.AppendBoolean(false);
this.Response.AppendInt32((int)span.TotalSeconds);
this.Response.AppendBoolean(true);
this.SendResponse();
}
}
catch
{
}
}
However, if you want to fix your profiles, do this:
You need to create a new page in your CMS and paste this script in. Visit the page once, if the script was succesfull and your user_info is filled, delete the page.