public void Handle(GameClient Session, ClientMessage Event)
		{
             ServerMessage Message = new ServerMessage(Outgoing.PetRace); //Rootkit
             string PetType = Event.PopFixedString();
             Message.AppendStringWithBreak(PetType);
             int petid = int.Parse(PetType.Substring(PetType.IndexOf('t'), PetType.Length - PetType.IndexOf('t')).Replace("t",""));
            if (PetRace.RaceGotRaces(petid))
            {
                List<PetRace> Races = PetRace.GetRacesForRaceId(petid);
                Message.AppendInt32(Races.Count);
                foreach (PetRace r in Races)
                {
                    Message.AppendInt32(petid);
                    Message.AppendInt32(r.Color1);
                    Message.AppendInt32(r.Color2);
                    Message.AppendBoolean(r.Has1Color);
                    Message.AppendBoolean(r.Has2Color); 
                }
            }
            else
            {
                Message.AppendInt32(0);
            }
				Session.SendMessage(Message);
			}
Ejemplo n.º 2
0
		public void Handle(GameClient Session, ClientMessage Event)
		{
            Room room = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
            if (room != null)
            {
                RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
                if (roomUserByHabbo != null)
                {
                    roomUserByHabbo.Unidle();
                    int num = Event.PopWiredInt32();
                    /*if (num < 0 || num > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && num > 1))
                    {
                        num = 0;
                    }*/
                    if (num > 0 && roomUserByHabbo.CarryItemID > 0)
                    {
                        roomUserByHabbo.CarryItem(0);
                    }
                    roomUserByHabbo.DanceId = num;
                    ServerMessage serverMessage = new ServerMessage(Outgoing.Dance);
                    serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
                    serverMessage.AppendInt32(num);
                    room.SendMessage(serverMessage, null);
                    if (Session.GetHabbo().CurrentQuestId > 0 && Essential.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
                    {
                        Essential.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
                    }
                }
            }
		}
Ejemplo n.º 3
0
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().GetInventoryComponent() != null)
     {
         Session.SendMessage(Session.GetHabbo().GetInventoryComponent().ComposeBotInventoryListMessage());
     }
 }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room Room = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
            if (Room != null && Room.CheckRights(Session, true))
            {

                        ServerMessage LoadUsersWithRights = new ServerMessage(Outgoing.FlatControllerAdded);
                        LoadUsersWithRights.AppendUInt(Room.Id);
                        LoadUsersWithRights.AppendInt32(Room.UsersWithRights.Count);
                        foreach (uint current2 in Room.UsersWithRights)
                        {

                            LoadUsersWithRights.AppendUInt(current2);
                            LoadUsersWithRights.AppendString(Essential.GetGame().GetClientManager().GetNameById(current2));
                        }
                        Session.SendMessage(LoadUsersWithRights);

                        foreach (uint current3 in Room.UsersWithRights)
                        {
                            ServerMessage serverMessage = new ServerMessage(Outgoing.GivePowers); // Updated
                            serverMessage.AppendUInt(Room.Id);
                            serverMessage.AppendUInt(current3);
                            serverMessage.AppendStringWithBreak(Essential.GetGame().GetClientManager().GetNameById(current3));
                            Session.SendMessage(serverMessage);
                        }
        
            }
        }
 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (Session.GetHabbo().CurrentRoom.CheckRights(Session, true))
     {
         ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
         message.AppendBoolean(false);
         if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
             message.AppendInt32(1000000);
         else
             message.AppendInt32(5);
         message.AppendInt32(0);
         message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
         message.AppendInt32(RoomItem_0.uint_0);
         message.AppendString("");
         message.AppendInt32(2);
         if (!string.IsNullOrEmpty(RoomItem_0.string_3))
         {
             message.AppendInt32(int.Parse(RoomItem_0.string_3.Split(';')[0]));
             message.AppendInt32(int.Parse(RoomItem_0.string_3.Split(';')[1]));
         }
         else
         {
             message.AppendInt32(1);
             message.AppendInt32(50);
         }
         message.AppendBoolean(false);
         message.AppendInt32(0);
         message.AppendInt32(1290);
         Session.SendMessage(message);
     }
 }
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
            if (bool_0)
            {
                ServerMessage message = new ServerMessage(Outgoing.WiredEffect); // Updated
                message.AppendBoolean(false);
                if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
                    message.AppendInt32(1000000);
                else
                    message.AppendInt32(5);
                message.AppendInt32(0);
                message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
                message.AppendInt32(RoomItem_0.uint_0);
                message.AppendString("");
                message.AppendInt32(2);
                if (RoomItem_0.string_2 != "")
                    message.AppendInt32(int.Parse(RoomItem_0.string_2));
                else
                    message.AppendInt32(5);
                if (RoomItem_0.string_3 != "")
                    message.AppendInt32(int.Parse(RoomItem_0.string_3));
                else
                    message.AppendInt32(1);
                message.AppendInt32(0);
                message.AppendInt32(6);
                message.AppendInt32(0);
                message.AppendInt32(0);
                message.AppendInt32(0);
                Session.SendMessage(message);
            }
		}
        public void Handle(GameClient Session, ClientMessage Event)
        {
            if (!Session.GetHabbo().CurrentRoom.CCTs.Contains("park"))
            {
                return;
            }

            if (Session.GetHabbo().CurrentRoom.IsInfobusOpen == false)
            {
                ServerMessage InfobusClosed = new ServerMessage(Outgoing.InfobusMessage);
                InfobusClosed.AppendStringWithBreak("Ich bin zurzeit geschlossen! Komm später wieder.");
                Session.SendMessage(InfobusClosed);
            }
            else
            {
                Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id).MoveTo(28, 5);

                if (Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id).X == 28 && Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id).Y == 5)
                {
                    ServerMessage Message = new ServerMessage(Outgoing.RoomForward);
                    Message.AppendBoolean(true);
                    Message.AppendInt32(56);
                    Session.SendMessage(Message);
                }
                    
                
            }
        }
Ejemplo n.º 8
0
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			RoomUser @class = RoomItem_0.GetRoom().GetRoomUserByHabbo(Session.GetHabbo().Id);
			if (@class != null && (RoomItem_0.GStruct1_2.x < RoomItem_0.GetRoom().RoomModel.int_4 && RoomItem_0.GStruct1_2.y < RoomItem_0.GetRoom().RoomModel.int_5))
			{
                if (ThreeDCoord.IsNot(@class.Position, RoomItem_0.GStruct1_1) && @class.bool_0)
				{
					@class.MoveTo(RoomItem_0.GStruct1_1);
				}
				else
				{
                    if (RoomItem_0.GetRoom().method_30(RoomItem_0.GStruct1_2.x, RoomItem_0.GStruct1_2.y, RoomItem_0.Double_0, true, false) && RoomItem_0.InteractingUser == 0)
					{
                        RoomItem_0.InteractingUser = @class.UId;
						@class.bool_0 = false;
						if (@class.bool_6 && (@class.int_10 != RoomItem_0.GStruct1_1.x || @class.int_11 != RoomItem_0.GStruct1_1.y))
						{
							@class.method_3(true);
						}
						@class.bool_1 = true;
						@class.MoveTo(RoomItem_0.GStruct1_0);
						RoomItem_0.ReqUpdate(3);
					}
				}
			}
		}
Ejemplo n.º 9
0
 public override void OnPlace(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
     roomMusicController.Stop();
     Session.GetHabbo().CurrentRoom.LoadMusic();
 }
Ejemplo n.º 10
0
		public void Handle(GameClient Session, ClientMessage Event)
		{
			DataTable dataTable_ = Session.GetHabbo().dataTable_0;
			if (dataTable_ != null)
			{
                ServerMessage Message = new ServerMessage(Outgoing.UserGuilds);
				Message.AppendInt32(dataTable_.Rows.Count);
				foreach (DataRow dataRow in dataTable_.Rows)
				{
					GroupsManager @class = Groups.GetGroupById((int)dataRow["groupid"]);
					Message.AppendInt32(@class.Id);
                    Message.AppendStringWithBreak(@class.Name);
                    Message.AppendStringWithBreak(@class.Badge);
					if (Session.GetHabbo().FavouriteGroup == @class.Id) // is favorite group?
					{
						Message.AppendBoolean(true);
					}
					else
					{
						Message.AppendBoolean(false);
					}
				}
				Session.SendMessage(Message);
			}
		}
		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.method_26(Session))
			{
                int num = Event.PopWiredInt32();
                uint Data = Event.PopWiredUInt();
                string BrandData = "state" + Convert.ToChar(9) + "0";
                for (int i = 1; i <= Data; i++)
                {
                    BrandData = BrandData + Convert.ToChar(9) + Event.PopFixedString();
                }
                using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
                {
                    class2.AddParamWithValue("extradata", BrandData);
                    class2.ExecuteQuery("UPDATE items_extra_data SET extra_data = @extradata WHERE item_id = '" + num + "' LIMIT 1");
                }
                /*ServerMessage Message = new ServerMessage();
                Message.Init(Outgoing.ObjectDataUpdate); // Update
                Message.AppendStringWithBreak(num.ToString());
                Message.AppendInt32(0);
                Message.AppendInt32(1);
                Message.AppendStringWithBreak(BrandData);
                @class.SendMessage(Message, null);*/
                @class.method_28((uint)num).ExtraData = BrandData;
                @class.method_79(Session, @class.method_28((uint)num), @class.method_28((uint)num).GetX, @class.method_28((uint)num).Int32_1, @class.method_28((uint)num).int_3, false, false, true);
                @class.method_28((uint)num).UpdateState(true, false, true);
				}
			
		}
		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.method_56(string_);
				if (@class != null)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (Session.GetHabbo().list_2.Contains(uint_))
					{
						Session.GetHabbo().list_2.Remove(uint_);
						using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"DELETE FROM user_ignores WHERE user_id = ",
								Session.GetHabbo().Id,
								" AND ignore_id = ",
								uint_,
								" LIMIT 1;"
							}));
						}
                        ServerMessage Message = new ServerMessage(Outgoing.UpdateIgnoreStatus); // Updated
						Message.AppendInt32(3);
                        Message.AppendString(string_);
						Session.SendMessage(Message);
					}
				}
			}
		}
		public void Handle(GameClient session, ClientMessage message)
		{
			if (session != null && session.GetHabbo() != null)
			{
				Room room = Essential.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);

				if (room != null)
				{
					RoomUser targetUser = room.GetRoomUserByHabbo(message.PopWiredUInt());

					if (targetUser != null && !targetUser.IsBot && targetUser.GetClient() != null)
					{
                        ServerMessage Message = new ServerMessage(Outgoing.UpdateBadges); // Updated

						Message.AppendUInt(targetUser.GetClient().GetHabbo().Id);
						Message.AppendInt32(targetUser.GetClient().GetHabbo().GetBadgeComponent().VisibleBadges);

						using (TimedLock.Lock(targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges()))
						{
							foreach (Badge current in targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges())
							{
								if (current.Slot > 0)
								{
									Message.AppendInt32(current.Slot);
									Message.AppendStringWithBreak(current.Code);
								}
							}
						}

						session.SendMessage(Message);
					}
				}
			}
		}
Ejemplo n.º 14
0
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0)
			{
                ServerMessage Message = new ServerMessage(Outgoing.WiredCondition); // Updated
                Message.AppendBoolean(false);
                Message.AppendInt32(5);
                if (RoomItem_0.string_3 != "")
                {
                    Message.AppendInt32(RoomItem_0.string_3.Split(',').Length);

                    foreach (string ItemId in RoomItem_0.string_3.Split(','))
                    {
                        Message.AppendInt32(int.Parse(ItemId));
                    }
                }
                else
                {
                    Message.AppendInt32(0);
                }
                Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
                Message.AppendUInt(RoomItem_0.uint_0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(1);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
			}
		}
		public void Handle(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().GetMessenger() != null)
			{
				int num = Event.PopWiredInt32();
				for (int i = 0; i < num; i++)
				{
					uint uint_ = Event.PopWiredUInt();
					MessengerRequest @class = Session.GetHabbo().GetMessenger().method_4(uint_);
					if (@class != null)
					{
						if (@class.To != Session.GetHabbo().Id)
						{
							break;
						}

						if (!Session.GetHabbo().GetMessenger().method_9(@class.To, @class.From))
						{
							Session.GetHabbo().GetMessenger().method_12(@class.From);
						}

						Session.GetHabbo().GetMessenger().method_11(uint_);

                       
					}
				}
			}
		}
Ejemplo n.º 16
0
 public override void OnRemove(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.Stop();
     roomMusicController.UnLinkRoomOutputItem();
     Item.UpdateState(true, true);
 }
Ejemplo n.º 17
0
        public override void OnRemove(GameClient Session, RoomItem Item)
        {
            DataRow dataRow2;
            using (DatabaseClient @class = Essential.GetDatabase().GetClient())
            {
                dataRow2 = @class.ReadDataRow("SELECT fw_count FROM items_firework WHERE item_id = '" + Item.uint_0 + "'");

                if (dataRow2 != null)
                {
                    Item.FireWorkCount = (int)dataRow2["fw_count"];
                }
                else
                {
                    @class.ExecuteQuery("INSERT INTO items_firework(item_id, fw_count) VALUES ( '" + Item.uint_0 + "', '0')");
                }
            }

            if (Item.FireWorkCount > 0)
            {
                Item.ExtraData = "1";
                Item.UpdateState(true, true);
            }

            else if (Item.FireWorkCount <= 0)
            {
                Item.ExtraData = "0";
                Item.UpdateState(true, true);
            }
        }
		public void Handle(GameClient Session, ClientMessage Event)
		{
            ServerMessage Message = new ServerMessage(Outgoing.CanCreateRoom); // Updated
            Message.AppendInt32(0);
            Message.AppendInt32(99999);
			Session.SendMessage(Message);
		}
Ejemplo n.º 19
0
		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.method_26(Session))
			{
				string string_ = Event.PopFixedString();
                bool canletin = Event.PopWiredBoolean();
				GameClient class2 = Essential.GetGame().GetClientManager().GetClientByHabbo(string_);
				if (class2 != null && class2.GetHabbo() != null && class2.GetHabbo().bool_6 && class2.GetHabbo().uint_2 == Session.GetHabbo().CurrentRoomId)
				{
					if (canletin)
					{
						class2.GetHabbo().bool_5 = true;
                        ServerMessage Message4 = new ServerMessage(Outgoing.FlatAccessible); // Updated
                        Message4.AppendString("");
                        class2.SendMessage(Message4);
					}
					else
					{
                        ServerMessage Message5 = new ServerMessage(Outgoing.DoorBellNoPerson); // Updated
                        Message5.AppendString("");
                        class2.SendMessage(Message5);
					}
				}
			}
		}
		public void Handle(GameClient Session, ClientMessage Event)
		{
			int num = Event.PopWiredInt32();

            ServerMessage Message = new ServerMessage(Outgoing.SongInfo); // Updated
			Message.AppendInt32(num);
			if (num > 0)
			{
				for (int i = 0; i < num; i++)
				{
					int num2 = Event.PopWiredInt32();

                    
                    if (num2 > 0)
                    {
                        Message.AppendInt32(SongManager.GetSong(num2).Id);
                        Message.AppendString(SongManager.GetSong(num2).Name);
                        Message.AppendString(SongManager.GetSong(num2).Track);
                        Message.AppendInt32(SongManager.GetSong(num2).Length);
                        Message.AppendString(SongManager.GetSong(num2).Author);
                    }
                    else
                    {
                        // Ei lähetetä osittaista pakettia!!
                        return;
                    }
                }
            }
          
			Session.SendMessage(Message);
		}
Ejemplo n.º 21
0
		public void Handle(GameClient Session, ClientMessage Event)
		{
         /*   ServerMessage Message = new ServerMessage(Outgoing.SoundSettings); // Updated
			Message.AppendInt32(Session.GetHabbo().Volume);
			Message.AppendBoolean(false);
			Session.SendMessage(Message);*/
		}
		public void Handle(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
				{
                    ServerMessage Message = new ServerMessage(Outgoing.DimmerData); // Updated
					Message.AppendInt32(@class.MoodlightData.Presets.Count);
					Message.AppendInt32(@class.MoodlightData.CurrentPreset);
					int num = 0;
					foreach (MoodlightPreset current in @class.MoodlightData.Presets)
					{
						num++;
						Message.AppendInt32(num);
						Message.AppendInt32(int.Parse(Essential.BooleanToString(current.BackgroundOnly)) + 1);
						Message.AppendStringWithBreak(current.ColorCode);
						Message.AppendInt32(current.ColorIntensity);
					}
					Session.SendMessage(Message);
				}
			}
			catch
			{
			}
		}
Ejemplo n.º 23
0
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null)
         {
             RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
             if (class2 != null)
             {
                 class2.Unidle();
                 int num = Event.PopWiredInt32();
                 int num2 = Event.PopWiredInt32();
                 if (num != class2.X || num2 != class2.Y)
                 {
                     int int_ = Rotation.GetRotation(class2.X, class2.Y, num, num2);
                     class2.method_9(int_);
                     if (class2.class34_1 != null && class2.RoomUser_0 != null)
                     {
                         class2.RoomUser_0.method_9(int_);
                     }
                 }
             }
         }
     }
 }
		public void Handle(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
				{
					RoomItem class2 = null;
					foreach (RoomItem class3 in @class.Hashtable_1.Values)
					{
						if (class3.GetBaseItem().InteractionType.ToLower() == "dimmer")
						{
							class2 = class3;
							break;
						}
					}
					if (class2 != null)
					{
						if (@class.MoodlightData.Enabled)
						{
							@class.MoodlightData.Deactivate();
						}
						else
						{
							@class.MoodlightData.Activate();
						}
						class2.ExtraData = @class.MoodlightData.GenerateExtraData();
						class2.UpdateState();
					}
				}
			}
			catch
			{
			}
		}
Ejemplo n.º 25
0
		public void Handle(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			string text = Essential.FilterString(Event.PopFixedString());
			if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null && Session.GetHabbo().PassedSafetyQuiz)
			{
                Session.GetHabbo().CheckForUnmute();
				if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
				{
                    ServerMessage Message = new ServerMessage(Outgoing.InstantChat);
					Message.AppendUInt(0u);
					Message.AppendString(Session.GetHabbo().Username + ": " + text);
                    Message.AppendString(Essential.GetUnixTimestamp() + string.Empty);
					Essential.GetGame().GetClientManager().SendToStaffs(Session, Message, false);
				}
				else
				{
					if (num == 0u)
					{
                       /* ServerMessage Message2 = new ServerMessage(1133);
						Message2.AppendInt32(4);
						Message2.AppendUInt(0u);
						Session.SendMessage(Message2);*/
					}
					else
					{
                        if (Session != null && Session.GetHabbo() != null)
                        {
                            Session.GetHabbo().GetMessenger().method_18(num, text);
                        }
					}
				}
			}
		}
		public void Handle(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
            RoomData @class = Essential.GetGame().GetRoomManager().method_12(num);
			if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
			{
			}
			else
			{
                ServerMessage Message2 = new ServerMessage(Outgoing.FavsUpdate); // Updated
				Message2.AppendUInt(num);
				Message2.AppendBoolean(true);
				Session.SendMessage(Message2);
				Session.GetHabbo().list_1.Add(num);
				using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
				{
					class2.ExecuteQuery(string.Concat(new object[]
					{
						"INSERT INTO user_favorites (user_id,room_id) VALUES ('",
						Session.GetHabbo().Id,
						"','",
						num,
						"')"
					}));
				}
			}
		}
 public void Handle(GameClient Session, ClientMessage Event)
 {
     int guildId = Event.PopWiredInt32();
     //Console.WriteLine(Event.PopWiredInt32() + " | " + Event.PopWiredInt32() + " | " + Event.PopWiredInt32());
     GroupsManager guild = Groups.GetGroupById(guildId);
     if (guild != null)
     {
         if (!guild.UserWithRanks.Contains((int)Session.GetHabbo().Id))
             return;
         Room room = Essential.GetGame().GetRoomManager().method_15(Convert.ToUInt32(guild.RoomId));
         if (room != null)
         {
             int type = Event.PopWiredInt32();
             guild.Locked = Groups.IntToType(type);
             int onlyAdminMove = Event.PopWiredInt32();
             guild.canMove = !Essential.StringToBoolean(onlyAdminMove + "");
             guild.OnlyAdminsCanMove = onlyAdminMove;
             using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
             {
                 dbClient.ExecuteQuery("UPDATE groups SET locked='" + guild.Locked + "' WHERE id=" + guild.Id);
                 dbClient.ExecuteQuery("UPDATE groups SET members_canmove='" +(guild.canMove ? 1 : 0) + "' WHERE id=" + guild.Id);
             }
             room.SaveSettingsPackets(guild, Session);
         }
     }
 }
 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if(Session.GetHabbo().CurrentRoom.CheckRights(Session,true))
     {
         Essential.getWebSocketManager().getWebSocketByName(Session.GetHabbo().Username).Send("19|" + RoomItem_0.uint_0 + "|" + RoomItem_0.ExtraData);
     }
 }
		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null)
			{
				RoomItem class2 = @class.method_28(Event.PopWiredUInt());
				if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
				{
                    string Color = Event.PopFixedString();
                    string Text = Event.PopFixedString();
                    if (@class.method_26(Session) || Text.StartsWith(class2.ExtraData))
					{
                        switch (Color)
                        {
                            case "FFFF33":
                            case "FF9CFF":
                            case "9CCEFF":
                            case "9CFF9C":
                                break;
                            default:
                                return; // invalid color
                        }
                        class2.ExtraData = Color + " " + Text;
						class2.UpdateState(true, true);
						
					}
				}
			}
		}
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Event.PopWiredInt32();
         Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true))
         {
             RoomItem class2 = @class.method_28(Event.PopWiredUInt());
             if (class2 != null)
             {
                 string text = class2.GetBaseItem().InteractionType.ToLower();
                 if (text == null || !(text == "postit"))
                 {
                     @class.method_29(Session, class2.uint_0, false, true);
                     Session.GetHabbo().GetInventoryComponent().method_11(class2.uint_0, class2.uint_2, class2.ExtraData, false, 0, 0, class2.GuildData);
                     Session.GetHabbo().GetInventoryComponent().method_9(true);
                     if (Session.GetHabbo().CurrentQuestId > 0 && Essential.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "PICKUPITEM")
                     {
                         Essential.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
                     }
                 }
             }
         }
     }
 }