Ejemplo n.º 1
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser roomUser = Room?.GetRoomUserManager()?.GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (roomUser == null)
            {
                return;
            }

            List <Items.Item> userBooth = Room.GetRoomItemHandler().GetFloor.Where(x => x != null && Gamemap.TilesTouching(
                                                                                       x.Coordinate, roomUser.Coordinate) && x.Data.InteractionType == Items.InteractionType.DICE).ToList();

            if (userBooth.Count != 5)
            {
                Session.SendWhisper("Debes tener 5 dados cerca de ti.", 34);
                return;
            }

            userBooth.ForEach(x => {
                x.ExtraData = "0";
                x.UpdateState();
            });

            Session.SendWhisper("Los dados han sido cerrados", 34);
        }
Ejemplo n.º 2
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser roomUser = Room?.GetRoomUserManager()?.GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (roomUser == null)
            {
                return;
            }

            List <Items.Item> userBooth = Room.GetRoomItemHandler().GetFloor.Where(x => x != null && Gamemap.TilesTouching(
                                                                                       x.Coordinate, roomUser.Point) && x.Data.InteractionType == Items.InteractionType.DICE).ToList();

            if (userBooth.Count != 5)
            {
                Session.SendWhisper("Oeps! Er zijn helaas geen vijf dices gevonden.");
                return;
            }

            userBooth.ForEach(x => {
                x.ExtraData = "0";
                x.UpdateState();
            });

            Session.SendWhisper("Hoppa! De dices zijn gesloten.");
        }
Ejemplo n.º 3
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (ThisUser == null)
            {
                return;
            }

            List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();

            foreach (RoomUser U in Users.ToList())
            {
                if (U == null || Session.GetHabbo().Id == U.UserId)
                {
                    continue;
                }

                U.SetRot(Rotation.Calculate(U.X, U.Y, ThisUser.X, ThisUser.Y), false);
            }
        }
Ejemplo n.º 4
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Insira um ID de dança válida. (1-4)", 1);
                return;
            }

            int DanceId;

            if (!int.TryParse(Params[1], out DanceId))
            {
                Session.SendWhisper("Insira um ID de dança válida. (1-4)", 1);
                return;
            }

            if (DanceId < 0 || DanceId > 4)
            {
                Session.SendWhisper("Insira um ID de dança válida. (1-4)", 1);
                return;
            }

            List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();

            if (Users.Count <= 1)
            {
                Session.SendWhisper("Você é a única pessoa no quarto!", 1);
                return;
            }

            foreach (RoomUser U in Users.ToList())
            {
                if (U == null)
                {
                    continue;
                }

                if (U.CarryItemID > 0)
                {
                    U.CarryItemID = 0;
                }

                if (U.CurrentEffect > 0)
                {
                    U.ApplyEffect(0);
                }

                U.DanceId = DanceId;
                Room.SendMessage(new DanceComposer(U, DanceId));
            }

            Session.Shout("*Força todos usuários a dançar*", 23);
        }
Ejemplo n.º 5
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            User.TeleportEnabled = !User.TeleportEnabled;
            Room.GetGameMap().GenerateMaps();
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();

            foreach (RoomUser U in Users.ToList())
            {
                if (U == null || Session.GetHabbo().Id == U.UserId)
                {
                    continue;
                }

                U.MoveTo(User.X, User.Y, true);
            }
        }
Ejemplo n.º 7
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            User.AllowOverride = !User.AllowOverride;
            Session.SendWhisper("Override mode updated.");
        }
Ejemplo n.º 8
0
        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 mimic.");
                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;
            }

            if (!TargetClient.GetHabbo().AllowMimic)
            {
                Session.SendWhisper("Oops, you cannot mimic this user - sorry!");
                return;
            }

            RoomUser TargetUser = Session.GetHabbo().CurrentRoom.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;
            }

            Session.GetHabbo().Gender = TargetUser.GetClient().GetHabbo().Gender;
            Session.GetHabbo().Look   = TargetUser.GetClient().GetHabbo().Look;

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `users` SET `gender` = @gender, `look` = @look WHERE `id` = @id LIMIT 1");
                dbClient.AddParameter("gender", Session.GetHabbo().Gender);
                dbClient.AddParameter("look", Session.GetHabbo().Look);
                dbClient.AddParameter("id", Session.GetHabbo().Id);
                dbClient.RunQuery();
            }

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

            if (User != null)
            {
                Session.SendPacket(new AvatarAspectUpdateComposer(Session.GetHabbo().Look, Session.GetHabbo().Gender));
                Session.SendPacket(new UserChangeComposer(User, true));
                Room.SendPacket(new UserChangeComposer(User, false));
            }
        }
Ejemplo n.º 9
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Introduce el nombre del usuari@ al cual le quieres copiar la ropa.");
                return;
            }

            GameClient TargetClient = RavenEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

            if (TargetClient == null)
            {
                Session.SendWhisper("Ocurrió un error, escribe correctamente el nombre o tal vez el usuario no se encuentre online.");
                return;
            }

            if (!TargetClient.GetHabbo().AllowMimic)
            {
                Session.SendWhisper(Params[1] + " tiene desactivada la opción de que le copien el look.");
                return;
            }

            RoomUser TargetUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);

            if (TargetUser == null)
            {
                Session.SendWhisper("Ocurrió un error, escribe correctamente el nombre o tal vez el usuario no se encuentre online.");
                return;
            }

            Session.GetHabbo().Gender = TargetUser.GetClient().GetHabbo().Gender;
            Session.GetHabbo().Look   = TargetUser.GetClient().GetHabbo().Look;

            using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `users` SET `gender` = @gender, `look` = @look WHERE `id` = @id LIMIT 1");
                dbClient.AddParameter("gender", Session.GetHabbo().Gender);
                dbClient.AddParameter("look", Session.GetHabbo().Look);
                dbClient.AddParameter("id", Session.GetHabbo().Id);
                dbClient.RunQuery();
            }

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

            if (User != null)
            {
                Session.SendMessage(new AvatarAspectUpdateMessageComposer(Session.GetHabbo().Look, Session.GetHabbo().Gender));
                Session.SendMessage(new UserChangeComposer(User, true));
                Room.SendMessage(new UserChangeComposer(User, false));
            }
        }
Ejemplo n.º 10
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Session.GetHabbo().GetPermissions().HasRight("room_unload_any"))
            {
                Room r = null;
                if (!RavenEnvironment.GetGame().GetRoomManager().TryGetRoom(Room.Id, out r))
                {
                    return;
                }

                List <RoomUser> UsersToReturn = Room.GetRoomUserManager().GetRoomUsers().ToList();
                RavenEnvironment.GetGame().GetRoomManager().UnloadRoom(r, true);

                foreach (RoomUser User in UsersToReturn)
                {
                    if (User != null)
                    {
                        User.GetClient().SendMessage(new RoomForwardComposer(Room.Id));
                    }
                }
            }
            else
            {
                if (Room.CheckRights(Session, true))
                {
                    List <RoomUser> UsersToReturn = Room.GetRoomUserManager().GetRoomUsers().ToList();
                    RavenEnvironment.GetGame().GetRoomManager().UnloadRoom(Room);

                    foreach (RoomUser User in UsersToReturn)
                    {
                        if (User != null)
                        {
                            User.GetClient().SendMessage(new RoomForwardComposer(Room.Id));
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            if (User.Statusses.ContainsKey("lie") || User.isLying || User.RidingHorse || User.IsWalking)
            {
                return;
            }

            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;
                }
            }
            else if (User.isSitting == true)
            {
                User.Z += 0.35;
                User.Statusses.Remove("sit");
                User.Statusses.Remove("1.0");
                User.isSitting    = false;
                User.UpdateNeeded = true;
            }
        }
Ejemplo n.º 12
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Oeps! Je bent vergeten een gebruikersnaam in te vullen.");
                return;
            }

            GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

            if (TargetClient == null)
            {
                Session.SendWhisper("Oeps! Deze gebruiker bestaat niet.");
                return;
            }

            if (!TargetClient.GetHabbo().AllowMimic)
            {
                Session.SendWhisper("Oeps! Deze gebruiker heeft uitgezet dat andere zijn of haar uiterlijk kan overnemen.");
                return;
            }

            RoomUser TargetUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);

            if (TargetUser == null)
            {
                Session.SendWhisper("Oeps! Deze gebruiker is niet in de kamer aanwezig.");
                return;
            }

            Session.GetHabbo().Gender = TargetUser.GetClient().GetHabbo().Gender;
            Session.GetHabbo().Look   = TargetUser.GetClient().GetHabbo().Look;

            using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `users` SET `gender` = @gender, `look` = @look WHERE `id` = @id LIMIT 1");
                dbClient.AddParameter("gender", Session.GetHabbo().Gender);
                dbClient.AddParameter("look", Session.GetHabbo().Look);
                dbClient.AddParameter("id", Session.GetHabbo().Id);
                dbClient.RunQuery();
            }

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

            if (User != null)
            {
                Session.SendMessage(new UserChangeComposer(User, true));
                Room.SendMessage(new UserChangeComposer(User, false));
            }
        }
Ejemplo n.º 13
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            #region Conditions
            if (Params.Length == 1)
            {
                Session.SendWhisper("Digite o nome do comprador!");
                return;
            }

            GameClient Target = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (Target == null)
            {
                Session.SendWhisper("Opa, não encontrou esse usuário!");
                return;
            }

            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Username);
            if (TargetUser == null)
            {
                Session.SendWhisper("Ocorreu um erro ao encontrar esse usuário, talvez ele não esteja online ou nesta sala.", 1);
                return;
            }

            if (!GroupManager.HasJobCommand(Session, "discount") && !Session.GetHabbo().GetPermissions().HasRight("offer_anything"))
            {
                Session.SendWhisper("Desculpe, você não trabalha na corporação da Loja de Roupas!", 1);
                return;
            }

            if (!Session.GetRoleplay().IsWorking&& !Session.GetHabbo().GetPermissions().HasRight("offer_anything"))
            {
                Session.SendWhisper("Você deve estar trabalhando para oferecer a alguém um desconto de roupas!", 1);
                return;
            }

            if (Target.GetRoleplay().OfferManager.ActiveOffers.ContainsKey("roupas"))
            {
                Session.SendWhisper("Este usuário já recebeu um desconto na loja de roupas!", 1);
                return;
            }
            #endregion

            #region Execute
            Session.Shout("*Oferece um desconto para " + Target.GetHabbo().Username + " de 5% ao comprar um item de vestuário na loja*", 4);
            Target.GetRoleplay().OfferManager.CreateOffer("roupas", Session.GetHabbo().Id, 0);
            return;

            #endregion
        }
Ejemplo n.º 14
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("¡Ingrese el usuario que desea recompensar!", 34);
                return;
            }

            GameClient Target = NeonEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

            if (Target == null)
            {
                Session.SendWhisper("¡Vaya, no pudimos encontrar a ese usuario!", 34);
                return;
            }

            RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id);

            if (TargetUser == null)
            {
                Session.SendWhisper("Usuario no encontrado! Quizás no esté en línea o en esta sala.", 34);
                return;
            }

            if (Target.GetHabbo().Username == Session.GetHabbo().Username)
            {
                string product = NeonEnvironment.GetDBConfig().DBData["bonus_rare_productdata_name"];
                int    baseid  = int.Parse(NeonEnvironment.GetDBConfig().DBData["bonus_rare_item_baseid"]);
                int    score   = Convert.ToInt32(NeonEnvironment.GetDBConfig().DBData["bonus_rare_total_score"]);

                Session.GetHabbo().BonusPoints += 1;
                Session.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().BonusPoints, score, 101));
                Session.SendMessage(new RoomNotificationComposer("Felicidades ¡Has recibido un punto extra! Tienes ahora: (" + Session.GetHabbo().BonusPoints + ") bono(s)"));
                Session.SendMessage(new BonusRareMessageComposer(Session));
                return;
            }
            if (Target.GetHabbo().Username != Session.GetHabbo().Username)
            {
                string product = NeonEnvironment.GetDBConfig().DBData["bonus_rare_productdata_name"];
                int    baseid  = int.Parse(NeonEnvironment.GetDBConfig().DBData["bonus_rare_item_baseid"]);
                int    score   = Convert.ToInt32(NeonEnvironment.GetDBConfig().DBData["bonus_rare_total_score"]);

                Target.GetHabbo().BonusPoints += 1;
                Target.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().BonusPoints, score, 101));
                Target.SendMessage(new RoomNotificationComposer("Felicidades ¡Has recibido un punto extra! Tienes ahora: (" + Target.GetHabbo().BonusPoints + ") bono(s)"));
                Target.SendMessage(new BonusRareMessageComposer(Target));
                Session.SendMessage(new RoomNotificationComposer("Felicidades ¡Has ganado con éxito los puntos de bonificación!"));
            }
        }
Ejemplo n.º 15
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Oops, you forgot to choose a target user!");
                return;
            }

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Params[1]);
            if (User == null)
                return;

            if (User.Statusses.ContainsKey("lie") || User.isLying || User.RidingHorse || User.IsWalking)
                return;

            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;
                }
            }
            else if (User.isSitting == true)
            {
                User.Z += 0.35;
                User.Statusses.Remove("sit");
                User.Statusses.Remove("1.0");
                User.isSitting = false;
                User.UpdateNeeded = true;
            }
        }
Ejemplo n.º 16
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Por favor, proporcione una razón para los usuarios de esta patada habitación.");
                return;
            }

            string Message = CommandManager.MergeParams(Params, 1);

            foreach (RoomUser RoomUser in Room.GetRoomUserManager().GetUserList().ToList())
            {
                if (RoomUser == null || RoomUser.IsBot || RoomUser.GetClient() == null || RoomUser.GetClient().GetHabbo() == null || RoomUser.GetClient().GetHabbo().GetPermissions().HasRight("mod_tool") || RoomUser.GetClient().GetHabbo().Id == Session.GetHabbo().Id)
                {
                    continue;
                }

                RoomUser.GetClient().SendNotification("Se le ha pateado por un moderador: " + Message);

                Room.GetRoomUserManager().RemoveUserFromRoom(RoomUser.GetClient(), true, false);
            }

            Session.SendWhisper("Pateado con éxito todos los usuarios de la sala.");
        }
Ejemplo n.º 17
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please provide a reason to the users for this room kick.");
                return;
            }

            string Message = CommandManager.MergeParams(Params, 1);

            foreach (RoomUser RoomUser in Room.GetRoomUserManager().GetUserList().ToList())
            {
                if (RoomUser == null || RoomUser.IsBot || RoomUser.GetClient() == null || RoomUser.GetClient().GetHabbo() == null || RoomUser.GetClient().GetHabbo().GetPermissions().HasRight("mod_tool") || RoomUser.GetClient().GetHabbo().Id == Session.GetHabbo().Id)
                {
                    continue;
                }

                RoomUser.GetClient().SendNotification("You have been kicked by a moderator: " + Message);

                Room.GetRoomUserManager().RemoveUserFromRoom(RoomUser.GetClient(), true, false);
            }

            Session.SendWhisper("Successfully kicked all users from the room.");
        }
Ejemplo n.º 18
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Por favor dale una razon a los usuarios.");
                return;
            }

            string Message = CommandManager.MergeParams(Params, 1);

            foreach (RoomUser RoomUser in Room.GetRoomUserManager().GetUserList().ToList())
            {
                if (RoomUser == null || RoomUser.IsBot || RoomUser.GetClient() == null || RoomUser.GetClient().GetHabbo() == null || RoomUser.GetClient().GetHabbo().GetPermissions().HasRight("mod_tool") || RoomUser.GetClient().GetHabbo().Id == Session.GetHabbo().Id)
                {
                    continue;
                }

                RoomUser.GetClient().SendNotification("Usted ha sido expulsado por un moderador por la siguiente razon: " + Message);

                Room.GetRoomUserManager().RemoveUserFromRoom(RoomUser.GetClient(), true, false);
            }

            Session.SendWhisper("Expulso a todos correctamente");
        }
Ejemplo n.º 19
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Oeps! Je hebt geen reden ingevuld voor het wegsturen van iedereen in de huidige kamer.", 34);
                return;
            }

            string Message = CommandManager.MergeParams(Params, 1);

            foreach (RoomUser RoomUser in Room.GetRoomUserManager().GetUserList().ToList())
            {
                if (RoomUser == null || RoomUser.IsBot || RoomUser.GetClient() == null || RoomUser.GetClient().GetHabbo() == null || RoomUser.GetClient().GetHabbo().GetPermissions().HasRight("mod_tool") || RoomUser.GetClient().GetHabbo().Id == Session.GetHabbo().Id)
                {
                    continue;
                }

                RoomUser.GetClient().SendMessage(new RoomCustomizedAlertComposer("Het Habbis personeel heeft iedereen uit de kamer weggestuurd met als reden: " + Message));

                Room.GetRoomUserManager().RemoveUserFromRoom(RoomUser.GetClient(), true, false);
            }

            Session.SendWhisper("Je hebt succesvol iedereen uit de kamer weggestuurd.", 34);
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendNotification("Você gostaria de comprar maconha?\n\n" +
                                         "Para confirmar, insira \":fumar sim\". \n\n Depois de ter feito você não pode voltar!\n\n(Se você não quiser comprar maconha, ignore esta mensagem! ;) )\n\n");
                return;
            }
            RoomUser roomUserByHabbo = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (roomUserByHabbo == null)
            {
                return;
            }
            if (Params.Length == 2 && Params[1].ToString() == "sim")
            {
                roomUserByHabbo.GetClient().SendWhisper("Ganhou Maconha!");
                Thread.Sleep(1000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "* Enrola baseado *", 0, 6), false);
                Thread.Sleep(2000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "*vou acender e começar a fumar*", 0, 6), false);
                Thread.Sleep(2000);
                roomUserByHabbo.ApplyEffect(53);
                Thread.Sleep(2000);
                switch (new Random().Next(1, 4))
                {
                case 1:
                    Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Hehehe Eu vejo muitas aves :D  ", 0, 6), false);
                    break;

                case 2:
                    roomUserByHabbo.ApplyEffect(70);
                    Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Eu me sinto um panda :D ", 0, 6), false);
                    break;

                default:
                    Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Hehehe to muito chapado :D ", 0, 6), false);
                    break;
                }
                Thread.Sleep(2000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "HAHAAHHAHAHAHAAHAHAHHAHAHAHA LOL", 0, 6), false);
                Thread.Sleep(2000);
                roomUserByHabbo.ApplyEffect(0);
                Thread.Sleep(2000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "*que Maconha boa que eu ganhei *", 0, 6), false);
                Thread.Sleep(2000);
            }
        }
Ejemplo n.º 21
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendNotification("¿Te gustaría comprar marihuana?\n\n" +
                                         "Para confirmar, escriba \":fumar si\". \n\n Después de haber hecho usted no puede volver!\n\n(Si no quieres comprar marihuana, ignora este mensaje! ;) )\n\n");
                return;
            }
            RoomUser roomUserByHabbo = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (roomUserByHabbo == null)
            {
                return;
            }
            if (Params.Length == 2 && Params[1].ToString() == "si")
            {
                roomUserByHabbo.GetClient().SendWhisper("¡Obtuvo Marihuana!");
                Thread.Sleep(1000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "* Enrolla el bate *", 0, 6), false);
                Thread.Sleep(2000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "*Encender y empezar a fumar*", 0, 6), false);
                Thread.Sleep(2000);
                roomUserByHabbo.ApplyEffect(53);
                Thread.Sleep(2000);
                switch (new Random().Next(1, 4))
                {
                case 1:
                    Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Hehehe Veo muchas aves :D  ", 0, 6), false);
                    break;

                case 2:
                    roomUserByHabbo.ApplyEffect(70);
                    Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Me siento un panda :D ", 0, 6), false);
                    break;

                default:
                    Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Hehehe voy volando por los aires :D ", 0, 6), false);
                    break;
                }
                Thread.Sleep(2000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "Veo a M00nlight y a Pussy de colores", 0, 6), false);
                Thread.Sleep(2000);
                roomUserByHabbo.ApplyEffect(0);
                Thread.Sleep(2000);
                Room.SendMessage((IServerPacket) new ChatComposer(roomUserByHabbo.VirtualId, "*que Marihuana buena que obtuve*", 0, 6), false);
                Thread.Sleep(2000);
            }
        }
Ejemplo n.º 22
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Escreva um nome de usuário.");
                return;
            }

            GameClient TargetClient = CloudServer.GetGame().GetClientManager().GetClientByUsername(Params[1]);

            if (TargetClient == null)
            {
                Session.SendWhisper("*ERRO* Nome do usuário não foi encontrado.");
                return;
            }

            RoomUser TargetUser  = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            RoomUser SessionUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (TargetUser == null)
            {
                Session.SendWhisper("*ERRO* Nome de utilizador não foi encontrado.");
                return;
            }
            if (Session.GetHabbo().Username == TargetClient.GetHabbo().Username)
            {
                Session.SendWhisper("Você não pode, desculpe :(");
                return;
            }
            if (!((Math.Abs(TargetUser.X - SessionUser.X) >= 2) || (Math.Abs(TargetUser.Y - SessionUser.Y) >= 2)))
            {
                RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Peguei a Uzi e começar a atirar " + Params[1] + " *", 0, 0));
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "*Ahiii, você me mato :( *", 0, 0));
                Session.GetHabbo().Effects().ApplyEffect(580);
                TargetClient.GetHabbo().Effects().ApplyEffect(93);
                TargetUser.Statusses.Add("lay", "1.0 null");
                TargetUser.isLying      = true;
                TargetUser.UpdateNeeded = true;
            }
            else
            {
                TimeSpan span2 = DateTime.Now - CloudServer.lastEvent;
                Session.SendWhisper("Espera " + (1 - span2.Minutes) + " para Atirar denovo.", 0);
                return;
            }
        }
Ejemplo n.º 23
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();

            if (Users.Count > 0)
            {
                foreach (RoomUser U in Users.ToList())
                {
                    if (U == null)
                    {
                        continue;
                    }

                    U.ApplyEffect(108);
                }
            }
        }
Ejemplo n.º 24
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Digite um ID de efeito.", 1);
                return;
            }

            int EnableId = 0;

            if (!int.TryParse(Params[1], out EnableId))
            {
                Session.SendWhisper("Digite um ID de efeito.", 1);
                return;
            }

            List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();

            if (Users.Count <= 1)
            {
                Session.SendWhisper("Você é a única pessoa na sala!", 1);
                return;
            }

            foreach (RoomUser U in Users.ToList())
            {
                if (U == null || U.RidingHorse)
                {
                    continue;
                }

                if (U.CarryItemID > 0)
                {
                    U.CarryItem(0);
                }

                if (U.DanceId > 0)
                {
                    U.DanceId = 0;
                }

                U.ApplyEffect(EnableId);
            }

            Session.Shout("*Altera imediatamente todos os efeitos dos usuários da sala*", 23);
        }
Ejemplo n.º 25
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            var Point = new System.Drawing.Point(Session.GetRoomUser().X, Session.GetRoomUser().Y);

            int             count = 0;
            List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();

            foreach (RoomUser U in Users.ToList())
            {
                if (U == null || Session.GetHabbo().Id == U.UserId)
                {
                    continue;
                }

                var TargetPoint = new System.Drawing.Point(U.X, U.Y);

                if (Point == TargetPoint)
                {
                    continue;
                }

                U.ClearMovement(true);

                if (U.TeleportEnabled)
                {
                    U.MoveTo(Point);
                }
                else
                {
                    U.TeleportEnabled = true;
                    U.MoveTo(Point);
                    U.TeleportEnabled = false;
                }
                count++;
            }

            if (count > 0)
            {
                Session.Shout("*Amarra imediatamente todos usuários da sala para em mim*", 23);
            }
            else
            {
                Session.SendWhisper("Não há mais ninguém na sala para puxar!", 1);
            }
            return;
        }
Ejemplo n.º 26
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            if (Params.Length == 1)
            {
                Session.SendWhisper("Oh, esqueceu-se de introduzir um ID!");
                return;
            }

            int Bubble = 0;

            if (!int.TryParse(Params[1].ToString(), out Bubble))
            {
                Session.SendWhisper("Por favor ultilize um número valido.");
                return;
            }

            if ((Bubble == 33) && !Session.GetHabbo().GetPermissions().HasRight("mod_tool"))
            {
                Session.LogsNotif("Desculpe, apenas os membros da equipe podem usar essas falas", "command_notification");
                return;
            }

            ChatStyle Style = null;

            if (!CloudServer.GetGame().GetChatManager().GetChatStyles().TryGetStyle(Bubble, out Style) || (Style.RequiredRight.Length > 0 && !Session.GetHabbo().GetPermissions().HasRight(Style.RequiredRight)))
            {
                Session.SendWhisper("Bem, você não pode usar esta fala por causa do seu cargo, sorry!");
                return;
            }

            User.LastBubble = Bubble;
            Session.GetHabbo().CustomBubbleId = Bubble;
            Session.SendWhisper("bolha estabelecida: " + Bubble);
            using (IQueryAdapter dbClient = CloudServer.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.runFastQuery("UPDATE `users` SET `bubble_id` = '" + Bubble + "' WHERE `id` = '" + Session.GetHabbo().Id + "' LIMIT 1");
            }
        }
Ejemplo n.º 27
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            User.SuperFastWalking = !User.SuperFastWalking;

            if (User.FastWalking)
            {
                User.FastWalking = false;
            }

            Session.SendWhisper("Walking mode updated.");
        }
Ejemplo n.º 28
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter an effect ID.");
                return;
            }

            int EnableId = 0;

            if (int.TryParse(Params[1], out EnableId))
            {
                if (EnableId == 102 || EnableId == 178)
                {
                    Session.Disconnect();
                    return;
                }

                if (!Session.GetHabbo().GetPermissions().HasCommand("command_override_massenable") && Room.OwnerId != Session.GetHabbo().Id)
                {
                    Session.SendWhisper("You can only use this command in your own room.");
                    return;
                }

                List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();
                if (Users.Count > 0)
                {
                    foreach (RoomUser U in Users.ToList())
                    {
                        if (U == null || U.RidingHorse)
                        {
                            continue;
                        }

                        U.ApplyEffect(EnableId);
                    }
                }
            }
            else
            {
                Session.SendWhisper("Please enter an effect ID.");
                return;
            }
        }
Ejemplo n.º 29
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Por favor introduce el efecto ID.");
                return;
            }

            int EnableId = 0;

            if (int.TryParse(Params[1], out EnableId))
            {
                if (EnableId == 102 || EnableId == 178)
                {
                    Session.Disconnect();
                    return;
                }

                if (!Session.GetHabbo().GetPermissions().HasCommand("command_override_massenable") && Room.OwnerId != Session.GetHabbo().Id)
                {
                    Session.SendWhisper("Este comando lo puedes usar solo si eres el dueño.");
                    return;
                }

                List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();
                if (Users.Count > 0)
                {
                    foreach (RoomUser U in Users.ToList())
                    {
                        if (U == null || U.RidingHorse)
                        {
                            continue;
                        }

                        U.ApplyEffect(EnableId);
                    }
                }
            }
            else
            {
                Session.SendWhisper("Por favor introduce el efecto ID.");
                return;
            }
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Oeps! Je bent vergeten een effect soort in te voeren.", 34);
                return;
            }

            int EnableId = 0;

            if (int.TryParse(Params[1], out EnableId))
            {
                if (EnableId == 102 || EnableId == 178)
                {
                    Session.Disconnect();
                    return;
                }

                if (!Session.GetHabbo().GetPermissions().HasCommand("command_massenable") && Room.CheckRights(Session, true))
                {
                    Session.SendWhisper("Oeps! Je hebt niet de bevoegdheid om deze actie uit te voeren.", 34);
                    return;
                }

                List <RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();
                if (Users.Count > 0)
                {
                    foreach (RoomUser U in Users.ToList())
                    {
                        if (U == null || U.RidingHorse)
                        {
                            continue;
                        }

                        U.ApplyEffect(EnableId);
                    }
                }
            }
            else
            {
                Session.SendWhisper("Oeps! Je bent vergeten een effect soort in te voeren.", 34);
                return;
            }
        }