Exemplo n.º 1
0
        public override bool OnUse(GameClient session, string[] args)
        {
            if (args.Length >= 2)
            {
                GameClient target = Skylight.GetGame().GetGameClientManager().GetGameClientByUsername(args[1]);
                if (target != null)
                {
                    RoomUnit     me    = session.GetHabbo().GetRoomSession().GetRoomUser();
                    RoomUnitUser other = target.GetHabbo().GetRoomSession().GetRoomUser();
                    if (target.GetHabbo().GetRoomSession().IsInRoom&& target.GetHabbo().GetRoomSession().CurrentRoomID == session.GetHabbo().GetRoomSession().CurrentRoomID)
                    {
                        bool doit = true;
                        if ((me.X + 1 != other.X || me.Y != other.Y) && (me.X - 1 != other.X || me.Y != other.Y) && (me.Y + 1 != other.Y || me.X != other.X))
                        {
                            bool skip = false;
                            if (me.X - 1 == other.X)
                            {
                                if (me.Y == other.Y)
                                {
                                    skip = true;
                                }
                            }

                            if (!skip)
                            {
                                doit = me.X == other.X || me.Y == other.Y;
                            }
                        }

                        if (doit)
                        {
                            me.Speak("*RKO'S " + other.Session.GetHabbo().Username + " OUT OF NO WHERE*", true);
                            other.Speak("Ouch", true);
                            if (!other.HasStatus("lay") && !other.HasStatus("sit"))
                            {
                                if (other.BodyRotation == 0 || other.BodyRotation == 2 || other.BodyRotation == 4 || other.BodyRotation == 6)
                                {
                                    other.AddStatus("sit", TextUtilies.DoubleWithDotDecimal((other.Z + 1) / 2 - other.Z * 0.5));
                                }
                            }
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 2
0
        public void Handle(GameClient session, ClientMessage message)
        {
            if (session != null && session.GetHabbo() != null)
            {
                RoomUnit roomUser = session.GetHabbo().GetRoomSession().CurrentRoomRoomUser;
                if (roomUser != null)
                {
                    string message_ = message.PopFixedString();
                    if (message_.Length > 300)
                    {
                        message_ = message_.Substring(0, 300);
                    }

                    roomUser.Speak(TextUtilies.FilterString(message_), true);
                }
            }
        }
Exemplo n.º 3
0
        public override bool OnUse(GameClient session, string[] args)
        {
            if (args.Length >= 2)
            {
                if (session.GetHabbo().HasPermission("cmd_push"))
                {
                    GameClient target = Skylight.GetGame().GetGameClientManager().GetGameClientByUsername(args[1]);
                    if (target != null)
                    {
                        RoomUnit me    = session.GetHabbo().GetRoomSession().GetRoomUser();
                        RoomUnit other = target.GetHabbo().GetRoomSession().GetRoomUser();
                        if (target.GetHabbo().GetRoomSession().IsInRoom&& target.GetHabbo().GetRoomSession().CurrentRoomID == session.GetHabbo().GetRoomSession().CurrentRoomID&& (other.RestrictMovementType & RestrictMovementType.Client) == 0)
                        {
                            if (Math.Abs(me.X - other.X) < 3 && Math.Abs(me.Y - other.Y) < 3)
                            {
                                me.Speak("*pulls " + target.GetHabbo().Username + " to them*", false);
                                if (me.HeadRotation == 0)
                                {
                                    other.MoveTo(session.GetHabbo().GetRoomSession().GetRoomUser().X, session.GetHabbo().GetRoomSession().GetRoomUser().Y - 1);
                                }
                                else if (me.HeadRotation == 2)
                                {
                                    other.MoveTo(session.GetHabbo().GetRoomSession().GetRoomUser().X + 1, session.GetHabbo().GetRoomSession().GetRoomUser().Y);
                                }
                                else if (me.HeadRotation == 4)
                                {
                                    other.MoveTo(session.GetHabbo().GetRoomSession().GetRoomUser().X, session.GetHabbo().GetRoomSession().GetRoomUser().Y + 1);
                                }
                                else if (me.HeadRotation == 6)
                                {
                                    other.MoveTo(session.GetHabbo().GetRoomSession().GetRoomUser().X - 1, session.GetHabbo().GetRoomSession().GetRoomUser().Y);
                                }
                                else
                                {
                                    other.MoveTo(session.GetHabbo().GetRoomSession().GetRoomUser().X, session.GetHabbo().GetRoomSession().GetRoomUser().Y + 1);
                                }

                                return(true);
                            }
                        }
                    }
                }
            }

            return(false);
        }
Exemplo n.º 4
0
        void IncomingPacket.Handle(GameClient session, ClientMessage message)
        {
            if (session != null && session.GetHabbo() != null)
            {
                RoomUnit roomUser = session.GetHabbo().GetRoomSession().CurrentRoomRoomUser;
                if (roomUser != null)
                {
                    string message_ = message.PopFixedString();
                    if (message_.Length > 300)
                    {
                        message_ = message_.Substring(0, 300);
                    }

                    roomUser.Speak(TextUtilies.FilterString(message_), true, session.GetHabbo().GetUserSettings().ChatColor = message.PopWiredInt32());
                }
            }
        }
Exemplo n.º 5
0
        public void Handle(GameClient session, ClientMessage message)
        {
            if (session != null && session.GetHabbo() != null)
            {
                RoomUnit roomUser = session.GetHabbo().GetRoomSession().CurrentRoomRoomUser;
                if (roomUser != null)
                {
                    string message_ = message.PopFixedString();
                    if (message_.Length > 300)
                    {
                        message_ = message_.Substring(0, 300);
                    }

                    roomUser.Speak(TextUtilies.FilterString(message_), false);
                    roomUser.Room.SendToAll(new MultiRevisionServerMessage(OutgoingPacketsEnum.TypingStatus, new ValueHolder().AddValue("VirtualID", roomUser.VirtualID).AddValue("Typing", false)));
                }
            }
        }
Exemplo n.º 6
0
        public override bool OnUse(GameClient session, string[] args)
        {
            if (args.Length >= 2)
            {
                GameClient target = Skylight.GetGame().GetGameClientManager().GetGameClientByUsername(args[1]);
                if (target != null)
                {
                    RoomUnit me    = session.GetHabbo().GetRoomSession().GetRoomUser();
                    RoomUnit other = target.GetHabbo().GetRoomSession().GetRoomUser();
                    if (target.GetHabbo().GetRoomSession().IsInRoom&& target.GetHabbo().GetRoomSession().CurrentRoomID == session.GetHabbo().GetRoomSession().CurrentRoomID)
                    {
                        bool doit = true;
                        if ((me.X + 1 != other.X || me.Y != other.Y) && (me.X - 1 != other.X || me.Y != other.Y) && (me.Y + 1 != other.Y || me.X != other.X))
                        {
                            bool skip = false;
                            if (me.X - 1 == other.X)
                            {
                                if (me.Y == other.Y)
                                {
                                    skip = true;
                                }
                            }

                            if (!skip)
                            {
                                doit = me.X == other.X || me.Y == other.Y;
                            }
                        }

                        if (doit)
                        {
                            me.Speak("*Hold hands behind back, pins them down and sticks it inside them*", false);
                            other.Speak("*Screams in pain*", true);
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 7
0
        public override bool OnUse(GameClient session, string[] args)
        {
            if (args.Length >= 2)
            {
                GameClient target = Skylight.GetGame().GetGameClientManager().GetGameClientByUsername(args[1]);
                if (target != null)
                {
                    RoomUnit     me    = session.GetHabbo().GetRoomSession().GetRoomUser();
                    RoomUnitUser other = target.GetHabbo().GetRoomSession().GetRoomUser();
                    if (target.GetHabbo().GetRoomSession().IsInRoom&& target.GetHabbo().GetRoomSession().CurrentRoomID == session.GetHabbo().GetRoomSession().CurrentRoomID)
                    {
                        bool doit = true;
                        if ((me.X + 1 != other.X || me.Y != other.Y) && (me.X - 1 != other.X || me.Y != other.Y) && (me.Y + 1 != other.Y || me.X != other.X))
                        {
                            bool skip = false;
                            if (me.X - 1 == other.X)
                            {
                                if (me.Y == other.Y)
                                {
                                    skip = true;
                                }
                            }

                            if (!skip)
                            {
                                doit = me.X == other.X || me.Y == other.Y;
                            }
                        }

                        if (doit)
                        {
                            me.Speak("*Swings for " + target.GetHabbo().Username + " and knocks them out cold*", false);
                            other.ApplyEffect(53, 6);
                        }

                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 8
0
        public override bool OnUse(GameClient session, string[] args)
        {
            if (args.Length >= 2)
            {
                GameClient target = Skylight.GetGame().GetGameClientManager().GetGameClientByUsername(args[1]);
                if (target != null)
                {
                    RoomUnit me    = session.GetHabbo().GetRoomSession().GetRoomUser();
                    RoomUnit other = target.GetHabbo().GetRoomSession().GetRoomUser();
                    if (target.GetHabbo().GetRoomSession().IsInRoom&& target.GetHabbo().GetRoomSession().CurrentRoomID == session.GetHabbo().GetRoomSession().CurrentRoomID)
                    {
                        me.Speak("Welcome to Cabbo Hotel " + target.GetHabbo().Username + ", we hope you enjoy your stay and make sure to stay safe.", false);

                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 9
0
        public override bool OnUse(GameClient session, string[] args)
        {
            if (args.Length >= 2)
            {
                if (session.GetHabbo().HasPermission("cmd_push"))
                {
                    GameClient target = Skylight.GetGame().GetGameClientManager().GetGameClientByUsername(args[1]);
                    if (target != null)
                    {
                        RoomUnit me    = session.GetHabbo().GetRoomSession().GetRoomUser();
                        RoomUnit other = target.GetHabbo().GetRoomSession().GetRoomUser();
                        if (target.GetHabbo().GetRoomSession().IsInRoom&& target.GetHabbo().GetRoomSession().CurrentRoomID == session.GetHabbo().GetRoomSession().CurrentRoomID&& (other.RestrictMovementType & RestrictMovementType.Client) == 0)
                        {
                            bool doit = true;
                            if ((me.X + 1 != other.X || me.Y != other.Y) && (me.X - 1 != other.X || me.Y != other.Y) && (me.Y + 1 != other.Y || me.X != other.X))
                            {
                                bool skip = false;
                                if (me.X - 1 == other.X)
                                {
                                    if (me.Y == other.Y)
                                    {
                                        skip = true;
                                    }
                                }

                                if (!skip)
                                {
                                    doit = me.X == other.X || me.Y == other.Y;
                                }
                            }

                            if (doit)
                            {
                                me.Speak("*pushes " + target.GetHabbo().Username + "*", false);
                                if (me.HeadRotation == 0)
                                {
                                    other.MoveTo(target.GetHabbo().GetRoomSession().GetRoomUser().X, target.GetHabbo().GetRoomSession().GetRoomUser().Y - 1);
                                }
                                else if (me.HeadRotation == 2)
                                {
                                    other.MoveTo(target.GetHabbo().GetRoomSession().GetRoomUser().X + 1, target.GetHabbo().GetRoomSession().GetRoomUser().Y);
                                }
                                else if (me.HeadRotation == 4)
                                {
                                    other.MoveTo(target.GetHabbo().GetRoomSession().GetRoomUser().X, target.GetHabbo().GetRoomSession().GetRoomUser().Y + 1);
                                }
                                else if (me.HeadRotation == 6)
                                {
                                    other.MoveTo(target.GetHabbo().GetRoomSession().GetRoomUser().X - 1, target.GetHabbo().GetRoomSession().GetRoomUser().Y);
                                }
                                else
                                {
                                    other.MoveTo(target.GetHabbo().GetRoomSession().GetRoomUser().X, target.GetHabbo().GetRoomSession().GetRoomUser().Y + 1);
                                }
                            }

                            return(true);
                        }
                    }
                }
            }

            return(false);
        }