[Req] Coloured Names

Nov 27, 2014
238
35
For ingame, I've seen retros where the staff team and VIPs get coloured usernames, and I'd like to do it to mine. Does anyone have the code to do it? Thanks.
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
you can add it to the SWF, but it will be easier to upgrade to anything newer than 201604 build which includes Chat colours as default. then just add checks in public void OnChat() in RoomUser to check if the message contains the colours if they're not VIP. pretty simple.
 

Jaden

not so active
Aug 24, 2014
886
263
Update to newest prod,, update the rsa keys, packets headers etc you can prob find on rival forum
RSA Keys rarely change because mainly everyone uses Joopie's encryption with preset RSA keys.
has nothing to do with newest production just so you know
An easier way of doing it would be using the @color@ tags that come with the an updated version of a March 2016 release or newer. But if you're not on that build you just use HTML <font> tag.

Notice that when I did this some user's had browsers that didn't support the <font> HTML tag so they saw username's like this "<font color='green'>Jaden</font>"

I think you can check whether a user has a certain browser that supports the HTML tag by reading the data provided by the GetClientVersionEvent (official name: ClientVariables) packet which tells the session's browser info and a few other things related to that.

Figure out where your emulator handles chat messages if you're using Plus that method will most likely be Chat(), not including function parameters.

You wanna send back the UpdateUsernameComposer along with the new username with HTML tags before sending the Shout or Chat composer, then after sending the Chat composer you want to send the UpdateUsernameComposer again along with the old username without the HTML tags.
 

Users who are viewing this thread

Top