Como adicionar StaffChat em seu emulador



Com exclusividade para vocês...
Tutorial:

1- Pesquisamos por UserDataFactory.cs apertamos CTRL+F nele e procuramos por
           return new UserData(UserId, Achievements, favouritedRooms, ignores, badges, friends, requests, rooms, quests, user, Relationships);
e substituimos por:

if (user.Rank >= 6) // Aqui ficará o cargo que queremos
            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- Agora pesquisamos por SendMsgEvent.cs e substituimos tudo o que ha dentro por:

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- Por fim, iremos procurar por BuddyListComposer.cs e substituiremos tudo dentro por:

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);
                }
            }
        }
    }
}

Imagens:


Créditos:
~ Dangerous
~ www.CriaHabbos.ga

3 comentários

faço tudo certo e n funciona, meu emulador é o plus 2.5

Parece-me que 'BuddyListComposer' não contém um construtor que leva 4 argumentos Plus Emulator C: \ Usuários \ Usuário \ Desktop \ Emulador Fonte \ Comunicação \ Pacotes \ Entrada \ Messenger \ MessengerInitEvent.cs 35 Ativo


EmoticonEmoticon