Chat Colors - PRODUCTION-201701171204-854626611

JynX

Posting Freak
Feb 6, 2016
710
438
Hello DevBest,

I recently updated my EMU to PRODUCTION-201701171204-854626611 and it has the chat colors (as most newer ones do) but I then found that I can only do @Red@ @blue@ @Cyan@ @purple@ @green@, how can I go about adding/removing the chat colors or changing the color ID's for certain ones?

Thanks in advance.
 

Jaden

not so active
Aug 24, 2014
886
263
Hello DevBest,

I recently updated my EMU to PRODUCTION-201701171204-854626611 and it has the chat colors (as most newer ones do) but I then found that I can only do @Red@ @blue@ @Cyan@ @purple@ @green@, how can I go about adding/removing the chat colors or changing the color ID's for certain ones?

Thanks in advance.
lol unless you intend on editing your swf (which no one has done for colors afaik) you simply just use the HTML <font> tag surrounding a username.

You do this by modifying the Chat() function in your RoomUser class so that your send the Update Username packet composer along with the username enclosed in the font tag before the outgoing Shout/Chat packet composer then just send the same packet but with the real username after the chat packet.
 

Core

Member
Nov 10, 2016
356
138
Here are all the colours in the swf, you can add more by adding items to the array.

public static const COLOUR_ARRAY:Array = [["@Red@", 9115929], ["@Cyan@", 0x7F7F], ["@blue@", 19609], ["@green@", 0x8000], ["@purple@", 0x4C004C]];
0x4C004C = hex colour (for absolute noobs you replace 0x with # for the standard web based colour pickers).

As for usernames just change the username in chat packets. you should be able to use standard html.
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
434
647
which no one has done for colors afaik

Me and @Sledmore messed around with adding new chat colours into the swfs when they were first released. It's fairly easy, and I'm SURE many people have done it since then.

As for how to do it, you'll need to decompile the habbo.swf. What you'll need to edit can be found in the class "ChatColours".
6977fb1b426349ae8499709d95a6f7e5.png

 
Also note they're done in decimal, NOT Hex
 

Core

Member
Nov 10, 2016
356
138
Me and @Sledmore messed around with adding new chat colours into the swfs when they were first released. It's fairly easy, and I'm SURE many people have done it since then.

As for how to do it, you'll need to decompile the habbo.swf. What you'll need to edit can be found in the class "ChatColours".
6977fb1b426349ae8499709d95a6f7e5.png

 
Also note they're done in decimal, NOT Hex

Yeah noticed that when decompiled it xD for some reason as3 converts to hex - likely for a nicer output.
 

JynX

Posting Freak
Feb 6, 2016
710
438
I added some to mine ages ago too, it's fairly easy as Damien stated
Thanks George, I could've solved it on my own but the issue was I didn't let my SWF decompiler fully decompile my SWF and therefore didn't have that class. A stupid mistake on my part, but then again Damien did help nonetheless as he basically had me retry it and I got it solved. :)
 

Jaden

not so active
Aug 24, 2014
886
263
Thanks George, I could've solved it on my own but the issue was I didn't let my SWF decompiler fully decompile my SWF and therefore didn't have that class. A stupid mistake on my part, but then again Damien did help nonetheless as he basically had me retry it and I got it solved. :)
I'm glad you understand his reply, that is obviously a better way of doing things.

If you run into any additional complications you should post them here before the thread gets closed.
 

Users who are viewing this thread

Top