Cut user head commands

megosa

New Member
Jun 13, 2018
3
0
Hi, i want to know is someone have the commands for cut user head, i search for a long time right now but don't found it
 

Joshhh

Member
Apr 13, 2016
323
172
Here's the full command. Just create a new class in the User > Fun folder using visual studio.
Code:
using System;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
using System.Threading;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun
{
    class
        CutCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_cut"; }
        }
        public string Parameters
        {
            get { return "%username%"; }
        }
        public string Description
        {
            get { return "Chops another user"; }
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("You must enter a username!");
                return;
            }

            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("That user cannot be found, maybe they're offline or not in the room.");
                return;
            }

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (User == null)
            {
                Session.SendWhisper("The user cannot be found, maybe they're offline or not in the room.");
                return;
            }
            RoomUser Self = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User == Self)
            {
                Session.SendWhisper("You can't Cut yourself!");
                return;
            }
            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (ThisUser == null)
                return;

            if (Math.Abs(User.X - ThisUser.X) < 2 && Math.Abs(User.Y - ThisUser.Y) < 2)
            {
                Room.SendMessage(new ShoutComposer(ThisUser.VirtualId, "*Chops " + TargetClient.GetHabbo().Username + "'s Head*", 0, ThisUser.LastBubble));
                Room.SendMessage(new ChatComposer(User.VirtualId, "*Dead*", 0, User.LastBubble));

                User.GetClient().SendWhisper("You're gonna respawn in 3 seconds!");
                ThisUser.ApplyEffect(117);
                User.ApplyEffect(93);
                TargetClient.SendMessage(new FloodControlComposer(3));
                if (User != null)
                    User.Frozen = true;
                System.Threading.Thread thrd = new System.Threading.Thread(delegate ()
                {
                    Thread.Sleep(4000);
                    if (User != null)
                        User.Frozen = false;
                    User.ApplyEffect(23);
                    Thread.Sleep(2000);
                    ThisUser.ApplyEffect(0);
                    User.ApplyEffect(0);
                    Room.SendMessage(new ChatComposer(User.VirtualId, "*Successfully Respawned*", 0, User.LastBubble));

                });
                thrd.Start();
            }
            else
            {
                Session.SendWhisper("That user is too far away, try getting closer.");
                return;
            }
        }
    }
}
 

Joshhh

Member
Apr 13, 2016
323
172
This is a AFK command, but you can easily change it to BRB if you want.
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.Communication.Packets.Outgoing.Rooms.Avatar;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Items;

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

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

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

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

        public string Description
        {
            get { return "Go AFK"; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            User.IsAsleep = true;
            Room.SendMessage(new SleepComposer(User, true));
            Room.SendMessage(new ChatComposer(User.VirtualId, "* " + Session.GetHabbo().Username + "  is now AFK! *", 1, User.LastBubble));
        }
    }
}
 

Users who are viewing this thread

Top