Coloured Usernames Release [PlusEmu]

Legend

https://habda.sh/
Jun 17, 2015
89
27
@Mikee @TheUndertaker (Firstly, I realize this is technically the wrong 'section', but who cares uno)
Would you be able to help me add this via teamviewer or join.me? I'm using a RP emu based off of PlusEMU and having a bit of trouble...
 

Antisj

Member
Apr 21, 2014
126
13
Change SendPacket to SendMessage. Problem should be solved.
Thanks, getting 3 more errors.
1:
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'UserNameChangeComposer' could not be found (are you missing a using directive or an assembly reference?) Plus Emulator C:\Users\Offic\Desktop\Emulator3\HabboHotel\Rooms\RoomUser.cs 287 Active
2:
Severity Code Description Project File Line Suppression State
Error CS0103 The name 'SendNameColorPacket' does not exist in the current context Plus Emulator C:\Users\Offic\Desktop\Emulator3\HabboHotel\Rooms\RoomUser.cs 415 Active
3:
Severity Code Description Project File Line Suppression State
Error CS1061 'Habbo' does not contain a definition for 'GetIgnores' and no extension method 'GetIgnores' accepting a first argument of type 'Habbo' could be found (are you missing a using directive or an assembly reference?) Plus Emulator C:\Users\Offic\Desktop\Emulator3\HabboHotel\Rooms\RoomUser.cs 419 Active
4 :
 

Mikee

Active Member
Jul 8, 2017
162
102
Error 1: On the UserNameChangeComposer word in Roomuser.cs hit alt + enter, then enter
Error 2: Means you forgot to add the SendNameColorPacket method. Read my post again.
Error 3: Nothing to do with this. send me a screenshot of it if u want.
 

Antisj

Member
Apr 21, 2014
126
13
Error 1: On the UserNameChangeComposer word in Roomuser.cs hit alt + enter, then enter
Error 2: Means you forgot to add the SendNameColorPacket method. Read my post again.
Error 3: Nothing to do with this. send me a screenshot of it if u want.
Thanks! <3 Sent you a pm
 
Error 1: On the UserNameChangeComposer word in Roomuser.cs hit alt + enter, then enter
Error 2: Means you forgot to add the SendNameColorPacket method. Read my post again.
Error 3: Nothing to do with this. send me a screenshot of it if u want.
Alt + enter + enter did not change anyting
SendNameColourPacket do exist
e0E2LI6.png

 
iYLzPEJ.png

'GetIgnores' is in SendColorPacket();
if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id))
 
Last edited:

Mikee

Active Member
Jul 8, 2017
162
102
On the UserNameChangeComposer Right Click and choose add the namespace for that function or whatever it may be called (i don't remember exactly) but theres an option that lets you add the namespace automatically.

Then for GetIgnores
I don't know Plus R1 off the top of my head, but what I would do is type
User.GetClient().GetHabbo().

then when you type the "." it'll have a list of methods, getter/setters, and non-encapsulated variables pop down. Find one that is similar to GetIgnores, use your logic for this.
If you can't figure it out then just remove that "or" clause from the if statement entirely. Won't make a huge difference.
Won't spoon feed you much anymore, so good luck.
 

ItsNick

Member
Nov 19, 2013
96
15
@Mikee I've been looking around... no errors on this but it doesnt register the command when you type :setcolor ... even though its in CommandManager?
 

ItsNick

Member
Nov 19, 2013
96
15
Actually yes, i figured that out. But also it looks like somehow it was missing a "colors" table from the database. I added that and it works. However the "rainbow" one does not work for some reason?
 

Mikee

Active Member
Jul 8, 2017
162
102
Actually yes, i figured that out. But also it looks like somehow it was missing a "colors" table from the database. I added that and it works. However the "rainbow" one does not work for some reason?
this release doesnt use the colors table, alaska does but not this. Sorry but cba and too busy to figure this out. Goodluck, keep trying.
 

Mikee

Active Member
Jul 8, 2017
162
102
No problem ill keep trying things. Would it be more sensible to have them set in a db?
of course, u can then add them on the fly. Thats why i did that. As far as rainbow not working i had same issue when i tried but never cared to figure it out. The way i would do it if u want rainbow is make a whole new seperate variable called public string Rainbow = null; then when the usernamecomposer packet is called, check if its null, if it is then call ChatColor, if its not then run the GenerateRainbow method and reassign rainbow to a value that the method gives it then in usernamecomposer pass the rainbow.
 

Antisj

Member
Apr 21, 2014
126
13
Did it all, got it to work and debug worked fine.
Did the command but the color of does not change.
 
Last edited:

ShalawHibblo

New Member
Jun 26, 2013
23
1
Thanks, getting 3 more errors.
1:
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'UserNameChangeComposer' could not be found (are you missing a using directive or an assembly reference?) Plus Emulator C:\Users\Offic\Desktop\Emulator3\HabboHotel\Rooms\RoomUser.cs 287 Active
2:
Severity Code Description Project File Line Suppression State
Error CS0103 The name 'SendNameColorPacket' does not exist in the current context Plus Emulator C:\Users\Offic\Desktop\Emulator3\HabboHotel\Rooms\RoomUser.cs 415 Active
3:
Severity Code Description Project File Line Suppression State
Error CS1061 'Habbo' does not contain a definition for 'GetIgnores' and no extension method 'GetIgnores' accepting a first argument of type 'Habbo' could be found (are you missing a using directive or an assembly reference?) Plus Emulator C:\Users\Offic\Desktop\Emulator3\HabboHotel\Rooms\RoomUser.cs 419 Active
4 :



2. Edit the name to SendNameColourPacket not color <- Write colour
 

Jepzter

Member
May 25, 2018
38
37
This can be simplified.


Code:
    private readonly Dictionary<string, string> colors = new Dictionary<string, string>()
    {
        { "blue", "#0000FF" },
        { "silver", "C0C0C0" }
    };
    public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) {
        bool hasColor = colors.TryGetValue(Params[1].ToLower(), out color);

        if(!hasColor) {
            Session.SendWhisper($"The chat color {color} does not exist!");
            return;
        }
        Session.GetHabbo().ChatColor = color;
        Session.SendWhisper($"Your chat color has been set to {color}");
    }
 
Last edited:

Users who are viewing this thread

Top