Boon Emulator Issues! + Custom Commands

Vinster

We are Anonymous. We are Legion.
Feb 11, 2016
88
12
Hey guys i seem to be having a problem with my mod tools, i have tried a new database and new files in the emulator files but no fix? anoyne have any ideas i have sent the problems in the pic below the text =}



Also. i want to add some simple custom commands so if anyone knows were i can find a tut on how to implament them would mean alot because i seen a hotel with commands like

:kiss
:sex
:cut cuts a users head off.

thankyou guys in advance =}
 

Each

Member
Dec 20, 2013
498
184
You need to code to make custom commands, there isn't a tutorial you just open it in VisualBasic or another C+ editing software and edit the code.
You can't find a tutorial on how to code, you can try to learn it through online courses which will teach you the basics
 
May 1, 2015
470
154
ah dang :/ okay and no one can releases these codes or anything?
I have coded the sex command for you, tested it & it works perfectly.
The code can probably be touched up a little, I'm tired so this is the best your going to get.
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun
{
    class SexCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_sex"; }
        }
        public string Parameters
        {
            get { return "%username%"; }
        }
        public string Description
        {
            get { return "Have sex with another user"; }
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter the username of the person you want to have sex with.");
                return;
            }
            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("The user was not found in the room, maybe they're offline.");
                return;
            }
            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (TargetUser == null)
            {
                Session.SendWhisper("An error occured while finding that user, maybe they're offline or not in this room.");
            }
            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("You cannot have sex with yourself!");
                return;
            }
            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (ThisUser == null)
                return;

            if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2)))
            {
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Bends " + Params[1] + " over and starts to have sex with them*", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "Gets bent over and starts to have sex with " + Session.GetHabbo().Username + "*", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "Slap's " + Params[1] + " ass and pulls their hair*", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "Climaxes and sprays juice all over the place", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "Collapses onto the floor, tired and worn out.", 0, ThisUser.LastBubble));
                TargetUser.Statusses.Add("lay", "0.1");
                TargetUser.isLying = true;
                TargetUser.UpdateNeeded = true;
            }
            else
            {
                Session.SendWhisper("The user is too far away, please try getting closer.");
                return;
            }
        }
    }
}
:up:
 

Kods

New Member
Aug 17, 2015
22
5
I'm unsure if you know exactly how to implement the commands if not just follow the spoilers.

First you need to create and save your commands into the emulator.
Create a new file in HabboHotel/Rooms/Users/Chat/Commands/User/Fun and save it as KissCommand.cs
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Pathfinding;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;

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

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

        public string Description
        {
            get { return "Give another user a kiss."; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter the username of the user you wish to kiss.");
                return;
            }

            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");
                return;
            }

            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (TargetUser == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online or in this room.");
                return;
            }

            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("Come on, you can't kiss yourself!");
                return;
            }

            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (ThisUser == null)
                return;

            if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2)))
            {
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Kisses " + Params[1] + "*", 0, ThisUser.LastBubble));
                Session.GetHabbo().Effects().ApplyEffect(9);
                TargetClient.GetHabbo().Effects().ApplyEffect(9);
            }
            else
            {
                Session.SendWhisper("Oops, " + Params[1] + " is not close enough!");
                return;
            }
        }
    }
}
Create a new file in HabboHotel/Rooms/Users/Chat/Commands/User/Fun and save it as SexCommand.cs Credits to @Altercationz
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Pathfinding;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun
{
    class SexCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_sex"; }
        }
        public string Parameters
        {
            get { return "%username%"; }
        }
        public string Description
        {
            get { return "Have sex with another user"; }
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter the username of the person you want to have sex with.");
                return;
            }
            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("The user was not found in the room, maybe they're offline.");
                return;
            }
            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (TargetUser == null)
            {
                Session.SendWhisper("An error occured while finding that user, maybe they're offline or not in this room.");
            }
            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("You cannot have sex with yourself!");
                return;
            }
            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (ThisUser == null)
                return;

            if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2)))
            {
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Bends " + Params[1] + " over and starts to have sex with them*", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "Gets bent over and starts to have sex with " + Session.GetHabbo().Username + "*", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "Slap's " + Params[1] + "'s ass and pulls their hair*", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "Climaxes and sprays juice all over the place", 0, ThisUser.LastBubble));
                System.Threading.Thread.Sleep(1000);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "Collapses onto the floor, tired and worn out.", 0, ThisUser.LastBubble));
                TargetUser.Statusses.Add("lay", "0.1");
                TargetUser.isLying = true;
                TargetUser.UpdateNeeded = true;
            }
            else
            {
                Session.SendWhisper("Oops, " + Params[1] + " is not close enough!");
                return;
            }
        }
    }
}
Create a new file in HabboHotel/Rooms/Users/Chat/Commands/User/Fun and save it as CutCommand.cs
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Pathfinding;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;

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

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

        public string Description
        {
            get { return "Chop off another users head off!"; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter the username of the user that you wish to chop the head off.");
                return;
            }

            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");
                return;
            }

            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (TargetUser == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online or in this room.");
                return;
            }

            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("Come on, you don't want to do that!");
                return;
            }

            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (ThisUser == null)
                return;

            if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2)))
            {
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Chops off " + Params[1] + "'s head*", 0, ThisUser.LastBubble));
                TargetClient.GetHabbo().Effects().ApplyEffect(93);
                Session.GetHabbo().Effects().ApplyEffect(117);
                System.Threading.Thread.Sleep(1500);
                Session.GetHabbo().Effects().ApplyEffect(0);
            }
            else
            {
                Session.SendWhisper("Oops, " + Params[1] + " is not close enough!");
                return;
            }
        }
    }
}
Now that you have your commands made now it's time to register them as actual commands.
Go into HabboHotel/Rooms/Chat/Commands/CommandManager.cs and open up that file.
Scroll through the file until you find;

Code:
        private void RegisterUser()
        {
            this.Register("about", new InfoCommand());
            this.Register("pickall", new PickAllCommand());
            this.Register("ejectall", new EjectAllCommand());
            this.Register("lay", new LayCommand());
            this.Register("sit", new SitCommand());
            this.Register("stand", new StandCommand());
            this.Register("mutepets", new MutePetsCommand());
            this.Register("mutebots", new MuteBotsCommand());

            this.Register("mimic", new MimicCommand());
            this.Register("dance", new DanceCommand());
            this.Register("push", new PushCommand());
            this.Register("pull", new PullCommand());
            this.Register("enable", new EnableCommand());
            this.Register("follow", new FollowCommand());
            this.Register("faceless", new FacelessCommand());
            this.Register("moonwalk", new MoonwalkCommand());

            this.Register("unload", new UnloadCommand());
            this.Register("regenmaps", new RegenMaps());
            this.Register("emptyitems", new EmptyItems());
            this.Register("setmax", new SetMaxCommand());
            this.Register("setspeed", new SetSpeedCommand());
            this.Register("disablediagonal", new DisableDiagonalCommand());
            this.Register("flagme", new FlagMeCommand());

            this.Register("stats", new StatsCommand());
            this.Register("kickpets", new KickPetsCommand());
            this.Register("kickbots", new KickBotsCommand());

            this.Register("room", new RoomCommand());
            this.Register("dnd", new DNDCommand());
            this.Register("disablegifts", new DisableGiftsCommand());
            this.Register("convertcredits", new ConvertCreditsCommand());
            this.Register("disablewhispers", new DisableWhispersCommand());
            this.Register("disablemimic", new DisableMimicCommand()); ;

            this.Register("pet", new PetCommand());
            this.Register("spush", new SuperPushCommand());
            this.Register("superpush", new SuperPushCommand());
        }
Insert the following somewhere in the void RegisterUser;
Code:
            this.Register("kiss", new KissCommand());
            this.Register("sex", new SexCommand());
            this.Register("cut", new CutCommand());
Where it says "kiss", "sex", "cut" that is what the user will type into the client to use the command so for example you could have;
Code:
            this.Register("cut", new CutCommand());
            this.Register("behead", new CutCommand());
Which allows the user to use either ":cut x", :behead x" to use the command
Now all that is left is to give the users permissions to use the commands
Open your database and run the query below You may edit it to your liking
Code:
INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_cut', '1', '0');
INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_kiss', '1', '0');
INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_sex', '1', '0');
This is assuming you want all users to be able to use those commands If they are VIP commands change the 0 to either Silver VIP - 1, Gold VIP - 2, Event Staff - 3
Now debug then restart your emulator and the commands should be working.

PM me if you get any other issues concerning the commands.
As for your ModTools I have no idea how to fix that, sorry.
 
Last edited:

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
thanks guys for the support =] how do i debug the emu never have i debugged it before xD
In visual studio or whatever usually there's just a little play button. Your emulator just has to be configured and as long as it gets past the part where you changed so "Loading Roles.." or whatever its called on your emulator, you should be good to go because that code was grabbed
 

Vinster

We are Anonymous. We are Legion.
Feb 11, 2016
88
12
everytime itry to download visual studio i am always getting instaltion error? any got a direct link were i can download it?
 

Vinster

We are Anonymous. We are Legion.
Feb 11, 2016
88
12
having debug errors anyone got an insight into debugging? please add my skype joshhylad
 
having debug errors anyone got an insight into debugging? please add my skype joshhylad
 

Joshhh

Member
Apr 13, 2016
325
177
I'm doing everything said above, but still errors that it can't find this:
The type or namespace name 'KissCommand' could not be found (are you missing a using directive or an assembly reference?)
Help?
 
May 1, 2015
470
154
I'm doing everything said above, but still errors that it can't find this:
The type or namespace name 'KissCommand' could not be found (are you missing a using directive or an assembly reference?)
Help?
make sure you have
Code:
class KissCommand : IChatCommand
Whatever you named the class is the name you have to use in the commandmanager.
 

Joshhh

Member
Apr 13, 2016
325
177
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Pathfinding;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;

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

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

        public string Description
        {
            get { return "Give another user a kiss."; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter the username of the user you wish to kiss.");
                return;
            }

            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");
                return;
            }

            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (TargetUser == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online or in this room.");
                return;
            }

            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("Come on, you can't kiss yourself!");
                return;
            }

            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (ThisUser == null)
                return;

            if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2)))
            {
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Kisses " + Params[1] + "*", 0, ThisUser.LastBubble));
                Session.GetHabbo().Effects().ApplyEffect(9);
                TargetClient.GetHabbo().Effects().ApplyEffect(9);
            }
            else
            {
                Session.SendWhisper("Oops, " + Params[1] + " is not close enough!");
                return;
            }
        }
    }
}

I used that and named it KissCommand.cs

For the CommandManager I did this:
Code:
 this.Register("kiss", new KissCommand());
 

Users who are viewing this thread

Top