public void OnTrigger(GameClients.GameClient Session, Item Item, int Request, bool HasRights)
        {
            Room Room;

            if ((Room = Session?.GetHabbo()?.CurrentRoom) != null || Item != null || Item.ExtraData == "1")
            {
                return;
            }

            if (Session.GetHabbo().Id != Item.UserID)
            {
                Session.SendWhisper("Oeps! Dit is niet jouw Pinata - Je kunt dit niet openen!");
                return;
            }

            RoomUser Actor;

            if ((Actor = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id)) == null ||
                Gamemap.TileDistance(Actor.X, Actor.Y, Item.GetX, Item.GetY) > 1)
            {
                return;
            }

            QuasarEnvironment.GetGame().GetPinataManager().ReceiveCrackableReward(Actor, Room, Item);
        }
 public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
 {
     Session.GetHabbo().ReceiveWhispers = !Session.GetHabbo().ReceiveWhispers;
     Session.SendWhisper("Usted " + (Session.GetHabbo().ReceiveWhispers ? "ahora" : "ya no") + " recibe susurros!");
 }
예제 #3
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please provide a reason for muting the room to show to the users.");
                return;
            }

            if (!Room.RoomMuted)
            {
                Room.RoomMuted = true;
            }

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

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

            if (RoomUsers.Count > 0)
            {
                foreach (RoomUser User in RoomUsers)
                {
                    if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().Username == Session.GetHabbo().Username)
                    {
                        continue;
                    }

                    User.GetClient().SendWhisper("This room has been muted because: " + Msg);
                }
            }
        }
        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;
            }

            Habbo Habbo = QuasarEnvironment.GetHabboByUsername(Params[1]);

            if (Habbo == null)
            {
                Session.SendWhisper("Oeps! De gebruiker '" + Params[1] + "' bestaat niet.");
                return;
            }

            if (Habbo.GetPermissions().HasRight("mod_soft_ban") && !Session.GetHabbo().GetPermissions().HasRight("mod_ban_any"))
            {
                Session.SendWhisper("Oeps! Je hebt niet de bevoegdheid om '" + Params[1] + "' een ban te geven.");
                return;
            }

            Double Expire = 0;
            string Hours  = Params[2];

            if (String.IsNullOrEmpty(Hours) || Hours == "perm")
            {
                Expire = QuasarEnvironment.GetUnixTimestamp() + 78892200;
            }
            else
            {
                Expire = (QuasarEnvironment.GetUnixTimestamp() + (Convert.ToDouble(Hours) * 3600));
            }

            string Reason = null;

            if (Params.Length >= 4)
            {
                Reason = CommandManager.MergeParams(Params, 3);
            }
            else
            {
                Reason = "Geen reden (nodig).";
            }

            string Username = Habbo.Username;

            using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.RunQuery("UPDATE `user_info` SET `bans` = `bans` + '1' WHERE `user_id` = '" + Habbo.Id + "' LIMIT 1");
            }

            QuasarEnvironment.GetGame().GetModerationManager().BanUser(Session.GetHabbo().Username, ModerationBanType.USERNAME, Habbo.Username, Reason, Expire);

            GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Username);

            if (TargetClient != null)
            {
                TargetClient.Disconnect();
            }

            Session.SendWhisper("Gelukt! Je heb het account '" + Username + "' verbannen voor " + Hours +
                                " uren met als reden '" + Reason + "'!");
        }
 public override void OnTrigger(GameClients.GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     HabboIM.GetWebSocketManager().getWebSocketByName(Session.GetHabbo().Username).Send("Pokemon");
 }
예제 #6
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 super pull.");
                return;
            }

            if (!Room.SPullEnabled && !Room.CheckRights(Session, true) && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config"))
            {
                Session.SendWhisper("Oops, it appears that the room owner has disabled the ability to use the spull command in here.");
                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, surely you don't want to push yourself!");
                return;
            }

            if (TargetUser.TeleportEnabled)
            {
                Session.SendWhisper("Oops, you cannot push a user whilst they have their teleport mode enabled.");
                return;
            }

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

            if (ThisUser == null)
            {
                return;
            }

            if (ThisUser.SetX - 1 == Room.GetGameMap().Model.DoorX)
            {
                Session.SendWhisper("Please don't pull that user out of the room :(!");
                return;
            }

            if (ThisUser.RotBody % 2 != 0)
            {
                ThisUser.RotBody--;
            }
            if (ThisUser.RotBody == 0)
            {
                TargetUser.MoveTo(ThisUser.X, ThisUser.Y - 1);
            }
            else if (ThisUser.RotBody == 2)
            {
                TargetUser.MoveTo(ThisUser.X + 1, ThisUser.Y);
            }
            else if (ThisUser.RotBody == 4)
            {
                TargetUser.MoveTo(ThisUser.X, ThisUser.Y + 1);
            }
            else if (ThisUser.RotBody == 6)
            {
                TargetUser.MoveTo(ThisUser.X - 1, ThisUser.Y);
            }

            Room.SendPacket(new ChatComposer(ThisUser.VirtualId, "*super pulls " + Params[1] + " to them*", 0, ThisUser.LastBubble));
            return;
        }
예제 #7
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM)
            {
                if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"]))
                {
                }
                else
                {
                    Session.SendWhisper("Você precisa estar logado como staff para usar este comando.");
                    return;
                }
            }
            if (Params.Length == 1)
            {
                Session.SendWhisper("Digite o nome de usuário do usuário que deseja Ban IP e banar conta.");
                return;
            }

            Habbo Habbo = BiosEmuThiago.GetHabboByUsername(Params[1]);

            if (Habbo == null)
            {
                Session.SendWhisper("Se produjo un error mientras que la búsqueda de usuario en la base de datos.");
                return;
            }

            if (Habbo.GetPermissions().HasRight("mod_tool") && !Session.GetHabbo().GetPermissions().HasRight("mod_ban_any"))
            {
                Session.SendWhisper("Uau, você não pode proibir o usuário.");
                return;
            }

            String IPAddress = String.Empty;
            Double Expire    = BiosEmuThiago.GetUnixTimestamp() + 78892200;
            string Username  = Habbo.Username;

            using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.runFastQuery("UPDATE `user_info` SET `bans` = `bans` + '1' WHERE `user_id` = '" + Habbo.Id + "' LIMIT 1");

                dbClient.SetQuery("SELECT `ip_last` FROM `users` WHERE `id` = '" + Habbo.Id + "' LIMIT 1");
                IPAddress = dbClient.getString();
            }

            string Reason = null;

            if (Params.Length >= 3)
            {
                Reason = CommandManager.MergeParams(Params, 2);
            }
            else
            {
                Reason = "Nenhuma razão especificada.";
            }

            if (!string.IsNullOrEmpty(IPAddress))
            {
                BiosEmuThiago.GetGame().GetModerationManager().BanUser(Session.GetHabbo().Username, ModerationBanType.IP, IPAddress, Reason, Expire);
            }
            BiosEmuThiago.GetGame().GetModerationManager().BanUser(Session.GetHabbo().Username, ModerationBanType.USERNAME, Habbo.Username, Reason, Expire);

            GameClient TargetClient = BiosEmuThiago.GetGame().GetClientManager().GetClientByUsername(Username);

            if (TargetClient != null)
            {
                TargetClient.Disconnect();
            }


            Session.SendWhisper("Sucesso, você tem IP e a conta baniu o usuário '" + Username + "' pelo motivo '" + Reason + "'!");
        }
예제 #8
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.");
        }
예제 #9
0
        internal void SerializeClub(ServerPacket Message, GameClients.GameClient Session)
        {
            Message.WriteInteger(Id);
            Message.WriteString(Name);
            Message.WriteBoolean(false);
            Message.WriteInteger(CostCredits);
            //Message.WriteInteger((CostGOTWPoints > 0) ? CostGOTWPoints : 0);
            //Message.WriteInteger((CostGOTWPoints > 0) ? 103 : 0);
            Message.WriteInteger((CostDiamonds > 0) ? CostDiamonds : CostDiamonds);
            Message.WriteInteger((CostDiamonds > 0) ? 105 : 0);
            Message.WriteBoolean(true); // don't know
            int Days   = 0;
            int Months = 0;

            if (GetBaseItem(ItemId).InteractionType == InteractionType.club_1_month || GetBaseItem(ItemId).InteractionType == InteractionType.club_3_month || GetBaseItem(ItemId).InteractionType == InteractionType.club_6_month || GetBaseItem(ItemId).InteractionType == InteractionType.club_vip)
            {
                switch (GetBaseItem(ItemId).InteractionType)
                {
                case InteractionType.club_1_month:
                    Months = 1;
                    break;

                case InteractionType.club_vip:
                    Months = 1;
                    break;

                case InteractionType.club_3_month:
                    Months = 3;
                    break;

                case InteractionType.club_6_month:
                    Months = 6;
                    break;
                }

                Days = 31 * Months;
            }

            DateTime future = DateTime.Now;

            if (PageID == 699 && Session.GetHabbo().GetClubManager().HasSubscription("habbo_vip"))
            {
                double Expire        = Session.GetHabbo().GetClubManager().GetSubscription("habbo_vip").ExpireTime;
                double TimeLeft      = Expire - NeonEnvironment.GetUnixTimestamp();
                int    TotalDaysLeft = (int)Math.Ceiling(TimeLeft / 86400);
                future = DateTime.Now.AddDays(TotalDaysLeft);
            }
            else if (Session.GetHabbo().GetClubManager().HasSubscription("club_vip"))
            {
                double Expire        = Session.GetHabbo().GetClubManager().GetSubscription("club_vip").ExpireTime;
                double TimeLeft      = Expire - NeonEnvironment.GetUnixTimestamp();
                int    TotalDaysLeft = (int)Math.Ceiling(TimeLeft / 86400);
                future = DateTime.Now.AddDays(TotalDaysLeft);
            }

            future = future.AddDays(Days);

            Message.WriteInteger(Months);       // months
            Message.WriteInteger(Days);         // days
            Message.WriteBoolean(true);
            Message.WriteInteger(Days);         // wtf
            Message.WriteInteger(future.Year);  // year
            Message.WriteInteger(future.Month); // month
            Message.WriteInteger(future.Day);   // day
        }
예제 #10
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Por favor, introduzca un mensaje para enviar.");
                return;
            }

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

            CloudServer.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("${mod.alert.ha.title}", Message + "\n\n" + "- " + Session.GetHabbo().Username + "\n", "", ""));
            return;
        }
예제 #11
0
 public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
 {
     Session.GetHabbo().IgnorePublicWhispers = !Session.GetHabbo().IgnorePublicWhispers;
     Session.SendWhisper("Usted " + (Session.GetHabbo().IgnorePublicWhispers ? "ahora" : "ya no") + " Ignora los susurros de otros!");
 }
예제 #12
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length != 3)
            {
                Session.SendWhisper("Você deve digitar o nome de usuário e o valor que você deseja dar a eles.", 1);
                return;
            }

            var TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

            if (TargetClient == null)
            {
                Session.SendWhisper("Este usuário não foi encontrado! Talvez ele esteja offline.", 1);
                return;
            }

            if (TargetClient.GetHabbo() == null || TargetClient.GetRoomUser() == null)
            {
                Session.SendWhisper("Este usuário não foi encontrado! Talvez ele esteja offline.", 1);
                return;
            }

            int Amount;

            if (int.TryParse(Params[2], out Amount))
            {
                TargetClient.GetHabbo().Duckets += Amount;
                TargetClient.GetHabbo().UpdateDucketsBalance();

                if (TargetClient != Session)
                {
                    TargetClient.SendWhisper("Você acabou de ser premiado com " + String.Format("{0:N0}", Amount) + " créditos por telefone de " + Session.GetHabbo().Username + ".", 1);
                    Session.SendWhisper("Você acabou de dar " + TargetClient.GetHabbo().Username + " " + String.Format("{0:N0}", Amount) + " créditos de telefone colocando seu total em " + String.Format("{0:N0}", TargetClient.GetHabbo().Duckets) + ".", 1);
                }
                else
                {
                    Session.SendWhisper("Você acabou de dar " + String.Format("{0:N0}", Amount) + " crédito por telefone colocando seu total em " + String.Format("{0:N0}", TargetClient.GetHabbo().Duckets) + ".", 1);
                }
            }
            else if (Params[2] == "limpar" || Params[2] == "remover" || Params[2] == "retirar")
            {
                TargetClient.GetHabbo().Duckets = 0;
                TargetClient.GetHabbo().UpdateDucketsBalance();

                TargetClient.SendWhisper("Todos seus créditos de celular foi retirado por " + Session.GetHabbo().Username + ".", 1);
                Session.SendWhisper("Você acabou de remover todos os créditos de telefone de " + TargetClient.GetHabbo().Username + ".", 1);
            }
            else
            {
                Session.SendWhisper("Por favor insira um número válido, ou use ':creditoscel (usuário) remover' para tirar todo o seu crédito de telefone.", 1);
            }
        }
예제 #13
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'd like to IP ban & account ban.");
                return;
            }

            Habbo Habbo = PlusEnvironment.GetHabboByUsername(Params[1]);

            if (Habbo == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user in the database.");
                return;
            }

            if (Habbo.GetPermissions().HasRight("mod_tool") && !Session.GetHabbo().GetPermissions().HasRight("mod_ban_any"))
            {
                Session.SendWhisper("Oops, you cannot ban that user.");
                return;
            }

            String IPAddress = String.Empty;
            Double Expire    = PlusEnvironment.GetUnixTimestamp() + 78892200;
            string Username  = Habbo.Username;

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.RunQuery("UPDATE `user_info` SET `bans` = `bans` + '1' WHERE `user_id` = '" + Habbo.Id + "' LIMIT 1");

                dbClient.SetQuery("SELECT `ip_last` FROM `users` WHERE `id` = '" + Habbo.Id + "' LIMIT 1");
                IPAddress = dbClient.GetString();
            }

            string Reason = null;

            if (Params.Length >= 3)
            {
                Reason = CommandManager.MergeParams(Params, 2);
            }
            else
            {
                Reason = "No reason specified.";
            }

            if (!string.IsNullOrEmpty(IPAddress))
            {
                PlusEnvironment.GetGame().GetModerationManager().BanUser(Session.GetHabbo().Username, ModerationBanType.IP, IPAddress, Reason, Expire);
            }
            PlusEnvironment.GetGame().GetModerationManager().BanUser(Session.GetHabbo().Username, ModerationBanType.Username, Habbo.Username, Reason, Expire);

            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Username);

            if (TargetClient != null)
            {
                TargetClient.Disconnect();
            }


            Session.SendWhisper("Success, you have IP and account banned the user '" + Username + "' for '" + Reason + "'!");
        }
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Oeps! Je bent vergeten een geldig effect in te vullen.");
                return;
            }

            if (!Room.EnablesEnabled && !Session.GetHabbo().GetPermissions().HasRight("mod_tool"))
            {
                Session.SendWhisper("Oeps! Je kan in deze kamer geen effecten dragen.");
                return;
            }

            RoomUser ThisUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);

            if (ThisUser == null)
            {
                return;
            }

            if (ThisUser.RidingHorse)
            {
                Session.SendWhisper("Oeps! Je kan dit effect niet doen terwijl je aan het paardrijden bent.");
                return;
            }
            else if (ThisUser.Team != TEAM.NONE)
            {
                return;
            }
            else if (ThisUser.isLying)
            {
                return;
            }

            int EffectId = 0;

            if (!int.TryParse(Params[1], out EffectId))
            {
                return;
            }

            if (EffectId > int.MaxValue || EffectId < int.MinValue)
            {
                return;
            }

            if ((EffectId == 102 || EffectId == 593 || EffectId == 598) && !Session.GetHabbo().GetPermissions().HasRight("mod_tool"))
            {
                Session.SendWhisper("Oeps! Deze effecten zijn enkel beschikbaar voor Habbis Personeel.");
                return;
            }

            if (EffectId == 178 && Session.GetHabbo()._hulptroepen < 4 || EffectId == 178 && Session.GetHabbo()._hulptroepen > 3)
            {
                Session.SendWhisper("Oeps! Dit effect is enkel beschikbaar voor Habbis Ambassadeurs.");
                return;
            }
            if (EffectId == 599 && Session.GetHabbo()._hulptroepen < 2 || EffectId == 599 && Session.GetHabbo()._hulptroepen > 2)
            {
                Session.SendWhisper("Oeps! Dit effect is enkel beschikbaar voor Habbis Bouwers.");
                return;
            }

            if (EffectId == 594 && Session.GetHabbo()._hulptroepen < 3 || EffectId == 599 && Session.GetHabbo()._hulptroepen > 3)
            {
                Session.SendWhisper("Oeps! Dit effect is enkel beschikbaar voor Habbis Palers.");
                return;
            }

            if (EffectId == 596 && Session.GetHabbo()._hulptroepen < 1 || EffectId == 596 && Session.GetHabbo()._hulptroepen > 1)
            {
                Session.SendWhisper("Oeps! Dit effect is enkel beschikbaar voor Habbis Entertainers.");
                return;
            }

            if (EffectId == 592 && !Room.CheckRights(Session, true))
            {
                Session.SendWhisper("Oeps! Dit effect is enkel beschikbaar voor Habbis die rechten hebben in de kamer.");
                return;
            }

            Session.GetHabbo().Effects().ApplyEffect(EffectId);
        }
예제 #15
0
        public void Execute(GameClients.GameClient Session, Room Room, string[] Params)
        {
            RoomUser RoomUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (RoomUser == null)
            {
                return;
            }

            if (!Room.PetMorphsAllowed)
            {
                Session.SendWhisper("Oeps! Je kan in deze kamer niet transformeren.", 34);
                if (Session.GetHabbo().PetId > 0)
                {
                    Session.SendWhisper("Oeps! Je hebt deze gedaante al.", 34);
                    //Change the users Pet Id.
                    Session.GetHabbo().PetId = 0;

                    //Quickly remove the old user instance.
                    Room.SendMessage(new UserRemoveComposer(RoomUser.VirtualId));

                    //Add the new one, they won't even notice a thing!!11 8-)
                    Room.SendMessage(new UsersComposer(RoomUser));
                }
                return;
            }

            if (Params.Length == 1)
            {
                Session.SendWhisper("Oeps! Je bent vergeten een waarde in te vullen. (Links is een lijst geopend met geldige transformatie alternatieven.)", 34);
                Session.SendMessage(new MassEventComposer("habbopages/transformeren.txt"));
                return;
            }

            if (Params[1].ToString().ToLower() == "lijst")
            {
                Session.SendMessage(new MassEventComposer("habbopages/transformeren.txt"));
                return;
            }

            int TargetPetId = GetPetIdByString(Params[1].ToString());

            if (TargetPetId == 0)
            {
                Session.SendWhisper("Oeps! Je hebt een ongeldige waarde ingevoerd. (Links is een lijst geopend met geldige transformatie alternatieven.)", 34);
                Session.SendMessage(new MassEventComposer("habbopages/transformeren.txt"));
                return;
            }

            //Change the users Pet Id.
            Session.GetHabbo().PetId = (TargetPetId == -1 ? 0 : TargetPetId);

            //Quickly remove the old user instance.
            Room.SendMessage(new UserRemoveComposer(RoomUser.VirtualId));

            //Add the new one, they won't even notice a thing!!11 8-)
            Room.SendMessage(new UsersComposer(RoomUser));

            //Tell them a quick message.
            if (Session.GetHabbo().PetId == 60)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_0", "                             Je bent nu een Hond .", ""));
            }
            else if (Session.GetHabbo().PetId == 1)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_1", "                             Je bent nu een Kat.", ""));
            }
            else if (Session.GetHabbo().PetId == 2)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_2", "                             Je bent nu een Terriër.", ""));
            }
            else if (Session.GetHabbo().PetId == 3)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_3", "                             Je bent nu een Krokodil.", ""));
            }
            else if (Session.GetHabbo().PetId == 4)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_4", "                             Je bent nu een Beer.", ""));
            }
            else if (Session.GetHabbo().PetId == 5)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_5", "                             Je bent nu een Varken.", ""));
            }
            else if (Session.GetHabbo().PetId == 6)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_6", "                             Je bent nu een Leeuw.", ""));
            }
            else if (Session.GetHabbo().PetId == 7)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_7", "                             Je bent nu een Neushoorn.", ""));
            }
            else if (Session.GetHabbo().PetId == 8)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_8", "                             Je bent nu een Spin.", ""));
            }
            else if (Session.GetHabbo().PetId == 9)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_9", "                             Je bent nu een Schildpad.", ""));
            }
            else if (Session.GetHabbo().PetId == 10)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_10", "                             Je bent nu een Kuiken.", ""));
            }
            else if (Session.GetHabbo().PetId == 11)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_11", "                             Je bent nu een Kikker.", ""));
            }
            else if (Session.GetHabbo().PetId == 12)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_12", "                             Je bent nu een Draak.", ""));
            }
            else if (Session.GetHabbo().PetId == 13)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_13", "                             Je bent nu de Slendermen.", ""));
            }
            else if (Session.GetHabbo().PetId == 14)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_14", "                             Je bent nu een Aap.", ""));
            }
            else if (Session.GetHabbo().PetId == 15)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_15", "                             Je bent nu een Paard.", ""));
            }
            else if (Session.GetHabbo().PetId == 16)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_16", "                             Je bent nu een Monsterplant.", ""));
            }
            else if (Session.GetHabbo().PetId == 17)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_17", "                             Je bent nu een Goedaardig Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 18)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_18", "                             Je bent nu een Slechtaardig Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 19)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_19", "                             Je bent nu een Depressief Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 20)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_20", "                             Je bent nu een Zachtaardig Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 21)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_21", "                             Je bent nu een Goedaardige Duif.", ""));
            }
            else if (Session.GetHabbo().PetId == 22)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_22", "                             Je bent nu een Slechtaardige Duif.", ""));
            }
            else if (Session.GetHabbo().PetId == 23)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_23", "                             Je bent nu een Demoon Aap.", ""));
            }
            else if (Session.GetHabbo().PetId == 24)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_24", "                             Je bent nu een Beren Pup.", ""));
            }
            else if (Session.GetHabbo().PetId == 25)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_25", "                             Je bent nu een Terriër Pup.", ""));
            }
            else if (Session.GetHabbo().PetId == 26)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_26", "                             Je bent nu een Dwerg.", ""));
            }
            else if (Session.GetHabbo().PetId == 27)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_27", "                             Je bent nu een Baby.", ""));
            }
            else if (Session.GetHabbo().PetId == 28)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_28", "                             Je bent nu een Kitten.", ""));
            }
            else if (Session.GetHabbo().PetId == 29)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_29", "                             Je bent nu een Honden Pup.", ""));
            }
            else if (Session.GetHabbo().PetId == 30)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_30", "                             Je bent nu een Varken Pup.", ""));
            }
            else if (Session.GetHabbo().PetId == 31)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_31", "                             Je bent nu een Oempa Loempa.", ""));
            }
            else if (Session.GetHabbo().PetId == 32)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_32", "                             Je bent nu een Steen.", ""));
            }
            else if (Session.GetHabbo().PetId == 33)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_33", "                             Je bent nu een Pterodactylus.", ""));
            }
            else if (Session.GetHabbo().PetId == 34)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_34", "                             Je bent nu een Velociraptor.", ""));
            }
            else if (Session.GetHabbo().PetId == 35)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_35", "                             Je bent nu een Wolf.", ""));
            }
            else if (Session.GetHabbo().PetId == 36)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_36", "                             Je bent nu een Monster Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 37)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_37", "                             Je bent nu Pickachu.", ""));
            }
            else if (Session.GetHabbo().PetId == 38)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_38", "                             Je bent nu een Pinguin.", ""));
            }
            else if (Session.GetHabbo().PetId == 39)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_39", "                             Je bent nu Mario.", ""));
            }
            else if (Session.GetHabbo().PetId == 40)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_40", "                             Je bent nu een Olifant.", ""));
            }
            else if (Session.GetHabbo().PetId == 41)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_41", "                             Je bent nu een Spookachtig Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 42)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_42", "                             Je bent nu een Goudkleurig Konijn.", ""));
            }
            else if (Session.GetHabbo().PetId == 43)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_43", "                             Je bent nu een Roze Mewtwo.", ""));
            }
            else if (Session.GetHabbo().PetId == 44)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_44", "                             Je bent nu een Entei.", ""));
            }
            else if (Session.GetHabbo().PetId == 45)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_45", "                             Je bent nu een Blauwe Mewtwo.", ""));
            }
            else if (Session.GetHabbo().PetId == 46)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_46", "                             Je bent nu een Cavia.", ""));
            }
            else if (Session.GetHabbo().PetId == 47)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_47", "                             Je bent nu een Uil.", ""));
            }
            else if (Session.GetHabbo().PetId == 48)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_48", "                             Je bent nu een Goude Mewtwo.", ""));
            }
            else if (Session.GetHabbo().PetId == 49)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_49", "                             Je bent nu een Eend.", ""));
            }
            else if (Session.GetHabbo().PetId == 50)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_50", "                             Je bent nu een Baby.", ""));
            }
            else if (Session.GetHabbo().PetId == 51)
            {
                Session.SendMessage(RoomNotificationComposer.SendBubble("bubble_transformeren_51", "                             Je bent nu een Baby.", ""));
            }
        }
예제 #16
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Por favor, digite o usuário que deseja premiar!");
                return;
            }

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

            if (Target == null)
            {
                Session.SendWhisper("Opa, não foi possível encontrar esse usuário!");
                return;
            }

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

            if (TargetUser == null)
            {
                Session.SendWhisper("Usuário não encontrado! Talvez ele não esteja online ou nesta sala.");
                return;
            }

            if (Target.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("Você não pode se premiar!");
                return;
            }

            if (Params.Length != 3)
            {
                Session.SendWhisper("Por favor, indique o código do emblema que gostaria de dar!");
                return;
            }

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

            if (ThisUser == null)
            {
                return;
            }
            else
            {
                PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("rank", "message", "O usuário " + TargetUser.GetUsername() + " ganhou o evento no HabboRPG!"));
                Target.GetHabbo().Credits = Target.GetHabbo().Credits += 500;
                Target.SendMessage(new CreditBalanceComposer(Target.GetHabbo().Credits));
                if (Session.GetHabbo().Id != Session.GetHabbo().Id)
                {
                    Target.SendWhisper("Parabens você ganhou um evento!");
                }
                Session.SendWhisper("Concedido com sucesso " + 500 + " crédito(s) ao " + Target.GetHabbo().Username + "!");
                Target.SendMessage(new RoomNotificationComposer("goldapple", "message", "Você ganhou " + 500 + " crédito(s) parabéns " + Target.GetHabbo().Username + "!"));

                Target.GetHabbo().Duckets += 500;
                Target.SendMessage(new HabboActivityPointNotificationComposer(Target.GetHabbo().Duckets, 500));
                if (Target.GetHabbo().Id != Session.GetHabbo().Id)
                {
                    Session.SendWhisper("Concedido com sucesso " + 500 + " duckets(s) ao " + Target.GetHabbo().Username + "!");
                }
                Target.SendMessage(new RoomNotificationComposer("coracao2", "message", "Você ganhou " + 500 + " ducket(s)! parabéns " + Target.GetHabbo().Username + "!"));

                Target.GetHabbo().Diamonds += 5;
                Target.SendMessage(new HabboActivityPointNotificationComposer(Target.GetHabbo().Diamonds, 5, 5));
                if (Target.GetHabbo().Id != Session.GetHabbo().Id)
                {
                    Session.SendWhisper("Concedido com sucesso " + 5 + " diamantes(s) ao " + Target.GetHabbo().Username + "!");
                }

                if (!Target.GetHabbo().GetBadgeComponent().HasBadge(Params[2]))
                {
                    Target.GetHabbo().GetBadgeComponent().GiveBadge(Params[2], true, Target);
                    if (Target.GetHabbo().Id != Session.GetHabbo().Id)
                    {
                        Target.SendMessage(new RoomNotificationComposer("game", "message", "Você acaba de receber um emblema!"));
                    }
                }
                else
                {
                    Session.SendWhisper("Uau, esse usuário já possui este emblema (" + Params[2] + ") !");
                }

                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("Acabou o evento!");

                    Room.GetRoomUserManager().RemoveUserFromRoom(RoomUser.GetClient(), true, false);
                }
                Session.SendWhisper("Você deu com sucesso emblema " + Params[2] + "!");
                Session.SendWhisper("Expulsa com sucesso a todos os usuários da sala.");
                Session.SendWhisper("Você acabou de finalizar um evento.");
            }
        }
예제 #17
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Escribe el mensaje que deseas enviar.");
                return;
            }

            DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);

            dtDateTime = dtDateTime.AddSeconds(RavenEnvironment.GetUnixTimestamp()).ToLocalTime();

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

            RavenEnvironment.GetGame().GetClientManager().StaffAlert(new MOTDNotificationComposer("[STAFF]\r[" + dtDateTime + "]\r\r" + Message + "\r\r - " + Session.GetHabbo().Username + " [" + Session.GetHabbo().Rank + "]"));
            return;
        }
예제 #18
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            #region Conditions
            if (Params.Length == 1 && Params[0].ToLower() != "explodir" && Params[0].ToLower() != "reparar")
            {
                if (Params[0].ToLower() == "plantar")
                {
                    Session.SendWhisper("Digite o ID da planta que você deseja usar! Digite ':agricultura' para ver os IDs da planta.", 1);
                    return;
                }
                else
                {
                    Session.SendWhisper("Digite o item que deseja colocar para baixo!", 1);
                    return;
                }
            }

            string Type;
            if (Params[0].ToLower() == "explodir")
            {
                Type = "dinamite";
            }
            else if (Params[0].ToLower() == "reparar")
            {
                Type = "grade";
            }
            else if (Params[0].ToLower() == "plantar")
            {
                Type = "planta";
            }
            else
            {
                Type = Params[1].ToLower();
            }
            #endregion

            switch (Type)
            {
                #region Dynamite
            case "dynamite":
            case "dinamite":
            {
                if (Session.GetRoleplay().Dynamite < 1)
                {
                    Session.SendWhisper("Você não tem nenhuma dinamite para colocar!", 1);
                    return;
                }

                if (JailbreakManager.JailbreakActivated)
                {
                    Session.SendWhisper("Uma fuga da prisão já está em andamento!", 1);
                    JailbreakManager.JailbreakActivated = false;
                    return;
                }

                int    RoomId = Convert.ToInt32(RoleplayData.GetData("jail", "outsideroomid"));
                int    X      = Convert.ToInt32(RoleplayData.GetData("jailbreak", "xposition"));
                int    Y      = Convert.ToInt32(RoleplayData.GetData("jailbreak", "yposition"));
                double Z      = Convert.ToDouble(RoleplayData.GetData("jailbreak", "zposition"));
                int    Rot    = Convert.ToInt32(RoleplayData.GetData("jailbreak", "rotation"));

                if (Session.GetRoomUser() == null)
                {
                    return;
                }

                if (Room.Id != RoomId)
                {
                    Session.SendWhisper("Você não está fora da prisão para iniciar uma fuga!", 1);
                    return;
                }

                Item BTile = Room.GetRoomItemHandler().GetFloor.FirstOrDefault(x => x.GetBaseItem().ItemName.ToLower() == "bb_rnd_tele" && x.Coordinate == Session.GetRoomUser().Coordinate);

                if (BTile == null)
                {
                    Session.SendWhisper("Você deve estar parado em um tele banzai da prisao para começar a explosão e causar a fuga!", 1);
                    return;
                }

                List <GameClient> CurrentJailedUsers = PlusEnvironment.GetGame().GetClientManager().GetClients.Where(x => x != null && x.GetHabbo() != null && x.GetRoleplay() != null && x.GetRoleplay().IsJailed).ToList();

                if (CurrentJailedUsers == null || CurrentJailedUsers.Count <= 0)
                {
                    Session.SendWhisper("Não há ninguém na prisão agora!", 1);
                    return;
                }

                Session.GetRoleplay().Dynamite--;
                JailbreakManager.JailbreakActivated = true;
                Session.Shout("*Coloca uma dinamite na parede, tentando explodir e libertar os prisioneiros*", 4);

                if (!Session.GetRoleplay().WantedFor.Contains("fugindo da prisão"))
                {
                    Session.GetRoleplay().WantedFor = Session.GetRoleplay().WantedFor + "fugindo da prisão, ";
                }

                Item Item  = RoleplayManager.PlaceItemToRoom(null, 6088, 0, X, Y, Z, Rot, false, Room.Id, false, "0");
                Item Item2 = RoleplayManager.PlaceItemToRoom(null, 3011, 0, X, Y, 0, Rot, false, Room.Id, false, "0");

                object[] Items = { Session, Item, Item2 };
                RoleplayManager.TimerManager.CreateTimer("dinamite", 500, false, Items);
                break;
            }
                #endregion

                #region Fence Repair
            case "repair":
            case "reparar":
            {
                if (!JailbreakManager.FenceBroken)
                {
                    Session.SendWhisper("Não há grade que precise de reparo!", 1);
                    return;
                }

                if (!GroupManager.HasJobCommand(Session, "guide") && !Session.GetHabbo().GetPermissions().HasRight("corporation_rights"))
                {
                    Session.SendWhisper("Apenas um policial tem o equipamento certo para reparar essa grade!", 1);
                    return;
                }

                if (!Session.GetRoleplay().IsWorking&& !Session.GetHabbo().GetPermissions().HasRight("corporation_rights"))
                {
                    Session.SendWhisper("Você deve estar trabalhando para reparar essa grade!", 1);
                    return;
                }

                if (Session.GetRoleplay().TimerManager.ActiveTimers.ContainsKey("reparar"))
                {
                    Session.SendWhisper("Você já está reparando a grade!", 1);
                    return;
                }

                Item BTile = Room.GetRoomItemHandler().GetFloor.FirstOrDefault(x => x.GetBaseItem().ItemName.ToLower() == "bb_rnd_tele" && x.Coordinate == Session.GetRoomUser().Coordinate);

                if (BTile == null)
                {
                    Session.SendWhisper("Você deve estar parado em um tele banzai para começar a reparar a grade!", 1);
                    return;
                }

                Session.Shout("*Comece a reparar a grade*", 4);
                Session.SendWhisper("Você tem 2 minutos até você reparar essa grade!", 1);
                Session.GetRoleplay().TimerManager.CreateTimer("reparar", 1000, false, BTile.Id);

                if (Session.GetRoomUser().CurrentEffect != 59)
                {
                    Session.GetRoomUser().ApplyEffect(59);
                }
                break;
            }
                #endregion

                #region Plant
            case "plant":
            case "plantar":
            {
                int Id;
                if (!int.TryParse(Params[1], out Id))
                {
                    Session.SendWhisper("Digite o ID da planta que você deseja usar! Digite ':agricultura' para ver os IDs das plantas.", 1);
                    break;
                }

                if (!Session.GetRoleplay().FarmingStats.HasSeedSatchel)
                {
                    Session.SendWhisper("Você não tem uma bolsa de sementes para transportar sementes!", 1);
                    return;
                }

                if (Id == 0)
                {
                    Session.SendWhisper("Você guardou todas as suas sementes de volta ao seu saco de sementes", 1);
                    Session.GetRoleplay().FarmingItem = null;
                    break;
                }

                FarmingItem Item = FarmingManager.GetFarmingItem(Id);

                ItemData Furni;

                if (Item.BaseItem == null)
                {
                    Session.SendWhisper("Desculpe, mas este ID da planta não existe! Digite ':agricultura' para ver os IDs das planta.", 1);
                    return;
                }

                if (!PlusEnvironment.GetGame().GetItemManager().GetItem(Item.BaseItem, out Furni) || Item == null)
                {
                    Session.SendWhisper("Desculpe, mas este ID da planta não existe! Digite ':agricultura' para ver os IDs das planta.", 1);
                    return;
                }

                if (Item.LevelRequired > Session.GetRoleplay().FarmingStats.Level)
                {
                    Session.SendWhisper("Desculpe, mas você não tem um nível de agricultura alto suficiente para esta semente!", 1);
                    return;
                }

                Session.GetRoleplay().FarmingItem = Item;

                int Amount;
                if (FarmingManager.GetSatchelAmount(Session, false, out Amount))
                {
                    if (Amount <= 0)
                    {
                        Session.SendWhisper("Você não tem nenhuma semente para plantar! Compre alguma no supermercado.", 1);
                        Session.GetRoleplay().FarmingItem = null;
                        break;
                    }
                    else
                    {
                        Session.SendWhisper("Você preparou sua semente " + Amount + " " + Furni.PublicName + " para a plantação!", 1);
                        break;
                    }
                }
                else
                {
                    Session.SendWhisper("Você não tem sementes para plantar! Compre alguma no supermercado.", 1);
                    Session.GetRoleplay().FarmingItem = null;
                    break;
                }
            }
                #endregion

                #region Default
            default:
            {
                Session.SendWhisper("Desculpe, mas este item não pode ser encontrado!", 1);
                break;
            }
                #endregion
            }
        }
예제 #19
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("@green@ Introduce el nombre del usuario que deseas quemar. { :quemar NOMBRE }");
                return;
            }

            //if (!Room.QuemarEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config"))
            //{
            //    Session.SendWhisper("@red@ Oops, el dueño de la sala no permite que quemes a otros en su sala.");
            //    return;
            //}

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

            if (TargetClient == null)
            {
                Session.SendWhisper("Ocurrió un problema, al parecer el usuario no se encuentra online o usted no escribio bien el nombre");
                return;
            }

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

            if (TargetUser == null)
            {
                Session.SendWhisper("@red@ Ocurrió un error, escribe correctamente el nombre, el usuario NO se encuentra online o en la sala.");
                return;
            }

            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("@red@ No está mal que intentes quemarte a ti mismo... pero puede parecer extraño y pensarán que estás loco...");
                return;
            }

            if (TargetUser.TeleportEnabled)
            {
                Session.SendWhisper("Oops, No puedes quemar a alguien si usas teleport.");
                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, "@red@ *¡Empiezo a quemar a " + Params[1] + "!", 0, ThisUser.LastBubble));
                ThisUser.ApplyEffect(5);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "@cyan@ ¡Ayuda! ¡Me están quemando!", 0, ThisUser.LastBubble));
                TargetUser.ApplyEffect(25);
            }
            else
            {
                Session.SendWhisper("@green@ ¡Oops, " + Params[1] + " no está lo suficientemente cerca!");
            }
        }
예제 #20
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Opa, você esqueceu de inserir um nome de usuário!", 1);
                return;
            }

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

            if (TargetClient == null)
            {
                Session.SendWhisper("Ocorreu um erro ao tentar encontrar esse usuário, talvez ele esteja offline.", 1);
                return;
            }

            if (Session.GetRoleplay().TryGetCooldown("addrecompensa"))
            {
                return;
            }

            if (Session.GetRoleplay().Level < 3)
            {
                Session.SendWhisper("Você deve ser ao menos nível 3 para definir recompensas!", 1);
                return;
            }

            if (TargetClient.GetRoleplay().Level < 3)
            {
                Session.SendWhisper(TargetClient.GetHabbo().Username + " O nível é muito baixo para definir uma recompensa! Ele deve ser pelo menos nível 3!", 1);
                return;
            }

            if (TargetClient.GetRoleplay().IsDead)
            {
                Session.SendWhisper("Você não pode definir uma recompensa em alguém que está morto!", 1);
                return;
            }

            if (TargetClient.GetRoleplay().IsJailed)
            {
                Session.SendWhisper("Você não pode definir uma recompensa em alguém que está preso!", 1);
                return;
            }

            if (TargetClient == Session)
            {
                Session.SendWhisper("Você não pode definir uma recompensa em si mesmo!", 1);
                return;
            }

            var BountyList = BountyManager.BountyUsers;
            int Amount;

            if (Params.Length < 3)
            {
                Session.SendWhisper("Comando inválido! Use :addrecompensa <usuário> <quantidade do pagamento>", 1);
                return;
            }

            if (int.TryParse((Params[2]), out Amount))
            {
                if (BountyList.ContainsKey(TargetClient.GetHabbo().Id))
                {
                    Session.SendWhisper(TargetClient.GetHabbo().Username + " já está na lista de recompensas!", 1);
                    return;
                }

                if (Amount <= 0)
                {
                    Session.SendWhisper("Por favor insira uma quantia válida de dinheiro!", 1);
                    return;
                }

                if (Amount < 50)
                {
                    Session.SendWhisper("O valor mínimo de recompensa é de R$50!", 1);
                    return;
                }

                if (Session.GetHabbo().Credits < Amount)
                {
                    Session.SendWhisper("Você não tem R$" + String.Format("{0:N0}", Amount) + " para pagar a recompensas!", 1);
                    return;
                }

                Bounty NewBounty = new Bounty(TargetClient.GetHabbo().Id, Session.GetHabbo().Id, Amount, PlusEnvironment.GetUnixTimestamp(), PlusEnvironment.GetUnixTimestamp() + 3600);
                BountyManager.AddBounty(NewBounty);

                Session.Shout("*Coloca uma recompensa de R$" + String.Format("{0:N0}", Amount) + " para quem matar o vagabundo " + TargetClient.GetHabbo().Username + "*", 4);

                Session.GetHabbo().Credits -= Amount;
                Session.GetHabbo().UpdateCreditsBalance();
                Session.GetRoleplay().CooldownManager.CreateCooldown("addrecompensa", 1000, 5);
            }
            else
            {
                Session.SendWhisper("Por favor insira um número válido!", 1);
            }
        }
예제 #21
0
 public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
 {
     Session.GetHabbo().AllowConsoleMessages = !Session.GetHabbo().AllowConsoleMessages;
     Session.SendWhisper("Usted " + (Session.GetHabbo().AllowConsoleMessages == true ? "ahora" : "ya no") + " acepta mensajes en su consola de amigos.");
 }
예제 #22
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("You must inculde a thing to update, e.g. :update catalog");
                return;
            }

            string UpdateVariable = Params[1];

            switch (UpdateVariable.ToLower())
            {
            case "cata":
            case "catalog":
            case "catalogue":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_catalog"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_catalog' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetCatalog().Init(PlusEnvironment.GetGame().GetItemManager());
                PlusEnvironment.GetGame().GetClientManager().SendPacket(new CatalogUpdatedComposer());
                Session.SendWhisper("Catalogue successfully updated.");
                break;
            }

            case "items":
            case "furni":
            case "furniture":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_furni"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_furni' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetItemManager().Init();
                Session.SendWhisper("Items successfully updated.");
                break;
            }

            case "models":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_models"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_models' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetRoomManager().LoadModels();
                Session.SendWhisper("Room models successfully updated.");
                break;
            }

            case "promotions":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_promotions"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_promotions' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetLandingManager().LoadPromotions();
                Session.SendWhisper("Landing view promotions successfully updated.");
                break;
            }

            case "youtube":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_youtube"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_youtube' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetTelevisionManager().Init();
                Session.SendWhisper("Youtube televisions playlist successfully updated.");
                break;
            }

            case "filter":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_filter"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_filter' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetChatManager().GetFilter().Init();
                Session.SendWhisper("Filter definitions successfully updated.");
                break;
            }

            case "navigator":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_navigator"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_navigator' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetNavigator().Init();
                Session.SendWhisper("Navigator items successfully updated.");
                break;
            }

            case "ranks":
            case "rights":
            case "permissions":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_rights"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_rights' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetPermissionManager().Init();

                foreach (GameClient Client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
                {
                    if (Client == null || Client.GetHabbo() == null || Client.GetHabbo().GetPermissions() == null)
                    {
                        continue;
                    }

                    Client.GetHabbo().GetPermissions().Init(Client.GetHabbo());
                }

                Session.SendWhisper("Rank definitions successfully updated.");
                break;
            }

            case "config":
            case "settings":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_configuration"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_configuration' permission.");
                    break;
                }

                PlusEnvironment.GetSettingsManager().Init();
                Session.SendWhisper("Server configuration successfully updated.");
                break;
            }

            case "bans":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bans"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_bans' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetModerationManager().ReCacheBans();
                Session.SendWhisper("Ban cache re-loaded.");
                break;
            }

            case "quests":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_quests"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_quests' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetQuestManager().Init();
                Session.SendWhisper("Quest definitions successfully updated.");
                break;
            }

            case "achievements":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_achievements"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_achievements' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetAchievementManager().LoadAchievements();
                Session.SendWhisper("Achievement definitions bans successfully updated.");
                break;
            }

            case "moderation":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_moderation"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_moderation' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetModerationManager().Init();
                PlusEnvironment.GetGame().GetClientManager().ModAlert("Moderation presets have been updated. Please reload the client to view the new presets.");

                Session.SendWhisper("Moderation configuration successfully updated.");
                break;
            }

            case "vouchers":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_vouchers"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_vouchers' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetCatalog().GetVoucherManager().Init();
                Session.SendWhisper("Catalogue vouche cache successfully updated.");
                break;
            }

            case "gc":
            case "games":
            case "gamecenter":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_game_center"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_game_center' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetGameDataManager().Init();
                Session.SendWhisper("Game Center cache successfully updated.");
                break;
            }

            case "pet_locale":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_pet_locale"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_pet_locale' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetChatManager().GetPetLocale().Init();
                Session.SendWhisper("Pet locale cache successfully updated.");
                break;
            }

            case "locale":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_locale"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_locale' permission.");
                    break;
                }

                PlusEnvironment.GetLanguageManager().Init();
                Session.SendWhisper("Locale cache successfully updated.");
                break;
            }

            case "mutant":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_anti_mutant"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_anti_mutant' permission.");
                    break;
                }

                PlusEnvironment.GetFigureManager().Init();
                Session.SendWhisper("FigureData manager successfully reloaded.");
                break;
            }

            case "bots":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bots"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_bots' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetBotManager().Init();
                Session.SendWhisper("Bot managaer successfully reloaded.");
                break;
            }

            case "rewards":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_rewards"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_rewards' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetRewardManager().Reload();
                Session.SendWhisper("Rewards managaer successfully reloaded.");
                break;
            }

            case "chat_styles":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_chat_styles"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_chat_styles' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetChatManager().GetChatStyles().Init();
                Session.SendWhisper("Chat Styles successfully reloaded.");
                break;
            }

            case "badge_definitions":
            {
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_badge_definitions"))
                {
                    Session.SendWhisper("Oops, you do not have the 'command_update_badge_definitions' permission.");
                    break;
                }

                PlusEnvironment.GetGame().GetBadgeManager().Init();
                Session.SendWhisper("Badge definitions successfully reloaded.");
                break;
            }

            default:
                Session.SendWhisper("'" + UpdateVariable + "' is not a valid thing to reload.");
                break;
            }
        }
        public void OnTrigger(GameClients.GameClient Session, Item Item, int Request, bool HasRights)
        {
            if (Item.ExtraData.Contains(Convert.ToChar(5).ToString()))
            {
                string[] Stuff                     = Item.ExtraData.Split(Convert.ToChar(5));
                Session.GetHabbo().Gender          = Stuff[0].ToUpper();
                Dictionary <string, string> NewFig = new Dictionary <string, string>();
                NewFig.Clear();
                foreach (string Man in Stuff[1].Split('.'))
                {
                    foreach (string Fig in Session.GetHabbo().Look.Split('.'))
                    {
                        if (Fig.Split('-')[0] == Man.Split('-')[0])
                        {
                            if (NewFig.ContainsKey(Fig.Split('-')[0]) && !NewFig.ContainsValue(Man))
                            {
                                NewFig.Remove(Fig.Split('-')[0]);
                                NewFig.Add(Fig.Split('-')[0], Man);
                            }
                            else if (!NewFig.ContainsKey(Fig.Split('-')[0]) && !NewFig.ContainsValue(Man))
                            {
                                NewFig.Add(Fig.Split('-')[0], Man);
                            }
                        }
                        else
                        {
                            if (!NewFig.ContainsKey(Fig.Split('-')[0]))
                            {
                                NewFig.Add(Fig.Split('-')[0], Fig);
                            }
                        }
                    }
                }

                string Final = "";
                foreach (string Str in NewFig.Values)
                {
                    Final += Str + ".";
                }


                Session.GetHabbo().Look = Final.TrimEnd('.');

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

                Room Room = Session.GetHabbo().CurrentRoom;
                if (Room != null)
                {
                    RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
                    if (User != null)
                    {
                        Session.SendMessage(new UserChangeComposer(User, true));
                        Session.GetHabbo().CurrentRoom.SendMessage(new UserChangeComposer(User, false));
                    }
                }
            }
        }
예제 #24
0
        internal void SerializeClub(ServerMessage Message, GameClients.GameClient Session)
        {
            Message.AppendInt32((int)Id);
            Message.AppendString(Name);
            Message.AppendBoolean(false);
            Message.AppendInt32((int)CreditsCost);
            Message.AppendInt32(((int)DiamondsCost > 0) ? (int)DiamondsCost : (int)DiamondsCost);
            Message.AppendInt32(((int)DiamondsCost > 0) ? 105 : 0);
            Message.AppendBoolean(true);

            int Days   = 0;
            int Months = 0;

            if (GetBaseItem(Id).InteractionType == InteractionType.club_1_month || GetBaseItem(Id).InteractionType == InteractionType.club_3_month || GetBaseItem(Id).InteractionType == InteractionType.club_6_month)
            {
                switch (GetBaseItem(Id).InteractionType)
                {
                case InteractionType.club_1_month:
                    Months = 1;
                    break;

                case InteractionType.CLUB_VIP:
                    Months = 1;
                    break;

                case InteractionType.club_3_month:
                    Months = 3;
                    break;

                case InteractionType.CLUB_VIP2:
                    Months = 3;
                    break;

                case InteractionType.club_6_month:
                    Months = 6;
                    break;
                }

                Days = 31 * Months;
            }

            DateTime future = DateTime.Now;

            if (PageID == EmuSettings.CLUB_PAGE_ID && Session.GetHabbo().GetClubManager().UserHasSubscription("club_habbo"))
            {
                double Expire        = Session.GetHabbo().GetClubManager().GetSubscription("club_habbo").TimestampExpire;
                double TimeLeft      = Expire - OtanixEnvironment.GetUnixTimestamp();
                int    TotalDaysLeft = (int)Math.Ceiling(TimeLeft / 86400);
                future = DateTime.Now.AddDays(TotalDaysLeft);
            }

            future = future.AddDays(Days);

            Message.AppendInt32(Months);
            Message.AppendInt32(Days);
            Message.AppendBoolean(true); // gift
            Message.AppendInt32(Days);
            Message.AppendInt32(future.Year);
            Message.AppendInt32(future.Month);
            Message.AppendInt32(future.Day);
        }
예제 #25
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            int TotalDuckets = 0;

            try
            {
                DataTable Table = null;
                using (IQueryAdapter dbClient = CloudServer.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.SetQuery("SELECT `id` FROM `items` WHERE `user_id` = '" + Session.GetHabbo().Id + "' AND (`room_id`=  '0' OR `room_id` = '')");
                    Table = dbClient.getTable();
                }

                if (Table == null)
                {
                    Session.SendWhisper("¡Você não tem nenhuma moeda em seu inventário!");
                    return;
                }

                foreach (DataRow Row in Table.Rows)
                {
                    Item Item = Session.GetHabbo().GetInventoryComponent().GetItem(Convert.ToInt32(Row[0]));
                    if (Item == null)
                    {
                        continue;
                    }

                    if (!Item.GetBaseItem().ItemName.StartsWith("DU_") && !Item.GetBaseItem().ItemName.StartsWith("DUC_"))
                    {
                        continue;
                    }

                    if (Item.RoomId > 0)
                    {
                        continue;
                    }

                    string[] Split = Item.GetBaseItem().ItemName.Split('_');
                    int      Value = int.Parse(Split[1]);

                    using (IQueryAdapter dbClient = CloudServer.GetDatabaseManager().GetQueryReactor())
                    {
                        dbClient.runFastQuery("DELETE FROM `items` WHERE `id` = '" + Item.Id + "' LIMIT 1");
                    }

                    Session.GetHabbo().GetInventoryComponent().RemoveItem(Item.Id);

                    TotalDuckets += Value;

                    if (Value > 0)
                    {
                        Session.GetHabbo().Duckets += Value;
                        Session.SendMessage(new ActivityPointsComposer(Session.GetHabbo().Duckets, Session.GetHabbo().Diamonds, Session.GetHabbo().GOTWPoints));
                    }
                }

                if (TotalDuckets > 0)
                {
                    Session.SendWhisper("¡Você resgatou corretamente " + TotalDuckets + " duckets do seu inventario!");
                }
                else
                {
                    Session.SendWhisper("¡Ocorreu algum Erro!");
                }
            }
            catch
            {
                Session.SendNotification("¡Sinto muito, Ocorreu algum erro!");
            }
        }
예제 #26
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 2)
            {
                Session.SendWhisper("Please enter a message and a URL to send..");
                return;
            }

            string URL = Params[1];

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

            PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Habboon Hotel Alert!", Message + "\r\n" + "- " + Session.GetHabbo().Username, "", URL, URL));
            return;
        }
예제 #27
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("@green@ Introduce el nombre del usuario que deseas quemar. { :quemar NOMBRE }");
                return;
            }

            if (!Room.GolpeEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config"))
            {
                Session.SendWhisper("@red@ Oops, el dueño de la sala no permite que quemes a otros en su sala.");
                return;
            }

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

            if (TargetClient == null)
            {
                Session.SendWhisper("Ocurrió un problema, al parecer el usuario no se encuentra online o usted no escribio bien el nombre");
                return;
            }

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

            if (TargetUser == null)
            {
                Session.SendWhisper("@red@ Ocurrió un error, escribe correctamente el nombre, el usuario NO se encuentra online o en la sala.");
                return;
            }

            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("@red@ ¿Te gusta el dolor? Lo siento pero hoy no es  tu día amig@...");
                return;
            }

            if (TargetUser.TeleportEnabled)
            {
                Session.SendWhisper("Oops, No puedes quemar a alguien si usas teleport.");
                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, "@red@ *He empezado a quemar a " + Params[1] + "*", 0, ThisUser.LastBubble));
                ThisUser.ApplyEffect(9);
                Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "@cyan@ Oh vaya... me han dado un beso :$", 0, ThisUser.LastBubble));
                TargetUser.ApplyEffect(9);
            }
            else
            {
                Session.SendWhisper("@green@ ¡Oops, " + Params[1] + " no está lo suficientemente cerca!");
            }
        }
예제 #28
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (!Room.RoomMuted)
            {
                Session.SendWhisper("Esta habitacion no se silencia.");
                return;
            }

            Room.RoomMuted = false;

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

            if (RoomUsers.Count > 0)
            {
                foreach (RoomUser User in RoomUsers)
                {
                    if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().Username == Session.GetHabbo().Username)
                    {
                        continue;
                    }

                    User.GetClient().SendWhisper("Esta sala ha sido desmuteada, puedes volver a hablar con normalidad.");
                }
            }
        }
예제 #29
0
        public void OnTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool HasRights)
        {
            int SlotsCost = RoleplayManager.SlotsMachineCost;

            Slot theSlot = SlotsManager.getSlotbyItem(Item);

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

            if (Item.InteractingUser2 != User.UserId)
            {
                Item.InteractingUser2 = User.UserId;
            }

            if (User == null)
            {
                return;
            }

            if (Session.GetRoleplay().Working&& Session.GetHabbo().Rank <= 2)
            {
                Session.SendWhisperBubble("You cannot roll the slots while working!");
                return;
            }

            if (!Session.GetHabbo().CurrentRoom.RoomData.Description.Contains("CASINO") == true)
            {
                Session.SendWhisperBubble("You must be in the casino to roll slots! [Room ID: 200 & 201]", 1);
                return;
            }

            if (Session.GetRoleplay().inSlotMachine == true)
            {
                Session.SendWhisperBubble("[SLOT MACHINE] You have already pulled the handle!", 1);
                return;
            }

            if (Session.GetHabbo().Credits < SlotsCost)
            {
                Session.SendWhisperBubble("[SLOT MACHINE] You don't have enough money! This machine cost: $" + SlotsCost + " to use.", 1);
                return;
            }

            if (theSlot != null && SlotsManager.isUserNearMachine(theSlot, User))
            {
                if (theSlot.beingRolled == false)
                {
                    slotsTimer timer = new slotsTimer(Session, theSlot);
                    timer.startTimer();

                    Session.GetRoleplay().inSlotMachine      = true;
                    Session.GetHabbo().GetRoomUser().CanWalk = false;
                    RoleplayManager.GiveMoney(Session, -SlotsCost);
                }
                else
                {
                    Session.SendWhisperBubble("[SLOT MACHINE] This machine is already in use!", 1);
                }
            }
            else
            {
                Session.SendWhisperBubble("[SLOT MACHINE] You aren't close enough to pull the handle!", 1);
            }
        }
예제 #30
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Introduce el nombre del usuario que deseas empujar");
                return;
            }

            if (!Room.PushEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config"))
            {
                Session.SendWhisper("Oops, al parecer el dueño de la sala ha deshabilitado la capacidad de usar el comando Push");
                return;
            }

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

            if (TargetClient == null)
            {
                Session.SendWhisper("Ocurrio un problema, al parecer el usuario no se encuentra online o usted no escribio bien el nombre");
                return;
            }

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

            if (TargetUser == null)
            {
                Session.SendWhisper("Ocurrio un error, escribe correctamente el nombre, el usuario NO se encuentra online o en la sala.");
                return;
            }

            if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
            {
                Session.SendWhisper("Vamos! no querras empujarte a ti mismo");
                return;
            }

            if (TargetUser.TeleportEnabled)
            {
                Session.SendWhisper("Oops, you cannot push a user whilst they have their teleport mode enabled.");
                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)))
            {
                if (TargetUser.SetX - 1 == Room.GetGameMap().Model.DoorX)
                {
                    Session.SendWhisper("Por favor no lo empujes hacia la salida :(!");
                    return;
                }

                if (TargetUser.RotBody == 4)
                {
                    TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1);
                }

                if (ThisUser.RotBody == 0)
                {
                    TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1);
                }

                if (ThisUser.RotBody == 6)
                {
                    TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y);
                }

                if (ThisUser.RotBody == 2)
                {
                    TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y);
                }

                if (ThisUser.RotBody == 3)
                {
                    TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y);
                    TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1);
                }

                if (ThisUser.RotBody == 1)
                {
                    TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y);
                    TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1);
                }

                if (ThisUser.RotBody == 7)
                {
                    TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y);
                    TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1);
                }

                if (ThisUser.RotBody == 5)
                {
                    TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y);
                    TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1);
                }

                Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*He empujado a " + Params[1] + "*", 0, ThisUser.LastBubble));
            }
            else
            {
                Session.SendWhisper("Oops, " + Params[1] + " no esta lo suficientemente cerca!");
            }
        }