Ejemplo n.º 1
0
        public void OnTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool HasRights)
        {
            if (Session == null)
                return;
            RoomUser User = Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User == null)
            {
                return;
            }

            if (!((Math.Abs((int)(User.X - Item.GetX)) >= 2) || (Math.Abs((int)(User.Y - Item.GetY)) >= 2)))
            {
                User.SetRot(Rotation.Calculate(User.X, User.Y, Item.GetX, Item.GetY), false);
                if (User.RotBody % 2 != 0)
                {
                    User.MoveTo(Item.GetX + 1, Item.GetY);
                    return;
                }
                Room Room = Item.GetRoom();
                Point NewPoint = new Point(0, 0);
                if (User.RotBody == 4)
                { NewPoint = new Point(Item.GetX, Item.GetY + 1); }

                if (User.RotBody == 0)
                { NewPoint = new Point(Item.GetX, Item.GetY - 1); }

                if (User.RotBody == 6)
                { NewPoint = new Point(Item.GetX - 1, Item.GetY); }

                if (User.RotBody == 2)
                { NewPoint = new Point(Item.GetX + 1, Item.GetY); }

                if (Room.GetGameMap().ValidTile(NewPoint.X, NewPoint.Y) && Room.GetGameMap().itemCanBePlacedHere(NewPoint.X, NewPoint.Y) && Room.GetGameMap().CanRollItemHere(NewPoint.X, NewPoint.Y))
                {
                    Double NewZ = Item.GetRoom().GetGameMap().SqAbsoluteHeight(NewPoint.X, NewPoint.Y);

                    ServerMessage mMessage = new ServerMessage();
                    mMessage.Init(Outgoing.ObjectOnRoller); // Cf
                    mMessage.AppendInt32(Item.GetX);
                    mMessage.AppendInt32(Item.GetY);
                    mMessage.AppendInt32(NewPoint.X);
                    mMessage.AppendInt32(NewPoint.Y);
                    mMessage.AppendInt32(1);
                    mMessage.AppendInt32(Item.Id);
                    mMessage.AppendString(Item.GetZ.ToString().Replace(',', '.'));
                    mMessage.AppendString(NewZ.ToString().Replace(',', '.'));
                    mMessage.AppendInt32(0);
                    Room.SendMessage(mMessage);

                    Item.GetRoom().GetRoomItemHandler().SetFloorItem(User.GetClient(), Item, NewPoint.X, NewPoint.Y, Item.Rot, false, false, false);
                }
            }
            else
            {
                User.MoveTo(Item.GetX + 1, Item.GetY);
            }
        }
Ejemplo n.º 2
0
        public void OnCycle()
        {
            ServerMessage Response = new ServerMessage();

            if (GameState == 0)
            {
                if (Players.Count >= 1 && NextTimeAction == 0)
                {
                    NextTimeAction = SilverwaveEnvironment.GetUnixTimestamp() + StormConfig.PreGameTimer;
                    
                    Response.Init(Outgoing.SnowStartLobbyCounter);
                    Response.AppendInt32(StormConfig.PreGameTimer);
                    SendToPlayers(Response);
                }
                else if (Players.Count >= 1 && NextTimeAction < SilverwaveEnvironment.GetUnixTimestamp())
                {
                    GameState = 1;
                    StartLobby();
                    NextTimeAction = SilverwaveEnvironment.GetUnixTimestamp() + StormConfig.LobbyTimer;
                }
                else if (Players.Count < 1 && NextTimeAction > 0)
                {
                    Response.Init(Outgoing.SnowStopLobbyCounter);
                    SendToPlayers(Response);
                    NextTimeAction = 0;
                }
            }
            else if (GameState == 1) // In Lobby
            {
                if (NextTimeAction < SilverwaveEnvironment.GetUnixTimestamp())
                {
                    StartStage();
                    GameState = 2;
                    NextTimeAction = SilverwaveEnvironment.GetUnixTimestamp() + 5;
                }
            }
            else if(GameState == 2) // On Snow, Waiting
            {
                if (NextTimeAction <= SilverwaveEnvironment.GetUnixTimestamp())
                {
                    Response.Init(Outgoing.SnowStageRunning);
                    Response.AppendInt32(StormConfig.GameLength);
                    SendToPlayers(Response);
                    GameState = 3;
                }
            }
            else if (GameState == 3) // Playing
            {
                CycleStage();
            }
            //Console.WriteLine("mILLISECONDS: " + (SilverwaveEnvironment.Now() - lastrun).ToString() + " cycle:" + CurrentCycle);
            lastrun = SilverwaveEnvironment.Now();
        }
Ejemplo n.º 3
0
        internal RoomUser DeployBot(RoomBot Bot, Pet PetData)
        {
            int num2;
            this.primaryPrivateUserID = (num2 = this.primaryPrivateUserID) + 1;
            RoomUser BotUser = new RoomUser(0, this.room.RoomId, num2, this.room, false);
            this.secondaryPrivateUserID = (num2 = this.secondaryPrivateUserID) + 1;
            int key = num2;
            BotUser.InternalRoomID = key;
            this.userlist.Add(key, BotUser);
            DynamicRoomModel Model = this.room.GetGameMap().Model;
            Point myPoint = new Point(Bot.X,Bot.Y);
            if ((Bot.X > 0 && Bot.Y > 0) && Bot.X < Model.MapSizeX && Bot.Y < Model.MapSizeY)
            {
                room.GetGameMap().AddUserToMap(BotUser, myPoint);
                BotUser.SetPos(Bot.X, Bot.Y, Bot.Z);
                BotUser.SetRot(Bot.Rot, false);
            }
            else
            {
                Bot.X = Model.DoorX;
                Bot.Y = Model.DoorY;

                BotUser.SetPos(Model.DoorX, Model.DoorY, Model.DoorZ);
                BotUser.SetRot(Model.DoorOrientation, false);
            }

            BotUser.BotData = Bot;
            BotUser.BotAI = Bot.GenerateBotAI(BotUser.VirtualId,(int)Bot.BotId);

            if (BotUser.IsPet)
            {

                BotUser.BotAI.Init(Bot.BotId, BotUser.VirtualId, room.RoomId, BotUser, room);
                BotUser.PetData = PetData;
                BotUser.PetData.VirtualId = BotUser.VirtualId;
            }
            else
            {
                BotUser.BotAI.Init(Bot.BotId, BotUser.VirtualId, room.RoomId, BotUser, room);
            }

            this.UpdateUserStatus(BotUser, false);
            BotUser.UpdateNeeded = true;

            ServerMessage EnterMessage = new ServerMessage(Outgoing.PlaceBot);
            EnterMessage.AppendInt32(1);
            BotUser.Serialize(EnterMessage, room.GetGameMap().gotPublicPool);
            room.SendMessage(EnterMessage);

            BotUser.BotAI.OnSelfEnterRoom();

            if (BotUser.IsPet)
            {
                if (pets.ContainsKey(BotUser.PetData.PetId)) //Pet allready placed
                    pets[BotUser.PetData.PetId] = BotUser;
                else
                    pets.Add(BotUser.PetData.PetId, BotUser);

                petCount++;
            }
            if (BotUser.BotData.AiType == AIType.Generic)
            {
                if (bots.ContainsKey(BotUser.BotData.BotId))
                    bots[BotUser.BotData.BotId] = BotUser;
                else
                {
                    bots.Add(BotUser.BotData.BotId, BotUser);
                }

                EnterMessage.Init(Outgoing.Dance);
                EnterMessage.AppendInt32(BotUser.VirtualId);
                EnterMessage.AppendInt32(BotUser.BotData.DanceId);
                room.SendMessage(EnterMessage);
                petCount++;
            }

            return BotUser;
        }
Ejemplo n.º 4
0
 internal void SendNewItems(int Id)
 {
     ServerMessage Response = new ServerMessage();
     Response.Init(Outgoing.SendPurchaseAlert);
     Response.AppendInt32(1); // items
     Response.AppendInt32(1); // type (gift) == s
     Response.AppendInt32(1);
     Response.AppendInt32(Id);
     mClient.SendMessage(Response);
 }
Ejemplo n.º 5
0
        internal ServerMessage UpdateUserOnRoller(RoomUser pUser, Point pNextCoord, uint pRollerID, Double NextZ)
        {
            ServerMessage mMessage = new ServerMessage(0);
            mMessage.Init(Outgoing.ObjectOnRoller); // Cf
            mMessage.AppendInt32(pUser.X);
            mMessage.AppendInt32(pUser.Y);

            mMessage.AppendInt32(pNextCoord.X);
            mMessage.AppendInt32(pNextCoord.Y);

            mMessage.AppendInt32(0);
            mMessage.AppendInt32(pRollerID);
            mMessage.AppendInt32(2);
            mMessage.AppendInt32(pUser.VirtualId);
            mMessage.AppendString(TextHandling.GetString(pUser.Z));
            mMessage.AppendString(TextHandling.GetString(NextZ));

            room.GetGameMap().UpdateUserMovement(new Point(pUser.X, pUser.Y), new Point(pNextCoord.X, pNextCoord.Y), pUser);
            room.GetGameMap().GameMap[pUser.X, pUser.Y] = 1;
            pUser.X = pNextCoord.X;
            pUser.Y = pNextCoord.Y;
            pUser.Z = NextZ;
            room.GetGameMap().GameMap[pUser.X, pUser.Y] = 0;

            return mMessage;
        }
Ejemplo n.º 6
0
        private void OnUserAdd(object sender, EventArgs args)
        {
            try
            {
                if (sender == null)// || args == null)
                    return;

                KeyValuePair<int, RoomUser> userPair = (KeyValuePair<int, RoomUser>)sender;;

                RoomUser user = userPair.Value;

                if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null)
                    return;

                GameClient session = user.GetClient();

                if (session == null || session.GetHabbo() == null || room == null)
                    return;

                if (!user.IsSpectator)
                {
                    DynamicRoomModel Model = room.GetGameMap().Model;
                    if (Model == null)
                        return;
                    user.SetPos(Model.DoorX, Model.DoorY, Model.DoorZ);
                    user.SetRot(Model.DoorOrientation, false);

                    if (room.CheckRights(session, true, false))
                    {
                        user.AddStatus("flatctrl 4", "");
                    }
                    else if (room.CheckRights(session, false, true))
                    {
                        user.AddStatus("flatctrl 1", "");
                    }
                    else if (room.CheckRights(session))
                    {
                        user.AddStatus("flatctrl 1", "");
                    }
                    user.CurrentItemEffect = ItemEffectType.None;

                    //UpdateUserEffect(User, User.X, User.Y);

                    if (!user.IsBot && user.GetClient().GetHabbo().IsTeleporting)
                    {
                        RoomItem Item = room.GetRoomItemHandler().GetItem(user.GetClient().GetHabbo().TeleporterId);

                        if (Item != null)
                        {
                            Item.ExtraData = "2";
                            Item.UpdateState(false, true);

                            user.SetPos(Item.GetX, Item.GetY, Item.GetZ);
                            user.SetRot(Item.Rot, false);

                            Item.InteractingUser2 = session.GetHabbo().Id;
                            Item.ExtraData = "0";
                            Item.UpdateState(false, true);
                        }
                    }

                    if (!user.IsBot && user.GetClient().GetHabbo().IsHopping)
                    {
                        RoomItem Item = room.GetRoomItemHandler().GetItem(user.GetClient().GetHabbo().HopperId);

                        if (Item != null)
                        {
                            Item.ExtraData = "1";
                            Item.UpdateState(false, true);
                            user.SetPos(Item.GetX, Item.GetY, Item.GetZ);
                            user.SetRot(Item.Rot, false);
                            user.AllowOverride = false;
                            Item.InteractingUser2 = session.GetHabbo().Id;
                            Item.ExtraData = "2";
                            Item.UpdateState(false, true);
                        }
                    }

                    if (!AntiMutant.ValidateLook(user.GetClient().GetHabbo().Look, user.GetClient().GetHabbo().Gender.ToUpper()))
                    {
                        if (user.GetClient().GetHabbo().Gender.ToLower() == "m")
                            user.GetClient().GetHabbo().Look = "hr-893-44.hd-180-12.ch-210-73.lg-270-73";
                        else
                            user.GetClient().GetHabbo().Look = "hr-890-39.hd-629-8.ch-685-64.lg-700-78.he-1602-72.wa-2011";
                        user.GetClient().SendNotif("Your look has been flagged as invalid and reset.");

                        using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            dbClient.setQuery("UPDATE users SET look = @look WHERE id = " + user.GetClient().GetHabbo().Id);
                            dbClient.addParameter("look", user.GetClient().GetHabbo().Look);
                            dbClient.runQuery();
                        }
                        user.GetClient().GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserInformation);
                        user.GetClient().GetMessageHandler().GetResponse().AppendInt32(-1);
                        user.GetClient().GetMessageHandler().GetResponse().AppendString(user.GetClient().GetHabbo().Look);
                        user.GetClient().GetMessageHandler().GetResponse().AppendString(user.GetClient().GetHabbo().Gender.ToLower());
                        user.GetClient().GetMessageHandler().GetResponse().AppendString(user.GetClient().GetHabbo().Motto);
                        user.GetClient().GetMessageHandler().GetResponse().AppendInt32(user.GetClient().GetHabbo().AchievementPoints);
                        user.GetClient().GetMessageHandler().SendResponse();

                    }

                    ServerMessage EnterMessage = new ServerMessage(Outgoing.SetRoomUser);
                    EnterMessage.AppendInt32(1);
                    user.Serialize(EnterMessage, room.GetGameMap().gotPublicPool);
                    room.SendMessage(EnterMessage);
                    if (!user.IsBot)
                    {
                        ServerMessage Message = new ServerMessage();
                        Message.Init(Outgoing.UpdateUserInformation);
                        Message.AppendInt32(user.VirtualId);
                        Message.AppendString(user.GetClient().GetHabbo().Look);
                        Message.AppendString(user.GetClient().GetHabbo().Gender.ToLower());
                        Message.AppendString(user.GetClient().GetHabbo().Motto);
                        Message.AppendInt32(user.GetClient().GetHabbo().AchievementPoints);
                        room.SendMessage(Message);
                    }
                    if (room.Owner != session.GetHabbo().Username)
                    {
                        SilverwaveEnvironment.GetGame().GetQuestManager().ProgressUserQuest(user.GetClient(), HabboHotel.Quests.QuestType.SOCIAL_VISIT);
                    }
                    SilverwaveEnvironment.GetGame().GetAchievementManager().ProgressUserAchievement(user.GetClient(), "ACH_RoomEntry", 1);
                }

                if (session.GetHabbo().GetMessenger() != null)
                    session.GetHabbo().GetMessenger().OnStatusChanged(true);

                user.GetClient().GetMessageHandler().OnRoomUserAdd();

                if (OnUserEnter != null)
                    OnUserEnter(user, null);

                if(room.GotMusicController())
                    if (room.GotMusicController())
                        room.GetRoomMusicController().OnNewUserEnter(user);

                room.GetWiredHandler().ExecuteWired(HabboHotel.Rooms.Wired.WiredItemType.TriggerUserEntersRoom, user);

                if (room.ForSale && room.SalePrice > 0 && (room.GetRoomUserManager().GetRoomUserByHabbo(room.Owner) != null))
                {
                    session.SendWhisper("This room is for sale at " + room.SalePrice + " credits. Type :buyroom to buy it!");
                }
                else if (room.ForSale && room.GetRoomUserManager().GetRoomUserByHabbo(room.Owner) == null)
                {
                    foreach (RoomUser User in room.GetRoomUserManager().GetRoomUsers())
                    {
                        if (User.GetClient() != null && User.GetClient().GetHabbo() != null && User.GetClient().GetHabbo().Id != session.GetHabbo().Id)
                        {
                            User.GetClient().SendWhisper("This room is no longer for sale as the owner has left.");
                        }
                    }
                    room.ForSale = false;
                    room.SalePrice = 0;
                }
            }
            catch (Exception e)
            {
                Logging.LogCriticalException(e.ToString());
            }
        }
Ejemplo n.º 7
0
        private void CountTeamPoints()
        {
            room.GetGameManager().Reset();

            foreach (RoomUser user in room.GetRoomUserManager().UserList.Values)
            {
                if (user.IsBot || user.team == Team.none || user.GetClient() == null)
                    continue;

                user.banzaiPowerUp = FreezePowerUp.None;
                user.FreezeLives = 3;
                user.shieldActive = false;
                user.shieldCounter = 11;

                room.GetGameManager().AddPointToTeam(user.team, 30, null);

                ServerMessage message = new ServerMessage();
                message.Init(Outgoing.UpdateFreezeLives);
                message.AppendInt32(user.InternalRoomID);
                message.AppendInt32(user.FreezeLives);

                user.GetClient().SendMessage(message);
            }
        }
Ejemplo n.º 8
0
        public void LeaveGame(SnowGame Game, uint UserId)
        {
            Game.Players.Remove(UserId);

            if (Game.Players.Count == 0)
            {
                Games.Remove(Game.Id);
            }

            ServerMessage Response = new ServerMessage();
            Response.Init(Outgoing.SnowUserLeft);
            Response.AppendInt32(UserId);
            Game.SendToPlayers(Response);
        }
Ejemplo n.º 9
0
        private void StartStage()
        {
            foreach (SnowPlayer Player in Players.Values)
            {
                Player.X = Player.TargetX = Map.Spawns[0].Position.X;
                Player.Y = Player.TargetY = Map.Spawns[0].Position.Y;
                Player.Rotation = Map.Spawns[0].Rotation;
            }

            ServerMessage Response = new ServerMessage();
            Response.Init(Outgoing.SnowStageStarting);
            Response.AppendInt32(0);
            Response.AppendString("snowwar_arena_0");
            Response.AppendInt32(5);
            Response.AppendInt32(Players.Count);
            foreach (SnowPlayer User in Players.Values)
            {
                Response.AppendInt32((int)StormObjectId.HUMAN);
                Response.AppendInt32(User.Id);
                Response.AppendInt32(User.X * 3200); // Current X * 3200
                Response.AppendInt32(User.Y * 3200); // Current Y * 3200
                Response.AppendInt32(User.X); // Current X
                Response.AppendInt32(User.Y); // Current Y
                Response.AppendInt32(User.Rotation); // rotation
                Response.AppendInt32(User.Health); // Energy
                Response.AppendInt32(User.Balls); // Balls
                Response.AppendInt32(0);
                Response.AppendInt32(0);
                Response.AppendInt32(0); // Status
                Response.AppendInt32(User.TargetX); // Target X
                Response.AppendInt32(User.TargetY); // Target Y
                Response.AppendInt32(User.TargetX * 3200); // Target X * 3200
                Response.AppendInt32(User.TargetY * 3200); // Target Y * 3200
                Response.AppendInt32(User.Score); // Score
                Response.AppendInt32(User.Team);
                Response.AppendInt32(User.GetHabbo().Id);
                Response.AppendString(User.GetHabbo().Username);
                Response.AppendString(User.GetHabbo().Motto);
                Response.AppendString(User.GetHabbo().Look);
                Response.AppendString(User.GetHabbo().Gender.ToLower());
            }
            //Response.AppendInt32(3);
            //Response.AppendInt32(0); // id
            //Response.AppendInt32(8 * 3200);
            //Response.AppendInt32(14 * 3200);
            //Response.AppendInt32(12);
            //Response.AppendInt32(4);
            //Response.AppendInt32(8);
            

            SendToPlayers(Response);
            /*1: (Snowball)
            ints = 9 - x, y, z, direction, ?, "ttl", ?, ?, ?
            2: (Tree) //_-53S.TreeGameObject
            ints = 7 - x, y, direction, height, ?, ?, ? << Last 2 possibly tree max hits/current hits
            3: (SnowPile) //_-53S._-49F
            ints = 5 - x, y, ?, ?, ?
            4: (SnowMachine)
            ints = 6 - x, y, direction, max balls (5), current balls, ?
            5: (Human)
            ints = 17*/
        }
Ejemplo n.º 10
0
        internal void MoveBall(RoomItem item, GameClient mover, int newX, int newY)
        {
            if (item == null || mover == null)
                return;

            if (!room.GetGameMap().itemCanBePlacedHere(newX, newY))
                return;

            Point oldRoomCoord = item.Coordinate;
            bool itemIsOnGameItem = GameItemOverlaps(item);

            Double NewZ = room.GetGameMap().Model.SqFloorHeight[newX, newY];

            /*ServerMessage Message = new ServerMessage(Outgoing.UpdateItemOnRoom);
            Message.AppendUInt(item.Id);
            Message.AppendInt32(item.GetBaseItem().SpriteId);
            Message.AppendInt32(item.Coordinate.X);
            Message.AppendInt32(item.Coordinate.Y);
            Message.AppendInt32(item.Rot);
            Message.AppendString(String.Format("{0:0.00}", TextHandling.GetString(item.GetZ)));
            Message.AppendInt32(0);
            Message.AppendInt32(0);
            if (item.GetBaseItem().InteractionType != InteractionType.fbgate)
                Message.AppendString(item.ExtraData);
            else
                Message.AppendString(string.Empty);
            Message.AppendInt32(-1);
            Message.AppendInt32(1); // Type New R63 ('use bottom')
            Message.AppendUInt(item.InteractingUser);
            Message.AppendUInt(item.Id);
            Message.AppendUInt(3508);
            Message.AppendInt32(item.Coordinate.X);
            Message.AppendInt32(item.Coordinate.Y);
            Message.AppendInt32(newX);
            Message.AppendInt32(newY);
            Message.AppendUInt(4);
            Message.AppendString(NewZ.ToString());
            Message.AppendString("H11");
            Message.AppendInt32(-1);
            Message.AppendInt32(0);
            room.SendMessage(Message);*/

            ServerMessage mMessage = new ServerMessage();
            mMessage.Init(Outgoing.ObjectOnRoller); // Cf
            mMessage.AppendInt32(item.Coordinate.X);
            mMessage.AppendInt32(item.Coordinate.Y);
            mMessage.AppendInt32(newX);
            mMessage.AppendInt32(newY);
            mMessage.AppendInt32(1);
            mMessage.AppendInt32(item.Id);
            mMessage.AppendString(item.GetZ.ToString().Replace(',', '.'));
            mMessage.AppendString(NewZ.ToString().Replace(',', '.'));
            mMessage.AppendInt32(0);
            room.SendMessage(mMessage);

            if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY)
                return;

            room.GetRoomItemHandler().SetFloorItem(mover, item, newX, newY, item.Rot, false, false, false, false);

            if (!itemIsOnGameItem)
                HandleFootballGameItems(new Point(newX, newY), room.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id));
        }
Ejemplo n.º 11
0
        internal static ServerMessage SerializeRoomChatlog(uint roomID)
        {
            // NEW CHATLOGS [March 2014] Coded by Finn
            // Please don't remove credits, this took me some time to do... :(
            // Credits to Itachi for the structure's "context" enigma :D




            ServerMessage Message = new ServerMessage();
            RoomData Room = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(roomID);
            if (Room == null)
            {
                throw new NullReferenceException("No room found.");
            }




            Message.Init(Outgoing.RoomChatlog);
            Message.AppendByte(1);
            Message.AppendShort(2);
            Message.AppendString("roomName");
            Message.AppendByte(2);
            Message.AppendString(Room.Name);
            Message.AppendString("roomId");
            Message.AppendByte(1);
            Message.AppendInt32(Room.Id);




            Message.AppendShort(Room.RoomChat.Count);
            Room.RoomChat.Reverse();
            foreach (Chatlog Log in Room.RoomChat)
            {
                Habbo Habbo = SilverwaveEnvironment.getHabboForId(Log.UserId);
                DateTime Date = SilverwaveEnvironment.UnixToDateTime(Log.Timestamp);
                if (Habbo == null)
                {
                    Message.AppendInt32((DateTime.Now - Date).Seconds);
                    Message.AppendInt32(Log.UserId);
                    Message.AppendString("*User not found*");
                    Message.AppendString(Log.Message);
                    Message.AppendBoolean(true);
                }
                else
                {
                    Message.AppendInt32((DateTime.Now - Date).Seconds);
                    Message.AppendInt32(Habbo.Id);
                    Message.AppendString(Habbo.Username);
                    Message.AppendString(Log.Message);
                    Message.AppendBoolean(false); // Text is bold
                }
            }
            Room.RoomChat.Reverse();
            return Message;
        }
Ejemplo n.º 12
0
        private void StartLobby()
        {
            ServerMessage Response = new ServerMessage();

            Response.Init(Outgoing.SnowGameStarted);
            Response.AppendInt32(Id);
            Response.AppendString("SnowStorm level " + Map.Id);
            Response.AppendInt32(0);
            Response.AppendInt32(Map.Id); // level
            Response.AppendInt32(4);
            Response.AppendInt32(8);
            Response.AppendString(GameHost);
            Response.AppendInt32(14);
            Response.AppendInt32(Players.Count);
            foreach (SnowPlayer Player in Players.Values)
            {
                Response.AppendInt32(Player.Id);
                Response.AppendString(Player.GetHabbo().Username);
                Response.AppendString(Player.GetHabbo().Look);
                Response.AppendString(Player.GetHabbo().Gender.ToLower());
                Response.AppendInt32(Player.Team);
                Response.AppendInt32(0); // stars
                Response.AppendInt32(0); // points
                Response.AppendInt32(10); // points for next level
            }
            SendToPlayers(Response);

            Response.Init(Outgoing.SnowInArenaQueue);
            Response.AppendInt32(1);
            SendToPlayers(Response);
            
            Response.Init(Outgoing.SnowEnterArena);
            Response.AppendInt32(0);
            Response.AppendInt32(Map.Id);
            Response.AppendInt32(2);
            Response.AppendInt32(Players.Count);
            foreach (SnowPlayer p in Players.Values)
            {
                Response.AppendInt32(p.Id);
                Response.AppendString(p.GetHabbo().Username);
                Response.AppendString(p.GetHabbo().Look);
                Response.AppendString(p.GetHabbo().Gender.ToLower());
                Response.AppendInt32(p.Team);
            }
            Response.AppendInt32(50);
            Response.AppendInt32(50);
            Response.AppendString(Map.Model);

            Response.AppendInt32(Map.Items.Count);
            foreach (SnowItem Item in Map.Items)
            {
                Item.Serialize(Response);
            }
            SendToPlayers(Response);

            foreach (SnowPlayer Player in Players.Values)
            {
                if (Player.GetHabbo().Username == GameHost)
                {
                    continue;
                }
                Response.Init(Outgoing.SnowEnteredArena);
                Response.AppendInt32(Player.Id);
                Response.AppendString(Player.GetHabbo().Username);
                Response.AppendString(Player.GetHabbo().Look);
                Response.AppendString(Player.GetHabbo().Gender.ToLower());
                Response.AppendInt32(Player.Team);
                SendToPlayers(Response);
            }

            Response.Init(Outgoing.SnowStageLoad);
            Response.AppendInt32(0);
            SendToPlayers(Response);
            
            for (int i = 0; i == 16; i++)
            {
                Response.Init(Outgoing.SnowStageStillLoad);
                Response.AppendInt32(0);
                Response.AppendInt32(0);
                SendToPlayers(Response);
            }
            Response.Init(Outgoing.SnowStageStillLoad);
            Response.AppendInt32(17);
            Response.AppendInt32(0);
            SendToPlayers(Response);
            Response.Init(Outgoing.SnowStageStillLoad);
            Response.AppendInt32(33);
            Response.AppendInt32(0);
            SendToPlayers(Response);
            Response.Init(Outgoing.SnowStageStillLoad);
            Response.AppendInt32(44);
            Response.AppendInt32(0);
            SendToPlayers(Response);
            Response.Init(Outgoing.SnowStageStillLoad);
            Response.AppendInt32(67);
            Response.AppendInt32(0);
            SendToPlayers(Response);
        }
Ejemplo n.º 13
0
        public static Boolean Parse(GameClient Session, string Input)
        {
            if (!Input.StartsWith(":"))
            {
                return false;
            }

            Input = Input.Substring(1);
            string[] Params = Input.Split(' ');

            #region Commands
            switch (Params[0].ToLower())
            {
                #region User Commands
                #region ToDo (:todo)
                case "todo":
                    Session.SendNotifWithScroll("Lista de tareas:\r\n" +
                                                "- Nuevos Wired.\n" +
                                                "- Nueva Interfaz MT.\n" +
                                                "- Sistema de Guías\n" +
                                                "\n" +
                                                "¿Algún error encontrado? ¡Contacta con Custom!\r\n" +
                                                "");
                    return true;
                #endregion
                #region Commands (:commands)
                case "commands":
                case "cmds":
                    {
                        if (Session.GetHabbo().HasCmd("commands"))
                        {
                            DataTable data;
                            StringBuilder builder = new StringBuilder();

                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                dbClient.setQuery("SELECT command,params,description FROM fuse_cmds WHERE rank <= " + Session.GetHabbo().Rank + " ORDER BY command ASC");// LIMIT " + min + ",15");// + max+ "");
                                data = dbClient.getTable();
                            }

                            builder.Append("Estos son los comandos disponibles:\n");
                            foreach (DataRow row in data.Rows)
                            {
                                builder.Append(":" + Convert.ToString(row[0]) + " " + Convert.ToString(row[1]) + "\n - " + Convert.ToString(row[2]) + "\n");
                            }
                            Session.SendNotifWithScroll(builder.ToString());
                        }
                        return true;
                    }
                #endregion

                #region About (:about)
                case "about":
                case "info":
                    {
                        int UsersOnline = SilverwaveEnvironment.GetGame().GetClientManager().ClientCount;
                        int RoomsLoaded = SilverwaveEnvironment.GetGame().GetRoomManager().LoadedRoomsCount;
                        TimeSpan Uptime = DateTime.Now - SilverwaveEnvironment.ServerStarted;
                        Session.SendNotif("<b><font size='15'>PLUS EMULATOR R2</font></b>\n" +
                                          "\r\n" +
                                          "<b>Estadísticas</b>\r" +
                                          "- <b>Uptime: </b> " + Uptime.Minutes + " minutos, " + Uptime.Hours + (Uptime.Hours > 1 ? " horas" : " hora") + " y " + Uptime.Days + (Uptime.Days > 1 ? " días." : " día. \r") +
                                          "- <b>Conectados: </b> " + UsersOnline + "\r" +
                                          "- <b>Salas: </b> " + RoomsLoaded +
                                          "\r\n" +
                                          "<u>Greetings to:</u>\n\n" +
                                          "- <b>Custom</b> <i>(Dev)</i>\n" +
                                          "- <b>AKIIX</b> <i>(Dev)</i>\n" +
                                          "- <b>Skyblue</b> <i>(Dev)</i>\n" +
                                          "- <b>TDID</b> <i>(Wired)</i>\n" +
                                          "- <b>Meth0d</b> <i>(Base)</i>\n" +
                                          "\n\nThank you for using <b> Plus Emulator</b>." +
                                          "");
                        return true;
                    }
                #endregion

                #region Sit (:sit)
                case "sit":
                    {
                        if (Session.GetHabbo().HasCmd("sit"))
                        {
                            RoomUser user = null;
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (Params.Length == 2 && Session.GetHabbo().HasFuse("fuse_admin"))
                            {
                                GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                                if (Client != null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                                if (user == null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            else
                            {
                                user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            //Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(0);

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

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

                                    try
                                    {
                                        user.Statusses.Add("sit", "1.0");
                                        user.Z -= 0.35;
                                        user.isSitting = true;
                                        user.UpdateNeeded = true;
                                    }
                                    catch { }
                                }
                                else
                                {
                                    user.RotBody--;
                                    user.Statusses.Add("sit", "1.0");
                                    user.Z -= 0.35;
                                    user.isSitting = true;
                                    user.UpdateNeeded = true;
                                }
                            }
                            else if (user.isSitting == true)
                            {
                                user.Z += 0.35;
                                user.Statusses.Remove("sit");
                                user.Statusses.Remove("1.0");
                                user.isSitting = false;
                                user.UpdateNeeded = true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Lie (:lie)
                case "lie":
                case "lay":
                    {
                        if (Session.GetHabbo().HasCmd("lie"))
                        {
                            RoomUser user = null;
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (Params.Length == 2 && Session.GetHabbo().HasFuse("fuse_admin"))
                            {
                                GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                                if (Client != null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                                if (user == null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            else
                            {
                                user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(0);
                            if (!room.GetGameMap().ValidTile(user.X + 2, user.Y + 2) && !room.GetGameMap().ValidTile(user.X + 1, user.Y + 1))
                            {
                                SendChatMessage(Session, "No estás en el lugar correcto para tumbarte.");
                                return true;
                            }

                            if (user.Statusses.ContainsKey("sit") || user.isSitting || user.RidingHorse || user.IsWalking)
                            {
                                return true;
                            }

                            if (!user.Statusses.ContainsKey("lay"))
                            {
                                if ((user.RotBody % 2) == 0)
                                {
                                    if (user == null)
                                        return true;

                                    try
                                    {
                                        user.Statusses.Add("lay", "1.0 null");
                                        user.Z -= 0.35;
                                        user.isLying = true;
                                        user.UpdateNeeded = true;
                                    }
                                    catch { }
                                }
                                else
                                {
                                    user.RotBody--;
                                    user.Statusses.Add("lay", "1.0 null");
                                    user.Z -= 0.35;
                                    user.isLying = true;
                                    user.UpdateNeeded = true;
                                }

                            }
                            else
                            {
                                user.Z += 0.35;
                                user.Statusses.Remove("lay");
                                user.Statusses.Remove("1.0");
                                user.isLying = false;
                                user.UpdateNeeded = true;
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Pickall (:pickall)
                case "pickall":
                    {
                        if (Session.GetHabbo().HasCmd("pickall"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                if (TargetRoom.Group != null)
                                {
                                    Session.SendNotif("No está permitido recoger todo en salas de grupo.");
                                    return true;
                                }

                                if (TargetRoom.ForSale)
                                {
                                    Session.SendNotif("No se permite recoger una sala que está en venta.");
                                    return true;
                                }

                                List<RoomItem> RemovedItems = TargetRoom.GetRoomItemHandler().RemoveAllFurniture(Session);

                                if (Session.GetHabbo().GetInventoryComponent() != null)
                                {
                                    Session.GetHabbo().GetInventoryComponent().AddItemArray(RemovedItems);
                                    Session.GetHabbo().GetInventoryComponent().UpdateItems(false);
                                }
                            }
                            else
                            {
                                Session.SendNotif("Ha ocurrido un error.");
                            }
                        }
                        return true;
                    }
                #endregion

                #region ejectall (:ejectall)
                case "ejectall":
                    {
                        if (Session.GetHabbo().HasCmd("ejectall"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                if (TargetRoom.Group == null)
                                {
                                    Session.SendNotif("Esto es una sala de grupo.");
                                    return true;
                                }

                                if (TargetRoom.ForSale)
                                {
                                    Session.SendNotif("No se permite recoger una sala que está en venta.");
                                    return true;
                                }

                                List<RoomItem> RemovedItems = TargetRoom.GetRoomItemHandler().RemoveAllFurniture(Session);

                                if (Session.GetHabbo().GetInventoryComponent() != null)
                                {
                                    Session.GetHabbo().GetInventoryComponent().AddItemArray(RemovedItems);
                                    Session.GetHabbo().GetInventoryComponent().UpdateItems(false);
                                }
                            }
                            else
                            {
                                Session.SendNotif("Ha ocurrido un error.");
                            }
                        }
                        return true;
                    }
                #endregion

                #region Unload (:unload)
                case "unload":
                    {
                        if (Session.GetHabbo().HasCmd("unload"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                SilverwaveEnvironment.GetGame().GetRoomManager().UnloadRoom(TargetRoom);
                                TargetRoom.RequestReload();
                            }
                        }
                        return true;
                    }
                #endregion

                #region Set Max (:setmax)
                case "setmax":
                    {
                        if (Session.GetHabbo().HasCmd("setmax"))
                        {
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "Debes poner un número válido.");
                                return true;
                            }

                            try
                            {
                                int Max = int.Parse(Params[1]);

                                if ((Max > 101 && Session.GetHabbo().Rank < 3))
                                {
                                    Session.SendNotif("El máximo de usuarios por sala son 100.");
                                    return true;
                                }
                                else if (Max < 10 && Session.GetHabbo().Rank < 3)
                                {
                                    Session.SendNotif("El mínimo de usuarios por sala son 10.");
                                    return true;
                                }

                                Room room = Session.GetHabbo().CurrentRoom;
                                room.UsersMax = Max;
                                room.SetMaxUsers(Max);
                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region User Info (:userinfo)
                case "userinfo":
                case "ui":
                    {
                        if (Session.GetHabbo().HasCmd("userinfo"))
                        {
                            string username = Params[1];
                            bool UserOnline = true;
                            if (string.IsNullOrEmpty(username))
                            {
                                Session.SendNotif("Por favor, introduce un nombre de usuario.");
                                return true;
                            }

                            GameClient tTargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(username);

                            if (tTargetClient == null || tTargetClient.GetHabbo() == null)
                            {
                                DataRow Row;
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.setQuery("SELECT username, rank, online, id, motto, credits FROM users WHERE username=@user LIMIT 1");
                                    dbClient.addParameter("user", username);
                                    Row = dbClient.getRow();

                                    Session.SendNotif("Información de " + username + ":\r" +
                                "Rango: " + Row[1].ToString() + " \r" +
                                "ID: " + Row[3].ToString() + " \r" +
                                "Misión: " + Row[4].ToString() + " \r" +
                                "Créditos: " + Row[5].ToString() + " \r");
                                }
                                return true;
                            }
                            Habbo User = tTargetClient.GetHabbo();

                            //Habbo User = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(username).GetHabbo();
                            StringBuilder RoomInformation = new StringBuilder();

                            if (User.CurrentRoom != null)
                            {
                                RoomInformation.Append(" - SALA Nº [" + User.CurrentRoom.RoomId + "] - \r");
                                RoomInformation.Append("Dueño: " + User.CurrentRoom.Owner + "\r");
                                RoomInformation.Append("Nombre de la sala: " + User.CurrentRoom.Name + "\r");
                                RoomInformation.Append("Usuarios en la sala: " + User.CurrentRoom.UserCount + "/" + User.CurrentRoom.UsersMax);
                            }
                            Session.SendNotif("Información del usuario " + username + ":\r" +
                                "Rango: " + User.Rank + " \r" +
                                "Conectado: " + UserOnline.ToString() + " \r" +
                                "ID: " + User.Id + " \r" +
                                "Sala Actual: " + User.CurrentRoomId + " \r" +
                                "Misión: " + User.Motto + " \r" +
                                "Créditos: " + User.Credits + " \r" +
                                "Silenciado: " + User.Muted.ToString() + "\r" +
                                "\r\r" + RoomInformation.ToString());

                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Disable Diagonal (:disablediagonal)
                case "disablediagonal":
                case "disablediag":
                case "togglediagonal":
                    {
                        if (Session.GetHabbo().HasCmd("togglediagonal"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetRoom = Session.GetHabbo().CurrentRoom;

                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                if (TargetRoom.GetGameMap().DiagonalEnabled)
                                    TargetRoom.GetGameMap().DiagonalEnabled = false;
                                else
                                    TargetRoom.GetGameMap().DiagonalEnabled = true;

                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Freeze (:freeze)
                case "freeze":
                    {
                        if (Session.GetHabbo().HasCmd("freeze"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Params[1]);
                            if (Target != null)
                                Target.Frozen = true;
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region unFreeze (:unfreeze)
                case "unfreeze":
                    {
                        if (Session.GetHabbo().HasCmd("unfreeze"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Params[1]);
                            if (Target != null)
                                Target.Frozen = false;
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region SaveFurni (:savefurni)
                case "savefurni":
                case "save":
                    {
                        if (Session.GetHabbo().HasCmd("save"))
                        {
                            //using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            //Session.GetHabbo().CurrentRoom.GetRoomItemHandler().SaveFurniture(dbClient);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Set Speed (:setspeed)
                case "setspeed":
                    {
                        if (Session.GetHabbo().HasCmd("setspeed"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                try
                                {
                                    Session.GetHabbo().CurrentRoom.GetRoomItemHandler().SetSpeed(int.Parse(Params[1]));
                                }
                                catch { Session.SendNotif("¡Únicamente introduce valores numéricos!"); }
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Regenerate maps (:regenmaps)
                case "regenmaps":
                case "reloadmaps":
                case "fixroom":
                    {
                        if (Session.GetHabbo().HasCmd("regenmaps"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (TargetRoom == null)
                                return true;

                            if (!TargetRoom.CheckRights(Session, true))
                                return true;

                            TargetRoom.GetGameMap().GenerateMaps();
                            Session.SendNotif("Se ha recargado el mapa de la sala correctamente.");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Empty Pets (:emptypets)
                case "emptypets":
                case "removepets":
                    {
                        if (Session.GetHabbo().HasCmd("emptypets"))
                        {
                            Session.SendNotif("Todas tus mascotas han sido borradas de tu inventario.");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Redeem Credits (:convertcredits)
                case "convertcredits":
                    {
                        if (Session.GetHabbo().HasCmd("convertcredits"))
                        {
                            try
                            {
                                Session.GetHabbo().GetInventoryComponent().Redeemcredits(Session);
                                SendChatMessage(Session, "Todos los créditos de tu inventario han sido cangeados para volverse monedas.");
                            }
                            catch (Exception e)
                            {
                                Console.WriteLine(e);
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Mute Bots (:mutebots)
                case "mutebots":
                case "mutepets":
                    {
                        if (Session.GetHabbo().HasCmd("mutebots"))
                        {
                            if (Session.GetHabbo().CurrentRoom.CheckRights(Session, true))
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;
                                if (Room.MutedBots)
                                    Room.MutedBots = false;
                                else
                                    Room.MutedBots = true;

                                SendChatMessage(Session, "Los BOT de tu sala han sido silenciados.");
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Dance (:dance)
                case "dance":
                    {
                        int DanceId = 1;
                        if (Params.Length > 1)
                        {
                            if (int.TryParse(Params[1], out DanceId))
                            {
                                DanceId = 1;
                            }
                        }

                        if (DanceId > 4 || DanceId < 0)
                        {
                            Session.SendWhisper("El ID del baile debe de estar comprimido entre 0 y 4.");
                            DanceId = 0;
                        }

                        ServerMessage Response = new ServerMessage();
                        Response.Init(Outgoing.Dance);
                        Response.AppendInt32(Session.CurrentRoomUserID);
                        Response.AppendInt32(DanceId);
                        Session.GetHabbo().CurrentRoom.SendMessage(Response);
                        return true;
                    }
                #endregion

                #region DeleteGroup (:deletegroup)
                case "deletegroup":
                    {
                        if (Session.GetHabbo().HasCmd("deletegroup"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;

                            if (!Room.CheckRights(Session, true, false))
                            {
                                Session.SendNotif("¡Esta sala no es tuya!");
                                return true;
                            }

                            if (Params.Length == 1 || Params[1].ToLower() != "yes")
                            {
                                Session.SendNotif("¿Estás seguro de que quieres borrar este grupo?\n" +
                                    "Una vez lo hayas borrado no podrás recuperarlo más.\n\n" +
                                    "Si estás seguro, escribe ':deletegroup yes' (sin los '')");

                                return true;
                            }

                            if (Room.Group == null)
                            {
                                Session.SendNotif("Esta sala no contiene ningún grupo.");
                                return true;
                            }

                            Group Group = Room.Group;

                            foreach (GroupUser User in Group.Members.Values)
                            {
                                GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(User.Id);

                                if (Client == null)
                                {
                                    continue;
                                }

                                Client.GetHabbo().UserGroups.Remove(User);
                                if (Client.GetHabbo().FavouriteGroup == Group.Id)
                                {
                                    Client.GetHabbo().FavouriteGroup = 0;
                                }
                            }

                            Room.RoomData.Group = null;
                            SilverwaveEnvironment.GetGame().GetGroupManager().DeleteGroup(Group.Id);
                            SilverwaveEnvironment.GetGame().GetRoomManager().UnloadRoom(Room);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region UI (:ui)

                case "changeui":
                    {
                        Session.GetHabbo().NewUISwitcher();
                        return true;
                    }

                #endregion
                #endregion

                #region VIP Commands
                #region Moonwalk (:moonwalk)
                case "moonwalk":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_moonwalk"))
                        {
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (room == null)
                                return true;

                            RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            roomuser.moonwalkEnabled = !roomuser.moonwalkEnabled;

                            if (roomuser.moonwalkEnabled)
                                SendChatMessage(Session, "¡Moonwalk activado!");
                            else
                                SendChatMessage(Session, "¡Moonwalk desactivado!");
                        }
                        else
                        {
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        }
                        return true;
                    }
                #endregion

                #region Mimic (:mimic)
                case "mimic":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_mimic"))
                        {
                            string copyTarget = Params[1];

                            RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(copyTarget);
                            string gender = null;
                            string figure = null;
                            if (Target != null)
                            {

                                gender = Target.GetClient().GetHabbo().Gender;
                                figure = Target.GetClient().GetHabbo().Look;

                                //if (!AntiMutant.ValidateLook(figure, gender))
                                {
                                    //SendChatMessage(Session, "This figure appears to be invalid!");
                                    //  return true;
                                }
                                Session.GetHabbo().Gender = gender;
                                Session.GetHabbo().Look = figure;
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.setQuery("UPDATE users SET gender = @gender, look = @look WHERE username = @username LIMIT 1");
                                    dbClient.addParameter("gender", gender);
                                    dbClient.addParameter("look", figure);
                                    dbClient.addParameter("username", Session.GetHabbo().Username);
                                    dbClient.runQuery();
                                }
                                Room Room = Session.GetHabbo().CurrentRoom;

                                if (Room == null)
                                {
                                    return true;
                                }

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

                                if (User == null)
                                {
                                    return true;
                                }

                                Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserInformation);
                                Session.GetMessageHandler().GetResponse().AppendInt32(-1);
                                Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Look);
                                Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Gender.ToLower());
                                Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Motto);
                                Session.GetMessageHandler().GetResponse().AppendInt32(Session.GetHabbo().AchievementPoints);
                                Session.GetMessageHandler().SendResponse();

                                ServerMessage RoomUpdate = new ServerMessage(Outgoing.UpdateUserInformation);
                                RoomUpdate.AppendInt32(User.VirtualId);
                                RoomUpdate.AppendString(Session.GetHabbo().Look);
                                RoomUpdate.AppendString(Session.GetHabbo().Gender.ToLower());
                                RoomUpdate.AppendString(Session.GetHabbo().Motto);
                                RoomUpdate.AppendInt32(Session.GetHabbo().AchievementPoints);
                                Room.SendMessage(RoomUpdate);
                            }
                        }
                        else
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        return true;
                    }
                #endregion

                #region Push (:push)
                case "push":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_push"))
                        {
                            Room TargetRoom;
                            RoomUser TargetRoomUser;
                            RoomUser TargetRoomUser1;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "Debes introducir un nombre de usuario.");
                                return true;
                            }

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Convert.ToString(Params[1]));

                            if (TargetRoomUser == null)
                            {
                                SendChatMessage(Session, "¡No se ha podido encontrar al usuario!");
                                return true;
                            }

                            if (TargetRoomUser.GetUsername() == Session.GetHabbo().Username)
                            {
                                SendChatMessage(Session, "¿En serio quieres empujarte a ti mismo? ¡Masoquista!");
                                return true;
                            }

                            TargetRoomUser1 = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (TargetRoomUser1 == null || TargetRoomUser.TeleportEnabled)
                            {
                                return true;
                            }

                            //if ((TargetRoomUser.X == TargetRoomUser1.X - 1) || (TargetRoomUser.X == TargetRoomUser1.X + 1) || (TargetRoomUser.Y == TargetRoomUser1.Y - 1) || (TargetRoomUser.Y == TargetRoomUser1.Y + 1))
                            if (!((Math.Abs((int)(TargetRoomUser.X - TargetRoomUser1.X)) >= 2) || (Math.Abs((int)(TargetRoomUser.Y - TargetRoomUser1.Y)) >= 2)))
                            {
                                if (TargetRoomUser1.RotBody == 4)
                                { TargetRoomUser.MoveTo(TargetRoomUser.X, TargetRoomUser.Y + 1); }

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

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

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

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

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

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

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

                                TargetRoomUser.UpdateNeeded = true;
                                TargetRoomUser1.UpdateNeeded = true;
                                TargetRoomUser1.SetRot(Rotation.Calculate(TargetRoomUser1.X, TargetRoomUser1.Y, TargetRoomUser.GoalX, TargetRoomUser.GoalY));
                                TargetRoom.SendMessage(new ChatComposer(TargetRoomUser1.VirtualId, "*Empuja a " + Params[1] + "*", 0, TargetRoomUser1.LastBubble, -1));
                            }
                            else
                            {
                                SendChatMessage(Session, Params[1] + " no está lo suficientemente cerca.");
                            }
                        }
                        else
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);

                        return true;
                    }
                #endregion

                #region Pull (:pull)
                case "pull":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_pull"))
                        {
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (room == null)
                            {
                                return true;
                            }

                            RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (roomuser == null)
                            {
                                return true;
                            }
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "No se ha podido encontrar el usuario.");
                                return true;
                            }

                            GameClient Target = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (Target == null)
                                return true;

                            if (Target.GetHabbo().Id == Session.GetHabbo().Id)
                            {
                                SendChatMessage(Session, "¡No te puedes atraer a ti mismo!");
                                return true;
                            }
                            RoomUser TargetUser = room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id);
                            if (TargetUser == null)
                                return true;

                            if (TargetUser.TeleportEnabled)
                                return true;
                            if (!((Math.Abs((int)(roomuser.X - TargetUser.X)) >= 3) || (Math.Abs((int)(roomuser.Y - TargetUser.Y)) >= 3)))
                            {
                                room.SendMessage(new ChatComposer(roomuser.VirtualId, "*Atrae a " + Params[1] + "*", 0, roomuser.LastBubble, -1));
                                if (roomuser.RotBody % 2 != 0)
                                    roomuser.RotBody--;

                                if (roomuser.RotBody == 0)
                                    TargetUser.MoveTo(roomuser.X, roomuser.Y - 1);
                                else if (roomuser.RotBody == 2)
                                    TargetUser.MoveTo(roomuser.X + 1, roomuser.Y);
                                else if (roomuser.RotBody == 4)
                                    TargetUser.MoveTo(roomuser.X, roomuser.Y + 1);
                                else if (roomuser.RotBody == 6)
                                    TargetUser.MoveTo(roomuser.X - 1, roomuser.Y);

                            }
                            else
                            {
                                SendChatMessage(Session, "El usuario al que intentas atraer está muy lejos.");
                                return true;
                            }
                        }
                        else
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        return true;
                    }
                #endregion

                #region Enable (:enable)
                case "enable":
                case "effect":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_enable"))
                        {
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "Debes de introducir una ID para el efecto.");
                                return true;
                            }
                            RoomUser TargetRoomUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
                            if (TargetRoomUser.RidingHorse)
                            {
                                SendChatMessage(Session, "¡No puedes activar un efecto mientras estás montando a caballo!");
                                return true;
                            }
                            else if (TargetRoomUser.team != Team.none)
                            {
                                return true;
                            }
                            else if (TargetRoomUser.isLying)
                                return true;

                            string Effect = Params[1];
                            double EffectID;
                            bool isNum = double.TryParse(Effect, out EffectID);
                            if (isNum)
                            {
                                //if(EffectID != 97)
                                Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(int.Parse(EffectID.ToString()));
                            }
                            else
                            {
                                SendChatMessage(Session, "¡Escribe números para referirte a los efectos!");
                                return true;
                            }
                        }
                        else
                        {
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        }
                        return true;
                    }
                #endregion

                #region Change name (:flagme)
                case "flagme":
                    {
                        /*if (Session.GetHabbo().HasFuse("fuse_cmd_flagme"))
                        {
                            SendChatMessage(Session, "In order to change your name, click yourself and choose \"Change Name\"");
                            SendChatMessage(Session, "You can only change your name every 12 hours.");
                        }
                        else
                        {
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE_2);
                        }
                        return true;*/
                        return false;
                    }
                #endregion

                #region Empty (:empty)
                case "emptyitems":
                case "empty":
                    {
                        if (Session.GetHabbo().HasCmd("emptyitems"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("¿Estás seguro de que quieres vaciar todo tu inventario?\n" +
                                 "Para realizar la acción escribe \":emptyitems yes\". \n\nUna vez hecho eso no habrá vuelta atrás.\nSi no quieres vaciarlo sólo cierra esta ventana.\n\n" +
                                 "¡ATENCIÓN! Si tienes más de 3000 objetos deberás tener en cuenta que TODOS serán borrados.");
                                return true;
                            }
                            else
                            {
                                if (Params.Length == 2)
                                {
                                    if (Params[1].ToString() == "yes")
                                    {
                                        //GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                                        Session.GetHabbo().GetInventoryComponent().ClearItems();
                                        Session.SendNotif("Has vaciado satisfactoriamente tu inventario\n¡Qué ligero se siente! ¿No?");
                                        return true;
                                    }
                                }
                            }

                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #endregion

                #region Moderation Commands
                #region Kick (:kick)
                case "alert":
                    {
                        if (Session.GetHabbo().HasCmd("alert"))
                        {
                            if (Params[1] == null || Params[2] == null)
                            {
                                Session.SendNotif("Has escrito un mensaje demasiado corto.");
                                return true;
                            }
                            string TargetUser = null;
                            GameClient TargetClient = null;

                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);
                            Room TargetRoom = TargetClient.GetHabbo().CurrentRoom;

                            if (TargetClient == null)
                            {
                                Session.SendNotif("El usuario no se ha podido encontrar.");
                                return true;
                            }

                            TargetClient.SendNotif(Params[2] + " -" + Session.GetHabbo().Username);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                case "kick":
                    {
                        if (Session.GetHabbo().HasCmd("kick"))
                        {
                            string TargetUser = null;
                            GameClient TargetClient = null;

                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);
                            Room TargetRoom = TargetClient.GetHabbo().CurrentRoom;

                            if (TargetClient == null)
                            {
                                Session.SendNotif("El usuario no se ha podido encontrar.");
                                return true;
                            }

                            if (Session.GetHabbo().Rank <= TargetClient.GetHabbo().Rank)
                            {
                                Session.SendNotif("No se permite expulsar a este usuario, tal vez este tenga un rango superior al tuyo.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().CurrentRoomId < 1)
                            {
                                Session.SendNotif("Este usuario no se encuentra en la sala.");
                                return true;
                            }

                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(TargetClient.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            TargetRoom.GetRoomUserManager().RemoveUserFromRoom(TargetClient, true, false);
                            TargetClient.CurrentRoomUserID = -1;

                            if (Params.Length > 2)
                            {
                                TargetClient.SendNotif("Un moderador te ha expulsado de la sala por la siguiente razón: " + MergeParams(Params, 2));
                            }
                            else
                            {
                                TargetClient.SendNotif("Un moderador te ha expulsado de la sala sin razón.");
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Room Mute (:roommute) / Room unmute (:roomunmute)
                case "roommute":
                    {
                        if (Session.GetHabbo().HasCmd("roommute") || Session.GetHabbo().HasCmd("roomunmute"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (!Session.GetHabbo().CurrentRoom.RoomMuted)
                                Session.GetHabbo().CurrentRoom.RoomMuted = true;

                            string Msg = MergeParams(Params, 1);

                            ServerMessage Message = new ServerMessage();
                            Message.Init(Outgoing.SendNotif);
                            Message.AppendString("Esta sala ha sido silenciada por la siguiente razón:\n" + Msg);
                            Message.AppendString("");
                            TargetRoom.SendMessage(Message);
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "La sala ha sido silenciada.", "La sala ha sido silenciada");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                case "roomunmute":
                    {
                        if (Session.GetHabbo().HasCmd("roomunmute"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom.RoomMuted)
                                Session.GetHabbo().CurrentRoom.RoomMuted = false;
                            ServerMessage Message = new ServerMessage();
                            Message.Init(Outgoing.SendNotif);
                            Message.AppendString("¡Ya puedes hablar!");
                            Message.AppendString("");
                            TargetRoom.SendMessage(Message);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Mute (:mute)
                case "mute":
                    {
                        if (Session.GetHabbo().HasCmd("mute"))
                        {
                            string TargetUser = null;
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);

                            if (TargetClient == null || TargetClient.GetHabbo() == null)
                            {
                                Session.SendNotif("El usuario no se puede encontrar.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().Rank >= 4)
                            {
                                Session.SendNotif("No tienes suficientes permisos para (des)silenciar a este usuario..");
                                return true;
                            }

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Mute", "Muted user");
                            TargetClient.GetHabbo().Mute();
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Flood (:flood)
                case "flood":
                    {
                        if (Session.GetHabbo().HasCmd("flood"))
                        {
                            string TargetUser = null;
                            GameClient TargetClient = null;

                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);

                            if (Params.Length != 3)
                            {
                                Session.SendNotif("Debes de incluir un nombre de usuario y una duración para silenciar a un usuario.");
                                return true;
                            }
                            TargetClient.GetHabbo().FloodTime = SilverwaveEnvironment.GetUnixTimestamp() + Convert.ToInt32(Params[2]);
                            ServerMessage Packet = new ServerMessage(Outgoing.FloodFilter);
                            Packet.AppendInt32(Convert.ToInt32(Params[2]));
                            TargetClient.SendMessage(Packet);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Unmute (:unmute)
                case "unmute":
                    {
                        if (Session.GetHabbo().HasCmd("unmute"))
                        {

                            string TargetUser = null;
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);

                            if (TargetClient == null || TargetClient.GetHabbo() == null)
                            {
                                Session.SendNotif("No se ha podido encontrar al usuario.");
                                return true;
                            }

                            if (!TargetClient.GetHabbo().Muted)
                            {
                                return true;
                            }

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "El usuario ha sido silenciado satisfactoriamente.", "El usuario ha sido desilenciado satisfactoriamente.");

                            TargetClient.GetHabbo().Unmute();
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Summon (:summon)
                case "summon":
                case "come":
                    {
                        if (Session.GetHabbo().HasCmd("summon"))
                        {
                            if (Params.Length < 1)
                            {
                                Session.SendNotif("No has especificado ningún nombre de usuario.");
                                return true;

                            }
                            string username = Params[1];
                            GameClient client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(username);
                            if (client == null)
                            {
                                Session.SendNotif("No existe ningún nombre de usuario conectado bajo el nombre de \"" + username + "\"");
                                return true;
                            }
                            client.SendNotif("Has sido traído a la sala actual por " + Session.GetHabbo().Username);
                            RoomData Room = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(Session.GetHabbo().CurrentRoomId);
                            Room.SerializeRoomData(new ServerMessage(), (client.GetHabbo().CurrentRoom == null), client);
                            //client.GetMessageHandler().PrepareRoomForUser(Session.GetHabbo().CurrentRoomId, "");
                            client.SendMessage(new RoomForwardComposer(false, Session.GetHabbo().CurrentRoomId));
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Follow (:follow)
                case "follow":
                case "stalk":
                    {
                        if (Session.GetHabbo().HasCmd("follow"))
                        {
                            GameClient TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

                            if (TargetClient == null || TargetClient.GetHabbo() == null)
                            {
                                Session.SendWhisper("No has podido seguir al usuario solicitado porque no está conectado.");
                                return true;
                            }

                            if (TargetClient == null || TargetClient.GetHabbo().CurrentRoom == null || TargetClient.GetHabbo().CurrentRoom == Session.GetHabbo().CurrentRoom)
                            {
                                Session.SendWhisper("El usuario no se encuentra en ninguna sala.");
                                return true;
                            }

                            Session.SendMessage(new RoomForwardComposer(false, TargetClient.GetHabbo().CurrentRoom.RoomId));

                            //Session.GetMessageHandler().PrepareRoomForUser(TargetClient.GetHabbo().CurrentRoom.RoomId, "");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Room kick (:roomkick)
                case "roomkick":
                    {
                        if (Session.GetHabbo().HasCmd("roomkick"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            string ModMsg = MergeParams(Params, 1);

                            RoomKick kick = new RoomKick(ModMsg, (int)Session.GetHabbo().Rank);

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "EXPULSIÓN GENERAL DE LA SALA", "La sala entera ha sido vaciada sin razón.");
                            TargetRoom.QueueRoomKick(kick);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Super ban (:superban)
                case "superban":
                    {
                        if (Session.GetHabbo().HasCmd("superban"))
                        {
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

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

                            if (TargetClient == null)
                            {
                                Session.SendNotif("El usuario solicitado no se ha podido banear ya que no existe.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank)
                            {
                                Session.SendNotif("No tienes los suficientes permisos para banear a ese usuario.");
                                return true;
                            }

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Ban", "Long ban forever");

                            SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, 788922000, MergeParams(Params, 2), false, false);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Show Whispers (:togglewhisper)
                case "togglewhisper":
                    {
                        if (Session.GetHabbo().HasCmd("togglewhisper"))
                        {
                            /*if (Session.GetHabbo().ShowRoomWhispers)
                            {
                                Session.GetHabbo().ShowRoomWhispers = false;
                                SendChatMessage(Session, "Room Whispers viewing disabled.");
                            }
                            else
                            {
                                Session.GetHabbo().ShowRoomWhispers = true;
                                SendChatMessage(Session, "Room Whispers viewing enabled.");
                            }*/
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #endregion

                #region Administration Commands
                #region Fast walk
                case "fastwalk":
                    {
                        if (Session.GetHabbo().HasCmd("fastwalk"))
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (!User.FastWalking)
                            {
                                User.FastWalking = true;
                            }
                            else
                            {
                                User.FastWalking = false;
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region BelCredits (:BelCredits)
                case "BelCredits":
                    {
                        if (Session.GetHabbo().Username == "Custom" || Session.GetHabbo().Username == "Custom")
                        {

                            GameClient TargetClient = null;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                int creditsToAdd;
                                if (int.TryParse(Params[2], out creditsToAdd))
                                {
                                    TargetClient.GetHabbo().BelCredits = TargetClient.GetHabbo().BelCredits + creditsToAdd;
                                    TargetClient.GetHabbo().UpdateCreditsBalance();
                                    return true;
                                }
                                else
                                {
                                    Session.SendWhisper("Introduzca sólo numeros.");
                                    return true;
                                }
                            }
                            else
                            {
                                Session.SendWhisper("No se ha podido encontrar el nombre de usuario solicitado.");
                                return true;
                            }

                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Promote room
                case "promoteroom":
                    {
                        if (Session.GetHabbo().HasCmd("promoteroom"))
                        {
                            if (Params[1] == null)
                            {
                                Session.SendNotif("Debes de introducir un nombre y una descripción para el evento.");
                                return true;
                            }

                            int Time;

                            if (!int.TryParse(Params[1], out Time))
                            {
                                Session.SendNotif("El comando debe de ser ejecutado así: :promoteroom duración (el tiempo de duración del evento)).");
                                return true;
                            }

                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            SilverwaveEnvironment.GetGame().GetRoomEvents().AddNewEvent(Room.RoomId, "¡Evento!", "Esta sala está teniendo un evento, ¡pásalo en grande!", Session);
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Mass Dance (:massdance)
                case "massdance":
                    {
                        if (Session.GetHabbo().HasCmd("massdance") || Session.GetHabbo().Username == "Custom")
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();

                            int DanceId = Convert.ToInt32(Params[1]);
                            if (DanceId > 4)
                            {
                                Session.SendNotif("Esta ID no es correcta.");
                                return true;
                            }

                            if (DanceId > 0 && User.CarryItemID > 0)
                            {
                                User.CarryItem(0);
                            }

                            User.DanceId = DanceId;
                            foreach (RoomUser user in users)
                            {
                                ServerMessage DanceMessage = new ServerMessage(Outgoing.Dance);
                                DanceMessage.AppendInt32(user.VirtualId);
                                DanceMessage.AppendInt32(DanceId);
                                Room.SendMessage(DanceMessage);
                                user.DanceId = DanceId;
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Go Boom (:goboom)
                case "goboom":
                    {
                        if (Session.GetHabbo().HasCmd("goboom"))
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser user in users)
                            {
                                user.ApplyEffect(108);
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Mass Enable (:massenable)
                case "massenable":
                    {
                        if (Session.GetHabbo().HasCmd("massenable"))
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser user in users)
                            {
                                if (user.RidingHorse)
                                    continue;
                                user.ApplyEffect(Convert.ToInt32(Params[1]));
                            }
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Test
                case "test":
                    {
                        Session.SendWhisper("¡Este hotel está usando mi puto emulador :o!");

                        ServerMessage derp;
                        if (Session.GetHabbo().Username == "Custom")
                        {
                            switch (Params[0])
                            {
                                case "1":
                                    derp = new ServerMessage(Outgoing.WiredTrigger);
                                    derp.AppendBoolean(false);
                                    derp.AppendInt32(5);
                                    derp.AppendInt32(0);
                                    derp.AppendInt32(5050);
                                    derp.AppendInt32(1290);
                                    derp.AppendString("");
                                    derp.AppendInt32(0);
                                    derp.AppendInt32(11);
                                    derp.AppendInt32(0);
                                    Session.SendMessage(derp);
                                    break;
                                case "2":

                                    break;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Give Credits (:credits)
                case "givecredits":
                case "credits":
                case "coins":
                    {
                        if (Session.GetHabbo().HasCmd("coins"))
                        {

                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                int creditsToAdd;
                                if (int.TryParse(Params[2], out creditsToAdd))
                                {
                                    TargetClient.GetHabbo().Credits = TargetClient.GetHabbo().Credits + creditsToAdd;
                                    TargetClient.GetHabbo().UpdateCreditsBalance();
                                    TargetClient.SendNotif(Session.GetHabbo().Username + LanguageLocale.GetValue("coins.awardmessage1") + creditsToAdd.ToString() + LanguageLocale.GetValue("coins.awardmessage2"));
                                    Session.SendNotif(LanguageLocale.GetValue("coins.updateok"));
                                    return true;
                                }
                                else
                                {
                                    Session.SendNotif("¡Sólo puedes introducir valores numéricos! (Pueden ser negativos y positivos)");
                                    return true;
                                }
                            }
                            else
                            {
                                Session.SendNotif("No se ha podido encontrar al usuario seleccionado.");
                                return true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Give Pixels (:pixels)
                case "pixels":
                case "givepixels":
                    {
                        if (Session.GetHabbo().HasCmd("pixels"))
                        {

                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                int creditsToAdd;
                                if (int.TryParse(Params[2], out creditsToAdd))
                                {
                                    TargetClient.GetHabbo().ActivityPoints = TargetClient.GetHabbo().ActivityPoints + creditsToAdd;
                                    Session.GetHabbo().NotifyNewPixels(creditsToAdd);
                                    TargetClient.GetHabbo().UpdateActivityPointsBalance();
                                    TargetClient.SendNotif(Session.GetHabbo().Username + LanguageLocale.GetValue("pixels.awardmessage1") + creditsToAdd.ToString() + LanguageLocale.GetValue("pixels.awardmessage2"));
                                    Session.SendNotif(LanguageLocale.GetValue("pixels.updateok"));
                                    return true;
                                }
                                else
                                {
                                    Session.SendNotif("¡Sólo puedes introducir valores numéricos! (Pueden ser negativos y positivos)");
                                    return true;
                                }
                            }
                            else
                            {
                                Session.SendNotif("No se ha podido encontrar al usuario seleccionado.");
                                return true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Hotel Alert (:ha)
                case "ha":
                    if (Session.GetHabbo().HasCmd("ha"))
                    {
                        string Notice = MergeParams(Params, 1);
                        ServerMessage HotelAlert = new ServerMessage(Outgoing.BroadcastMessage);
                        HotelAlert.AppendString(Notice + "\r\n" + "- " + Session.GetHabbo().Username);
                        SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(HotelAlert);
                        SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "HotelAlert", "Hotel alert [" + Notice + "]");
                    }
                    else
                    {
                        return false;
                    }
                    return true;
                #endregion

                #region Shutdown (:shutdown)
                case "shutdown":
                    {
                        if (Session.GetHabbo().HasCmd("shutdown"))
                        {
                            Task ShutdownTask = new Task(SilverwaveEnvironment.PerformShutDown);
                            ShutdownTask.Start();
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Shutdown", "Issued shutdown command");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Disconnect (:kill)
                case "disconnect":
                case "kill":
                case "dc":
                    {
                        if (Session.GetHabbo().HasCmd("kill"))
                        {
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

                            if (TargetClient == null)
                            {
                                Session.SendNotif("El usuario no ha sido encontrado.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().Rank >= 4 && !Session.GetHabbo().HasFuse("fuse_disconnect_anyone"))
                            {
                                Session.SendNotif("No tienes permisos para desconectar a ese usuario.");
                                return true;
                            }
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Disconnect", "User disconnected by user");

                            TargetClient.GetConnection().Dispose();

                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion

                #region Position (:coords)
                case "coord":
                case "coords":
                case "position":
                    {
                        if (Session.GetHabbo().HasCmd("coords"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser TargetRoomUser = null;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (TargetRoomUser == null)
                            {
                                return true;
                            }

                            Session.SendNotif("X: " + TargetRoomUser.X + "\n - Y: " + TargetRoomUser.Y + "\n - Z: " + TargetRoomUser.Z + "\n - Rotación: " + TargetRoomUser.RotBody + ", sqState: " + TargetRoom.GetGameMap().GameMap[TargetRoomUser.X, TargetRoomUser.Y].ToString() + "\n\n - RoomID: " + Session.GetHabbo().CurrentRoomId);
                        }
                        return true;
                    }
                #endregion

                #region Teleport (:teleport)
                case "teleport":
                case "tele":
                    {
                        if (Session.GetHabbo().HasCmd("teleport"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser TargetRoomUser = null;

                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (TargetRoomUser.RidingHorse)
                            {
                                SendChatMessage(Session, "No te puedes teletransportar mientras montas a caballo.");
                                return true;
                            }
                            if (TargetRoomUser == null)
                                return true;

                            TargetRoomUser.TeleportEnabled = !TargetRoomUser.TeleportEnabled;

                            TargetRoom.GetGameMap().GenerateMaps();
                        }
                        return true;
                    }
                #endregion

                #region Update (:update_x)
                #region Update Catalog
                case "update_catalog":
                case "reload_catalog":
                case "recache_catalog":
                case "refresh_catalog":
                case "update_catalogue":
                case "reload_catalogue":
                case "recache_catalogue":
                case "refresh_catalogue":
                    {
                        if (Session.GetHabbo().HasCmd("update_catalog"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetCatalog().Initialize(dbClient);
                            }
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(new ServerMessage(Outgoing.UpdateShop));

                            Session.SendNotif("¡El catálogo del hotel ha sido actualizado satisfactoriamente!");
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Update Items
                case "update_items":
                case "reload_items":
                case "recache_items":
                case "refresh_items":
                    {
                        if (Session.GetHabbo().HasCmd("update_items"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetItemManager().LoadItems(dbClient);
                            }
                            Session.SendNotif("Las definiciones de los objetos han sido actualizadas satisfactoriamente!");
                        }

                        return true;
                    }
                #endregion

                #region Update Filter
                case "update_filter":
                case "reload_filter":
                case "recache_filter":
                case "refresh_filter":
                    {
                        if (Session.GetHabbo().HasCmd("update_filter"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                LanguageLocale.InitSwearWord(dbClient);
                            }
                        }
                        return true;
                    }
                #endregion

                #region Update Navigator
                case "update_navigator":
                case "reload_navigator":
                case "recache_navigator":
                case "refresh_navigator":
                    {
                        if (Session.GetHabbo().HasCmd("update_navigator"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetNavigator().Initialize(dbClient);
                            }
                            Session.SendNotif("¡Se ha actualizado satisfactoriamente el navegador del hotel!");
                        }
                        return true;
                    }
                #endregion

                #region Update Ranks
                case "update_ranks":
                case "reload_ranks":
                case "recache_ranks":
                case "refresh_ranks":
                    {
                        if (Session.GetHabbo().HasCmd("update_ranks"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetRoleManager().LoadRights(dbClient);
                            }
                            Session.SendNotif("Los rangos del hotel se han actualizado satisfactoriamente.");
                        }
                        return true;
                    }
                #endregion

                #region Update Settings
                case "update_settings":
                case "reload_settings":
                case "recache_settings":
                case "refresh_settings":
                    {
                        if (Session.GetHabbo().HasCmd("update_settings"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                SilverwaveEnvironment.ConfigData = new ConfigData(dbClient);
                        }
                        return true;
                    }
                #endregion

                #region Update Groups
                case "update_groups":
                case "reload_groups":
                case "recache_groups":
                case "refresh_groups":
                    {
                        if (Session.GetHabbo().HasCmd("update_groups"))
                        {
                            SilverwaveEnvironment.GetGame().GetGroupManager().InitGroups();
                            Session.SendNotif("¡Los grupos han sido cargados de nuevo satisfactoriamente!");
                        }

                        return true;
                    }
                #endregion

                #region Update Bans
                case "update_bans":
                    {
                        if (Session.GetHabbo().HasCmd("update_bans"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                SilverwaveEnvironment.GetGame().GetBanManager().LoadBans(dbClient);

                            Session.SendNotif("Los baneos se han actualizado satisfactoriamente.");
                        }
                        return true;
                    }
                #endregion

                #region Update Quests
                case "update_quests":
                    {
                        if (Session.GetHabbo().HasCmd("update_quests"))
                        {
                            SilverwaveEnvironment.GetGame().GetQuestManager().Initialize(SilverwaveEnvironment.GetDatabaseManager().getQueryreactor());
                            Session.SendNotif("¡Se han actualizado las misiones y los retos satisfactoriamente!");
                        }
                        return true;
                    }
                #endregion
                #endregion

                #region Super Pull (:spull)
                case "spull":
                    {
                        if (Session.GetHabbo().HasCmd("spull"))
                        {
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (room == null)
                            {
                                SendChatMessage(Session, "'No se encuentra la sala!");
                                return true;
                            }

                            RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (roomuser == null)
                            {
                                SendChatMessage(Session, "¡No se encuentra al usuario!");
                                return true;
                            }
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "¡No se encuentra al usuario!");
                                return true;
                            }

                            GameClient Target = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            RoomUser TargetUser = room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id);
                            if (Target.GetHabbo().Id == Session.GetHabbo().Id)
                            {
                                SendChatMessage(Session, "¡No te puedes atraer a ti mismo!");
                                return true;
                            }

                            if (TargetUser.TeleportEnabled)
                                return true;

                            if (roomuser.RotBody % 2 != 0)
                                roomuser.RotBody--;
                            room.SendMessage(new ChatComposer(roomuser.VirtualId, "*Atrae a " + Params[1] + "*", 0, roomuser.LastBubble, -1));
                            if (roomuser.RotBody == 0)
                                TargetUser.MoveTo(roomuser.X, roomuser.Y - 1);
                            else if (roomuser.RotBody == 2)
                                TargetUser.MoveTo(roomuser.X + 1, roomuser.Y);
                            else if (roomuser.RotBody == 4)
                                TargetUser.MoveTo(roomuser.X, roomuser.Y + 1);
                            else if (roomuser.RotBody == 6)
                                TargetUser.MoveTo(roomuser.X - 1, roomuser.Y);
                        }
                        return true;
                    }
                #endregion

                #region Global Credits (:globalcredits)
                case "globalcredits":
                    {
                        if (Session.GetHabbo().HasCmd("globalcredits"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("Debes de introducir una cantidad de créditos.");
                                return true;
                            }
                            try
                            {
                                int Amount = int.Parse(Params[1]);
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                    dbClient.runFastQuery("UPDATE users SET credits=credits+" + Amount);

                                SilverwaveEnvironment.GetGame().GetClientManager().QueueCreditsUpdate(Amount);

                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Mass Credits", "Send [" + Amount + "] credits to everyone in the database");

                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region Mass Credits (:masscredits)
                case "masscredits":
                    {
                        if (Session.GetHabbo().HasCmd("masscredits"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("Debes de introducir una cantidad de créditos.");
                                return true;
                            }
                            try
                            {
                                int Amount = int.Parse(Params[1]);
                                SilverwaveEnvironment.GetGame().GetClientManager().QueueCreditsUpdate(Amount);

                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Mass Credits", "Send [" + Amount + "] credits to everyone online");
                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region Give Badge (:badge)
                case "badge":
                case "givebadge":
                    {
                        if (Session.GetHabbo().HasCmd("badge"))
                        {
                            if (Params.Length != 3)
                            {
                                Session.SendNotif("Debes de introducir un nombre de usuario junto a la placa que quieras dar.");
                                return true;
                            }
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                TargetClient.GetHabbo().GetBadgeComponent().GiveBadge(Params[2], true, TargetClient);

                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Badge", "Acabas de darle una placa al usuario [" + Params[2] + "]");
                                TargetClient.SendNotif("¡Acabas de recibir una placa por parte de un miembro del equipo administrativo del hotel!");
                                return true;
                            }
                            else
                            {
                                Session.SendNotif("No se encuentra al usuario seleccionado.");
                                return true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Room Badge (:roombadge)
                case "roombadge":
                    {
                        if (Session.GetHabbo().HasCmd("roombadge"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("¡Debes de introducir la ID de la placa!");
                                return true;
                            }

                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom == null)
                                return true;

                            TargetRoom.QueueRoomBadge(Params[1]);
                            ServerMessage nMessage = new ServerMessage();
                            nMessage.Init(Outgoing.SendNotif);
                            nMessage.AppendString("¡Acabas de recibir una placa por parte de uno de los miembros del Equipo Administrativo del hotel!");
                            nMessage.AppendString("");
                            TargetRoom.SendMessage(nMessage);
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Badge", "La sala [" + TargetRoom.RoomId + "] ha recibido la placa [" + Params[1] + "]");
                        }
                        return true;
                    }
                #endregion

                #region Mass Badge (:massbadge)
                case "massbadge":
                    {
                        if (Session.GetHabbo().HasCmd("massbadge"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("¡Debes de introducir la ID de la placa!");
                                return true;
                            }
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBadgeUpdate(Params[1]);
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Badge", "Placa masiva a todo el hotel, ID: [" + Params[1] + "]");
                            ServerMessage nMessage = new ServerMessage();
                            nMessage.Init(Outgoing.SendNotif);
                            nMessage.AppendString("¡Acabas de recibir una placa por parte de uno de los miembros del Equipo Administrativo del hotel!");
                            nMessage.AppendString("");
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(nMessage);
                        }
                        return true;
                    }
                #endregion

                #region All eyes on me (:alleyesonme)
                case "alleyesonme":
                    {
                        if (Session.GetHabbo().HasCmd("alleyesonme"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom == null)
                                return true;
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser Us in users)
                            {
                                if (Session.GetHabbo().Id == Us.userID)
                                    continue;
                                Us.SetRot(Rotation.Calculate(Us.X, Us.Y, User.X, User.Y));
                            }
                        }
                        return true;
                    }
                #endregion

                #region IP Ban (:ipban)
                case "ipban":
                case "banip":
                    {
                        if (Session.GetHabbo().HasCmd("ipban"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("¡Debes de introducir un nombre de usuario y una razón!");
                            }
                            GameClient TargetUser = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1].ToString());
                            if (TargetUser == null)
                            {
                                Session.SendNotif("Ha ocurrido un error inesperado buscando al usuario seleccionado.");
                                return true;
                            }
                            try
                            {
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 788922000, MergeParams(Params, 2), true, false);
                            }
                            catch (Exception e) { Console.WriteLine(e); }

                        }
                        return true;
                    }
                #endregion

                #region Machine Ban (:machineban)
                case "machineban":
                case "banmachine":
                case "mban":
                    {
                        if (Session.GetHabbo().HasCmd("machineban"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("¡Debes de introducir un nombre de usuario y una razón!");
                            }
                            GameClient TargetUser = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1].ToString());
                            if (TargetUser == null)
                            {
                                Session.SendNotif("Ha ocurrido un error inesperado buscando al usuario seleccionado.");
                                return true;
                            }

                            if (string.IsNullOrWhiteSpace(TargetUser.MachineId))
                            {
                                Session.SendNotif("No se ha podido banear a este usuario ya que no se encuentra una ID de su PC.");
                                return true;
                            }

                            try
                            {
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 2678400, "Has sido baneado bajo la siguiente razón:\n" + MergeParams(Params, 2), false, true);
                            }
                            catch (Exception e) { Console.WriteLine(e); }

                        }
                        return true;
                    }
                #endregion

                #region Machine and IP ban (:mip)
                case "mip":
                    {
                        if (Session.GetHabbo().HasCmd("mip"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("¡Debes de introducir un nombre de usuario y una razón!");
                            }
                            GameClient TargetUser = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1].ToString());
                            if (TargetUser == null)
                            {
                                Session.SendNotif("Ha ocurrido un error inesperado buscando al usuario seleccionado.");
                                return true;
                            }
                            try
                            {
                                if (string.IsNullOrWhiteSpace(TargetUser.MachineId))
                                {
                                    Session.SendNotif("No se ha podido banear a este usuario ya que no se encuentra una ID de su PC.");
                                    return true;
                                }
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 2678400, "Has sido baneado bajo la siguiente razón:\n" + MergeParams(Params, 2), false, true);
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 788922000, MergeParams(Params, 2), true, false);
                            }
                            catch (Exception e) { Console.WriteLine(e); }
                        }
                        return true;
                    }
                #endregion

                #region All around me (:allaroundme)
                case "allaroundme":
                    {
                        if (Session.GetHabbo().HasCmd("allaroundme"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom == null)
                            {
                                Session.SendNotif("Ha ocurrido un error inesperado.");
                                return true;
                            }
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser Us in users)
                            {
                                if (Session.GetHabbo().Id == Us.userID)
                                    continue;
                                Us.MoveTo(User.X, User.Y, true);
                            }
                            if (Params.Length == 2)
                            {
                                if (Params[1] == "override")
                                {
                                    foreach (RoomUser Us in users)
                                    {
                                        if (Session.GetHabbo().Id == Us.userID)
                                            continue;
                                        Us.AllowOverride = true;
                                        Us.MoveTo(User.X, User.Y, true);
                                        Us.AllowOverride = false;
                                    }
                                }
                            }
                        }
                        return true;
                    }
                #endregion

                #region Hotel alert w/link (:hal)
                case "hal":
                    {
                        if (Session.GetHabbo().HasCmd("hal"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            // Hotel Alert pluss link :hal <link> <message>
                            string Link = Params[1];

                            string Message = MergeParams(Params, 2);

                            ServerMessage nMessage = new ServerMessage(Outgoing.SendNotif);
                            nMessage.AppendString(LanguageLocale.GetValue("hotelallert.notice") + "\r\n" + Message + "\r\n-" + Session.GetHabbo().Username);
                            nMessage.AppendString(Link);
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(nMessage);

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "HotelAlert", "Hotel alert [" + Message + "]");
                        }
                        return true;
                    }
                #endregion

                #region Staff Alert (:sa)
                case "sa":
                    {
                        if (Session.GetHabbo().HasCmd("sa"))
                        {
                            string Message = "<b>Chat Administrativo</b>: \n" + Params[1] + "\n - " + Session.GetHabbo().Username;
                            ServerMessage message = new ServerMessage(Outgoing.BroadcastMessage);
                            message.AppendString(Message);
                            SilverwaveEnvironment.GetGame().GetClientManager().StaffAlert(message);

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "StaffAlert", "Staff alert [" + Message + "]");
                        }
                        return true;
                    }
                #endregion

                #region Spectators Mode (:invisible)

                case "invisible":
                case "spec":
                case "spectatorsmode":
                    {
                        if (Session.GetHabbo().HasCmd("invisible"))
                        {
                            if (Session.GetHabbo().SpectatorMode == false)
                            {
                                Session.GetHabbo().SpectatorMode = true;

                                Session.SendNotif("Reinicia la sala para ser invisible.");

                            }
                            else
                            {
                                Session.GetHabbo().SpectatorMode = false;
                                Session.SendNotif("Reinicia la sala para ser visible.");
                            }
                        }
                        return true;
                    }

                #endregion

                #region Add Bannable Word (:banword)
                case "banword":
                    {
                        if (Session.GetHabbo().HasCmd("banword"))
                        {
                            string BannedWord = Params[1];
                            if (!string.IsNullOrWhiteSpace(BannedWord))
                            {
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.setQuery("INSERT INTO wordfilter (`word`, `addedby`, `bannable`) VALUES " +
                                        "(@ban, '" + Session.GetHabbo().Username + "', '0');");
                                    dbClient.addParameter("ban", BannedWord.ToLower());
                                    dbClient.runQuery();
                                    LanguageLocale.InitSwearWord(dbClient);
                                    Session.SendNotif("La palabra '" + BannedWord + "' ha sido añaida a la lista prohibida.");
                                }
                            }
                        }
                        return true;
                    }
                #endregion

                #region Unidle (:unidle)
                case "unidle":
                    {
                        if (Session.GetHabbo().HasCmd("unidle"))
                        {
                            Habbo Habbo = SilverwaveEnvironment.getHabboForName(Params[1]);
                            if (Habbo == null)
                                return true;

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

                            if (User == null)
                                return true;

                            User.UnIdle();
                        }
                        return true;
                    }
                #endregion

                #region Make Public (:public)
                case "public":
                    {
                        if (Session.GetHabbo().HasCmd("public"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;
                            if (Room == null)
                                return true;
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                dbClient.runFastQuery("UPDATE rooms SET roomtype='public' WHERE id=" + Room.RoomId + " LIMIT 1");
                            Room.Type = "public";
                            Room.RoomData.Type = "public";
                            Room.RoomData.SerializeRoomData(new ServerMessage(), false, Session, true);
                        }
                        return true;
                    }
                #endregion

                #region Make Private (:private)
                case "private":
                    {
                        if (Session.GetHabbo().HasCmd("private"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;
                            if (Room == null)
                                return true;
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                dbClient.runFastQuery("UPDATE rooms SET roomtype='private' WHERE id=" + Room.RoomId + " LIMIT 1");
                            Room.Type = "private";
                            Room.RoomData.Type = "private";
                            Room.RoomData.SerializeRoomData(new ServerMessage(), false, Session, true);
                        }
                        return true;
                    }
                #endregion

                #region Mass Action (:massact)
                case "massact":
                    {
                        if (Session.GetHabbo().HasCmd("massact"))
                        {
                            try
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;

                                List<RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();
                                int Num = Int16.Parse(Params[1]);

                                ServerMessage Message = new ServerMessage();

                                foreach (RoomUser User in Users)
                                {
                                    if (User == null)
                                        continue;

                                    Room.SendMessage(new ActionComposer(User, Num));
                                }
                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region Close Alert (:closealert)
                case "closealert":
                    {
                        if (Session.GetHabbo().HasCmd("closealert"))
                        {
                            int Time = int.Parse(Params[1]);

                            ServerMessage Message = new ServerMessage(Outgoing.ClosingAlert);
                            Message.AppendInt32(Time);
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(Message);
                        }
                        return true;
                    }
                #endregion
                #endregion
            }
            return false;
            #endregion
        }
Ejemplo n.º 14
0
        private void PickUpPowerUp(RoomItem item, RoomUser user)
        {
            switch (item.freezePowerUp)
            {
                case FreezePowerUp.Heart:
                    {
                        if (user.FreezeLives < 5)
                        {
                            user.FreezeLives++;
                            room.GetGameManager().AddPointToTeam(user.team, 10, user);
                        }

                        ServerMessage message = new ServerMessage();
                        message.Init(Outgoing.UpdateFreezeLives);
                        message.AppendInt32(user.InternalRoomID);
                        message.AppendInt32(user.FreezeLives);

                        user.GetClient().SendMessage(message);
                        break;
                    }
                case FreezePowerUp.Shield:
                    {
                        ActivateShield(user);
                        break;
                    }
                case FreezePowerUp.BlueArrow:
                case FreezePowerUp.GreenArrow:
                case FreezePowerUp.OrangeSnowball:
                    {
                        user.banzaiPowerUp = item.freezePowerUp;
                        break;
                    }
            }

            item.freezePowerUp = FreezePowerUp.None;
            item.ExtraData = "1" + item.ExtraData;
            item.UpdateState(false, true);
        }
Ejemplo n.º 15
0
        private void FreezeUser(RoomUser user)
        {
            if (user.IsBot || user.shieldActive || user.team == Team.none)
                return;

            if (user.Freezed)
            {
                //user.Freezed = false;
                //user.ApplyEffect((int)user.team + 39);
                return;
            }
            user.Freezed = true;
            user.FreezeCounter = 0;

            user.FreezeLives--;

            if (user.FreezeLives <= 0)
            {
                ServerMessage message2 = new ServerMessage();
                message2.Init(Outgoing.UpdateFreezeLives);
                message2.AppendInt32(user.InternalRoomID);
                message2.AppendInt32(user.FreezeLives);
                user.GetClient().SendMessage(message2);

                user.ApplyEffect(-1);
                room.GetGameManager().AddPointToTeam(user.team, -10, user);
                TeamManager t = room.GetTeamManagerForFreeze();
                t.OnUserLeave(user);
                user.team = Team.none;
                if (exitTeleport != null)
                    room.GetGameMap().TeleportToItem(user, exitTeleport);

                user.Freezed = false;
                user.SetStep = false;
                user.IsWalking = false;
                user.UpdateNeeded = true;

                if (t.BlueTeam.Count <= 0 && t.RedTeam.Count <= 0 && t.GreenTeam.Count <= 0 && t.YellowTeam.Count > 0)
                    this.StopGame(); // yellow team win
                else if (t.BlueTeam.Count > 0 && t.RedTeam.Count <= 0 && t.GreenTeam.Count <= 0 && t.YellowTeam.Count <= 0)
                    this.StopGame(); // blue team win
                else if (t.BlueTeam.Count <= 0 && t.RedTeam.Count > 0 && t.GreenTeam.Count <= 0 && t.YellowTeam.Count <= 0)
                    this.StopGame(); // red team win
                else if (t.BlueTeam.Count <= 0 && t.RedTeam.Count <= 0 && t.GreenTeam.Count > 0 && t.YellowTeam.Count <= 0)
                    this.StopGame(); // green team win
                return;
            }

            room.GetGameManager().AddPointToTeam(user.team, -10, user);
            user.ApplyEffect(12);

            ServerMessage message = new ServerMessage();
            message.Init(Outgoing.UpdateFreezeLives);
            message.AppendInt32(user.InternalRoomID);
            message.AppendInt32(user.FreezeLives);

            user.GetClient().SendMessage(message);
        }
Ejemplo n.º 16
0
        internal ServerMessage SerializeBotInventory()
        {
            ServerMessage Response = new ServerMessage();
            Response.Init(Outgoing.SerializeBotInventory);
            Response.AppendInt32(InventoryBots.Count); // Count
            foreach (RoomBot mBot in InventoryBots.Values)
            {
                Response.AppendInt32(mBot.BotId); // Id
                Response.AppendString(mBot.Name); // Name
                Response.AppendString(mBot.Motto);
                Response.AppendString("m"); // Gender
                Response.AppendString(mBot.Look); // Figure
            }

            return Response;
        }
Ejemplo n.º 17
0
        internal void SerializeGroupInfo(Group Group, ServerMessage Response, GameClient Session, Room Room, bool NewWindow = false)
        {
            DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);
            DateTime Time = origin.AddSeconds(Group.CreateTime);
            Response.Init(Outgoing.SerializeGroupInfo);
            Response.AppendInt32(Group.Id);
            Response.AppendBoolean(true);
            Response.AppendInt32(Group.State); // Type (0 = 50k users, 1 = Request, 2 = blocked, 3 = ?, 4 = ?..
            Response.AppendString(Group.Name);
            Response.AppendString(Group.Description);
            Response.AppendString(Group.Badge);
            Response.AppendInt32(Group.RoomId);
            Response.AppendString((SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(Group.RoomId) == null) ? "No room found.." : SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(Group.RoomId).Name); // room name
            Response.AppendInt32((Group.CreatorId == Session.GetHabbo().Id) ? 3 : (Group.Requests.Contains(Session.GetHabbo().Id)) ? 2 : (Group.Members.ContainsKey(Session.GetHabbo().Id)) ? 1 : 0); //Member
            Response.AppendInt32(Group.Members.Count); // Members
            Response.AppendBoolean(Session.GetHabbo().FavouriteGroup == Group.Id);
            Response.AppendString(Time.Day + "-" + Time.Month + "-" + Time.Year);
            Response.AppendBoolean(Group.CreatorId == Session.GetHabbo().Id);
            Response.AppendBoolean((Group.Admins.ContainsKey(Session.GetHabbo().Id)));
            Response.AppendString((SilverwaveEnvironment.getHabboForId(Group.CreatorId) == null) ? "" : SilverwaveEnvironment.getHabboForId(Group.CreatorId).Username);
            Response.AppendBoolean(NewWindow); // Show group info
            Response.AppendBoolean(Group.AdminOnlyDeco == 0); // Any user can place furni in home room
            Response.AppendInt32(Group.Requests.Count); // Pending users
            Response.AppendBoolean(true);
            if (Room != null)
                Room.SendMessage(Response);
            else if (Session != null)
                Session.SendMessage(Response);

            /*if (Session.GetHabbo().Id == Group.CreatorId)
                SerializeGroupInfo(Group, Response, Session, false);*/
        }
Ejemplo n.º 18
0
 internal void SerializeEventInfo(uint RoomId)
 {
     Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(RoomId);
     if (Room == null)
         return;
     RoomEvent Event = Events[RoomId];
     ServerMessage Response = new ServerMessage();
     if (Event == null || Event.HasExpired || !RoomHasEvents(RoomId))
     {
     }
     else
     {
         Response.Init(Outgoing.SerializeRoomEvent);
         Response.AppendInt32(RoomId);
         Response.AppendInt32(Room.OwnerId);
         Response.AppendString(Room.Owner);
         Response.AppendInt32(1);
         Response.AppendInt32(1);
         Response.AppendString(Event.Name);
         Response.AppendString(Event.Description);
         Response.AppendInt32(0);
         Response.AppendInt32((int)Math.Floor((double)(Event.Time - SilverwaveEnvironment.GetUnixTimestamp()) / 60));
     }
     Room.SendMessage(Response);
 }
Ejemplo n.º 19
0
        public bool OnCycle()
        {
            long Now = SilverwaveEnvironment.Now();

            if (Room  == null || Room.GetRoomItemHandler() == null || Room.GetRoomItemHandler().mFloorItems == null)
            {
                return false;
            }

            if (mNext < Now)
            {
                foreach (RoomItem Item in mItems)
                {
                    if (Item == null)
                    {
                        continue;
                    }
                    if (!Room.GetRoomItemHandler().mFloorItems.ContainsKey(Item.Id))
                    {
                        continue;
                    }

                    Point Point = HandleMovement(mDir, new Point(Item.GetX, Item.GetY));

                    int newRot = HandleRotation(mRot, Item.Rot);

                    if (mRoom.GetGameMap().CanRollItemHere(Point.X, Point.Y) && !mRoom.GetGameMap().SquareHasUsers(Point.X, Point.Y))
                    {
                        Double NewZ = 0;
                        Boolean CanBePlaced = true;

                        List<RoomItem> Items = mRoom.GetGameMap().GetRoomItemForSquare(Point.X, Point.Y);
                        foreach (RoomItem IItem in Items)
                        {
                            if (IItem == null)
                                continue;

                            if (IItem.TotalHeight > NewZ)
                                NewZ = Item.TotalHeight;
                            if (CanBePlaced == true && !IItem.GetBaseItem().Stackable)
                                CanBePlaced = false;
                        }

                        if (newRot != Item.Rot)
                        {
                            Item.Rot = newRot;
                            ServerMessage Message = new ServerMessage(Outgoing.UpdateItemOnRoom);
                            Item.Serialize(Message);
                            mRoom.SendMessage(Message);
                        }

                        if (CanBePlaced && Point != Item.Coordinate)
                        {
                            ServerMessage mMessage = new ServerMessage();
                            mMessage.Init(Outgoing.ObjectOnRoller); // Cf
                            mMessage.AppendInt32(Item.GetX);
                            mMessage.AppendInt32(Item.GetY);
                            mMessage.AppendInt32(Point.X);
                            mMessage.AppendInt32(Point.Y);
                            mMessage.AppendInt32(1);
                            mMessage.AppendInt32(Item.Id);
                            mMessage.AppendString(TextHandling.GetString(Item.GetZ));
                            mMessage.AppendString(TextHandling.GetString(NewZ));
                            mMessage.AppendInt32(0);
                            mRoom.SendMessage(mMessage);
                            mRoom.GetRoomItemHandler().SetFloorItem(Item, Point.X, Point.Y, NewZ);
                        }
                    }
                }

                mNext = 0;
                return true;
            }
            return false;
        }
Ejemplo n.º 20
0
        private void CycleStage()
        {
            ServerMessage Response = new ServerMessage();
            Response.Init(Outgoing.SnowGameStatus);
            Response.AppendInt32(CurrentCycle);
            Response.AppendInt32(CurrentCycle * 1000000); // mofo checksum
            Response.AppendInt32(1);
            if (CurrentCycle == 0)
            {
                Response.AppendInt32(1);
                Response.AppendInt32(1);
                Response.AppendInt32(1);
            }
            else
            {
                Response.AppendInt32(0);
            }


            foreach (SnowPlayer Player in Players.Values)
            {
                //Response.AppendInt32(Player.Updates.Count);
                foreach (object[] obj in Player.Updates)
                {
                    //SnowUpdateHandler.ParseUpdate(Response, this, Player, obj);
                }
            }
            
            SendToPlayers(Response);

            CurrentCycle++;
        }
Ejemplo n.º 21
0
        internal void SerializeMessengerAction(int Type, string Name)
        {
            if (GetClient() == null)
                return;
            ServerMessage Message = new ServerMessage();
            Message.Init(Outgoing.SerializeMessengerAction);
            Message.AppendString(GetClient().GetHabbo().Id.ToString());
            Message.AppendInt32(Type);
            Message.AppendString(Name);

            foreach (MessengerBuddy Buddy in friends.Values)
            {
                if (Buddy.client == null)
                    continue;
                Buddy.client.SendMessage(Message);
            }
        }
Ejemplo n.º 22
0
        internal void SerializeRoomData(ServerMessage Response, bool FromView, GameClient Session, bool SendRoom = false)
        {
            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

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

            Response.Init(Outgoing.RoomData);
            Response.AppendBoolean(true);
            Response.AppendInt32(Id);
            Response.AppendString(Name);
            Response.AppendBoolean(Type == "private");
            Response.AppendInt32(OwnerId);
            Response.AppendString(Owner);
            Response.AppendInt32(State);
            Response.AppendInt32(UsersNow);
            Response.AppendInt32(UsersMax);
            Response.AppendString(Description);
            Response.AppendInt32(0); //unused, let be 0
            Response.AppendInt32(2);
            Response.AppendInt32(Score);
            Response.AppendInt32(0); // visible for rank > x
            Response.AppendInt32(Category);
            if (GroupId > 0)
            {
                Response.AppendInt32(Group.Id);
                Response.AppendString(Group.Name);
                Response.AppendString(Group.Badge);
                Response.AppendString("");
            }
            else
            {
                Response.AppendInt32(0);
                Response.AppendString("");
                Response.AppendString("");
                Response.AppendString("");
            }
            Response.AppendInt32(TagCount);
            foreach (string Tag in Tags.ToArray())
            {
                Response.AppendString(Tag);
            }
            //GUESTROOM THUMBNAIL^?  disabled
            Response.AppendInt32(0); //
            Response.AppendInt32(0); //
            Response.AppendInt32(0);
            //Response.AppendInt32(0);
            //GUESROOM THUBNAILS ^
            Response.AppendBoolean(AllowPets == 1);
            Response.AppendBoolean(AllowPetsEating == 1);
            Response.AppendString("");  // EVENT related stuff
            Response.AppendString("");  // EVENT related stuff
            Response.AppendInt32(0); // EVENT Time Left, in seconds
            Response.AppendBoolean(FromView); //staff moderation locking the room ?
            Response.AppendBoolean(false);
            Response.AppendBoolean(false);
            Response.AppendBoolean(false);
            Console.WriteLine(WhoCanBan + WhoCanKick + WhoCanMute + ChatType + ChatBalloon);
            Response.AppendInt32(WhoCanMute); // who can mute
            Response.AppendInt32(WhoCanKick); // who can kick
            Response.AppendInt32(WhoCanBan); // who can ban
            Response.AppendBoolean(Room.CheckRights(Session, true));
            Response.AppendInt32(ChatType);  //ChatMode, ChatSize, ChatSpeed, HearingDistance, ExtraFlood is the order.
            Response.AppendInt32(ChatBalloon);
            Response.AppendInt32(ChatSpeed);
            Response.AppendInt32(ChatMaxDistance);
            Response.AppendInt32(ChatFloodProtection);

            if (SendRoom)
            {
                if (SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Id) != null)
                    SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Id).SendMessage(Response);
            }
            else
                Session.SendMessage(Response);
        }
Ejemplo n.º 23
0
        internal ServerMessage UpdateItemOnRoller(RoomItem pItem, Point NextCoord, uint pRolledID, Double NextZ)
        {
            ServerMessage mMessage = new ServerMessage();
            mMessage.Init(Outgoing.ObjectOnRoller); // Cf
            mMessage.AppendInt32(pItem.GetX);
            mMessage.AppendInt32(pItem.GetY);

            mMessage.AppendInt32(NextCoord.X);
            mMessage.AppendInt32(NextCoord.Y);

            mMessage.AppendInt32(1);

            mMessage.AppendInt32(pItem.Id);

            mMessage.AppendString(TextHandling.GetString(pItem.GetZ));
            mMessage.AppendString(TextHandling.GetString(NextZ));

            mMessage.AppendInt32(pRolledID);

            //room.SendMessage(mMessage);

            //SetFloorItem(null, pItem, NextCoord.X, NextCoord.Y, pItem.Rot, false, true);
            SetFloorItem(pItem, NextCoord.X, NextCoord.Y, NextZ);

            return mMessage;
        }
Ejemplo n.º 24
0
        public static Boolean Parse(GameClient Session, string Input)
        {
            if (!Input.StartsWith(":"))
            {
                return false;
            }

            Input = Input.Substring(1);
            string[] Params = Input.Split(' ');

            #region Commands
            switch (Params[0].ToLower())
            {
                #region User Commands
                #region Commands (:commands)
                case "commands":
                case "cmds":
                    {
                        if (Session.GetHabbo().HasCmd("commands"))
                        {
                            DataTable data;
                            StringBuilder builder = new StringBuilder();

                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                dbClient.setQuery("SELECT command,params,description FROM fuse_cmds WHERE rank <= " + Session.GetHabbo().Rank + " ORDER BY id DESC");// LIMIT " + min + ",15");// + max+ "");
                                data = dbClient.getTable();
                            }

                            builder.Append("You have the following commands available to use:\n");
                            foreach (DataRow row in data.Rows)
                            {
                                builder.Append(":" + Convert.ToString(row[0]) + " " + Convert.ToString(row[1]) + "\n - " + Convert.ToString(row[2]) + "\n");
                            }
                            Session.SendNotifWithScroll(builder.ToString());
                        }
                        return true;
                    }
                #endregion

                #region About (:about)
                case "about":
                case "info":
                    {
                        if (Session.GetHabbo().HasCmd("about"))
                        {
                            StringBuilder About = new StringBuilder();

                            About.Append("Plus Emulator - Release 2.1  \n\r  @forum.ragezone.com ");

                            Session.SendNotifWithScroll(About.ToString());
                        }
                        return true;
                    }
                #endregion

                #region Sit (:sit)
                case "sit":
                    {
                        if (Session.GetHabbo().HasCmd("sit"))
                        {
                            RoomUser user = null;
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (Params.Length == 2 && Session.GetHabbo().HasFuse("fuse_admin"))
                            {
                                GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                                if (Client != null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                                if (user == null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            else
                            {
                                user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            //Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(0);

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

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

                                    try
                                    {
                                        user.Statusses.Add("sit", "1.0");
                                        user.Z -= 0.35;
                                        user.isSitting = true;
                                        user.UpdateNeeded = true;
                                    }
                                    catch { }
                                }
                                else
                                {
                                    user.RotBody--;
                                    user.Statusses.Add("sit", "1.0");
                                    user.Z -= 0.35;
                                    user.isSitting = true;
                                    user.UpdateNeeded = true;
                                }
                            }
                            else if (user.isSitting == true)
                            {
                                user.Z += 0.35;
                                user.Statusses.Remove("sit");
                                user.Statusses.Remove("1.0");
                                user.isSitting = false;
                                user.UpdateNeeded = true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Lie (:lie)
                case "lie":
                case "lay":
                    {
                        if (Session.GetHabbo().HasCmd("lie"))
                        {
                            RoomUser user = null;
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (Params.Length == 2 && Session.GetHabbo().HasFuse("fuse_admin"))
                            {
                                GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                                if (Client != null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                                if (user == null)
                                    user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            else
                            {
                                user = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            }
                            Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(0);
                            if (!room.GetGameMap().ValidTile(user.X + 2, user.Y + 2) && !room.GetGameMap().ValidTile(user.X + 1, user.Y + 1))
                            {
                                SendChatMessage(Session, "Try lying somewhere valid!");
                                return true;
                            }

                            if (user.Statusses.ContainsKey("sit") || user.isSitting || user.RidingHorse || user.IsWalking)
                            {
                                return true;
                            }

                            if (!user.Statusses.ContainsKey("lay"))
                            {
                                if ((user.RotBody % 2) == 0)
                                {
                                    if (user == null)
                                        return true;

                                    try
                                    {
                                        user.Statusses.Add("lay", "1.0 null");
                                        user.Z -= 0.35;
                                        user.isLying = true;
                                        user.UpdateNeeded = true;
                                    }
                                    catch { }
                                }
                                else
                                {
                                    user.RotBody--;
                                    user.Statusses.Add("lay", "1.0 null");
                                    user.Z -= 0.35;
                                    user.isLying = true;
                                    user.UpdateNeeded = true;
                                }

                            }
                            else
                            {
                                user.Z += 0.35;
                                user.Statusses.Remove("lay");
                                user.Statusses.Remove("1.0");
                                user.isLying = false;
                                user.UpdateNeeded = true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Pickall (:pickall)
                case "pickall":
                    {
                        if (Session.GetHabbo().HasCmd("pickall"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                if (TargetRoom.Group != null)
                                {
                                    Session.SendNotif("You are unable to pickall in group rooms.");
                                    return true;
                                }

                                if (TargetRoom.ForSale)
                                {
                                    Session.SendNotif("You are unable to pickall a room whilst it is for sale.");
                                    return true;
                                }

                                List<RoomItem> RemovedItems = TargetRoom.GetRoomItemHandler().RemoveAllFurniture(Session);

                                if (Session.GetHabbo().GetInventoryComponent() != null)
                                {
                                    Session.GetHabbo().GetInventoryComponent().AddItemArray(RemovedItems);
                                    Session.GetHabbo().GetInventoryComponent().UpdateItems(false);
                                }
                            }
                            else
                            {
                                Session.SendNotif("An error occured.");
                            }
                        }
                        return true;
                    }
                #endregion

                #region Unload (:unload)
                case "unload":
                    {
                        if (Session.GetHabbo().HasCmd("unload"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                SilverwaveEnvironment.GetGame().GetRoomManager().UnloadRoom(TargetRoom);
                                TargetRoom.RequestReload();
                            }
                        }
                        return true;
                    }
                #endregion

                #region Set Max (:setmax)
                case "setmax":
                    {
                        if (Session.GetHabbo().HasCmd("setmax"))
                        {
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "You must enter a number to set");
                                return true;
                            }

                            try
                            {
                                int Max = int.Parse(Params[1]);

                                if ((Max > 101 && Session.GetHabbo().Rank < 3))
                                {
                                    Session.SendNotif("The maximum users is 100");
                                    return true;
                                }
                                else if (Max < 10 && Session.GetHabbo().Rank < 3)
                                {
                                    Session.SendNotif("The minimum users is 10");
                                    return true;
                                }

                                Room room = Session.GetHabbo().CurrentRoom;
                                room.UsersMax = Max;
                                room.SetMaxUsers(Max);
                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region User Info (:userinfo)
                case "userinfo":
                case "ui":
                    {
                        if (Session.GetHabbo().HasCmd("userinfo"))
                        {
                            string username = Params[1];
                            bool UserOnline = true;
                            if (string.IsNullOrEmpty(username))
                            {
                                Session.SendNotif("Please enter a username");
                                return true;
                            }

                            GameClient tTargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(username);

                            if (tTargetClient == null || tTargetClient.GetHabbo() == null)
                            {
                                DataRow Row;
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.setQuery("SELECT username, rank, online, id, motto, credits FROM users WHERE username=@user LIMIT 1");
                                    dbClient.addParameter("user", username);
                                    Row = dbClient.getRow();

                                    Session.SendNotif("User Info for " + username + ":\r" +
                                "Rank: " + Row[1].ToString() + " \r" +
                                "User Id: " + Row[3].ToString() + " \r" +
                                "Motto: " + Row[4].ToString() + " \r" +
                                "Credits: " + Row[5].ToString() + " \r");
                                }
                                return true;
                            }
                            Habbo User = tTargetClient.GetHabbo();

                            //Habbo User = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(username).GetHabbo();
                            StringBuilder RoomInformation = new StringBuilder();

                            if (User.CurrentRoom != null)
                            {
                                RoomInformation.Append(" - ROOM INFORMAtiON [" + User.CurrentRoom.RoomId + "] - \r");
                                RoomInformation.Append("Owner: " + User.CurrentRoom.Owner + "\r");
                                RoomInformation.Append("Room Name: " + User.CurrentRoom.Name + "\r");
                                RoomInformation.Append("Current Users: " + User.CurrentRoom.UserCount + "/" + User.CurrentRoom.UsersMax);
                            }
                            Session.SendNotif("User info for: " + username + ":\r" +
                                "Rank: " + User.Rank + " \r" +
                                "Online: " + UserOnline.ToString() + " \r" +
                                "User Id: " + User.Id + " \r" +
                                "Current Room: " + User.CurrentRoomId + " \r" +
                                "Motto: " + User.Motto + " \r" +
                                "Credits: " + User.Credits + " \r" +
                                "Muted: " + User.Muted.ToString() + "\r" +
                                "\r\r" + RoomInformation.ToString());

                        }
                        return true;
                    }
                #endregion

                #region Disable Diagonal (:disablediagonal)
                case "disablediagonal":
                case "disablediag":
                case "togglediagonal":
                    {
                        if (Session.GetHabbo().HasCmd("togglediagonal"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetRoom = Session.GetHabbo().CurrentRoom;

                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                if (TargetRoom.GetGameMap().DiagonalEnabled)
                                    TargetRoom.GetGameMap().DiagonalEnabled = false;
                                else
                                    TargetRoom.GetGameMap().DiagonalEnabled = true;

                            }
                        }
                        return true;
                    }
                #endregion

                #region Freeze (:freeze)
                case "freeze":
                    {
                        if (Session.GetHabbo().HasCmd("freeze"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Params[1]);
                            if (Target != null)
                                Target.Frozen = true;
                        }
                        return true;
                    }
                #endregion

                #region unFreeze (:unfreeze)
                case "unfreeze":
                    {
                        if (Session.GetHabbo().HasCmd("unfreeze"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Params[1]);
                            if (Target != null)
                                Target.Frozen = false;
                        }
                        return true;
                    }
                #endregion

                #region SaveFurni (:savefurni)
                case "savefurni":
                case "save":
                    {
                        if (Session.GetHabbo().HasCmd("save"))
                        {
                            //using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            //Session.GetHabbo().CurrentRoom.GetRoomItemHandler().SaveFurniture(dbClient);
                        }
                        return true;
                    }
                #endregion

                #region Set Speed (:setspeed)
                case "setspeed":
                    {
                        if (Session.GetHabbo().HasCmd("setspeed"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
                            {
                                try
                                {
                                    Session.GetHabbo().CurrentRoom.GetRoomItemHandler().SetSpeed(int.Parse(Params[1]));
                                }
                                catch { Session.SendNotif("Numbers Only!"); }
                            }
                        }
                        return true;
                    }
                #endregion

                #region Regenerate maps (:regenmaps)
                case "regenmaps":
                case "reloadmaps":
                case "fixroom":
                    {
                        if (Session.GetHabbo().HasCmd("regenmaps"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (TargetRoom == null)
                                return true;

                            if (!TargetRoom.CheckRights(Session, true))
                                return true;

                            TargetRoom.GetGameMap().GenerateMaps();
                            Session.SendNotif("The room map has been refreshed!");
                        }
                        return true;
                    }
                #endregion

                #region Empty Pets (:emptypets)
                case "emptypets":
                case "removepets":
                    {
                        if (Session.GetHabbo().HasCmd("emptypets"))
                        {
                            Session.SendNotif("Your pet inventory has been cleared!");
                        }
                        return true;
                    }
                #endregion

                #region Redeem Credits (:convertcredits)
                case "convertcredits":
                    {
                        if (Session.GetHabbo().HasCmd("convertcredits"))
                        {
                            try
                            {
                                Session.GetHabbo().GetInventoryComponent().Redeemcredits(Session);
                                SendChatMessage(Session, "All credits have successfully been converted!");
                            }
                            catch (Exception e)
                            {
                                Console.WriteLine(e);
                            }
                        }
                        return true;
                    }
                #endregion

                #region Mute Bots (:mutebots)
                case "mutebots":
                case "mutepets":
                    {
                        if (Session.GetHabbo().HasCmd("mutebots"))
                        {
                            if (Session.GetHabbo().CurrentRoom.CheckRights(Session, true))
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;
                                if (Room.MutedBots)
                                    Room.MutedBots = false;
                                else
                                    Room.MutedBots = true;

                                SendChatMessage(Session, "Muted bots have been toggled");
                            }
                        }
                        return true;
                    }
                #endregion

                #region SellRoom / BuyRoom
                    #region Sell Room (:sellroom)
                    case "sellroom":
                        {
                            if (Session.GetHabbo().HasCmd("sellroom"))
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;
                                Int32 Value = 0;
                                if (Room == null)
                                    return true;

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

                                if (Params.Length == 1)
                                {
                                    Session.SendNotif("In order to sell a room, you must include a value. \n\nPLEASE NOTE:\nIf you sell a room you CANNOT get any of it back!");
                                    return true;
                                }
                            else if (Room.Group != null)
                            {
                                Session.SendNotif("You cannot sell a room with a group on it.\n Delete the group first by typing :deletegroup");
                                return true;
                            }
                                else if (!SilverwaveEnvironment.IsNum(Params[1]))
                                {
                                    SendChatMessage(Session, "You must enter a number!");
                                    return true;
                                }
                                else
                                    Value = Convert.ToInt32(Params[1]);

                                if (Value < 0)
                                {
                                    SendChatMessage(Session, "You can not sell a room for less than 0 credits!");
                                    return true;
                                }

                                if (Room.ForSale)
                                {
                                    Room.SalePrice = Value;
                                }
                                else
                                {
                                    Room.ForSale = true;
                                    Room.SalePrice = Value;
                                }

                                foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers())
                                {
                                User.SendChatMsg("This room is for sale! The current asking price is " + Value + " credits! Buy it by saying :buyroom");
                                }

                            Session.SendNotif("In order to sell a room, you must include a value. \n\nPLEASE NOTE:\nIf you sell a room you CANNOT get any of it back!\n\n" +
                            "You can cancel selling a room by typing ':buyroom 0' (Without '')");

                            }
                            return true;
                        }
                    #endregion

                    #region Buy Room (:buyroom)
                    case "buyroom":
                        {
                            if (Session.GetHabbo().HasCmd("buyroom"))
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;
                            RoomUser RoomOwner = Room.GetRoomUserManager().GetRoomUserByHabbo(Room.Owner);
                            if (Room == null)
                            {
                                return true;
                            }
                            if (Room.Owner == Session.GetHabbo().Username)
                            {
                                SendChatMessage(Session, "You already own this room!");
                                    return true;
                            }

                                if (!Room.ForSale)
                                {
                                    SendChatMessage(Session, "This room is not for sale!");
                                    return true;
                                }

                                if (Session.GetHabbo().Credits < Room.SalePrice)
                                {
                                    SendChatMessage(Session, "You do not have enough credits to buy this room!");
                                    return true;
                                }

                            if (RoomOwner == null || RoomOwner.GetClient() == null)
                            {
                                SendChatMessage(Session, "An unknown error occured, this room is no longer for sale.");
                                Room.ForSale = false;
                                Room.SalePrice = 0;
                                return true;
                            }
                            GameClient Owner = RoomOwner.GetClient();

                                Session.GetHabbo().Credits -= Room.SalePrice;
                            Session.GetHabbo().UpdateCreditsBalance();
                            Owner.GetHabbo().Credits += Room.SalePrice;
                            Owner.GetHabbo().UpdateCreditsBalance();

                                Room.Owner = Session.GetHabbo().Username;
                                Room.OwnerId = (int)Session.GetHabbo().Id;
                            Room.RoomData.Owner = Session.GetHabbo().Username;
                            Room.RoomData.OwnerId = (int)Session.GetHabbo().Id;
                            uint RoomId = Room.RoomId;

                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.runFastQuery("UPDATE rooms SET owner='" + Session.GetHabbo().Username + "' WHERE id='" + Room.RoomId + "' LIMIT 1");
                                }
                            Session.GetHabbo().UsersRooms.Add(Room.RoomData);
                            Owner.GetHabbo().UsersRooms.Remove(Room.RoomData);
                                SilverwaveEnvironment.GetGame().GetRoomManager().UnloadRoom(Room);

                            RoomData Data = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(RoomId);
                            Data.SerializeRoomData(new ServerMessage(), true, Session, false);
                            Session.GetMessageHandler().PrepareRoomForUser(Room.RoomId, "");

                        }
                        return true;
                    }
                #endregion
                #endregion

                #region Dance (:dance)
                case "dance":
                    {
                        int DanceId = 1;
                        if (Params.Length > 1)
                        {
                            if (int.TryParse(Params[1], out DanceId))
                            {
                                DanceId = 1;
                            }
                        }

                        if (DanceId > 4 || DanceId < 0)
                        {
                            Session.SendWhisper("The dance ID must be between 0 and 4!");
                            DanceId = 0;
                            }

                        ServerMessage Response = new ServerMessage();
                        Response.Init(Outgoing.Dance);
                        Response.AppendInt32(Session.CurrentRoomUserID);
                        Response.AppendInt32(DanceId);
                        Session.GetHabbo().CurrentRoom.SendMessage(Response);
                            return true;
                        }
                    #endregion

                #region DeleteGroup (:deletegroup)
                case "deletegroup":
                    {
                        if (Session.GetHabbo().HasCmd("deletegroup"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;

                            if (!Room.CheckRights(Session, true, false))
                            {
                                Session.SendNotif("You do not own this room!");
                                return true;
                            }

                            if (Params.Length == 1 || Params[1].ToLower() != "yes")
                            {
                                Session.SendNotif("Are you sure you want to delete this group?\n" +
                                    "Once you delete it you will never be able to get it back.\n\n" +
                                    "To continue, type ':deletegroup yes' (without '')");

                                return true;
                            }

                            if (Room.Group == null)
                            {
                                Session.SendNotif("This room does not have a group.");
                                return true;
                            }

                            Group Group = Room.Group;

                            foreach (GroupUser User in Group.Members.Values)
                            {
                                GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(User.Id);

                                if (Client == null)
                                {
                                    continue;
                                }

                                Client.GetHabbo().UserGroups.Remove(User);
                                if (Client.GetHabbo().FavouriteGroup == Group.Id)
                                {
                                    Client.GetHabbo().FavouriteGroup = 0;
                                }
                            }

                            Room.RoomData.Group = null;
                            SilverwaveEnvironment.GetGame().GetGroupManager().DeleteGroup(Group.Id);
                            SilverwaveEnvironment.GetGame().GetRoomManager().UnloadRoom(Room);
                        }
                        return true;
                    }
                #endregion
                #endregion

                #region VIP Commands
                #region Moonwalk (:moonwalk)
                case "moonwalk":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_moonwalk"))
                        {
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (room == null)
                                return true;

                            RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            roomuser.moonwalkEnabled = !roomuser.moonwalkEnabled;

                            if (roomuser.moonwalkEnabled)
                                SendChatMessage(Session, "Moonwalk enabled!");
                            else
                                SendChatMessage(Session, "Moonwalk disabled!");
                        }
                        else
                        {
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        }
                        return true;
                    }
                #endregion

                #region Mimic (:mimic)
                case "mimic":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_mimic"))
                        {
                            string copyTarget = Params[1];

                            RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(copyTarget);
                            string gender = null;
                            string figure = null;
                            if (Target != null)
                            {

                                gender = Target.GetClient().GetHabbo().Gender;
                                figure = Target.GetClient().GetHabbo().Look;

                                //if (!AntiMutant.ValidateLook(figure, gender))
                                {
                                    //SendChatMessage(Session, "This figure appears to be invalid!");
                                  //  return true;
                                }
                                Session.GetHabbo().Gender = gender;
                                Session.GetHabbo().Look = figure;
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.setQuery("UPDATE users SET gender = @gender, look = @look WHERE username = @username");
                                    dbClient.addParameter("gender", gender);
                                    dbClient.addParameter("look", figure);
                                    dbClient.addParameter("username", Session.GetHabbo().Username);
                                    dbClient.runQuery();
                                }
                                Room Room = Session.GetHabbo().CurrentRoom;

                                if (Room == null)
                                {
                                    return true;
                                }

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

                                if (User == null)
                                {
                                    return true;
                                }

                                Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserInformation);
                                Session.GetMessageHandler().GetResponse().AppendInt32(-1);
                                Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Look);
                                Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Gender.ToLower());
                                Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Motto);
                                Session.GetMessageHandler().GetResponse().AppendInt32(Session.GetHabbo().AchievementPoints);
                                Session.GetMessageHandler().SendResponse();

                                ServerMessage RoomUpdate = new ServerMessage(Outgoing.UpdateUserInformation);
                                RoomUpdate.AppendInt32(User.VirtualId);
                                RoomUpdate.AppendString(Session.GetHabbo().Look);
                                RoomUpdate.AppendString(Session.GetHabbo().Gender.ToLower());
                                RoomUpdate.AppendString(Session.GetHabbo().Motto);
                                RoomUpdate.AppendInt32(Session.GetHabbo().AchievementPoints);
                                Room.SendMessage(RoomUpdate);
                            }
                        }
                        else
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        return true;
                    }
                #endregion

                #region Push (:push)
                case "push":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_push"))
                        {
                            Room TargetRoom;
                            RoomUser TargetRoomUser;
                            RoomUser TargetRoomUser1;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "You must enter a user");
                                return true;
                            }

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Convert.ToString(Params[1]));

                            if (TargetRoomUser == null)
                            {
                                SendChatMessage(Session, "Could not find that user!");
                                return true;
                            }

                            if (TargetRoomUser.GetUsername() == Session.GetHabbo().Username)
                            {
                                SendChatMessage(Session, "Come on, surely you don't want to push yourself!");
                                return true;
                            }

                            TargetRoomUser1 = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (TargetRoomUser1 == null || TargetRoomUser.TeleportEnabled)
                            {
                                return true;
                            }

                            //if ((TargetRoomUser.X == TargetRoomUser1.X - 1) || (TargetRoomUser.X == TargetRoomUser1.X + 1) || (TargetRoomUser.Y == TargetRoomUser1.Y - 1) || (TargetRoomUser.Y == TargetRoomUser1.Y + 1))
                            if (!((Math.Abs((int)(TargetRoomUser.X - TargetRoomUser1.X)) >= 2) || (Math.Abs((int)(TargetRoomUser.Y - TargetRoomUser1.Y)) >= 2)))
                            {
                                if (TargetRoomUser1.RotBody == 4)
                                { TargetRoomUser.MoveTo(TargetRoomUser.X, TargetRoomUser.Y + 1); }

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

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

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

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

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

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

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

                                TargetRoomUser.UpdateNeeded = true;
                                TargetRoomUser1.UpdateNeeded = true;
                                TargetRoomUser1.SetRot(Rotation.Calculate(TargetRoomUser1.X, TargetRoomUser1.Y, TargetRoomUser.GoalX, TargetRoomUser.GoalY));
                                TargetRoom.SendMessage(new ChatComposer(TargetRoomUser1.VirtualId, "*pushes " + Params[1] + "*", 0, TargetRoomUser1.LastBubble,-1));
                            }
                            else
                            {
                                SendChatMessage(Session, Params[1] + " is not close enough.");
                            }
                        }
                        else
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);

                        return true;
                    }
                #endregion

                #region Pull (:pull)
                case "pull":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_pull"))
                        {
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (room == null)
                            {
                                return true;
                            }

                            RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (roomuser == null)
                            {
                                return true;
                            }
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "Unable to find user!");
                                return true;
                            }

                            GameClient Target = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (Target == null)
                            return true;

                            if (Target.GetHabbo().Id == Session.GetHabbo().Id)
                            {
                                SendChatMessage(Session, "You cannot pull yourself!");
                                return true;
                            }
                            RoomUser TargetUser = room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id);
                            if (TargetUser == null)
                                return true;

                            if (TargetUser.TeleportEnabled)
                                return true;
                            if (!((Math.Abs((int)(roomuser.X - TargetUser.X)) >= 3) || (Math.Abs((int)(roomuser.Y - TargetUser.Y)) >= 3)))
                            {
                                room.SendMessage(new ChatComposer(roomuser.VirtualId, "*pulls " + Params[1] + "*", 0, roomuser.LastBubble,-1));
                                if (roomuser.RotBody % 2 != 0)
                                    roomuser.RotBody--;

                                if (roomuser.RotBody == 0)
                                    TargetUser.MoveTo(roomuser.X, roomuser.Y - 1);
                                else if (roomuser.RotBody == 2)
                                    TargetUser.MoveTo(roomuser.X + 1, roomuser.Y);
                                else if (roomuser.RotBody == 4)
                                    TargetUser.MoveTo(roomuser.X, roomuser.Y + 1);
                                else if (roomuser.RotBody == 6)
                                    TargetUser.MoveTo(roomuser.X - 1, roomuser.Y);

                            }
                            else
                            {
                                SendChatMessage(Session, "This user is too far away!");
                                return true;
                            }
                        }
                        else
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        return true;
                    }
                #endregion

                #region Enable (:enable)
                case "enable":
                case "effect":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_enable"))
                        {
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "You must enter an effect ID");
                                return true;
                            }
                            RoomUser TargetRoomUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
                            if (TargetRoomUser.RidingHorse)
                            {
                                SendChatMessage(Session, "You cannot enable effects whilst riding a horse!");
                                return true;
                            }
                            else if (TargetRoomUser.team != Team.none)
                            {
                                return true;
                            }
                            else if (TargetRoomUser.isLying)
                                return true;

                            string Effect = Params[1];
                            double EffectID;
                            bool isNum = double.TryParse(Effect, out EffectID);
                            if (isNum)
                            {
                                //if(EffectID != 97)
                                Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(int.Parse(EffectID.ToString()));
                            }
                            else
                            {
                                SendChatMessage(Session, "Try using a number for the effects!");
                                return true;
                            }
                        }
                        else
                        {
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE);
                        }
                        return true;
                    }
                #endregion

                #region Change name (:flagme)
                case "flagme":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_flagme"))
                        {
                            SendChatMessage(Session, "In order to change your name, click yourself and choose \"Change Name\"");
                            SendChatMessage(Session, "You can only change your name every 12 hours.");
                        }
                        else
                        {
                            SendChatMessage(Session, SilverwaveStaticSettings.VIP_MESSAGE_2);
                        }
                        return true;
                    }
                #endregion

                #region Empty (:empty)
                case "emptyitems":
                case "empty":
                    {
                        if (Session.GetHabbo().HasCmd("emptyitems"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("Are you sure you want to clear your inventory? You will lose all the furniture!\n" +
                                 "To confirm, type \":emptyitems yes\". \n\nOnce you do this, there is no going back!\n(If you do not want to empty it, just ignore this message!)\n\n" +
                                 "PLEASE NOTE! If you have more than 3000 items, the hidden items will also be DELETED.");
                                return true;
                            }
                            else
                            {
                                if (Params.Length == 2)
                                {
                                    if (Params[1].ToString() == "yes")
                                    {
                                        //GameClient Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                                        Session.GetHabbo().GetInventoryComponent().ClearItems();
                                        Session.SendNotif("Your inventory has been cleared!");
                                        return true;
                                    }
                                }
                            }

                        }
                        return true;
                    }
                #endregion

                #region Toll (:toll)
                case "toll":
                    {
                        if (Session.GetHabbo().HasFuse("fuse_cmd_toll"))
                        {
                            Room TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            RoomUser User = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);

                            if (TargetRoom.CheckRights(Session, true))
                            {
                                if (Params.Length == 1)
                                {
                                    SendChatMessage(Session, "You must include a price!");
                                    return true;
                                }

                                string toll = Params[1];
                                double Price;
                                bool isNum = double.TryParse(toll, out Price);
                                if (!isNum)
                                {
                                    SendChatMessage(Session, "The price must be a number!");
                                    return true;
                                }
                                else if (Price < 0)
                                {
                                    SendChatMessage(Session, "The price cannot be a negative number");
                                    return true;
                                }

                                int x = 0;
                                int y = 0;
                                //0 - MINUS Y
                                //2 - PLUS X
                                //4 - PLUS Y
                                //6 - MINUS X
                                if (User.RotBody == 0)
                                {
                                    x = User.X;
                                    y = User.Y - 1;
                                }
                                else if (User.RotBody == 2)
                                {
                                    x = User.X + 1;
                                    y = User.Y;
                                }
                                else if (User.RotBody == 4)
                                {
                                    x = User.X;
                                    y = User.Y + 1;
                                }
                                else if (User.RotBody == 6)
                                {
                                    x = User.X - 1;
                                    y = User.Y;
                                }

                                //RoomItem item = SilverwaveEnvironment.GetGame().GetItemManager().GetItem();
                                List<RoomItem> Items = TargetRoom.GetGameMap().GetAllRoomItemForSquare(x, y);
                                if (Items.Count == 0)
                                {
                                    SendChatMessage(Session, "Could not find any items on that square!");
                                    return true;
                                }
                                int i = 0;
                                foreach (RoomItem item in TargetRoom.GetGameMap().GetAllRoomItemForSquare(x, y))
                                {
                                    if (i == 1)
                                        continue;
                                    if (item.GetBaseItem().InteractionType == InteractionType.onewaygate || item.GetBaseItem().InteractionType == InteractionType.teleport)
                                    {
                                        i++;
                                        item.TollPrice = Convert.ToInt32(Price);
                                        using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                        {
                                            dbClient.runFastQuery("UPDATE item_tolls SET toll_price=" + Price + " WHERE item_id=" + item.Id + " LIMIT 1");
                                            SendChatMessage(Session, "The toll price has been set to " + Price + " credits!");
                                        }
                                    }
                                }
                            }
                        }
                        return true;
                    }
                #endregion

                #region Hit (:hit)
                case "hit":
                    {
                        if (Session.GetHabbo().HasCmd("hit"))
                        {
                            Room TargetRoom;
                            RoomUser TargetRoomUser;
                            RoomUser TargetRoomUser1;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "You must enter a user");
                                return true;
                            }

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Convert.ToString(Params[1]));

                            if (TargetRoomUser == null)
                            {
                                SendChatMessage(Session, "Could not find that user!");
                                return true;
                            }

                            if (TargetRoomUser.GetUsername() == Session.GetHabbo().Username)
                            {
                                SendChatMessage(Session, "Come on, surely you don't want to hit yourself!");
                                return true;
                            }

                            TargetRoomUser1 = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (TargetRoomUser1 == null)
                            {
                                return true;
                            }

                            //if ((TargetRoomUser.X == TargetRoomUser1.X - 1) || (TargetRoomUser.X == TargetRoomUser1.X + 1) || (TargetRoomUser.Y == TargetRoomUser1.Y - 1) || (TargetRoomUser.Y == TargetRoomUser1.Y + 1))
                            if (!((Math.Abs((int)(TargetRoomUser.X - TargetRoomUser1.X)) >= 2) || (Math.Abs((int)(TargetRoomUser.Y - TargetRoomUser1.Y)) >= 2)))
                            {
                                TargetRoomUser1.SetRot(Rotation.Calculate(TargetRoomUser1.X, TargetRoomUser1.Y, TargetRoomUser.GoalX, TargetRoomUser.GoalY));
                                TargetRoom.SendMessage(new ChatComposer(TargetRoomUser1.VirtualId, "*hits " + Params[1] + "*", 0, TargetRoomUser1.LastBubble,-1));
                            }
                        }
                        return true;
                    }
                #endregion

                #region Override (:override)
                case "override":
                    {
                        if (Session.GetHabbo().HasCmd("override"))
                        {
                            Room currentRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser roomUserByHabbo = null;
                            currentRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            if (currentRoom != null)
                            {
                                roomUserByHabbo = currentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                                if (roomUserByHabbo != null)
                                {
                                    if (roomUserByHabbo.AllowOverride)
                                    {
                                        roomUserByHabbo.AllowOverride = false;
                                        SendChatMessage(Session, "Override has been disabled!");
                                    }
                                    else
                                    {
                                        roomUserByHabbo.AllowOverride = true;
                                        SendChatMessage(Session, "Override has been enabled!");
                                    }
                                    currentRoom.GetGameMap().GenerateMaps(true);
                                }
                            }

                        }
                        return true;
                    }
                #endregion

                #region Faceless
                case "faceless":
                    {
                        string[] figureParts;
                        string[] headParts;

                        figureParts = Session.GetHabbo().Look.Split('.');
                        foreach (string Part in figureParts)
                        {
                            if (Part.StartsWith("hd"))
                            {
                                headParts = Part.Split('-');

                                if (!headParts[1].Equals("99999"))
                                    headParts[1] = "99999";
                                else
                                    break;

                                string NewHead = "hd-" + headParts[1] + "-" + headParts[2];

                                Session.GetHabbo().Look = Session.GetHabbo().Look.Replace(Part, NewHead);
                                break;
                            }
                        }

                        using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            dbClient.setQuery("UPDATE users SET look =  @Look WHERE username =  @username");
                            dbClient.addParameter("look", Session.GetHabbo().Look);
                            dbClient.addParameter("username", Session.GetHabbo().Username);
                            dbClient.runQuery();
                        }

                        Room Room = Session.GetHabbo().CurrentRoom;

                        if (Room == null)
                            break;

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

                        if (User == null)
                            break;

                        #region Messages
                        Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserInformation);
                        Session.GetMessageHandler().GetResponse().AppendInt32(-1);
                        Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Look);
                        Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Gender.ToLower());
                        Session.GetMessageHandler().GetResponse().AppendString(Session.GetHabbo().Motto);
                        Session.GetMessageHandler().GetResponse().AppendInt32(Session.GetHabbo().AchievementPoints);
                        Session.GetMessageHandler().SendResponse();

                        ServerMessage RoomUpdate = new ServerMessage(Outgoing.UpdateUserInformation);
                        RoomUpdate.AppendInt32(User.VirtualId);
                        RoomUpdate.AppendString(Session.GetHabbo().Look);
                        RoomUpdate.AppendString(Session.GetHabbo().Gender.ToLower());
                        RoomUpdate.AppendString(Session.GetHabbo().Motto);
                        RoomUpdate.AppendInt32(Session.GetHabbo().AchievementPoints);
                        Room.SendMessage(RoomUpdate);
                        #endregion
                        break;
                    }
                #endregion
                #endregion

                #region Moderation Commands
                #region Kick (:kick)
                case "kick":
                    {
                        if (Session.GetHabbo().HasCmd("kick"))
                        {
                            string TargetUser = null;
                            GameClient TargetClient = null;

                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);
                            Room TargetRoom = TargetClient.GetHabbo().CurrentRoom;

                            if (TargetClient == null)
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }

                            if (Session.GetHabbo().Rank <= TargetClient.GetHabbo().Rank)
                            {
                                Session.SendNotif("You are not allowed to kick that user.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().CurrentRoomId < 1)
                            {
                                Session.SendNotif("That user is not in a room and can not be kicked.");
                                return true;
                            }

                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(TargetClient.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            TargetRoom.GetRoomUserManager().RemoveUserFromRoom(TargetClient, true, false);
                            TargetClient.CurrentRoomUserID = -1;

                            if (Params.Length > 2)
                            {
                                TargetClient.SendNotif("A moderator has kicked you from the room for the following reason: " + MergeParams(Params, 2));
                            }
                            else
                            {
                                TargetClient.SendNotif("A moderator has kicked you from the room.");
                            }
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Room Mute (:roommute) / Room unmute (:roomunmute)
                case "roommute":
                    {
                        if (Session.GetHabbo().HasCmd("roommute") || Session.GetHabbo().HasCmd("roomunmute"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (!Session.GetHabbo().CurrentRoom.RoomMuted)
                                Session.GetHabbo().CurrentRoom.RoomMuted = true;

                            string Msg = MergeParams(Params, 1);

                            ServerMessage Message = new ServerMessage();
                            Message.Init(Outgoing.SendNotif);
                            Message.AppendString("This room has been muted because:\n" + Msg);
                            Message.AppendString("");
                            TargetRoom.SendMessage(Message);
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Room Mute", "Room muted");
                        }
                        return true;
                    }
                case "roomunmute":
                    {
                        if (Session.GetHabbo().HasCmd("roomunmute"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom.RoomMuted)
                                Session.GetHabbo().CurrentRoom.RoomMuted = false;
                            ServerMessage Message = new ServerMessage();
                            Message.Init(Outgoing.SendNotif);
                            Message.AppendString("You have been unmuted.");
                            Message.AppendString("");
                            TargetRoom.SendMessage(Message);
                        }
                        return true;
                    }
                #endregion

                #region Mute (:mute)
                case "mute":
                    {
                        if (Session.GetHabbo().HasCmd("mute"))
                        {
                            string TargetUser = null;
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);

                            if (TargetClient == null || TargetClient.GetHabbo() == null)
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().Rank >= 4)
                            {
                                Session.SendNotif("You are not allowed to (un)mute that user.");
                                return true;
                            }

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Mute", "Muted user");
                            TargetClient.GetHabbo().Mute();
                        }
                        return true;
                    }
                #endregion

                #region Flood (:flood)
                case "flood":
                    {
                        if (Session.GetHabbo().HasCmd("flood"))
                        {
                            string TargetUser = null;
                            GameClient TargetClient = null;

                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);

                            if (Params.Length != 3)
                            {
                                Session.SendNotif("You must include a username and a time for the person you want to flood.");
                                return true;
                            }
                            TargetClient.GetHabbo().FloodTime = SilverwaveEnvironment.GetUnixTimestamp() + Convert.ToInt32(Params[2]);
                            ServerMessage Packet = new ServerMessage(Outgoing.FloodFilter);
                            Packet.AppendInt32(Convert.ToInt32(Params[2]));
                            TargetClient.SendMessage(Packet);
                        }
                        return true;
                    }
                #endregion

                #region Unmute (:unmute)
                case "unmute":
                    {
                        if (Session.GetHabbo().HasCmd("unmute"))
                        {

                            string TargetUser = null;
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);

                            if (TargetClient == null || TargetClient.GetHabbo() == null)
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }

                            if (!TargetClient.GetHabbo().Muted)
                            {
                                return true;
                            }

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Mute", "Un Muted user");

                            TargetClient.GetHabbo().Unmute();
                        }
                        return true;
                    }
                #endregion

                #region Summon (:summon)
                case "summon":
                case "come":
                    {
                        if (Session.GetHabbo().HasCmd("summon"))
                        {
                            if (Params.Length < 1)
                            {
                                Session.SendNotif("No use specified");
                                return true;

                            }
                            string username = Params[1];
                            GameClient client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(username);
                            if (client == null)
                            {
                                Session.SendNotif("Could not find user \"" + username + "\"");
                                return true;
                            }
                            client.SendNotif("You have been summoned by " + Session.GetHabbo().Username);
                            RoomData Room = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(Session.GetHabbo().CurrentRoomId);
                            Room.SerializeRoomData(new ServerMessage(), (client.GetHabbo().CurrentRoom == null), client);
                            //client.GetMessageHandler().PrepareRoomForUser(Session.GetHabbo().CurrentRoomId, "");
                            client.SendMessage(new RoomForwardComposer(false, Session.GetHabbo().CurrentRoomId));
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Follow (:follow)
                case "follow":
                case "stalk":
                    {
                        if (Session.GetHabbo().HasCmd("follow"))
                        {
                            GameClient TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

                            if (TargetClient == null || TargetClient.GetHabbo() == null)
                            {
                                Session.SendNotif("This user could not be found");
                                return true;
                            }

                            if (TargetClient == null || TargetClient.GetHabbo().CurrentRoom == null || TargetClient.GetHabbo().CurrentRoom == Session.GetHabbo().CurrentRoom)
                            {
                                return true;
                            }

                            Session.SendMessage(new RoomForwardComposer(false, TargetClient.GetHabbo().CurrentRoom.RoomId));

                            //Session.GetMessageHandler().PrepareRoomForUser(TargetClient.GetHabbo().CurrentRoom.RoomId, "");
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Room kick (:roomkick)
                case "roomkick":
                    {
                        if (Session.GetHabbo().HasCmd("roomkick"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            string ModMsg = MergeParams(Params, 1);

                            RoomKick kick = new RoomKick(ModMsg, (int)Session.GetHabbo().Rank);

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Room kick", "Kicked the whole room");
                            TargetRoom.QueueRoomKick(kick);
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Super ban (:superban)
                case "superban":
                    {
                        if (Session.GetHabbo().HasCmd("superban"))
                        {
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

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

                            if (TargetClient == null)
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank)
                            {
                                Session.SendNotif("You are not allowed to ban that user.");
                                return true;
                            }

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Ban", "Long ban forever");

                            SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, 788922000, MergeParams(Params, 2), false, false);

                        }
                        return true;
                    }
                #endregion

                #region Show Whispers (:togglewhisper)
                case "togglewhisper":
                    {
                        if (Session.GetHabbo().HasCmd("togglewhisper"))
                        {
                            /*if (Session.GetHabbo().ShowRoomWhispers)
                            {
                                Session.GetHabbo().ShowRoomWhispers = false;
                                SendChatMessage(Session, "Room Whispers viewing disabled.");
                            }
                            else
                            {
                                Session.GetHabbo().ShowRoomWhispers = true;
                                SendChatMessage(Session, "Room Whispers viewing enabled.");
                            }*/
                        }
                        return true;
                    }
                #endregion

                #region Roomalert (:roomalert)
                case "roomalert":
                    {
                        if (Session.GetHabbo().HasCmd("roomalert"))
                        {
                            Room currentRoom = Session.GetHabbo().CurrentRoom;
                            currentRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            if (currentRoom != null)
                            {
                                string s = MergeParams(Params, 1);
                                ServerMessage message = new ServerMessage();
                                message.Init(Outgoing.SendNotif);
                                message.AppendString(s);
                                message.AppendString("");
                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Alert", "Room alert with message [" + s + "]");
                                currentRoom.QueueRoomMessage(message);
                            }
                        }
                    }
                    return true;
                #endregion

                case "alert":
                    {
                        if (Session.GetHabbo().HasCmd("alert"))
                        {
                            if (Params[1] == null || Params[2] == null)
                            {
                                Session.SendNotif("You left something empty.");
                                return true;
                            }
                            string TargetUser = null;
                            GameClient TargetClient = null;

                            TargetUser = Params[1];
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);
                            Room TargetRoom = TargetClient.GetHabbo().CurrentRoom;

                            if (TargetClient == null)
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }

                            TargetClient.SendNotif(Params[2] + " -" + Session.GetHabbo().Username);
                        }
                        return true;
                    }
                #endregion

                #region Administration Commands
                #region Fast walk
                case "fastwalk":
                    {
                        if (Session.GetHabbo().HasCmd("fastwalk"))
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (!User.FastWalking)
                            {
                                User.FastWalking = true;
                            }
                            else
                            {
                                User.FastWalking = false;
                            }
                        }

                        return true;
                    }
                #endregion

                case "givebelcredits":
                    {
                        if (Session.GetHabbo().Rank > 7)
                        {

                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                int creditsToAdd;
                                if (int.TryParse(Params[2], out creditsToAdd))
                                {
                                    TargetClient.GetHabbo().BelCredits = TargetClient.GetHabbo().BelCredits + creditsToAdd;
                                    TargetClient.GetHabbo().UpdateCreditsBalance();
                                    return true;
                                }
                                else
                                {
                                    Session.SendNotif("Numbers Only!");
                                    return true;
                                }
                            }
                            else
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }
                        }
                        return true;
                    }

                #region Promote room
                case "promoteroom":
                    {
                        if (Session.GetHabbo().HasCmd("promoteroom"))
                        {
                            if (Params[1] == null)
                            {
                                Session.SendNotif("You need to enter event name and description.");
                                return true;
                            }

                            int Time;

                            if (!int.TryParse(Params[1], out Time))
                            {
                                Session.SendNotif("You need use command like :promoteroom time (time being how long to run event for in seconds).");
                                return true;
                            }

                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            SilverwaveEnvironment.GetGame().GetRoomEvents().AddNewEvent(Room.RoomId, "Default Name", "Default Desc", Session);
                        }

                        return true;
                    }
                #endregion

                #region Mass Dance (:massdance)
                case "massdance":
                    {
                        if (Session.GetHabbo().HasCmd("massdance") || Session.GetHabbo().Username == "MOD-billsonnn")
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();

                            int DanceId = Convert.ToInt32(Params[1]);
                            if (DanceId > 4)
                            {
                                Session.SendNotif("That is an invalid dance ID");
                                return true;
                            }

                            if (DanceId > 0 && User.CarryItemID > 0)
                            {
                                User.CarryItem(0);
                            }

                            User.DanceId = DanceId;
                            foreach (RoomUser user in users)
                            {
                                ServerMessage DanceMessage = new ServerMessage(Outgoing.Dance);
                                DanceMessage.AppendInt32(user.VirtualId);
                                DanceMessage.AppendInt32(DanceId);
                                Room.SendMessage(DanceMessage);
                                user.DanceId = DanceId;
                            }
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Go Boom (:goboom)
                case "goboom":
                    {
                        if (Session.GetHabbo().HasCmd("goboom"))
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser user in users)
                            {
                                user.ApplyEffect(108);
                            }
                        }
                        return true;
                    }
                #endregion

                #region Mass Enable (:massenable)
                case "massenable":
                    {
                        if (Session.GetHabbo().HasCmd("massenable"))
                        {
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser user in users)
                            {
                                if (user.RidingHorse)
                                    continue;
                                user.ApplyEffect(Convert.ToInt32(Params[1]));
                            }
                        }
                        return true;
                    }
                #endregion
                #region Give Credits (:credits)
                case "givecredits":
                case "credits":
                case "coins":
                    {
                        if (Session.GetHabbo().HasCmd("coins"))
                        {

                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                int creditsToAdd;
                                if (int.TryParse(Params[2], out creditsToAdd))
                                {
                                    TargetClient.GetHabbo().Credits = TargetClient.GetHabbo().Credits + creditsToAdd;
                                    TargetClient.GetHabbo().UpdateCreditsBalance();
                                    TargetClient.SendNotif(Session.GetHabbo().Username + LanguageLocale.GetValue("coins.awardmessage1") + creditsToAdd.ToString() + LanguageLocale.GetValue("coins.awardmessage2"));
                                    Session.SendNotif(LanguageLocale.GetValue("coins.updateok"));
                                    return true;
                                }
                                else
                                {
                                    Session.SendNotif("Numbers Only!");
                                    return true;
                                }
                            }
                            else
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Give Pixels (:pixels)
                case "pixels":
                case "givepixels":
                    {
                        if (Session.GetHabbo().HasCmd("pixels"))
                        {

                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                int creditsToAdd;
                                if (int.TryParse(Params[2], out creditsToAdd))
                                {
                                    TargetClient.GetHabbo().ActivityPoints = TargetClient.GetHabbo().ActivityPoints + creditsToAdd;
                                    Session.GetHabbo().NotifyNewPixels(creditsToAdd);
                                    TargetClient.GetHabbo().UpdateActivityPointsBalance();
                                    TargetClient.SendNotif(Session.GetHabbo().Username + LanguageLocale.GetValue("pixels.awardmessage1") + creditsToAdd.ToString() + LanguageLocale.GetValue("pixels.awardmessage2"));
                                    Session.SendNotif(LanguageLocale.GetValue("pixels.updateok"));
                                    return true;
                                }
                                else
                                {
                                    Session.SendNotif("Numbers Only!");
                                    return true;
                                }
                            }
                            else
                            {
                                Session.SendNotif("User could not be found.");
                                return true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Hotel Alert (:ha)
                case "ha":
                    if (Session.GetHabbo().HasCmd("ha"))
                    {
                        string Notice = MergeParams(Params, 1);

                        ServerMessage HotelAlert = new ServerMessage(Outgoing.BroadcastMessage);
                        HotelAlert.AppendString(Notice + "\r\n" + "- " + Session.GetHabbo().Username);

                        SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(HotelAlert);

                        SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "HotelAlert", "Hotel alert [" + Notice + "]");
                        return true;
                    }
                    return true;
                #endregion

                #region Shutdown (:shutdown)
                case "shutdown":
                    {
                        if (Session.GetHabbo().HasCmd("shutdown"))
                        {
                            Task ShutdownTask = new Task(SilverwaveEnvironment.PerformShutDown);
                            ShutdownTask.Start();
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Shutdown", "Issued shutdown command");
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Disconnect (:kill)
                case "disconnect":
                case "kill":
                case "dc":
                    {
                        if (Session.GetHabbo().HasCmd("kill"))
                        {
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);

                            if (TargetClient == null)
                            {
                                Session.SendNotif("User not found.");
                                return true;
                            }

                            if (TargetClient.GetHabbo().Rank >= 4 && !Session.GetHabbo().HasFuse("fuse_disconnect_anyone"))
                            {
                                Session.SendNotif("You are not allowed to disconnect that user.");
                                return true;
                            }
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Disconnect", "User disconnected by user");

                            TargetClient.GetConnection().Dispose();
                        }
                        return true;
                    }
                #endregion

                #region Position (:coords)
                case "coord":
                case "coords":
                case "position":
                    {
                        if (Session.GetHabbo().HasCmd("coords"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser TargetRoomUser = null;
                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            if (TargetRoom == null)
                            {
                                return true;
                            }

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);

                            if (TargetRoomUser == null)
                            {
                                return true;
                            }

                            Session.SendNotif("X: " + TargetRoomUser.X + "\n - Y: " + TargetRoomUser.Y + "\n - Z: " + TargetRoomUser.Z + "\n - Rot: " + TargetRoomUser.RotBody + ", sqState: " + TargetRoom.GetGameMap().GameMap[TargetRoomUser.X, TargetRoomUser.Y].ToString() + "\n\n - RoomID: " + Session.GetHabbo().CurrentRoomId);
                        }
                        return true;
                    }
                #endregion

                #region Teleport (:teleport)
                case "teleport":
                case "tele":
                    {
                        if (Session.GetHabbo().HasCmd("teleport"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            RoomUser TargetRoomUser = null;

                            TargetRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (TargetRoomUser.RidingHorse)
                            {
                                SendChatMessage(Session, "You cannot teleport whilst riding a horse!");
                                return true;
                            }
                            if (TargetRoomUser == null)
                                return true;

                            TargetRoomUser.TeleportEnabled = !TargetRoomUser.TeleportEnabled;

                            TargetRoom.GetGameMap().GenerateMaps();
                        }
                        return true;
                    }
                #endregion

                #region Update (:update_x)
                #region Update Catalog
                case "update_catalog":
                case "reload_catalog":
                case "recache_catalog":
                case "refresh_catalog":
                case "update_catalogue":
                case "reload_catalogue":
                case "recache_catalogue":
                case "refresh_catalogue":
                    {
                        if (Session.GetHabbo().HasCmd("update_catalog"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetCatalog().Initialize(dbClient);
                            }
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(new ServerMessage(Outgoing.UpdateShop));

                            Session.SendNotif("The catalog has been refreshed!");
                            return true;
                        }
                        return true;
                    }
                #endregion

                #region Update Items
                case "update_items":
                case "reload_items":
                case "recache_items":
                case "refresh_items":
                    {
                        if (Session.GetHabbo().HasCmd("update_items"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetItemManager().LoadItems(dbClient);
                            }
                            Session.SendNotif("Item definitions have been refreshed!");
                        }

                        return true;
                    }
                #endregion

                #region Update Filter
                case "update_filter":
                case "reload_filter":
                case "recache_filter":
                case "refresh_filter":
                    {
                        if (Session.GetHabbo().HasCmd("update_filter"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                LanguageLocale.InitSwearWord(dbClient);
                            }
                        }
                        return true;
                    }
                #endregion

                #region Update Navigator
                case "update_navigator":
                case "reload_navigator":
                case "recache_navigator":
                case "refresh_navigator":
                    {
                        if (Session.GetHabbo().HasCmd("update_navigator"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetNavigator().Initialize(dbClient);
                            }
                            Session.SendNotif("The navigator has been updated!");
                        }
                        return true;
                    }
                #endregion

                #region Update Ranks
                case "update_ranks":
                case "reload_ranks":
                case "recache_ranks":
                case "refresh_ranks":
                    {
                        if (Session.GetHabbo().HasCmd("update_ranks"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                SilverwaveEnvironment.GetGame().GetRoleManager().LoadRights(dbClient);
                            }
                            Session.SendNotif("Ranks have been refreshed!");
                        }
                        return true;
                    }
                #endregion

                #region Update Settings
                case "update_settings":
                case "reload_settings":
                case "recache_settings":
                case "refresh_settings":
                    {
                        if (Session.GetHabbo().HasCmd("update_settings"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                SilverwaveEnvironment.ConfigData = new ConfigData(dbClient);
                        }
                        return true;
                    }
                #endregion

                #region Update Groups
                case "update_groups":
                case "reload_groups":
                case "recache_groups":
                case "refresh_groups":
                    {
                        if (Session.GetHabbo().HasCmd("update_groups"))
                        {
                            SilverwaveEnvironment.GetGame().GetGroupManager().InitGroups();
                            Session.SendNotif("Groups have been successfully reloaded");
                        }

                        return true;
                    }
                #endregion

                #region Update Bans
                case "update_bans":
                    {
                        if (Session.GetHabbo().HasCmd("update_bans"))
                        {
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                SilverwaveEnvironment.GetGame().GetBanManager().LoadBans(dbClient);

                            Session.SendNotif("Bans have been refreshed!");
                        }
                        return true;
                    }
                #endregion

                #region Update Quests
                case "update_quests":
                    {
                        if (Session.GetHabbo().HasCmd("update_quests"))
                        {
                            SilverwaveEnvironment.GetGame().GetQuestManager().Initialize(SilverwaveEnvironment.GetDatabaseManager().getQueryreactor());
                            Session.SendNotif("Quests have been successfully reloaed!");
                        }
                        return true;
                    }
                #endregion
                #endregion

                #region Super Pull (:spull)
                case "spull":
                    {
                        if (Session.GetHabbo().HasCmd("spull"))
                        {
                            Room room = Session.GetHabbo().CurrentRoom;
                            if (room == null)
                            {
                                SendChatMessage(Session, "Error in finding room!");
                                return true;
                            }

                            RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (roomuser == null)
                            {
                                SendChatMessage(Session, "Unable to find user!");
                                return true;
                            }
                            if (Params.Length == 1)
                            {
                                SendChatMessage(Session, "Unable to find user!");
                                return true;
                            }

                            GameClient Target = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            RoomUser TargetUser = room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id);
                            if (Target.GetHabbo().Id == Session.GetHabbo().Id)
                            {
                                SendChatMessage(Session, "You cannot pull yourself!");
                                return true;
                            }

                            if (TargetUser.TeleportEnabled)
                                return true;

                            if (roomuser.RotBody % 2 != 0)
                                roomuser.RotBody--;
                            room.SendMessage(new ChatComposer(roomuser.VirtualId, "*pulls " + Params[1] + "*", 0, roomuser.LastBubble,-1));
                            if (roomuser.RotBody == 0)
                                TargetUser.MoveTo(roomuser.X, roomuser.Y - 1);
                            else if (roomuser.RotBody == 2)
                                TargetUser.MoveTo(roomuser.X + 1, roomuser.Y);
                            else if (roomuser.RotBody == 4)
                                TargetUser.MoveTo(roomuser.X, roomuser.Y + 1);
                            else if (roomuser.RotBody == 6)
                                TargetUser.MoveTo(roomuser.X - 1, roomuser.Y);
                        }
                        return true;
                    }
                #endregion

                #region Global Credits (:globalcredits)
                case "globalcredits":
                    {
                        if (Session.GetHabbo().HasCmd("globalcredits"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You need to enter an amount!");
                                return true;
                            }
                            try
                            {
                                int Amount = int.Parse(Params[1]);
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                    dbClient.runFastQuery("UPDATE users SET credits=credits+" + Amount);

                                SilverwaveEnvironment.GetGame().GetClientManager().QueueCreditsUpdate(Amount);

                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Mass Credits", "Send [" + Amount + "] credits to everyone in the database");

                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region Mass Credits (:masscredits)
                case "masscredits":
                    {
                        if (Session.GetHabbo().HasCmd("masscredits"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You need to enter an amount!");
                                return true;
                            }
                            try
                            {
                                int Amount = int.Parse(Params[1]);
                                SilverwaveEnvironment.GetGame().GetClientManager().QueueCreditsUpdate(Amount);

                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Mass Credits", "Send [" + Amount + "] credits to everyone online");
                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region Give Badge (:badge)
                case "badge":
                case "givebadge":
                    {
                        if (Session.GetHabbo().HasCmd("badge"))
                        {
                            if (Params.Length != 3)
                            {
                                Session.SendNotif("You must include a username and badgecode!");
                                return true;
                            }
                            GameClient TargetClient = null;
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;

                            TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (TargetClient != null)
                            {
                                TargetClient.GetHabbo().GetBadgeComponent().GiveBadge(Params[2], true, TargetClient);

                                SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, TargetClient.GetHabbo().Username, "Badge", "Badge given to user [" + Params[2] + "]");
                                TargetClient.SendNotif("You have just been given a badge!");
                                return true;
                            }
                            else
                            {
                                Session.SendNotif("User was not found");
                                return true;
                            }
                        }
                        return true;
                    }
                #endregion

                #region Room Badge (:roombadge)
                case "roombadge":
                    {
                        if (Session.GetHabbo().HasCmd("roombadge"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You must enter a badge code!");
                                return true;
                            }

                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom == null)
                                return true;

                            TargetRoom.QueueRoomBadge(Params[1]);
                            ServerMessage nMessage = new ServerMessage();
                            nMessage.Init(Outgoing.SendNotif);
                            nMessage.AppendString("You have just recieved a badge!");
                            nMessage.AppendString("");
                            TargetRoom.SendMessage(nMessage);
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Badge", "Roombadge in room [" + TargetRoom.RoomId + "] with badge [" + Params[1] + "]");
                        }
                        return true;
                    }
                #endregion

                #region Mass Badge (:massbadge)
                case "massbadge":
                    {
                        if (Session.GetHabbo().HasCmd("massbadge"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You must enter a badge code!");
                                return true;
                            }
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBadgeUpdate(Params[1]);
                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "Badge", "Mass badge with badge [" + Params[1] + "]");
                            ServerMessage nMessage = new ServerMessage();
                            nMessage.Init(Outgoing.SendNotif);
                            nMessage.AppendString("You have just recieved a badge!");
                            nMessage.AppendString("");
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(nMessage);
                        }
                        return true;
                    }
                #endregion

                #region All eyes on me (:alleyesonme)
                case "alleyesonme":
                    {
                        if (Session.GetHabbo().HasCmd("alleyesonme"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom == null)
                                return true;
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser Us in users)
                            {
                                if (Session.GetHabbo().Id == Us.userID)
                                    continue;
                                Us.SetRot(Rotation.Calculate(Us.X, Us.Y, User.X, User.Y));
                            }
                        }
                        return true;
                    }
                #endregion

                #region IP Ban (:ipban)
                case "ipban":
                case "banip":
                    {
                        if (Session.GetHabbo().HasCmd("ipban"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You must include a username and reason!");
                            }
                            GameClient TargetUser = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1].ToString());
                            if (TargetUser == null)
                            {
                                Session.SendNotif("An unknown error occured whilst finding this user!");
                                return true;
                            }
                            try
                            {
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 788922000, MergeParams(Params, 2), true, false);
                            }
                            catch (Exception e) { Console.WriteLine(e); }

                        }
                        return true;
                    }
                #endregion

                #region Machine Ban (:machineban)
                case "machineban":
                case "banmachine":
                case "mban":
                    {
                        if (Session.GetHabbo().HasCmd("machineban"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You must include a username and reason!");
                            }
                            GameClient TargetUser = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1].ToString());
                            if (TargetUser == null)
                            {
                                Session.SendNotif("An unknown error occured whilst finding this user!");
                                return true;
                            }

                            if (string.IsNullOrWhiteSpace(TargetUser.MachineId))
                            {
                                Session.SendNotif("Unable to ban this user, they don't have a machine ID");
                                return true;
                            }

                            try
                            {
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 2678400, "You have been banned! The reason given was:\n" + MergeParams(Params, 2), false, true);
                            }
                            catch (Exception e) { Console.WriteLine(e); }

                        }
                        return true;
                    }
                #endregion

                #region Machine and IP ban (:mip)
                case "mip":
                    {
                        if (Session.GetHabbo().HasCmd("mip"))
                        {
                            if (Params.Length == 1)
                            {
                                Session.SendNotif("You must include a username and reason!");
                            }
                            GameClient TargetUser = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1].ToString());
                            if (TargetUser == null)
                            {
                                Session.SendNotif("An unknown error occured whilst finding this user!");
                                return true;
                            }
                            try
                            {
                                if (string.IsNullOrWhiteSpace(TargetUser.MachineId))
                                {
                                    Session.SendNotif("Unable to ban this user, they don't have a machine ID");
                                    return true;
                                }
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 2678400, "You have been banned! The reason given was:\n" + MergeParams(Params, 2), false, true);
                                SilverwaveEnvironment.GetGame().GetBanManager().BanUser(TargetUser, Session.GetHabbo().Username, 788922000, MergeParams(Params, 2), true, false);
                            }
                            catch (Exception e) { Console.WriteLine(e); }
                        }
                        return true;
                    }
                #endregion

                #region All around me (:allaroundme)
                case "allaroundme":
                    {
                        if (Session.GetHabbo().HasCmd("allaroundme"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            if (Session.GetHabbo().CurrentRoom == null)
                            {
                                Session.SendNotif("An unknown error occured!");
                                return true;
                            }
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            List<RoomUser> users = Room.GetRoomUserManager().GetRoomUsers();
                            foreach (RoomUser Us in users)
                            {
                                if (Session.GetHabbo().Id == Us.userID)
                                    continue;
                                Us.MoveTo(User.X, User.Y, true);
                            }
                            if (Params.Length == 2)
                            {
                                if (Params[1] == "override")
                                {
                                    foreach (RoomUser Us in users)
                                    {
                                        if (Session.GetHabbo().Id == Us.userID)
                                            continue;
                                        Us.AllowOverride = true;
                                        Us.MoveTo(User.X, User.Y, true);
                                        Us.AllowOverride = false;
                                    }
                                }
                            }
                        }
                        return true;
                    }
                #endregion

                #region Hotel alert w/link (:hal)
                case "hal":
                    {
                        if (Session.GetHabbo().HasCmd("hal"))
                        {
                            Room TargetRoom = Session.GetHabbo().CurrentRoom;
                            // Hotel Alert pluss link :hal <link> <message>
                            string Link = Params[1];

                            string Message = MergeParams(Params, 2);

                            ServerMessage nMessage = new ServerMessage(Outgoing.SendNotif);
                            nMessage.AppendString(LanguageLocale.GetValue("hotelallert.notice") + "\r\n" + Message + "\r\n-" + Session.GetHabbo().Username);
                            nMessage.AppendString(Link);
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(nMessage);

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "HotelAlert", "Hotel alert [" + Message + "]");
                        }
                        return true;
                    }
                #endregion

                #region Staff Alert (:sa)
                case "sa":
                    {
                        if (Session.GetHabbo().HasCmd("sa"))
                        {
                            string Message = "Message from staff: \n" + Params[1] + "\n - " + Session.GetHabbo().Username;
                            ServerMessage message = new ServerMessage(Outgoing.BroadcastMessage);
                            message.AppendString(Message);
                            SilverwaveEnvironment.GetGame().GetClientManager().StaffAlert(message);

                            SilverwaveEnvironment.GetGame().GetModerationTool().LogStaffEntry(Session.GetHabbo().Username, string.Empty, "StaffAlert", "Staff alert [" + Message + "]");
                        }
                        return true;
                    }
                #endregion

                #region Spectators Mode (:invisible)
                case "invisible":
                case "spec":
                case "spectatorsmode":
                    {
                        if (Session.GetHabbo().HasCmd("invisible"))
                        {
                            Session.GetHabbo().SpectatorMode = true;
                            Session.SendNotif("Reload the room to be invisible");

                            //RoomUser User = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
                            //User.IsSpectator = true;
                        }
                        return true;
                    }
                #endregion

                #region Add Bannable Word (:banword)
                case "banword":
                    {
                        if (Session.GetHabbo().HasCmd("banword"))
                        {
                            string BannedWord = Params[1];
                            if (!string.IsNullOrWhiteSpace(BannedWord))
                            {
                                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    dbClient.setQuery("INSERT INTO wordfilter (`word`, `addedby`, `bannable`) VALUES " +
                                        "(@ban, '" + Session.GetHabbo().Username + "', '0');");
                                    dbClient.addParameter("ban", BannedWord.ToLower());
                                    dbClient.runQuery();
                                    LanguageLocale.InitSwearWord(dbClient);
                                    Session.SendNotif("'" + BannedWord + "' has been added to the bannable list");
                                }
                            }
                        }
                        return true;
                    }
                #endregion

                #region Unidle (:unidle)
                case "unidle":
                    {
                        if (Session.GetHabbo().HasCmd("unidle"))
                        {
                            Habbo Habbo = SilverwaveEnvironment.getHabboForName(Params[1]);
                            if (Habbo == null)
                                return true;

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

                            if (User == null)
                                return true;

                            User.UnIdle();
                        }
                        return true;
                    }
                #endregion

                #region Make Public (:public)
                case "public":
                    {
                        if (Session.GetHabbo().HasCmd("public"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;
                            if (Room == null)
                                return true;
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                dbClient.runFastQuery("UPDATE rooms SET roomtype='public' WHERE id=" + Room.RoomId + " LIMIT 1");
                            Room.Type = "public";
                            Room.RoomData.Type = "public";
                            Room.RoomData.SerializeRoomData(new ServerMessage(), false, Session, true);
                        }
                        return true;
                    }
                #endregion

                #region Make Private (:private)
                case "private":
                    {
                        if (Session.GetHabbo().HasCmd("private"))
                        {
                            Room Room = Session.GetHabbo().CurrentRoom;
                            if (Room == null)
                                return true;
                            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                                dbClient.runFastQuery("UPDATE rooms SET roomtype='private' WHERE id=" + Room.RoomId + " LIMIT 1");
                            Room.Type = "private";
                            Room.RoomData.Type = "private";
                            Room.RoomData.SerializeRoomData(new ServerMessage(), false, Session, true);
                        }
                        return true;
                    }
                #endregion

                #region Mass Action (:massact)
                case "massact":
                    {
                        if (Session.GetHabbo().HasCmd("massact"))
                        {
                            try
                            {
                                Room Room = Session.GetHabbo().CurrentRoom;

                                List<RoomUser> Users = Room.GetRoomUserManager().GetRoomUsers();
                                int Num = Int16.Parse(Params[1]);

                                ServerMessage Message = new ServerMessage();

                                foreach (RoomUser User in Users)
                                {
                                    if (User == null)
                                        continue;

                                    Room.SendMessage(new ActionComposer(User, Num));
                                }
                            }
                            catch { }
                        }
                        return true;
                    }
                #endregion

                #region Close Alert (:closealert)
                case "closealert":
                    {
                        if (Session.GetHabbo().HasCmd("closealert"))
                        {
                            int Time = int.Parse(Params[1]);

                            ServerMessage Message = new ServerMessage(Outgoing.ClosingAlert);
                            Message.AppendInt32(Time);
                            SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(Message);
                        }
                        return true;
                    }
                #endregion
                #endregion
            }
            return false;
            #endregion
        }
Ejemplo n.º 25
0
        internal void MovePuck(RoomItem item, GameClient mover, int newX, int newY, Team team)
        {
            if (!room.GetGameMap().itemCanBePlacedHere(newX, newY))
                return;

            Point oldRoomCoord = item.Coordinate;

            Double NewZ = room.GetGameMap().Model.SqFloorHeight[newX, newY];

            //ServerMessage Message = new ServerMessage(95);
            //Message.AppendUInt(item.Id);
            //Message.AppendUInt(3508);
            //Message.AppendInt32(item.Coordinate.X);
            //Message.AppendInt32(item.Coordinate.Y);
            //Message.AppendInt32(newX);
            //Message.AppendInt32(newY);
            //Message.AppendUInt(4);
            //Message.AppendString(NewZ.ToString());
            //Message.AppendString("H11");
            //Message.AppendInt32(-1);
            //Message.AppendInt32(0);
            //SendMessage(Message);

            if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY)
                return;

            item.ExtraData = ((int)team).ToString();
            item.UpdateNeeded = true;
            item.UpdateState();

            ServerMessage mMessage = new ServerMessage();
            mMessage.Init(Outgoing.ObjectOnRoller); // Cf
            mMessage.AppendInt32(item.Coordinate.X);
            mMessage.AppendInt32(item.Coordinate.Y);
            mMessage.AppendInt32(newX);
            mMessage.AppendInt32(newY);
            mMessage.AppendInt32(1);
            mMessage.AppendInt32(item.Id);
            mMessage.AppendString(TextHandling.GetString(item.GetZ));
            mMessage.AppendString(TextHandling.GetString(NewZ));
            mMessage.AppendInt32(1);
            room.SendMessage(mMessage);

            //HandleBanzaiTiles(new Coord(item.GetX, item.GetY), team);
            room.GetRoomItemHandler().SetFloorItem(mover, item, newX, newY, item.Rot, false, false, false, false);

            if (mover == null || mover.GetHabbo() == null)
                return;

            RoomUser user = mover.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id);
            if (banzaiStarted)
            {
                HandleBanzaiTiles(new Point(newX, newY), team, user);
            }
        }