Coloured Usernames PlusR1

JMS

Posting Freak
Aug 25, 2014
563
269
Hi all, I have been trying to add coloured usernames released by @Mikee ( )

The code is coded around R2, however I am using R1.

One part of it is to replace this code here:
Code:
            if (GetClient().GetHabbo().TentId > 0)
            {
                mRoom.SendToTent(GetClient().GetHabbo().Id, GetClient().GetHabbo().TentId, Packet);

                Packet = new WhisperComposer(this.VirtualId, "[Tent Chat] " + Message, 0, Colour);

                List<RoomUser> ToNotify = mRoom.GetRoomUserManager().GetRoomUserByRank(2);

                if (ToNotify.Count > 0)
                {
                    foreach (RoomUser user in ToNotify)
                    {
                        if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null ||
                            user.GetClient().GetHabbo().TentId == GetClient().GetHabbo().TentId)
                        {
                            continue;
                        }

                        user.GetClient().SendMessage(Packet);
                    }
                }
            }
            else
            {
                foreach (RoomUser User in mRoom.GetRoomUserManager().GetRoomUsers().ToList())
                {
                    if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().MutedUsers.Contains(mClient.GetHabbo().Id))
                        continue;

                    if (mRoom.chatDistance > 0 && Gamemap.TileDistance(this.X, this.Y, User.X, User.Y) > mRoom.chatDistance)
                        continue;

                    User.GetClient().SendMessage(Packet);
                }
            }

(Also worth noting, that using this code client loads fine and all chats show)
With this code

Code:
           if (GetClient().GetHabbo().TentId > 0)
           {
               mRoom.SendToTent(GetClient().GetHabbo().Id, GetClient().GetHabbo().TentId, Packet);

               Packet = new WhisperComposer(this.VirtualId, "[Tent Chat] " + Message, 0, Colour);

               List<RoomUser> ToNotify = mRoom.GetRoomUserManager().GetRoomUserByRank(2);

               if (ToNotify.Count > 0)
               {
                   foreach (RoomUser user in ToNotify)
                   {
                       if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null ||
                           user.GetClient().GetHabbo().TentId == GetClient().GetHabbo().TentId)
                       {
                           continue;
                       }

                       user.GetClient().SendMessage(Packet);
                   }
                 
               }
           }
           else
           {
               SendNameColorPacket();

               foreach (RoomUser User in mRoom.GetRoomUserManager().GetRoomUsers().ToList())
               {
                   if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id))
                       continue;

                   if (mRoom.chatDistance > 0 && Gamemap.TileDistance(this.X, this.Y, User.X, User.Y) > mRoom.chatDistance)
                       continue;

                   User.GetClient().SendMessage(Packet);
               }
               SendNamePacket();
           }

However this threw up this error:

I managed to fix this in VS by replacing:
Code:
 if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id))
                        continue;
With this:
Code:
 if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().MutedUsers.Contains(mClient.GetHabbo().Id))
                        continue;

With this, the emulator loads up correctly however chat does not show in game. It appears in the chatlogs in game, but doesnt show in game.
Can anyone offer any advice, this has been the vain of my life for the past week!

@Damien @Sledmore @Brad maybe?
 
Last edited:

JMS

Posting Freak
Aug 25, 2014
563
269



@Wess crap screenshots but thats all that shows!
 

Users who are viewing this thread

Top