Hello guys. In 2007, when I started with Habbo Retro's, I was wondering how Habbo is being made. Now I know the answer.
First, packet sending is nothing more then sending bytes to client. But, you can do SendMessage(MOTD); and that's a ServerMessage.
1. SendData is being used. Convert MOTD into a string and use SendData(MOTD.ToString());
2. Another SendData is being used. Convert the MOTD string into bytes and use SendData(Encoding.GetBytes(MOTD.ToString())); or something Similar to that.
3. In the SendData of the bytes it send the bytes of servermessage MOTD to the socket server. But the only thing you have to do is know the packet numbers
Some people think: What the fuck? Cata pages is 1 servermessage and 1 requesthandler?? Well.. The catalog pages servermessage is the outgoing data (the catalog header, teaser ect) and the requesthandler is the incoming data (also known as the client Message) which is for starting the void of the outgoing data.
What about things like chatting
The input is very easy. The socket client reads the text that was inputted in a text bar for example. In Snowlight Meth0d used this:
Using that void is much easier.Code:public string PopString(Encoding Encoding)
{
return Encoding.GetString(ReadFixedValue());
}
That could be used for simple text bar, but is very hard to know the encoding. The best (other) way to do is, is this:
public string PopString()
{
return PopString(Constants.DefaultEncoding);
}
For example, in my hotel it would be this:
How is shouting being made?Code:internal void Chat()
{
string Mesanje = Request.PopWiredString();
ServerMessage Chat = new ServerMessage(PACKET OUTGOING);
Chat.AppendInt32(VirtualID);
Chat.AppendString(Mesanje);
Session.Connection.SendMessage(Chat);
}
Shouting is a pop wired/fixed boolean. If the user pressed 'shift' with 'enter' the value is true, else it's false.
Questions?
Post them here :3
After this:
As you can see: a lot of things are needed, and you just have to type in a text message in hotel to chat. Weird, isn't it?

