Habbo Packets Explained
- Introduction
- History
- Chrs/Chars/Characters (Chr1 - Chr2 - Chr13)
- vL64
- B64
- Headers
- Sprites
Introduction:
In Habbo the word "Packets" refers to small snippets of code that usually controll on-screen events.
In Habbo these events include things like: The furniture/Habbo loadup order; The figure data about each Habbo (Their hair type/colour etc); how far the Habbomoves and where to; the type of furniture placed down/moved and how it's been rotated; What is being said between clients (on-screen dialogue) etc etc...
It does not include the more basic graphic and sounds, such as: How a furniture/Habbo is drawn (lines, colours); how a sound is composed etc... this data (more logically) is all kept within the SWF files themselves.
History:
To be perfectly honest very little has ever changed in the packet side of Habbo...
from version one till the end of the shockwave client and even on the newer flash client the only things that have been changed are:
A few headers; a few bits of code have been revised (mostly changing numbers into their vL64 encoded equiverlent but also the catalogue and figure codes were changed after the first few versions) and obviously a few pices of code have been removed and added over the years... but that's pretty much all that's happened!
Chrs/Chars/Characters:
Chrs/Chars means "Characters" (I will refer to them as "Chrs" in most of my tutorials) reffering to the ASCii/Unicode characters used for text.
Chrs refer to all text, not just letters and numbers but punctuation and even alt codes! Everthing that you can type is either a chr or a group or chrs.
Altcodes in fact are an interesting trick that most Habboers know... try doing the Altcode "65" or "065", I bet it comes up as an "A"? That's because Chr65 (ASCii 65, 01000001 in binary) is a capital A.
All of them altcodes are actually equal to ASCii, Unicode or other character types (Unless they've been over-riden by add-ons like Japanese characters or, as it happens, like the Habbo-altcode pictures).
Anyway, usually when someone talks about chrs in a Habbo-scripting context they're refering to either: Chr1, Chr2 or Chr13. These three Chrs are quite special, so special in fact, that a lot of programs/websites etc block them from being used!
They are often quite hard to see, sometimes they show up just as blank spaces, sometimes there's no gap at all and the easiest way you can figure out it's there is by tapping the left/right key till you notice it takes two taps to go past a certain letter.
Here are some examples of what Chr1/Chr2/Chr3 most commonly look like, do be aware they can actually be coded to look like ANYTHING though:
(Note: Above the examples are the chr type that the corresponding chr USUALLY are associated with, they can be coded to be different ways around or so that all of them are one type etc.)
Update: Now, after my suggestion to Dom (Myrax) in regards to Lemon, it seems everyone uses [#] ([Chr(#)]) replacements (eg. [0][1][2])! ^-^
Below I've explained each of the three chrs individually.
Chr1:
What it is: Known as the "New Code" chr.
What it does: This character is used to reprisent the start/end code.
In Habbo: This chr is added after each packet/group of packets making up an event, this is it split them up (making it easier for the server/client to read). (eg. "HabboA talks" then Chr2 then "HabboB moves")
History: This use to only be used in the client at the very start of the packets and then was blocked from then on.
Chr2:
What it is: Known as the "New Packet" chr.
What it does: This is used to reprisent the start/end of a packet.
In Habbo: This is used to breakup code within an event packet/group of packets. (eg. "HabboA has loaded, HabboA is male" chr2 "HabboA is called Fred" chr2 "HabboA has a hat and a HC jacket" etc)
History: This use to be used to mark the start/end of each packet, much like Chr1 does now.
Chr13:
What it is: Known as the "New Line" or "Break" chr.
What it does: This character is used to reprisent a new line.
In Habbo: This is no longer used.
History: It use to be used to split up packet information in the same way that Chr2 does now.
VL64:
vLevel64 (VL64) is Sulakes own encoding algorithm to change numbers into letters, thus making majour errors less common in the client. The reason it makes errors less likely is because the strings of letters (That vL64 converts the numbers to) need to be in specific orders and be a corresponding specific amount of characters in length or an error will happen, the client can then re-request the numbers without a majour error appearing on-screen!
I, personally (Alex/Shenk) created the first FULLY working vL64 decoder, although many people had made partially working versions well before I attempted to... these, in all honesty, work fine for most things on Habbo but they actually require more code then my version and also can't handle the massive number strings that mine can.
[You can view my log/diary of making the decoder HERE it explains in a LOT more detail how vL64 works and exactly what it does, and also step-by-step how I decrypted it.]
[Also HERE is a fully working JavaScript version of the decoder (be aware it uses Javascript alerts).]
B64:
Base64 (B64) is a commonly used encoding method, so much so that PHP script actually has a built-in B64 encoding/decoding function!
Habbo use it to tell the server/client how many chrs it should expect to directly follow it.
For example:
1Chr = @A (eg. @A1)
2Chrs = @B (eg. @B12)
26Chrs = @Z (eg. @Z12345678901234567890123456)
Get the idea? (Note: after the capital Z it goes onto the next ASCii chr just like vL64 does.)
Headers:
Habbo LOVE using headers for some reason... which, as it happens, makes a scripters life a hell of a lot easier!
This is because headers (in Habbo) are a string of two chrs that tell the client that everything from the header till the next Chr2 will be about the event that the header symbolises.
There are, unfortunatly, different headers for the Client and Server packets (This is to stop us scripters from finding new serverside scripts/rawdata methods TOO easily).
Sprites:
Sprites are short names without spaces that reprisent furniture. A lot of the sprite names are in Finnish... obviously because the main Habbo coders live in Finland.
Sprites use to be a big part of Habbo's packet-structure when dealing with furniture, a lot has changed since then however... now the sprite names are only viewable in Habbo's FurniData texts.
Instead of sprites Habbo now use the furnitures corresponding NumberedIDs, which later they decided needed to be vL64 encoded as well.
So, after all that sprites are now pretty much irrelivant to the client... although the individual Furniture SWFs are still called by the sprite name and all the coding inside them also use this name!
- Alex (Shenk).
- Tutorial was written by Alex (Shenk.)
Any errors in this tutorial should be emailed to or reported on the ShoutBox.