RKO Command Plus Emulator

Velaski

winner
Aug 4, 2015
562
165
Everyone has been requesting this command, so I decided to just release it. Didnt take long, took around 5 mins.
Code:
 class RKOCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_rko"; }
        }

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

        public string Description
        {
            get { return "RKO a user."; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter a username");
                return;
            }
            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);

            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User == null)
{
Session.SendWhisper("Error in command execution");
                return;
}
            if (TargetClient == null)
               
{
Session.SendWhisper("Target not found");
                return;
}
            if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId && (Math.Abs(ThisUser.X - User.X) < 3 && Math.Abs(ThisUser.Y - User.Y) < 3))
            {
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*RKO OUTTA NOWHERE ON " + TargetClient.GetHabbo().Username + "*", 0, User.LastBubble));
                Room.SendMessage(new ChatComposer(User.VirtualId, "*feels the viper effect well*", 0, User.LastBubble));
            }

            if (!User.Statusses.ContainsKey("sit"))
            {
                if ((User.RotBody % 2) == 0)
                {
                    if (User == null)
                        return;

                    try
                    {
                        User.Statusses.Add("sit", "1.0");
                        User.Z -= 0.35;
                        User.isSitting = true;
                        User.UpdateNeeded = true;
                    }
                    catch { }
                }
                else
                {
                    User.RotBody--;
                    User.Statusses.Add("sit", "1.0");
                    User.Z -= 0.35;
                    User.isSitting = true;
                    User.UpdateNeeded = true;
                }
            }



        }
        }
}

Basically makes you sit after the RKO.
GIF:

If you want any more commands ask please :)
 
Last edited:

LeComet

Retaliation 3
Jun 26, 2016
31
9
Be handy for those newbies who don't have but want this. I recommend putting all of the commands that you want to release in one file, rather than posting a new individual every time as that could become annoying, nice work though.
 

SOUL

┼ ┼ ┼
Nov 10, 2015
224
45
I would of added whisper composers after the if statements but suppose people who wanna use it can do it themselves :p
 

Velaski

winner
Aug 4, 2015
562
165
Be handy for those newbies who don't have but want this. I recommend putting all of the commands that you want to release in one file, rather than posting a new individual every time as that could become annoying, nice work though.
Thank you
 
I would of added whisper composers after the if statements but suppose people who wanna use it can do it themselves :p
Sly sly agree with you there, but It's pretty simple how to execute the command but yeah i'll update the thread
 

SOUL

┼ ┼ ┼
Nov 10, 2015
224
45
Thank you
 

Sly sly agree with you there, but It's pretty simple how to execute the command but yeah i'll update the thread
PS - if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo(). isn't necessary since you added the return statement the command will already terminate if the user is not found
 

Pinkman

Posting Freak
Jul 27, 2016
814
193
I made it so it lays down rather than sits looks better and more realistic for an RKO. But good release!
 

Users who are viewing this thread

Top