PlusEMU brb and back command?

Status
Not open for further replies.
Jan 7, 2016
194
15
Hi guys so here is what I'm trying to accomplish, here is my habbo staff badge as a halo/enable ID: and here is one from another hotel but instead of the staff badge to be for :brb command.
Here is my command being used:
Mine is on Release 2 of PlusEMU and has a different re-write code/way of sending messages and here is my brb command cs:
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.Communication.Packets.Outgoing.Rooms.Avatar;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Items;


using Plus.Communication.Packets.Outgoing.Inventory.Furni;
using Plus.Database.Interfaces;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User
{
    class BrbCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_brb"; }
        }

        public string Parameters
        {
            get { return ""; }
        }

        public string Description
        {
            get { return "Allows users know you are away from your PC!"; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            User.IsAsleep = true;
            Room.SendPacket(new SleepComposer(User, true));
            Room.SendPacket(new ChatComposer(User.VirtualId, "*is now away from his PC!*", 0, User.LastBubble));
         }
    }
}

And here is my back command:
(I would like to have this take away the halo)

Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.Communication.Packets.Outgoing.Rooms.Avatar;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Items;


using Plus.Communication.Packets.Outgoing.Inventory.Furni;
using Plus.Database.Interfaces;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User
{
    class BackCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_back"; }
        }

        public string Parameters
        {
            get { return ""; }
        }

        public string Description
        {
            get { return "Allows other users to know you are back at your PC!"; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            User.UnIdle();
            Room.SendPacket(new ChatComposer(User.VirtualId, "*is now back at his PC*", 0, User.LastBubble));
        }
    }
}
 

Joe

Well-Known Member
Jun 10, 2012
4,090
1,918
Make it so when you go BRB you put the enable on and when your back just set it to 0?

I'm no developer but this might help.
Code:
            if (Session.GetHabbo().GetPermissions().HasRight("mod_tool") && !Session.GetHabbo().DisableForcedEffects)
                Session.GetHabbo().Effects().ApplyEffect(102);
 

Velaski

winner
Aug 4, 2015
562
165
1. Create the enable for BRB
2. Grab the id from the effectmap.xml
3. Add it into the command:
PHP:
Session.GetHabbo().Effects().ApplyEffect(ID);
4. The Back command, add
PHP:
Session.GetHabbo().Effects().ApplyEffect(102);
 
Status
Not open for further replies.

Users who are viewing this thread

Top