Esempio n. 1
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_mute"))
            {
                return;
            }
            int    UserId  = Packet.PopInt();
            string Message = Packet.PopString();
            double Length  = (Packet.PopInt() * 60);
            //string Unknown1 = Packet.PopString();
            //string Unknown2 = Packet.PopString();
            Habbo Habbo = null;

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

            if (Habbo.GetPermissions().HasRight("mod_mute") && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_any"))
            {
                Session.SendNotification("Oops, you cannot mute that user.");
                return;
            }

            using (IQueryAdapter dbClient = RocketEmulador.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.RunQuery("UPDATE `users` SET `time_muted` = '" + Length + "' WHERE `id` = '" + Habbo.Id + "' LIMIT 1");
            }

            if (Habbo.GetClient() != null)
            {
                Length          = 3600;
                Habbo.TimeMuted = Length;
                Habbo.GetClient().SendNotification("Você foi mutado por um moderador: " + Message + " e durará " + Length + " segundos.");
            }
        }
Esempio n. 2
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_mute"))
            {
                return;
            }

            int    UserId   = Packet.PopInt();
            string Message  = Packet.PopString();
            double Length   = (Packet.PopInt() * 60);
            string Unknown1 = Packet.PopString();
            string Unknown2 = Packet.PopString();

            Habbo Habbo = PlusEnvironment.GetHabboById(UserId);

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

            if (Habbo.GetPermissions().HasRight("mod_mute") && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_any"))
            {
                Session.SendWhisper("Oops, you cannot mute that user.");
                return;
            }

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.RunQuery("UPDATE `users` SET `time_muted` = '" + Length + "' WHERE `id` = '" + Habbo.Id + "' LIMIT 1");
            }

            if (Habbo.GetClient() != null)
            {
                Habbo.TimeMuted = Length;
                Habbo.GetClient().SendNotification("You have been muted by a moderator for " + Length + " seconds!");
            }
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room;

            if (!RavenEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
            {
                return;
            }

            if (!Room.CheckRights(Session, true) || Room.MoodlightData == null)
            {
                return;
            }

            Item Item = Room.GetRoomItemHandler().GetItem(Room.MoodlightData.ItemId);

            if (Item == null || Item.GetBaseItem().InteractionType != InteractionType.MOODLIGHT)
            {
                return;
            }

            if (Room.MoodlightData.Enabled)
            {
                Room.MoodlightData.Disable();
            }
            else
            {
                Room.MoodlightData.Enable();
            }

            Item.ExtraData = Room.MoodlightData.GenerateExtraData();
            Item.UpdateState();
        }
Esempio n. 4
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            Room Room = Session.GetHabbo().CurrentRoom;

            if (Room == null || !Room.CheckRights(Session, true))
            {
                return;
            }

            int    ItemId = Packet.PopInt();
            string Name   = Packet.PopString();

            Item Item = Session.GetHabbo().CurrentRoom.GetRoomItemHandler().GetItem(ItemId);

            if (Item == null)
            {
                return;
            }

            if (Item.ExtraData.Contains(Convert.ToChar(5)))
            {
                string[] Flags = Item.ExtraData.Split(Convert.ToChar(5));
                Item.ExtraData = Flags[0] + Convert.ToChar(5) + Flags[1] + Convert.ToChar(5) + Name;
            }
            else
            {
                Item.ExtraData = "m" + Convert.ToChar(5) + ".ch-210-1321.lg-285-92" + Convert.ToChar(5) + "Default Mannequin";
            }

            using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `items` SET `extra_data` = @Ed WHERE id = '" + Item.Id + "' LIMIT 1");
                dbClient.AddParameter("Ed", Item.ExtraData);
                dbClient.RunQuery();
            }

            Item.UpdateState(true, true);
        }
Esempio n. 5
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_mute"))
            {
                return;
            }

            int    UserId   = Packet.PopInt();
            string Message  = Packet.PopString();
            double Length   = (Packet.PopInt() + 60 * 60);
            string Unknown1 = Packet.PopString();
            string Unknown2 = Packet.PopString();

            Habbo Habbo = PlusEnvironment.GetHabboById(UserId);

            if (Habbo == null)
            {
                Session.SendWhisper("Ocorreu um erro ao encontrar esse usuário no banco de dados.");
                return;
            }

            if (Habbo.GetPermissions().HasRight("mod_mute") && !Session.GetHabbo().GetPermissions().HasRight("mod_mute_any"))
            {
                Session.SendWhisper("Opa, você não pode silenciar esse usuário.");
                return;
            }

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.RunQuery("UPDATE `users` SET `time_muted` = '" + Length + "' WHERE `id` = '" + Habbo.Id + "' LIMIT 1");
            }

            if (Habbo.GetClient() != null)
            {
                Habbo.TimeMuted = Length;
                Habbo.GetClient().SendNotification("Você foi mutado por um moderador por " + Length + " segundos!");
            }
        }
Esempio n. 6
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            Room Instance = Session.GetHabbo().CurrentRoom;

            if (Instance == null)
            {
                return;
            }

            if (Instance.GetRoomMusicManager().IsPlaying)
            {
                Session.SendMessage(new SyncMusicComposer(Instance.GetRoomMusicManager().CurrentSong.SongData.Id, Instance.GetRoomMusicManager().SongQueuePosition, Instance.GetRoomMusicManager().SongSyncTimestamp));
            }
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            string item = Packet.PopString();

            var CraftingItem = CraftingManager.getRecipe(item);

            if (CraftingItem == null)
            {
                Session.SendWhisper("Esta receita não pôde ser encontrada! Notificar um desenvolvedor!", 1);
                return;
            }

            ICollection <Item> FloorItems = Session.GetHabbo().GetInventoryComponent().GetFloorItems();
            ICollection <Item> WallItems  = Session.GetHabbo().GetInventoryComponent().GetWallItems();

            Session.GetRoleplay().CraftingCheck = false;
            Session.SendMessage(new FurniListComposer(FloorItems.ToList(), WallItems, Session.GetRoleplay().CraftingCheck));

            Session.SendMessage(new CraftingRecipeMessageComposer(CraftingItem));

            Session.GetRoleplay().CraftingCheck = true;
            Session.SendMessage(new FurniListComposer(FloorItems.ToList(), WallItems, Session.GetRoleplay().CraftingCheck));
        }
Esempio n. 8
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_tickets"))
            {
                return;
            }

            SupportTicket Ticket = QuasarEnvironment.GetGame().GetModerationTool().GetTicket(Packet.PopInt());

            if (Ticket == null)
            {
                return;
            }

            RoomData Data = QuasarEnvironment.GetGame().GetRoomManager().GenerateRoomData(Ticket.RoomId);

            if (Data == null)
            {
                return;
            }

            Session.SendMessage(new ModeratorTicketChatlogComposer(Ticket, Data, Ticket.Timestamp));
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            int GroupId = Packet.PopInt();
            int UserId  = Packet.PopInt();

            if (!NeonEnvironment.GetGame().GetGroupManager().TryGetGroup(GroupId, out Group Group))
            {
                return;
            }

            if (Session.GetHabbo().Id != Group.CreatorId && !Group.IsAdmin(Session.GetHabbo().Id))
            {
                return;
            }

            if (!Group.HasRequest(UserId))
            {
                return;
            }

            Group.HandleRequest(UserId, false);
            Session.SendMessage(new UnknownGroupComposer(Group.Id, UserId));
        }
Esempio n. 10
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room;

            if (!RavenEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
            {
                return;
            }

            Item Item = Room.GetRoomItemHandler().GetItem(Packet.PopInt());

            if (Item == null || Item.GetBaseItem().InteractionType != InteractionType.POSTIT)
            {
                return;
            }

            Session.SendMessage(new StickyNoteComposer(Item.Id.ToString(), Item.ExtraData));
        }
Esempio n. 11
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session != null)
            {
                Room Instance = Session.GetHabbo().CurrentRoom;

                if (Instance == null || !Instance.CheckRights(Session, true))
                {
                    return;
                }

                Session.SendMessage(new GetJukeboxPlaylistsComposer(MusicManager.PlaylistCapacity, Instance.GetRoomMusicManager().Playlist.Values.ToList()));
            }
        }
Esempio n. 12
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Instance = Session.GetHabbo().CurrentRoom;

            if (Instance == null || !Instance.CheckRights(Session, true))
            {
                return;
            }

            int UserId = Packet.PopInt();
            int RoomId = Packet.PopInt();

            if (Instance.GetBans().IsBanned(UserId))
            {
                Instance.GetBans().Unban(UserId);
                Session.SendMessage(new UnbanUserFromRoomComposer(RoomId, UserId));
            }
        }
Esempio n. 13
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            HabboHotel.Users.Habbo habbo = Session.GetHabbo();

            if (habbo == null)
            {
                return;
            }
            //if (!habbo.PassedNuxNavigator && !habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            //{
            //    Session.SendMessage(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_NAVIGATOR/Este es el navegador de salas, en el, podrás visitar nuevas salas y hacer nuevas amistades."));
            //    habbo.PassedNuxNavigator = true;
            //}

            //if (habbo.PassedNuxNavigator && !habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            //{
            //    Session.SendMessage(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_CATALOG/Aquí tienes la tienda, en ella, encontrarás lo necesario para hacer las salas mas chic del hotel!"));
            //    habbo.PassedNuxCatalog = true;
            //}
            //else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            //{
            //    Session.SendMessage(new NuxAlertComposer("helpBubble/add/CHAT_INPUT/Este es el chat, en el puedes interactuar con el resto de miembros de la comunidad y seleccionar estilos diferentes."));
            //    habbo.PassedNuxChat = true;
            //}
            //else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            //{
            //    Session.SendMessage(new NuxAlertComposer("helpBubble/add/DUCKETS_BUTTON/En este apartado, dispondrás de toda la información de tu economía dentro del Hotel"));
            //    habbo.PassedNuxDuckets = true;
            //}
            //else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            //{
            //    Session.SendMessage(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_INVENTORY/Aquí está el inventario, en el, todos los furnis que compres, serán almacenados y posteriormente, podrás colocarlos."));
            //    habbo.PassedNuxItems = true;
            //}

            //if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && habbo.PassedNuxDuckets && habbo.PassedNuxItems)
            //{
            Session.SendMessage(new NuxAlertComposer("nux/lobbyoffer/show"));
            habbo._NUX = false;
            using (Database.Interfaces.IQueryAdapter dbClient = NeonEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.runFastQuery("UPDATE users SET nux_user = '******' WHERE id = " + Session.GetHabbo().Id + ";");
            }

            ServerPacket nuxStatus = new ServerPacket(ServerPacketHeader.NuxUserStatus);

            nuxStatus.WriteInteger(0);
            Session.SendMessage(nuxStatus);
            //}
        }
Esempio n. 14
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null)
            {
                return;
            }


            if (Session.GetHabbo().InRoom)
            {
                Room OldRoom;

                if (!RocketEmulador.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out OldRoom))
                {
                    return;
                }

                if (OldRoom.GetRoomUserManager() != null)
                {
                    OldRoom.GetRoomUserManager().RemoveUserFromRoom(Session, true, false);
                }
            }
        }
Esempio n. 15
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_tickets"))
            {
                return;
            }

            int TicketId = Packet.PopInt();

            if (!NeonEnvironment.GetGame().GetModerationManager().TryGetTicket(TicketId, out ModerationTicket Ticket) || Ticket.Room == null)
            {
                return;
            }

            RoomData Data = NeonEnvironment.GetGame().GetRoomManager().GenerateRoomData(Ticket.Room.Id);

            if (Data == null)
            {
                return;
            }

            Session.SendMessage(new ModeratorTicketChatlogComposer(Ticket, Data, Ticket.Timestamp));
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_tickets"))
            {
                return;
            }

            int ticketId = Packet.PopInt();

            ModerationTicket ticket = null;

            if (!BiosEmuThiago.GetGame().GetModerationManager().TryGetTicket(ticketId, out ticket) || ticket.Room == null)
            {
                return;
            }

            if (ticket.Room == null)
            {
                return;
            }

            Session.SendMessage(new ModeratorTicketChatlogComposer(ticket, ticket.Room, ticket.Timestamp));
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room;

            if (!BiosEmuThiago.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
            {
                return;
            }

            if (!Room.CheckRights(Session, true))
            {
                return;
            }

            if (Room.MoodlightData == null)
            {
                foreach (Item item in Room.GetRoomItemHandler().GetWall.ToList())
                {
                    if (item.GetBaseItem().InteractionType == InteractionType.MOODLIGHT)
                    {
                        Room.MoodlightData = new MoodlightData(item.Id);
                    }
                }
            }

            if (Room.MoodlightData == null)
            {
                return;
            }

            Session.SendMessage(new MoodlightConfigComposer(Room.MoodlightData));
        }
Esempio n. 18
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            int PetId = Packet.PopInt();

            if (!Session.GetHabbo().CurrentRoom.GetRoomUserManager().TryGetPet(PetId, out RoomUser Pet))
            {
                //Okay so, we've established we have no pets in this room by this virtual Id, let us check out users, maybe they're creeping as a pet?!
                RoomUser User = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(PetId);
                if (User == null)
                {
                    return;
                }

                //Check some values first, please!
                if (User.GetClient() == null || User.GetClient().GetHabbo() == null)
                {
                    return;
                }

                //And boom! Let us send the information composer 8-).
                Session.SendMessage(new PetInformationComposer(User.GetClient().GetHabbo()));
                return;
            }

            //Continue as a regular pet..
            if (Pet.RoomId != Session.GetHabbo().CurrentRoomId || Pet.PetData == null)
            {
                return;
            }

            Session.SendMessage(new PetInformationComposer(Pet.PetData));
        }
Esempio n. 19
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null)
            {
                return;
            }

            if (!Session.GetHabbo().InRoom || Session.GetHabbo().GetStats().DailyRespectPoints <= 0)
            {
                return;
            }

            Room Room = null;

            if (!QuasarEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
            {
                return;
            }

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Packet.PopInt());

            if (User == null || User.GetClient() == null || User.GetClient().GetHabbo().Id == Session.GetHabbo().Id || User.IsBot)
            {
                return;
            }

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

            if (ThisUser == null)
            {
                return;
            }

            QuasarEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, QuestType.SOCIAL_RESPECT);
            QuasarEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Session, "ACH_RespectGiven", 1);
            QuasarEnvironment.GetGame().GetAchievementManager().ProgressAchievement(User.GetClient(), "ACH_RespectEarned", 1);

            Session.GetHabbo().GetStats().DailyRespectPoints -= 1;
            Session.GetHabbo().GetStats().RespectGiven       += 1;
            User.GetClient().GetHabbo().GetStats().Respect   += 1;

            // Respect Bubble
            User.GetClient().SendMessage(RoomNotificationComposer.SendBubble("bubble_respect", "Respect! Je hebt zojuist Respect gekregen."));

            User.GetClient().SendMessage(RoomNotificationComposer.SendBubble("bubble_respect", "Je hebt al " + User.GetClient().GetHabbo().GetStats().Respect + " keer Respect gekregen."));

            if (Room.RespectNotificationsEnabled)
            {
                Room.SendMessage(new RespectNotificationComposer(User.GetClient().GetHabbo().Id, User.GetClient().GetHabbo().GetStats().Respect));
            }
            Room.SendMessage(new ActionComposer(ThisUser.VirtualId, 7));
        }
Esempio n. 20
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room;

            if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
            {
                return;
            }

            int  itemID = Packet.PopInt();
            Item Item   = Room.GetRoomItemHandler().GetItem(itemID);

            if (Item == null)
            {
                return;
            }

            bool hasRights = false;

            if (Room.CheckRights(Session, false, true))
            {
                hasRights = true;
            }

            string oldData = Item.ExtraData;
            int    request = Packet.PopInt();

            Item.Interactor.OnTrigger(Session, Item, request, hasRights);
            Item.GetRoom().GetWired().TriggerEvent(WiredBoxType.TriggerStateChanges, Session.GetHabbo(), Item);

            PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, QuestType.ExploreFindItem, Item.GetBaseItem().Id);
        }
Esempio n. 21
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room = Session.GetHabbo().CurrentRoom;

            if (Room == null || !Room.CheckRights(Session, true))
            {
                return;
            }

            Room.RoomMuted = !Room.RoomMuted;

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

            foreach (RoomUser roomUser in roomUsers.ToList())
            {
                if (roomUser == null || roomUser.GetClient() == null)
                {
                    continue;
                }

                if (Room.RoomMuted)
                {
                    roomUser.GetClient().SendWhisper("Esta sala ha sido silenciada");
                }
                else
                {
                    roomUser.GetClient().SendWhisper("La sala ha sido desmuteada, ya puedes volver a hablar con normalidad.");
                }
            }

            Room.SendMessage(new RoomMuteSettingsComposer(Room.RoomMuted));
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Room = Session.GetHabbo().CurrentRoom;

            if (Room == null || !Room.CheckRights(Session, true))
            {
                return;
            }

            Room.RoomMuted = !Room.RoomMuted;

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

            foreach (RoomUser roomUser in roomUsers.ToList())
            {
                if (roomUser == null || roomUser.GetClient() == null)
                {
                    continue;
                }

                if (Room.RoomMuted)
                {
                    roomUser.GetClient().SendWhisper("This room has been muted");
                }
                else
                {
                    roomUser.GetClient().SendWhisper("This room has been unmuted");
                }
            }

            Room.SendMessage(new RoomMuteSettingsComposer(Room.RoomMuted));
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
            {
                return;
            }

            Room Instance = Session.GetHabbo().CurrentRoom;

            if (Instance == null)
            {
                return;
            }

            if (!Instance.CheckRights(Session))
            {
                return;
            }

            int    RoomId = Packet.PopInt();
            bool   Added  = Packet.PopBoolean();
            string Word   = Packet.PopString();

            if (Word.Contains(":ban") || Word.Contains(":ha") || Word.Contains(":mute") || Word.Contains(":kick") || Word.Contains(":roomkick") || Word.Contains(":roommute"))
            {
                return;
            }

            if (Added)
            {
                Instance.GetFilter().AddFilter(Word);
            }
            else
            {
                Instance.GetFilter().RemoveFilter(Word);
            }
        }
Esempio n. 24
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            int GroupId = Packet.PopInt();

            Group Group = null;

            if (!PlusEnvironment.GetGame().GetGroupManager().TryGetGroup(GroupId, out Group))
            {
                return;
            }

            if (Group.CreatorId != Session.GetHabbo().Id)
            {
                return;
            }

            int Count   = Packet.PopInt();
            int Current = 1;

            string x;
            string newBadge = "";

            while (Current <= Count)
            {
                int Id     = Packet.PopInt();
                int Colour = Packet.PopInt();
                int Pos    = Packet.PopInt();
                if (Current == 1)
                {
                    x = "b" + ((Id < 10) ? "0" + Id.ToString() : Id.ToString()) + ((Colour < 10) ? "0" + Colour.ToString() : Colour.ToString()) + Pos;
                }
                else
                {
                    x = "s" + ((Id < 10) ? "0" + Id.ToString() : Id.ToString()) + ((Colour < 10) ? "0" + Colour.ToString() : Colour.ToString()) + Pos;
                }
                newBadge += PlusEnvironment.GetGame().GetGroupManager().CheckActiveSymbol(x);
                Current++;
            }

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE groups SET badge = @badge WHERE id=" + Group.Id + " LIMIT 1");
                dbClient.AddParameter("badge", newBadge);
                dbClient.RunQuery();
            }

            Group.Badge = (string.IsNullOrWhiteSpace(newBadge) ? "b05114s06114" : newBadge);
            Session.SendMessage(new GroupInfoComposer(Group, Session));
        }
Esempio n. 25
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            var habbo = Session.GetHabbo();

            if (habbo == null)
            {
                return;
            }
            if (!habbo.PassedNuxNavigator && !habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            {
                Session.SendMessage(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_NAVIGATOR/Dit hier noemen we de Navigator, klik erop en ga opzoek naar de leukste kamers!"));
                habbo.PassedNuxNavigator = true;
            }

            if (habbo.PassedNuxNavigator && !habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            {
                Session.SendMessage(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_CATALOG/Een kamer zonder decoratie is natuurlijk alles behalve af. Gebruik daarom deze winkel om de meest chique hotel kamers te maken!"));
                habbo.PassedNuxCatalog = true;
            }
            else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            {
                Session.SendMessage(new NuxAlertComposer("helpBubble/add/CHAT_INPUT/Chatten was nog nooit zo simpel, communiceer met andere Habbis in verschillende kleuren en stylen!"));
                habbo.PassedNuxChat = true;
            }
            else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            {
                Session.SendMessage(new NuxAlertComposer("helpBubble/add/DUCKETS_BUTTON/Dit hier is je geld, de economie bestaat uit Credits, Duckets en Diamanten."));
                habbo.PassedNuxDuckets = true;
            }
            else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
            {
                Session.SendMessage(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_INVENTORY/Alles wat er gekocht of geruild wordt komt in je inventaris terecht, van uit hier is het ook weer mogelijk om items in je kamer te plaatsen."));
                habbo.PassedNuxItems = true;
            }

            if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && habbo.PassedNuxDuckets && habbo.PassedNuxItems)
            {
                //   Session.SendMessage(new NuxAlertComposer("nux/lobbyoffer/show"));
                habbo._NUX = false;
                using (var dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor())
                    dbClient.runFastQuery("UPDATE users SET nux_user = '******' WHERE id = " + Session.GetHabbo().Id + ";");
                QuasarEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Session, "ACH_NuxSucceeded", 1);
                QuasarEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Session, "ACH_Login", 1);
                //QuasarEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Session, "ACH_RegistrationDuration", 1);
                var nuxStatus = new ServerPacket(ServerPacketHeader.NuxUserStatus);
                nuxStatus.WriteInteger(0);
                Session.SendMessage(nuxStatus);
            }
        }
        public UserTagsComposer(HabboHotel.GameClients.GameClient Session, int UserId)
            : base(ServerPacketHeader.UserTagsMessageComposer)
        {
            var room = BiosEmuThiago.GetGame().GetRoomManager().LoadRoom(Session.GetHabbo().CurrentRoomId);

            if (room == null)
            {
                return;
            }

            var roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(UserId);

            if (roomUserByHabbo == null || roomUserByHabbo.IsBot)
            {
                return;
            }

            base.WriteInteger(roomUserByHabbo.GetClient().GetHabbo().Id);
            base.WriteInteger(roomUserByHabbo.GetClient().GetHabbo().Tags.Count);//Count of the tags.
            foreach (string current in roomUserByHabbo.GetClient().GetHabbo().Tags)
            {
                base.WriteString(current);
            }

            if (Session != roomUserByHabbo.GetClient())
            {
                return;
            }

            if (Session.GetHabbo().Tags.Count >= 5)
            {
                BiosEmuThiago.GetGame()
                .GetAchievementManager()
                .ProgressAchievement(roomUserByHabbo.GetClient(), "ACH_UserTags", 5, false);
            }
        }
Esempio n. 27
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session.GetHabbo().Rank < ExtraSettings.AmbassadorMinRank)
            {
                return;
            }
            int        userId = Packet.PopInt();
            GameClient user   = BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(userId);

            if (user == null)
            {
                return;
            }
            user.SendMessage(new SuperNotificationComposer("", "${notification.ambassador.alert.warning.title}", "${notification.ambassador.alert.warning.message}", "", ""));
        }
        public CraftableProductsMessageComposer(HabboHotel.GameClients.GameClient Session)
            : base(ServerPacketHeader.CraftableProductsMessageComposer)
        {
            base.WriteInteger(CraftingManager.NotSecretCraftingRecipes.Count + Session.GetHabbo().UnlockedRecipes.Count);

            foreach (var recipe in CraftingManager.NotSecretCraftingRecipes.Values)
            {
                base.WriteString(recipe.Result);
                base.WriteString(recipe.Result);
            }

            foreach (var recipe in Session.GetHabbo().UnlockedRecipes)
            {
                base.WriteString(recipe.Result);
                base.WriteString(recipe.Result);
            }

            base.WriteInteger(CraftingManager.CraftableItems.Count);

            foreach (var itemName in CraftingManager.CraftableItems)
            {
                base.WriteString(itemName);
            }
        }
Esempio n. 29
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            int  SignId = Packet.PopInt();
            Room Room;

            if (!RavenEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
            {
                return;
            }

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

            if (User == null)
            {
                return;
            }


            User.UnIdle();

            User.AddStatus("sign", Convert.ToString(SignId));
            User.UpdateNeeded = true;
            User.SignTime     = RavenEnvironment.GetUnixTimestamp() + 5;
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().GetPermissions().HasRight("mod_caution"))
            {
                return;
            }

            int    UserId  = Packet.PopInt();
            String Message = Packet.PopString();

            GameClient Client = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);

            if (Client == null || Client.GetHabbo() == null)
            {
                return;
            }

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

            Client.SendNotification(Message);
        }