Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Staff Chat Plus emu

Newbie Spellweaver
Joined
Jan 29, 2016
Messages
26
Reaction score
2
This release wasnt code it by me im just posting it in Ragezone because i think is useful :eek:tt: :w00t: :love:

1- go to UserDataFactory.cs and search for :​
Code:
 return new UserData(UserId, Achievements, favouritedRooms, ignores, badges, friends, requests, rooms, quests, user, Relationships);

And we change it to:​
Code:
if (user.Rank >= 6) //Change it to the minimum rank you want
            friends.Add(0x7fffffff, new MessengerBuddy(0x7fffffff, "Staff Chat", "hr-831-45.fa-1206-91.sh-290-1331.ha-3129-100.hd-180-2.cc-3039-73.ch-3215-92.lg-270-73", "Solo Staffs", 0, true, false));
            return new UserData(UserId, Achievements, favouritedRooms, ignores, badges, friends, requests, rooms, quests, user, Relationships);

2- Now we search for SendMsgEvent.cs and replace everything that has inside by:​
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.Communication.Packets.Outgoing.Messenger;

namespace Plus.Communication.Packets.Incoming.Messenger
{
    class SendMsgEvent : IPacketEvent
    {
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || Session.GetHabbo().GetMessenger() == null)
                return;

            int userId = Packet.PopInt();
            if (userId == 0 || userId == Session.GetHabbo().Id)
                return;

            string message = PlusEnvironment.GetGame().GetChatManager().GetFilter().CheckMessage(Packet.PopString());
            if (string.IsNullOrWhiteSpace(message))
                return;


            if (Session.GetHabbo().TimeMuted > 0)
            {
                Session.SendNotification("Oops, you're currently muted - you cannot send messages.");
                return;
            }

            if (userId == 0x7fffffff)
            {

                PlusEnvironment.GetGame().GetClientManager().StaffAlert(new NewConsoleMessageComposer(0x7fffffff, Session.GetHabbo().Username + ": " + message), Session.GetHabbo().Id);
                return;
            }


            Session.GetHabbo().GetMessenger().SendInstantMessage(userId, message);

        }
    }
}
3- Finally, we will search for BuddyListComposer.cs and replace everything inside by:​
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Users;
using Plus.HabboHotel.Users.Messenger;
using Plus.HabboHotel.Users.Relationships;

namespace Plus.Communication.Packets.Outgoing.Messenger
{
    class BuddyListComposer : ServerPacket
    {
        public BuddyListComposer(ICollection<MessengerBuddy> Friends, Habbo Player)
            : base(ServerPacketHeader.BuddyListMessageComposer)
        {
            base.WriteInteger(1);
            base.WriteInteger(0);

            base.WriteInteger(Friends.Count);
            foreach (MessengerBuddy Friend in Friends.ToList())
            {
                if (Friend.Id == 0x7fffffff)
                {
                    base.WriteInteger(0x7fffffff);
                    base.WriteString(Friend.mUsername);
                    base.WriteInteger(1);//Gender.
                    base.WriteBoolean(true);
                    base.WriteBoolean(Friend.InRoom);
                    base.WriteString(Friend.mLook);
                    base.WriteInteger(0); // category id
                    base.WriteString(string.Empty);
                    base.WriteString(string.Empty);//Alternative name?
                    base.WriteString(string.Empty);
                    base.WriteBoolean(true);
                    base.WriteBoolean(false);
                    base.WriteBoolean(false);//Pocket Habbo user.
                    base.WriteShort(0);


                }
                else
                { 
                Relationship Relationship = Player.Relationships.FirstOrDefault(x => x.Value.UserId == Convert.ToInt32(Friend.UserId)).Value;

                base.WriteInteger(Friend.Id);
               base.WriteString(Friend.mUsername);
                base.WriteInteger(1);//Gender.
                base.WriteBoolean(Friend.IsOnline);
                base.WriteBoolean(Friend.IsOnline && Friend.InRoom);
               base.WriteString(Friend.IsOnline ? Friend.mLook : string.Empty);
                base.WriteInteger(0); // category id
               base.WriteString(Friend.IsOnline ? Friend.mMotto : string.Empty);
               base.WriteString(string.Empty);//Alternative name?
               base.WriteString(string.Empty);
                base.WriteBoolean(true);
                base.WriteBoolean(false);
                base.WriteBoolean(false);//Pocket Habbo user.
                base.WriteShort(Relationship == null ? 0 : Relationship.Type);
                }
            }
        }
    }
}
lStickerz - Staff Chat Plus emu - RaGEZONE Forums


lStickerz - Staff Chat Plus emu - RaGEZONE Forums
-Credits
~ Dangerous
~
Im not giving credits to my self im only posting it to ragezone thank you :w00t:
 
Last edited:
Junior Spellweaver
Joined
Jan 1, 2016
Messages
157
Reaction score
23
lel 1 line credz to retroripper ;D
and the rest to french community :p
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
12
Reaction score
1
How would I go about making the messenger sender, for example in your case Paul, in bold? Like black letters. Easier to see who send the message then.
 
Joined
Apr 17, 2012
Messages
508
Reaction score
77
Staff chat is useless to communicate with other staff members. First of all, the IM design doesn't support that and I don't understand why people are using it for wrong purposes. It's only meant to communicate with one person to another. Conversations aren't cached (session related) instead of using Skype where you could read back the whole conversation at anytime.
 
Last edited:
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
12
Reaction score
1
Staff chat is useless to communicate with other staff members. First of all, the IM design doesn't support that and I don't understand why people are using it for wrong purposes. It's only meant to communicate with one person to another. Conversations aren't cached (session related) instead of using Skype where you could read back the whole conversation at anytime.
Not true. You can easily save the chatlog and pull it to your HK. Skype is more personal, this is not.
 
Joined
May 13, 2013
Messages
968
Reaction score
240
Not true. You can easily save the chatlog and pull it to your HK. Skype is more personal, this is not.

Too much work to go everytime into HK and check what was written within a couple of hours.

Skype is the best solution for staffs.

OT: Nice release, thanks for sharing with us! :)
 
Newbie Spellweaver
Joined
Jan 29, 2016
Messages
26
Reaction score
2
Staff chat is useless to communicate with other staff members. First of all, the IM design doesn't support that and I don't understand why people are using it for wrong purposes. It's only meant to communicate with one person to another. Conversations aren't cached (session related) instead of using Skype where you could read back the whole conversation at anytime.
But it still better than using the :sa command which is kind of annoying sometimes.
Not true. You can easily save the chatlog and pull it to your HK. Skype is more personal, this is not.


 
Newbie Spellweaver
Joined
Jan 26, 2012
Messages
78
Reaction score
14
You do know you can just use user id 0 right?

Nope, not possible with newer releases of Habbo.swf.

When I was writing my server, I had a special friend (that I can fiddle with the server), which had an ID of 0, but the figure didn't load for some unknown reason (the Habbo.swf sends a request to some URL path which I don't remember right now, maybe habbo-imaging? I remember there was a 0 in the end of URL).

My workaround was using Integer.MAX_VALUE, which is 2 ^ 31 - 1 (2147483647 or 7FFFFFFF in hexadecimal)
 
Newbie Spellweaver
Joined
Jan 26, 2012
Messages
78
Reaction score
14
U can use id 0 -.-

Not really, just for you: Release: PRODUCTION-201612201205-462162202

When ID == 0

Habbo.swf:
Chrome web console: -- I don't know why, but when if ID is 0, Habbo.swf tries to load the figure from habbo-imaging/badge (isn't that used for groups only?)

But when ID > 0, like 2147483647, the Habbo.swf correctly loads the figure image as usual:

I know that older releases of Habbo.swf did show the figure image when ID == 0, but not anymore.

Anyways, use whatever the ID you want.
 
Newbie Spellweaver
Joined
Apr 29, 2014
Messages
89
Reaction score
59
You're an idiot, when the ID is <= 0 the chat is then considered a "group chat" for groups. That's why it requests that URL to get the group badge for the chat. You can just check if the string is a figure and load the figure, like I did or just keep it blank.

The chat WILL still work with <= 0 ids and it'll also allows you to parse another string in the structure for the senders look and username, so you won't have to have frank showing the entire time with "Paul:" next to each image.
 
Junior Spellweaver
Joined
Nov 5, 2013
Messages
147
Reaction score
57
You're an idiot, when the ID is <= 0 the chat is then considered a "group chat" for groups. That's why it requests that URL to get the group badge for the chat. You can just check if the string is a figure and load the figure, like I did or just keep it blank.

The chat WILL still work with <= 0 ids and it'll also allows you to parse another string in the structure for the senders look and username, so you won't have to have frank showing the entire time with "Paul:" next to each image.

Exactly! And using group chats it better than using a static user data as friend inside you messenger list...

It's easy to set up the group chat, doesn't need so much knowledge in c# or java or any programming language.
 
Newbie Spellweaver
Joined
Jan 26, 2012
Messages
78
Reaction score
14
You're an idiot, when the ID is <= 0 the chat is then considered a "group chat" for groups. That's why it requests that URL to get the group badge for the chat. You can just check if the string is a figure and load the figure, like I did or just keep it blank.

The chat WILL still work with <= 0 ids and it'll also allows you to parse another string in the structure for the senders look and username, so you won't have to have frank showing the entire time with "Paul:" next to each image.

I never knew that Habbo had a group chat! Wow! That is useful in some things. Thanks!

So when id <= 0, it's a group chat. And seems friend structure data isn't different to a real friend.

Maybe the messenger chat event is different? You said that I can send username, figure and message instead of "username: message". How so?

When I have a little bit of time and mood, I'll inspect the Habbo.swf scripts about that.

--
Does official Habbo still uses group chat, or they replaced with group forums?
 
Back
Top