Ejemplo n.º 1
0
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_1, bool bool_0)
		{
			if (bool_0)
			{
				if (this.Modes == 0)
				{
					RoomItem_0.UpdateState(false, true);
				}
				int num = 0;
				int num2 = 0;
				if (RoomItem_0.ExtraData.Length > 0)
				{
					num = int.Parse(RoomItem_0.ExtraData);
				}
				if (num <= 0)
				{
					num2 = 1;
				}
				else
				{
					if (num >= this.Modes)
					{
						num2 = 0;
					}
					else
					{
						num2 = num + 1;
					}
				}
				if (num2 == 0)
				{
					if (RoomItem_0.GetRoom().method_97(RoomItem_0.GetX, RoomItem_0.Int32_1))
					{
						return;
					}
					Dictionary<int, AffectedTile> dictionary = RoomItem_0.GetRoom().method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, RoomItem_0.GetX, RoomItem_0.Int32_1, RoomItem_0.int_3);
					if (dictionary == null)
					{
						dictionary = new Dictionary<int, AffectedTile>();
					}
					foreach (AffectedTile current in dictionary.Values)
					{
						if (RoomItem_0.GetRoom().method_97(current.Int32_0, current.Int32_1))
						{
							return;
						}
					}
				}
				RoomItem_0.ExtraData = num2.ToString();
				RoomItem_0.UpdateState();
				RoomItem_0.GetRoom().method_22();
			}
		}
Ejemplo n.º 2
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 override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0)
			{
                ServerMessage message = new ServerMessage(Outgoing.WiredFurniTrigger);
                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);
                if (RoomItem_0.string_3.Length > 0)
                {
                    message.AppendString(RoomItem_0.string_3);
                }
                else
                {
                    message.AppendString("I");
                }
                message.AppendInt32(1);
                message.AppendInt32(1);
                message.AppendInt32(1);
                message.AppendInt32(3);
                message.AppendInt32(0);
                message.AppendInt32(0);
                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);
            }
		}
Ejemplo n.º 5
0
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (RoomItem_0.GetBaseItem().Height_Adjustable.Count > 1)
			{
				Dictionary<int, AffectedTile> dictionary = RoomItem_0.GetRoom().method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, RoomItem_0.GetX, RoomItem_0.Int32_1, RoomItem_0.int_3);
				RoomItem_0.GetRoom().method_22();
				RoomItem_0.GetRoom().method_87(RoomItem_0.GetRoom().method_43(RoomItem_0.GetX, RoomItem_0.Int32_1), true, true);
				foreach (AffectedTile current in dictionary.Values)
				{
					RoomItem_0.GetRoom().method_87(RoomItem_0.GetRoom().method_43(current.Int32_0, current.Int32_1), true, true);
				}
			}
			if (Session != null)
			{
				RoomUser RoomUser_ = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
				RoomItem_0.GetRoom().method_10(RoomUser_, RoomItem_0);
			}
		}
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0 && Session != null)
			{
				RoomItem_0.CheckExtraData3();
				ServerMessage Message = new ServerMessage(Outgoing.WiredEffect); // Update
                Message.AppendBoolean(false);
                if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
                {
                    Message.AppendInt32(1000000);
                }
                else
                {
                    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.AppendStringWithBreak("");
				Message.AppendInt32(0);
				Message.AppendInt32(8);
				Message.AppendInt32(0);
                double value = 0;
                if (RoomItem_0.string_2 != "" && double.TryParse(RoomItem_0.string_2, out value))
                    Message.AppendInt32(Convert.ToInt32(value * 2));
                else
                    Message.AppendInt32(0);
				Message.AppendInt32(0);
				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.WiredFurniTrigger); // Updated
                Message.AppendBoolean(false);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
				Message.AppendUInt(RoomItem_0.uint_0);
				Message.AppendStringWithBreak(RoomItem_0.string_2);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(7);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
				Session.SendMessage(Message);
			}
		}
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0 && Session != null)
			{
				RoomItem_0.CheckExtraData3();
                ServerMessage Message = new ServerMessage(Outgoing.WiredCondition); // Updated
                Message.AppendBoolean(false);
                if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
                    Message.AppendInt32(1000000);
                else
                    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.AppendString("");
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                /*Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendBoolean(false);
                Message.AppendBoolean(true);*/
				Session.SendMessage(Message);
			}
		}
Ejemplo n.º 9
0
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (RoomItem_0.ExtraData != "1" && RoomItem_0.GetBaseItem().VendingIds.Count >= 1 && RoomItem_0.InteractingUser == 0u)
			{
				if (Session != null)
				{
					RoomUser @class = RoomItem_0.GetRoom().GetRoomUserByHabbo(Session.GetHabbo().Id);
					if (@class == null)
					{
						return;
					}
                    if (!RoomItem_0.GetRoom().method_99(@class.X, @class.Y, RoomItem_0.GetX, RoomItem_0.Int32_1))
					{
						if ([email protected]_0)
						{
							return;
						}
						try
						{
							@class.MoveTo(RoomItem_0.GStruct1_1);
							return;
						}
						catch
						{
							return;
						}
					}
					RoomItem_0.InteractingUser = Session.GetHabbo().Id;
					@class.bool_0 = false;
					@class.method_3(true);
                    @class.method_9(Rotation.GetRotation(@class.X, @class.Y, RoomItem_0.GetX, RoomItem_0.Int32_1));
				}
				RoomItem_0.ReqUpdate(2);
				RoomItem_0.ExtraData = "1";
				RoomItem_0.UpdateState(false, true);
			}
		}
		public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
		{
			if (UserHasRights && Session != null)
			{
				Item.CheckExtraData4();
                ServerMessage Message = new ServerMessage(Outgoing.WiredEffect); // Updated
                Message.AppendBoolean(false);
                if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
                    Message.AppendInt32(1000000);
                else
                    Message.AppendInt32(5);
                if (Item.string_4 != "")
                {
                    Message.AppendInt32(Item.string_4.Split(',').Length);

                    foreach (string ItemId in Item.string_4.Split(','))
                    {
                        Message.AppendInt32(int.Parse(ItemId));
                    }
                }
                else
                {
                    Message.AppendInt32(0);
                }
				Message.AppendInt32(Item.GetBaseItem().Sprite);
				Message.AppendUInt(Item.uint_0);
				Message.AppendStringWithBreak("");
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
				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.WiredFurniTrigger);
                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.AppendUInt(RoomItem_0.uint_0);
				Message.AppendStringWithBreak(RoomItem_0.string_1);
                Message.AppendInt32(1);
                Message.AppendInt32(1);
                Message.AppendInt32(1);
                Message.AppendInt32(3);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
				Session.SendMessage(Message);
				RoomItem_0.ReqUpdate(1);
			}
		}
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
		{
			if (bool_0)
			{
				RoomItem_0.CheckExtraData4();
                ServerMessage Message = new ServerMessage(Outgoing.WiredEffect); // Updated
                Message.AppendBoolean(false);
				Message.AppendInt32(5);
                if (RoomItem_0.string_4 != "")
                {
                    Message.AppendInt32(RoomItem_0.string_4.Split(',').Length);

                    foreach (string ItemId in RoomItem_0.string_4.Split(','))
                    {
                        Message.AppendInt32(int.Parse(ItemId));
                    }
                }
                else
                {
                    Message.AppendInt32(0);
                }
				Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
				Message.AppendUInt(RoomItem_0.uint_0);
                Message.AppendStringWithBreak("");
                Message.AppendInt32(2);
                if (RoomItem_0.string_2.Length > 0)
                {
                    Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_2));
                }
                else
                {
                    Message.AppendInt32(0);
                }
                if (RoomItem_0.string_3.Length > 0)
                {
                    Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_3));
                }
                else
                {
                    Message.AppendInt32(0);
                }
                Message.AppendInt32(0);
                Message.AppendInt32(4);
                if (RoomItem_0.string_6.Length > 0)
                {
                    Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_6));
                }
                else
                {
                    Message.AppendInt32(0);
                }
                Message.AppendInt32(0);
                Message.AppendInt32(0);
				Message.AppendStringWithBreak("");
				Message.AppendString("J");
				if (RoomItem_0.string_2.Length > 0)
				{
					Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_2));
				}
				else
				{
					Message.AppendInt32(0);
				}
				if (RoomItem_0.string_3.Length > 0)
				{
					Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_3));
				}
				else
				{
					Message.AppendInt32(0);
				}
				Message.AppendString("HPA");
				if (RoomItem_0.string_6.Length > 0)
				{
					Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_6));
				}
				else
				{
					Message.AppendInt32(0);
				}
				Message.AppendStringWithBreak("H");
                
				Session.SendMessage(Message);
			}
		}
Ejemplo n.º 13
0
        public void FillBanzaiPatches(RoomUser User, RoomItem Item)
        {
            if (Item.GetBaseItem().InteractionType.ToLower() == "bb_patch" && User.team != Team.None && User.game == Rooms.Games.Game.BattleBanzai && User.bool_6 && Item.ExtraData != "14" && Item.ExtraData != "5" && Item.ExtraData != "8" && Item.ExtraData != "11" && Item.ExtraData != "1")
            {
                #region Set ExtraData
                if (Item.ExtraData == "0" || Item.ExtraData == "")
                {
                    if (User.team == Team.Yellow)
                    {
                        Item.ExtraData = Convert.ToString(12);
                    }
                    else if (User.team == Team.Red)
                    {
                        Item.ExtraData = Convert.ToString(3);
                    }
                    else if (User.team == Team.Green)
                    {
                        Item.ExtraData = Convert.ToString(6);
                    }
                    else if (User.team == Team.Blue)
                    {
                        Item.ExtraData = Convert.ToString(9);
                    }
                }
                else
                {
                    if (Convert.ToInt32(Item.ExtraData) > 0)
                    {
                        if (User.team == Team.Yellow && (Item.ExtraData == "12" || Item.ExtraData == "13"))
                        {
                            Item.ExtraData = Convert.ToString(Convert.ToInt32(Item.ExtraData) + 1);
                        }
                        else
                        {
                            if (User.team == Team.Red && (Item.ExtraData == "3" || Item.ExtraData == "4"))
                            {
                                Item.ExtraData = Convert.ToString(Convert.ToInt32(Item.ExtraData) + 1);
                            }
                            else
                            {
                                if (User.team == Team.Green && (Item.ExtraData == "6" || Item.ExtraData == "7"))
                                {
                                    Item.ExtraData = Convert.ToString(Convert.ToInt32(Item.ExtraData) + 1);
                                }
                                else
                                {
                                    if (User.team == Team.Blue && (Item.ExtraData == "9" || Item.ExtraData == "10"))
                                    {
                                        Item.ExtraData = Convert.ToString(Convert.ToInt32(Item.ExtraData) + 1);
                                    }
                                    else
                                    {
                                        if (User.team == Team.Yellow)
                                        {
                                            Item.ExtraData = Convert.ToString(12);
                                        }
                                        else if (User.team == Team.Red)
                                        {
                                            Item.ExtraData = Convert.ToString(3);
                                        }
                                        else if (User.team == Team.Green)
                                        {
                                            Item.ExtraData = Convert.ToString(6);
                                        }
                                        else if (User.team == Team.Blue)
                                        {
                                            Item.ExtraData = Convert.ToString(9);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                #endregion
                #region Achievements
                if (User.team == Team.Yellow && Item.ExtraData == "14")
                {
                    User.GetClient().GetHabbo().TilesLocked++;
                    User.GetClient().GetHabbo().CheckBattleBanzaiTilesLockedAchievements();
                }

                if (User.team == Team.Red && Item.ExtraData == "5")
                {
                    User.GetClient().GetHabbo().TilesLocked++;
                    User.GetClient().GetHabbo().CheckBattleBanzaiTilesLockedAchievements();
                }

                if (User.team == Team.Green && Item.ExtraData == "8")
                {
                    User.GetClient().GetHabbo().TilesLocked++;
                    User.GetClient().GetHabbo().CheckBattleBanzaiTilesLockedAchievements();
                }

                if (User.team == Team.Blue && Item.ExtraData == "11")
                {
                    User.GetClient().GetHabbo().TilesLocked++;
                    User.GetClient().GetHabbo().CheckBattleBanzaiTilesLockedAchievements();
                }
                #endregion
                #region Update Item
                int team = 0;
                if (User.team == Team.Yellow)
                {
                    team = 14;
                }
                else if (User.team == Team.Red)
                {
                    team = 5;
                }
                else if (User.team == Team.Green)
                {
                    team = 8;
                }
                else if (User.team == Team.Blue)
                {
                    team = 11;
                }

                this.method_89(team, Item, false, User.GetClient());
                Item.UpdateState(true, true);
                #endregion
            }
        }
Ejemplo n.º 14
0
 public bool method_81(RoomItem RoomItem_0, int int_17, int int_18, double double_3)
 {
     Dictionary<int, AffectedTile> dictionary = this.method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, int_17, int_18, RoomItem_0.int_3);
     RoomItem_0.SetPosition(int_17, int_18, double_3);
     if (!this.hashtable_2.Contains(RoomItem_0.uint_0))
     {
         this.hashtable_2.Add(RoomItem_0.uint_0, RoomItem_0);
     }
     this.method_22();
     this.method_87(this.method_43(int_17, int_18), true, true);
     foreach (AffectedTile current in dictionary.Values)
     {
         this.method_87(this.method_43(current.Int32_0, current.Int32_1), true, true);
     }
     return true;
 }
Ejemplo n.º 15
0
 public bool method_82(GameClient Session, RoomItem RoomItem_0, bool bool_13, string string_10)
 {
     if (bool_13)
     {
         RoomItem_0.Interactor.OnPlace(Session, RoomItem_0);
         string text = RoomItem_0.GetBaseItem().InteractionType.ToLower();
         if (text != null && text == "dimmer" && this.MoodlightData == null)
         {
             this.MoodlightData = new MoodlightData(RoomItem_0.uint_0);
             RoomItem_0.ExtraData = this.MoodlightData.GenerateExtraData();
         }
         if (!this.hashtable_3.ContainsKey(RoomItem_0.uint_0))
         {
             this.hashtable_3.Add(RoomItem_0.uint_0, RoomItem_0);
             if (RoomItem_0.Boolean_2)
             {
                 this.hashtable_0.Add(RoomItem_0.uint_0, RoomItem_0);
             }
             else
             {
                 if (!this.hashtable_4.Contains(RoomItem_0.uint_0))
                 {
                     this.hashtable_4.Add(RoomItem_0.uint_0, RoomItem_0);
                 }
             }
         }
         ServerMessage Message5_ = new ServerMessage(Outgoing.AddWallItemToRoom); // Updated
         RoomItem_0.Serialize(Message5_);
         Message5_.AppendString(this.Owner);
         this.SendMessage(Message5_, null);
     }
     else
     {
         if (!this.hashtable_2.Contains(RoomItem_0.uint_0))
         {
             this.hashtable_2.Add(RoomItem_0.uint_0, RoomItem_0);
         }
     }
     if (!bool_13)
     {
         RoomItem_0.string_7 = string_10;
         ServerMessage Message5_ = new ServerMessage(Outgoing.UpdateWallItemOnRoom);
         RoomItem_0.Serialize(Message5_);
         this.SendMessage(Message5_, null);
     }
     return true;
 }
Ejemplo n.º 16
0
        public void method_25()
        {
            this.hashtable_0.Clear();
            this.hashtable_4.Clear();
            DataTable dataTable;
            using (DatabaseClient @class = Essential.GetDatabase().GetClient())
            {
                dataTable = @class.ReadDataTable("SELECT Id, base_item, x, y, z, rot, wall_pos, ltd_id, ltd_cnt, guild_data FROM items WHERE room_id = '" + this.Id + "' ORDER BY room_id DESC");
            }
            if (dataTable != null)
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    DataRow DataRowExtraData;
                    string ExtraData;
                    using (DatabaseClient @class = Essential.GetDatabase().GetClient())
                    {
                        DataRowExtraData = @class.ReadDataRow("SELECT extra_data FROM items_extra_data WHERE item_id = '" + (uint)dataRow["Id"] + "'");
                        if (DataRowExtraData != null)
                        {
                            ExtraData = (string)DataRowExtraData["extra_data"];
                        }
                        else
                        {
                            ExtraData = "";
                        }
                    }
                    RoomItem class2 = new RoomItem((uint)dataRow["Id"], this.Id, (uint)dataRow["base_item"], ExtraData, (int)dataRow["x"], (int)dataRow["y"], (double)dataRow["z"], (int)dataRow["rot"], (string)dataRow["wall_pos"], this, (int)dataRow["ltd_id"], (int)dataRow["ltd_cnt"], (string)dataRow["guild_data"]);
                    if (class2.Boolean_0)
                    {
                        this.bool_11 = true;
                    }
                    if (class2.GetBaseItem().InteractionType.ToLower().Contains("wf_") || class2.GetBaseItem().InteractionType.ToLower().Contains("fbgate"))
                    {
                        DataRow dataRow2;
                        using (DatabaseClient @class = Essential.GetDatabase().GetClient())
                        {
                            dataRow2 = @class.ReadDataRow("SELECT extra1,extra2,extra3,extra4,extra5 FROM wired_items WHERE item_id = '" + class2.uint_0 + "'");
                        }
                        if (dataRow2 != null)
                        {
                            class2.string_2 = (string)dataRow2["extra1"];
                            class2.string_3 = (string)dataRow2["extra2"];
                            class2.string_4 = (string)dataRow2["extra3"];
                            class2.string_5 = (string)dataRow2["extra4"];
                            class2.string_6 = (string)dataRow2["extra5"];
                        }
                    }
                    if (class2.GetBaseItem().InteractionType.ToLower() == "firework")
                    {
                        DataRow dataRow2;
                        using (DatabaseClient @class = Essential.GetDatabase().GetClient())
                        {
                            dataRow2 = @class.ReadDataRow("SELECT fw_count FROM items_firework WHERE item_id = '" + class2.uint_0 + "'");

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

                    string text = class2.GetBaseItem().InteractionType.ToLower();
                    switch (text)
                    {
                        case "dice":
                            if (class2.ExtraData == "-1")
                            {
                                class2.ExtraData = "0";
                            }
                            break;
                        case "fbgate":
                            if (class2.ExtraData != "" && class2.ExtraData.Contains(','))
                            {
                                class2.string_2 = class2.ExtraData.Split(new char[]
							{
								','
							})[0];
                                class2.string_3 = class2.ExtraData.Split(new char[]
							{
								','
							})[1];
                            }
                            break;
                        case "dimmer":
                            if (this.MoodlightData == null)
                            {
                                this.MoodlightData = new MoodlightData(class2.uint_0);
                            }
                            break;
                        case "bb_patch":
                            this.list_5.Add(class2);
                            if (class2.ExtraData == "5")
                            {
                                this.list_6.Add(class2);
                            }
                            else
                            {
                                if (class2.ExtraData == "8")
                                {
                                    this.list_7.Add(class2);
                                }
                                else
                                {
                                    if (class2.ExtraData == "11")
                                    {
                                        this.list_9.Add(class2);
                                    }
                                    else
                                    {
                                        if (class2.ExtraData == "14")
                                        {
                                            this.list_8.Add(class2);
                                        }
                                    }
                                }
                            }
                            break;
                        case "blue_score":
                            this.list_12.Add(class2);
                            break;
                        case "green_score":
                            this.list_13.Add(class2);
                            break;
                        case "red_score":
                            this.list_10.Add(class2);
                            break;
                        case "yellow_score":
                            this.list_11.Add(class2);
                            break;
                        case "stickiepole":
                            this.list_3.Add(class2);
                            break;
                        case "wf_trg_onsay":
                        case "wf_trg_enterroom":
                        case "wf_trg_furnistate":
                        case "wf_trg_onfurni":
                        case "wf_trg_offfurni":
                        case "wf_trg_gameend":
                        case "wf_trg_gamestart":
                        case "wf_trg_bot_reached_stf":
                            if (!this.list_14.Contains(class2))
                            {
                                this.list_14.Add(class2);
                            }
                            break;
                        case "wf_trg_attime":
                            if (class2.string_2.Length <= 0)
                            {
                                class2.string_2 = "10";
                            }
                            if (!this.list_14.Contains(class2))
                            {
                                this.list_14.Add(class2);
                            }
                            class2.bool_0 = true;
                            class2.ReqUpdate(1);
                            break;
                        case "wf_trg_atscore":
                            if (!this.list_14.Contains(class2))
                            {
                                this.list_14.Add(class2);
                            }
                            class2.WiredAtTimeNeedReset = false;
                            class2.ReqUpdate(1);
                            break;
                        case "wf_trg_timer":
                            if (class2.string_2.Length <= 0)
                            {
                                class2.string_2 = "10";
                            }
                            if (!this.list_14.Contains(class2))
                            {
                                this.list_14.Add(class2);
                            }
                            class2.bool_0 = true;
                            class2.ReqUpdate(1);
                            break;
                        case "wf_act_saymsg":
                        case "wf_act_kick_user":
                        case "wf_act_moveuser":
                        case "wf_act_togglefurni":
                        case "wf_act_givepoints":
                        case "wf_act_moverotate":
                        case "wf_act_matchfurni":
                        case "wf_act_give_phx":
                        case "wf_act_bot_follow_avatar":
                        case "wf_act_bot_give_handitem":
                        case "wf_act_bot_talk":
                        case "wf_act_bot_talk_to_avatar":
                        case "wf_act_bot_clothes":
                        case "wf_act_yt":
                        case "wf_act_img":
                            if (!this.list_15.Contains(class2))
                            {
                                this.list_15.Add(class2);
                            }
                            break;
                        case "wf_cnd_trggrer_on_frn":
                        case "wf_cnd_furnis_hv_avtrs":
                        case "wf_cnd_has_furni_on":
                        case "wf_cnd_match_snapshot":
                        case "wf_cnd_time_more_than":
                        case "wf_cnd_time_less_than":
                        case "wf_cnd_phx":
                        case "wf_cnd_user_count_in":
                        case "wf_cnd_not_user_count":
                        case "wf_cnd_actor_in_group":
                        case "wf_cnd_actor_in_team":
                        case "wf_cnd_has_handitem":
                        case "wf_cnd_not_furni_on":
                        case "wf_cnd_not_hv_avtrs":
                        case "wf_cnd_not_in_group":
                        case "wf_cnd_not_in_team":
                        case "wf_cnd_not_match_snap":
                        case "wf_cnd_has_purse":
                        case "wf_cnd_hasnot_purse":
                            if (!this.list_16.Contains(class2))
                            {
                                this.list_16.Add(class2);
                            }
                            break;
                        case "jukebox":
                            RoomMusicController roomMusicController = this.GetRoomMusicController();
                            roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(class2);
                            break;
                        case "freeze_tile":
                            this.GetFreeze().AddFreezeTile(class2);
                            break;
                        case "freeze_ice_block":
                            this.GetFreeze().AddFreezeBlock(class2);
                            break;
                        case "freeze_exit":
                            RoomItem exitTeleport = this.GetFreeze().ExitTeleport;
                            if (exitTeleport == null)
                            {
                                this.GetFreeze().ExitTeleport = class2;
                            }
                            break;
                        case "freeze_blue_gate":
                            this.GetGameManager().AddFreezeGate(class2);
                            break;
                        case "freeze_red_gate":
                            this.GetGameManager().AddFreezeGate(class2);
                            break;
                        case "freeze_green_gate":
                            this.GetGameManager().AddFreezeGate(class2);
                            break;
                        case "freeze_yellow_gate":
                            this.GetGameManager().AddFreezeGate(class2);
                            break;
                        case "freeze_blue_score":
                            this.GetGameManager().AddFreezeScoreboard(class2);
                            break;
                        case "freeze_red_score":
                            this.GetGameManager().AddFreezeScoreboard(class2);
                            break;
                        case "freeze_green_score":
                            this.GetGameManager().AddFreezeScoreboard(class2);
                            break;
                        case "freeze_yellow_score":
                            this.GetGameManager().AddFreezeScoreboard(class2);
                            break;
                    }
                    if (this.hashtable_0.Contains(class2.uint_0))
                    {
                        this.hashtable_0.Remove(class2.uint_0);
                    }
                    if (this.hashtable_4.Contains(class2.uint_0))
                    {
                        this.hashtable_4.Remove(class2.uint_0);
                    }
                    if (class2.Boolean_2)
                    {
                        this.hashtable_0.Add(class2.uint_0, class2);
                    }
                    else
                    {
                        this.hashtable_4.Add(class2.uint_0, class2);
                    }
                }
            }

        }
Ejemplo n.º 17
0
        public bool method_79(GameClient Session, RoomItem RoomItem_0, int int_17, int int_18, int int_19, bool bool_13, bool bool_14, bool bool_15)
        {
            //TODO HOFFENTLICH GEHT DAS .___.

            Dictionary<int, AffectedTile> dictionary = this.method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, int_17, int_18, int_19);
            bool result;
            if (!this.method_92(int_17, int_18))
            {
                result = false;
            }
            else
            {
                foreach (AffectedTile current in dictionary.Values)
                {
                    if (!this.method_92(current.Int32_0, current.Int32_1))
                    {
                        result = false;
                        return result;
                    }
                }
                double num = this.RoomModel.double_1[int_17, int_18];
                if (!bool_14)
                {
                    if (RoomItem_0.int_3 == int_19 && RoomItem_0.GetX == int_17 && RoomItem_0.Int32_1 == int_18 && RoomItem_0.Double_0 != num)
                    {
                        if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                        {
                            result = false;
                            return result;
                        }
                    }
                    if (this.RoomModel.squareState[int_17, int_18] != SquareState.OPEN && this.RoomModel.squareState[int_17, int_18] != SquareState.GROUPGATE)
                    {
                        if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                        {
                            result = false;
                            return result;
                        }
                    }
                    foreach (AffectedTile current in dictionary.Values)
                    {
                        if (this.RoomModel.squareState[current.Int32_0, current.Int32_1] != SquareState.OPEN && this.RoomModel.squareState[int_17, int_18] != SquareState.GROUPGATE)
                        {
                            if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                            {
                                result = false;
                                return result;
                            }
                        }
                    }
                    if (RoomItem_0.GetBaseItem().IsSeat || RoomItem_0.Boolean_0)
                    {
                        goto IL_1FE;
                    }
                    if (this.method_97(int_17, int_18) && !RoomItem_0.GetBaseItem().Walkable)
                    {
                        if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                        {
                            result = false;
                            ServerMessage Testing = new ServerMessage(Outgoing.ObjectUpdate); // Updated
                            RoomItem_0.Serialize(Testing);
                            Session.SendMessage(Testing);
                            return result;
                        }
                    }
                    using (Dictionary<int, AffectedTile>.ValueCollection.Enumerator enumerator = dictionary.Values.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            AffectedTile current = enumerator.Current;
                            if (this.method_97(current.Int32_0, current.Int32_1) && !RoomItem_0.GetBaseItem().Walkable)
                            {
                                if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                                {
                                    result = false;
                                    return result;
                                }
                            }
                        }
                        goto IL_1FE;
                    }
                }
                if (this.RoomModel.squareState[int_17, int_18] != SquareState.OPEN)
                {
                    if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                    {
                        result = false;
                        return result;
                    }
                }
                if ((!bool_15 || !RoomItem_0.GetBaseItem().Walkable) && this.method_97(int_17, int_18))
                {
                    if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                    {
                        result = false;
                        return result;
                    }
                }
                else if (!RoomItem_0.GetBaseItem().Walkable)
                {
                    if (!bool_15 && this.method_97(int_17, int_18))
                    {
                        if (RoomItem_0.GetBaseItem().InteractionType != "stackfield")
                        {
                            result = false;
                            return result;
                        }
                    }
                }
            IL_1FE:
                List<RoomItem> list = this.method_93(int_17, int_18);
                List<RoomItem> list2 = new List<RoomItem>();
                List<RoomItem> list3 = new List<RoomItem>();
                foreach (AffectedTile current in dictionary.Values)
                {
                    List<RoomItem> list4 = this.method_93(current.Int32_0, current.Int32_1);
                    if (list4 != null)
                    {
                        list2.AddRange(list4);
                    }
                }
                if (list == null)
                {
                    list = new List<RoomItem>();
                }
                list3.AddRange(list);
                list3.AddRange(list2);
                int num2 = 0;
                bool containsStackField = false;
                double stackFieldHeight = 0.0;
                foreach (RoomItem current23 in list3)
                {
                    if (current23.GetBaseItem().InteractionType == "stackfield")
                    {
                        containsStackField = true;
                        stackFieldHeight = current23.Double_0;
                        goto nextStep;
                    }
                }
            nextStep:
                foreach (RoomItem current2 in list3)
                {
                    if (current2 != null && current2.uint_0 != RoomItem_0.uint_0 && current2.GetBaseItem() != null)
                    {
                        if (!current2.GetBaseItem().Stackable)
                        {
                            if (RoomItem_0.GetBaseItem().InteractionType != "stackfield" && !containsStackField)
                            {
                                result = false;
                                ServerMessage Testing = new ServerMessage(Outgoing.ObjectUpdate); // Updated
                                RoomItem_0.Serialize(Testing);
                                Session.SendMessage(Testing);
                                return result;
                            }
                        }
                        if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "wf_trg_timer" && current2.GetBaseItem().InteractionType.ToLower() == "wf_trg_timer")
                        {
                            result = false;
                            return result;
                        }
                        if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "ball")
                        {
                            if (current2.GetBaseItem().InteractionType.ToLower() == "blue_goal")
                            {
                                num2 = 11;

                                ProgressFootballAchievement(RoomItem_0);
                            }
                            if (current2.GetBaseItem().InteractionType.ToLower() == "red_goal")
                            {
                                num2 = 5;

                                ProgressFootballAchievement(RoomItem_0);
                            }
                            if (current2.GetBaseItem().InteractionType.ToLower() == "yellow_goal")
                            {
                                num2 = 14;

                                ProgressFootballAchievement(RoomItem_0);
                            }
                            if (current2.GetBaseItem().InteractionType.ToLower() == "green_goal")
                            {
                                num2 = 8;

                                ProgressFootballAchievement(RoomItem_0);
                            }
                        }
                    }
                }
                if (num2 > 0)
                {
                    this.method_89(num2, RoomItem_0, false, Session);
                }
                if (!RoomItem_0.Boolean_0)
                {
                    if (RoomItem_0.int_3 != int_19 && RoomItem_0.GetX == int_17 && RoomItem_0.Int32_1 == int_18)
                    {
                        num = RoomItem_0.Double_0;
                    }
                    foreach (RoomItem current2 in list3)
                    {
                        if (current2.uint_0 != RoomItem_0.uint_0 && current2.Double_1 > num)
                        {
                            num = current2.Double_1;
                        }
                    }
                }
                if (int_19 != 0 && int_19 != 2 && int_19 != 4 && int_19 != 6 && int_19 != 8 && RoomItem_0.GetBaseItem().InteractionType != "mannequin" && RoomItem_0.GetBaseItem().InteractionType != "gld_furni")
                {
                    int_19 = 0;
                }
                Dictionary<int, AffectedTile> dictionary2 = new Dictionary<int, AffectedTile>();
                dictionary2 = this.method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, RoomItem_0.GetX, RoomItem_0.Int32_1, RoomItem_0.int_3);
                int num3 = 0;
                int num4 = 0;
                if (!bool_13)
                {
                    num3 = RoomItem_0.GetX;
                    num4 = RoomItem_0.Int32_1;
                }
                RoomItem_0.int_3 = int_19;
                if (containsStackField)
                    num = stackFieldHeight;

                RoomItem_0.SetPosition(int_17, int_18, num);

                if (!bool_14 && Session != null)
                {
                    RoomItem_0.Interactor.OnPlace(Session, RoomItem_0);
                }
                if (bool_13)
                {
                    if (this.hashtable_1.Contains(RoomItem_0.uint_0))
                    {
                        this.hashtable_1.Remove(RoomItem_0.uint_0);
                    }
                    if (this.hashtable_3.Contains(RoomItem_0.uint_0))
                    {

                        result = false;

                        ServerMessage Testing = new ServerMessage(Outgoing.ObjectUpdate); // Updated
                        RoomItem_0.Serialize(Testing);
                        Session.SendMessage(Testing);
                        return result;
                    }
                    this.hashtable_3.Add(RoomItem_0.uint_0, RoomItem_0);
                    if (RoomItem_0.Boolean_2)
                    {
                        if (this.hashtable_0.Contains(RoomItem_0.uint_0))
                        {
                            this.hashtable_0.Remove(RoomItem_0.uint_0);
                        }
                        this.hashtable_0.Add(RoomItem_0.uint_0, RoomItem_0);
                    }
                    else
                    {
                        if (this.hashtable_4.Contains(RoomItem_0.uint_0))
                        {
                            this.hashtable_4.Remove(RoomItem_0.uint_0);
                        }
                        this.hashtable_4.Add(RoomItem_0.uint_0, RoomItem_0);
                    }

                    ServerMessage Message5_ = new ServerMessage(Outgoing.ObjectAdd); // Updated
                    RoomItem_0.Serialize(Message5_);
                    Message5_.AppendString(this.Owner);
                    this.SendMessage(Message5_, null);



                    string text = RoomItem_0.GetBaseItem().InteractionType.ToLower();
                    switch (text)
                    {
                        case "bb_patch":
                            this.list_5.Add(RoomItem_0);
                            if (RoomItem_0.ExtraData == "5")
                            {
                                this.list_6.Add(RoomItem_0);
                            }
                            else
                            {
                                if (RoomItem_0.ExtraData == "8")
                                {
                                    this.list_7.Add(RoomItem_0);
                                }
                                else
                                {
                                    if (RoomItem_0.ExtraData == "11")
                                    {
                                        this.list_9.Add(RoomItem_0);
                                    }
                                    else
                                    {
                                        if (RoomItem_0.ExtraData == "14")
                                        {
                                            this.list_8.Add(RoomItem_0);
                                        }
                                    }
                                }
                            }
                            break;
                        case "blue_score":
                            this.list_12.Add(RoomItem_0);
                            break;
                        case "green_score":
                            this.list_13.Add(RoomItem_0);
                            break;
                        case "red_score":
                            this.list_10.Add(RoomItem_0);
                            break;
                        case "yellow_score":
                            this.list_11.Add(RoomItem_0);
                            break;
                        case "stickiepole":
                            this.list_3.Add(RoomItem_0);
                            break;
                        case "wf_trg_onsay":
                        case "wf_trg_enterroom":
                        case "wf_trg_furnistate":
                        case "wf_trg_onfurni":
                        case "wf_trg_offfurni":
                        case "wf_trg_gameend":
                        case "wf_trg_gamestart":
                        case "wf_trg_atscore":
                        case "wf_trg_bot_reached_stf":
                            if (!this.list_14.Contains(RoomItem_0))
                            {
                                this.list_14.Add(RoomItem_0);
                            }
                            break;
                        case "wf_trg_attime":
                            if (RoomItem_0.string_2.Length <= 0)
                            {
                                RoomItem_0.string_2 = "10";
                            }
                            if (!this.list_14.Contains(RoomItem_0))
                            {
                                this.list_14.Add(RoomItem_0);
                            }
                            RoomItem_0.bool_0 = true;
                            RoomItem_0.ReqUpdate(1);
                            break;
                        case "wf_trg_timer":
                            if (RoomItem_0.string_2.Length <= 0)
                            {
                                RoomItem_0.string_2 = "10";
                            }
                            if (!this.list_14.Contains(RoomItem_0))
                            {
                                this.list_14.Add(RoomItem_0);
                            }
                            RoomItem_0.bool_0 = true;
                            RoomItem_0.ReqUpdate(1);
                            break;
                        case "wf_act_saymsg":
                        case "wf_act_kick_user":
                        case "wf_act_moveuser":
                        case "wf_act_togglefurni":
                        case "wf_act_givepoints":
                        case "wf_act_moverotate":
                        case "wf_act_matchfurni":
                        case "wf_act_give_phx":
                        case "wf_act_bot_follow_avatar":
                        case "wf_act_bot_give_handitem":
                        case "wf_act_bot_talk":
                        case "wf_act_bot_talk_to_avatar":
                        case "wf_act_bot_clothes":
                        case "wf_act_yt":
                        case "wf_act_img":
                            if (!this.list_15.Contains(RoomItem_0))
                            {
                                this.list_15.Add(RoomItem_0);
                            }
                            break;
                        case "wf_cnd_trggrer_on_frn":
                        case "wf_cnd_furnis_hv_avtrs":
                        case "wf_cnd_has_furni_on":
                        case "wf_cnd_match_snapshot":
                        case "wf_cnd_time_more_than":
                        case "wf_cnd_time_less_than":
                        case "wf_cnd_phx":
                        case "wf_cnd_user_count_in":
                        case "wf_cnd_not_user_count":
                        case "wf_cnd_actor_in_group":
                        case "wf_cnd_actor_in_team":
                        case "wf_cnd_has_handitem":
                        case "wf_cnd_not_furni_on":
                        case "wf_cnd_not_hv_avtrs":
                        case "wf_cnd_not_in_group":
                        case "wf_cnd_not_in_team":
                        case "wf_cnd_not_match_snap":
                        case "wf_cnd_has_purse":
                        case "wf_cnd_hasnot_purse":
                            if (!this.list_16.Contains(RoomItem_0))
                            {
                                this.list_16.Add(RoomItem_0);
                            }
                            break;
                        case "freeze_tile":
                            this.GetFreeze().AddFreezeTile(RoomItem_0);
                            break;
                        case "freeze_ice_block":
                            this.GetFreeze().AddFreezeBlock(RoomItem_0);
                            break;
                        case "freeze_exit":
                            RoomItem exitTeleport = this.GetFreeze().ExitTeleport;
                            if (exitTeleport == null)
                            {
                                this.GetFreeze().ExitTeleport = RoomItem_0;
                            }
                            break;
                        case "freeze_blue_gate":
                            this.GetGameManager().AddFreezeGate(RoomItem_0);
                            break;
                        case "freeze_red_gate":
                            this.GetGameManager().AddFreezeGate(RoomItem_0);
                            break;
                        case "freeze_green_gate":
                            this.GetGameManager().AddFreezeGate(RoomItem_0);
                            break;
                        case "freeze_yellow_gate":
                            this.GetGameManager().AddFreezeGate(RoomItem_0);
                            break;
                        case "freeze_blue_score":
                            this.GetGameManager().AddFreezeScoreboard(RoomItem_0);
                            break;
                        case "freeze_red_score":
                            this.GetGameManager().AddFreezeScoreboard(RoomItem_0);
                            break;
                        case "freeze_green_score":
                            this.GetGameManager().AddFreezeScoreboard(RoomItem_0);
                            break;
                        case "freeze_yellow_score":
                            this.GetGameManager().AddFreezeScoreboard(RoomItem_0);
                            break;
                    }
                }
                else
                {
                    if (!this.hashtable_2.Contains(RoomItem_0.uint_0) && !this.hashtable_3.ContainsKey(RoomItem_0.uint_0))
                    {
                        this.hashtable_2.Add(RoomItem_0.uint_0, RoomItem_0);
                    }
                    if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "wf_act_give_phx" && Session != null)
                    {
                        string text2 = RoomItem_0.string_2.Split(new char[]
						{
							':'
						})[0].ToLower();
                        if (!Essential.GetGame().GetRoleManager().HasSuperWiredFXFuse(text2, Session))
                        {
                            RoomItem_0.string_2 = "";
                        }
                    }
                    if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "wf_cnd_phx" && Session != null)
                    {
                        string text2 = RoomItem_0.string_2.Split(new char[]
						{
							':'
						})[0].ToLower();
                        if (!Essential.GetGame().GetRoleManager().HasSuperWiredcndFuse(text2, Session))
                        {
                            RoomItem_0.string_2 = "";
                        }
                    }
                    ServerMessage Message5_ = new ServerMessage(Outgoing.ObjectUpdate); // Updated
                    RoomItem_0.Serialize(Message5_);
                    this.SendMessage(Message5_, null);
                }
                this.method_22();
                if (!bool_14)
                {
                    this.method_87(this.method_43(int_17, int_18), true, true);
                    foreach (AffectedTile current in dictionary.Values)
                    {
                        this.method_87(this.method_43(current.Int32_0, current.Int32_1), true, true);
                    }
                    if (num3 > 0 || num4 > 0)
                    {
                        this.method_87(this.method_43(num3, num4), true, true);
                    }
                    foreach (AffectedTile current in dictionary2.Values)
                    {
                        this.method_87(this.method_43(current.Int32_0, current.Int32_1), true, true);
                    }
                }
                result = true;
            }
            return result;
        }
Ejemplo n.º 18
0
        public bool method_21(RoomUser RoomUser_1, RoomItem RoomItem_0, string string_10)
        {
            bool result;
            try
            {
                if (this.bool_6 || this.bool_7)
                {
                    result = false;
                }
                else
                {
                    bool flag = false;
                    int num = 0;
                    int num2 = 0;
                    bool flag2 = false;
                    string text = RoomItem_0.GetBaseItem().InteractionType.ToLower();
                    switch (text)
                    {
                        case "wf_trg_onsay":
                            if (string_10.Contains(RoomItem_0.string_2.ToLower()))
                            {
                                flag = true;
                            }
                            break;
                        case "wf_trg_enterroom":
                            if (RoomItem_0.string_2 == "" || RoomItem_0.string_2 == RoomUser_1.GetClient().GetHabbo().Username)
                            {
                                flag = true;
                            }
                            break;
                        case "wf_trg_furnistate":
                            if (RoomItem_0.string_3.Length > 0)
                            {
                                string[] collection = RoomItem_0.string_3.Split(new char[]
							{
								','
							});
                                List<string> list = new List<string>(collection);
                                foreach (string current in list)
                                {
                                    if (current == string_10)
                                    {
                                        flag = true;
                                    }
                                }
                            }
                            break;
                        case "wf_trg_onfurni":
                            if (!RoomUser_1.IsBot)
                            {
                                if (RoomItem_0.string_3.Length > 0)
                                {
                                    string[] collection = RoomItem_0.string_3.Split(new char[]
							{
								','
							});
                                    List<string> list = new List<string>(collection);
                                    List<string> list2 = list;
                                    foreach (string current in list)
                                    {
                                        if (!(current != string_10))
                                        {
                                            RoomItem @class = this.method_28(Convert.ToUInt32(string_10));
                                            if (@class != null)
                                            {
                                                flag = true;
                                            }
                                            else
                                            {
                                                list2.Remove(current);
                                            }
                                        }
                                    }
                                    RoomItem_0.string_3 = string.Join(",", list2.ToArray());
                                }
                            }
                            break;
                        case "wf_trg_offfurni":
                            if (RoomItem_0.string_3.Length > 0)
                            {
                                string[] collection = RoomItem_0.string_3.Split(new char[]
							{
								','
							});
                                List<string> list = new List<string>(collection);
                                List<string> list2 = list;
                                foreach (string current in list)
                                {
                                    if (!(current != string_10))
                                    {
                                        RoomItem @class = this.method_28(Convert.ToUInt32(string_10));
                                        if (@class != null)
                                        {
                                            flag = true;
                                        }
                                        else
                                        {
                                            list2.Remove(current);
                                        }
                                    }
                                }
                                RoomItem_0.string_3 = string.Join(",", list2.ToArray());
                            }
                            break;
                        case "wf_trg_gameend":
                            if (string_10 == "GameEnded")
                            {
                                flag = true;
                            }
                            break;
                        case "wf_trg_gamestart":
                            if (string_10 == "GameBegun")
                            {
                                flag = true;
                            }
                            break;
                        case "wf_trg_timer":
                            if (string_10 == "Timer")
                            {
                                flag = true;
                            }
                            break;
                        case "wf_trg_attime":
                            if (string_10 == "AtTime")
                            {
                                flag = true;
                            }
                            break;
                        case "wf_trg_atscore":
                            if (string_10 == "TheScore")
                            {
                                flag = true;
                            }
                            break;
                    }
                    try
                    {
                        List<RoomItem> list3 = this.method_93(RoomItem_0.GetX, RoomItem_0.Int32_1);
                        if (list3 == null)
                        {
                            result = false;
                            return result;
                        }
                        foreach (RoomItem current2 in list3)
                        {
                            text = current2.GetBaseItem().InteractionType.ToLower();
                            if (text != null)
                            {

                                int num4;
                                if (!(text == "wf_cnd_phx"))
                                {
                                    if (!(text == "wf_cnd_trggrer_on_frn"))
                                    {
                                        string[] collection;
                                        List<string> list;
                                        List<RoomItem> list4;
                                        if (!(text == "wf_cnd_furnis_hv_avtrs"))
                                        {
                                            if (!(text == "wf_cnd_has_furni_on"))
                                            {
                                                if (text == "wf_cnd_time_more_than")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if (current2.WiredCounter >= double.Parse(current2.string_2, CultureInfo.InvariantCulture))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_time_less_than")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if (current2.WiredCounter <= double.Parse(current2.string_2, CultureInfo.InvariantCulture))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_actor_in_group")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if (this.RoomData.GuildId != 0 && RoomUser_1.GetClient().GetHabbo().InGuild(this.RoomData.GuildId) && (current2.string_2 == "" || current2.string_2.ToLower().Equals(RoomUser_1.GetClient().GetHabbo().Username.ToLower())))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_not_in_group")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if (this.RoomData.GuildId != 0 && !RoomUser_1.GetClient().GetHabbo().InGuild(this.RoomData.GuildId) && (current2.string_2 == "" || current2.string_2.ToLower().Equals(RoomUser_1.GetClient().GetHabbo().Username.ToLower())))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_user_count_in")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if (this.UserCount >= int.Parse(current2.string_2.Split(';')[0]) && this.UserCount <= int.Parse(current2.string_2.Split(';')[1]))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_not_user_count")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if (!(this.UserCount >= int.Parse(current2.string_2.Split(';')[0])) || !(this.UserCount <= int.Parse(current2.string_2.Split(';')[1])))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_has_handitem")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if ((current2.string_2 != "" || current2.string_2 != "0") && RoomUser_1.CarryItemID == int.Parse(current2.string_2))
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_actor_in_team")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if ((GetTeam(current2.string_2) != Team.None) && GetTeam(current2.string_2) == RoomUser_1.team)
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_not_in_team")
                                                {
                                                    num++;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    if ((GetTeam(current2.string_2) != Team.None) && RoomUser_1.team != Team.None && GetTeam(current2.string_2) != RoomUser_1.team)
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_not_furni_on")
                                                {
                                                    RoomItem ri;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    foreach (string s in current2.string_3.Split(','))
                                                    {
                                                        num++;
                                                        try
                                                        {
                                                            ri = this.method_28(uint.Parse(s));
                                                            RoomItem TopItem = this.GetTopItem(ri.GetX, ri.Int32_1);
                                                            if (!(TopItem != null && TopItem != ri && TopItem.Double_0 >= ri.Double_0))
                                                            {
                                                                num2++;
                                                                continue;
                                                            }
                                                            foreach (AffectedTile current5 in ri.Dictionary_0.Values)
                                                            {
                                                                TopItem = this.GetTopItem(current5.Int32_0, current5.Int32_1);
                                                                if (!(TopItem != null && TopItem != ri && TopItem.Double_0 >= ri.Double_0))
                                                                {
                                                                    num2++;
                                                                    break;
                                                                }
                                                            }
                                                        }
                                                        catch { }
                                                    }
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_not_hv_avtrs")
                                                {
                                                    RoomItem ri;
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    foreach (string s in current2.string_3.Split(','))
                                                    {
                                                        num++;
                                                        ri = this.method_28(uint.Parse(s));
                                                        bool hasUser = false;
                                                        if (this.method_96(ri.GetX, ri.Int32_1))
                                                            hasUser = true;
                                                        foreach (AffectedTile current5 in ri.Dictionary_0.Values)
                                                        {
                                                            if (this.method_96(current5.Int32_0, current5.Int32_1))
                                                                hasUser = true;
                                                        }
                                                        if (!hasUser)
                                                            num2++;
                                                    }
                                                    continue;
                                                }
                                                else if(text =="wf_cnd_has_purse")
                                                {
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    num++;
                                                    bool hasPurse = false;
                                                    string currency = "credits";
                                                    int number =  -1;
                                                    if(RoomUser_1 != null && RoomUser_1.GetClient() != null && current2.string_2.Contains(";") && IsValidCurrency(current2.string_2.Split(';')[0]) && int.TryParse(current2.string_2.Split(';')[1],out number))
                                                    {
                                                        currency = current2.string_2.Split(';')[0];
                                                        if (currency == "credits")
                                                            hasPurse = RoomUser_1.GetClient().GetHabbo().GetCredits() >= number;
                                                        else if (currency == "duckets")
                                                            hasPurse = RoomUser_1.GetClient().GetHabbo().ActivityPoints >= number;
                                                        else if (currency == "diamonds")
                                                            hasPurse = RoomUser_1.GetClient().GetHabbo().VipPoints >= number;
                                                    }
                                                    if (hasPurse)
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_hasnot_purse")
                                                {
                                                    current2.ExtraData = "1";
                                                    current2.UpdateState(false, true);
                                                    current2.ReqUpdate(1);
                                                    num++;
                                                    bool hasPurse = true;
                                                    string currency = "credits";
                                                    int number = -1;
                                                    if (RoomUser_1 != null && RoomUser_1.GetClient() != null && current2.string_2.Contains(";") && IsValidCurrency(current2.string_2.Split(';')[0]) && int.TryParse(current2.string_2.Split(';')[1], out number))
                                                    {
                                                        currency = current2.string_2.Split(';')[0];
                                                        if (currency == "credits")
                                                            hasPurse = RoomUser_1.GetClient().GetHabbo().GetCredits() >= number;
                                                        else if (currency == "duckets")
                                                            hasPurse = RoomUser_1.GetClient().GetHabbo().ActivityPoints >= number;
                                                        else if (currency == "diamonds")
                                                            hasPurse = RoomUser_1.GetClient().GetHabbo().VipPoints >= number;
                                                    }
                                                    if (!hasPurse)
                                                        num2++;
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_not_match_snap")
                                                {
                                                    bool useExtradata, useRot, usePos;
                                                    useExtradata = current2.string_3[0] == 'I';
                                                    useRot = current2.string_3[1] == 'I';
                                                    usePos = current2.string_3[2] == 'I';
                                                    Dictionary<uint, SnapShotItem> itemsOriginalData = new Dictionary<uint, SnapShotItem>();
                                                    foreach (string s in current2.string_2.Split(';'))
                                                    {
                                                        string[] n = s.Split(',');
                                                        itemsOriginalData.Add(uint.Parse(n[0]), new SnapShotItem(uint.Parse(n[0]), int.Parse(n[1]), int.Parse(n[2]), double.Parse(n[3]), int.Parse(n[4]), n[5]));
                                                    }
                                                    //foreach (string cstring in current2.string_4.Split(','))
                                                    foreach (SnapShotItem ssi in itemsOriginalData.Values)
                                                    {
                                                        num++;
                                                        try
                                                        {
                                                            bool returning = true;
                                                            RoomItem current = this.method_28(ssi.Id);//uint.Parse(cstring));
                                                            if (current == null || !itemsOriginalData.ContainsKey(current.uint_0)) returning = false;

                                                            var originalData = itemsOriginalData[current.uint_0];

                                                            if (useRot)
                                                            {
                                                                if (current.int_3 != originalData.Rotation)
                                                                {
                                                                    returning = false;
                                                                }
                                                            }
                                                            if (useExtradata)
                                                            {
                                                                if ((current.ExtraData == string.Empty ? "0" : current.ExtraData) != (originalData.ExtraData == string.Empty ? "0" : originalData.ExtraData))
                                                                {
                                                                    returning = false;
                                                                }
                                                            }

                                                            if (usePos)
                                                            {
                                                                if ((current.GetX != originalData.X) || (current.Int32_1 != originalData.Y))
                                                                {
                                                                    returning = false;
                                                                }
                                                            }
                                                            if (!returning)
                                                                num2++;
                                                        }
                                                        catch{}/* (Exception ex)
                                                        {
                                                            Console.ForegroundColor = ConsoleColor.Red;
                                                            Console.WriteLine(ex.ToString());
                                                            Console.WriteLine("Couldn't Trigger Condition \"wf_cnd_match_snapshot\"!");
                                                            Console.ForegroundColor = ConsoleColor.Gray;
                                                        }*/
                                                    }
                                                    if (num == num2)
                                                    {
                                                        current2.ExtraData = "1";
                                                        current2.UpdateState(false, true);
                                                        current2.ReqUpdate(1);
                                                    }
                                                    continue;
                                                }
                                                else if (text == "wf_cnd_match_snapshot")
                                                {
                                                    bool useExtradata, useRot, usePos;
                                                    useExtradata = current2.string_3[0] == 'I';
                                                    useRot = current2.string_3[1] == 'I';
                                                    usePos = current2.string_3[2] == 'I';
                                                    Dictionary<uint, SnapShotItem> itemsOriginalData = new Dictionary<uint, SnapShotItem>();
                                                    foreach (string s in current2.string_2.Split(';'))
                                                    {
                                                        string[] n = s.Split(',');
                                                        itemsOriginalData.Add(uint.Parse(n[0]), new SnapShotItem(uint.Parse(n[0]), int.Parse(n[1]), int.Parse(n[2]), double.Parse(n[3]), int.Parse(n[4]), n[5]));
                                                    }
                                                    //foreach (string cstring in current2.string_4.Split(','))
                                                    foreach (SnapShotItem ssi in itemsOriginalData.Values)
                                                    {
                                                        num++;
                                                        try
                                                        {
                                                            bool returning = true;
                                                            RoomItem current = this.method_28(ssi.Id);//uint.Parse(cstring));
                                                            if (current == null || !itemsOriginalData.ContainsKey(current.uint_0)) returning = false;

                                                            var originalData = itemsOriginalData[current.uint_0];

                                                            if (useRot)
                                                            {
                                                                if (current.int_3 != originalData.Rotation)
                                                                {
                                                                    returning = false;
                                                                }
                                                            }
                                                            if (useExtradata)
                                                            {
                                                                if ((current.ExtraData == string.Empty ? "0" : current.ExtraData) != (originalData.ExtraData == string.Empty ? "0" : originalData.ExtraData))
                                                                {
                                                                    returning = false;
                                                                }
                                                            }

                                                            if (usePos)
                                                            {
                                                                if ((current.GetX != originalData.X) || (current.Int32_1 != originalData.Y))
                                                                {
                                                                    returning = false;
                                                                }
                                                            }
                                                            if (returning)
                                                                num2++;
                                                        }
                                                        catch { }/* (Exception ex)
                                                        {
                                                            Console.ForegroundColor = ConsoleColor.Red;
                                                            Console.WriteLine(ex.ToString());
                                                            Console.WriteLine("Couldn't Trigger Condition \"wf_cnd_match_snapshot\"!");
                                                            Console.ForegroundColor = ConsoleColor.Gray;
                                                        }*/
                                                    }
                                                    if (num == num2)
                                                    {
                                                        current2.ExtraData = "1";
                                                        current2.UpdateState(false, true);
                                                        current2.ReqUpdate(1);
                                                    }
                                                    continue;
                                                }
                                                else
                                                {
                                                    continue;
                                                }
                                            }
                                            num4 = num2;
                                            num++;
                                            current2.ExtraData = "1";
                                            current2.UpdateState(false, true);
                                            current2.ReqUpdate(1);
                                            current2.CheckExtraData3();
                                            if (current2.string_3.Length <= 0)
                                            {
                                                continue;
                                            }
                                            collection = current2.string_3.Split(new char[]
											{
												','
											});
                                            list = new List<string>(collection);
                                            list4 = new List<RoomItem>();
                                            foreach (string current3 in list)
                                            {
                                                list4.Add(this.method_28(Convert.ToUInt32(current3)));
                                            }
                                            using (List<RoomItem>.Enumerator enumerator3 = list4.GetEnumerator())
                                            {
                                                while (enumerator3.MoveNext())
                                                {
                                                    RoomItem current4 = enumerator3.Current;
                                                    if (current4 != null)
                                                    {
                                                        Dictionary<int, AffectedTile> dictionary = current4.Dictionary_0;
                                                        if (dictionary == null)
                                                        {
                                                            dictionary = new Dictionary<int, AffectedTile>();
                                                        }
                                                        RoomItem TopItem = this.GetTopItem(current4.GetX, current4.Int32_1);
                                                        if (TopItem != null && TopItem != current4 && TopItem.Double_0 >= current4.Double_0 && num4 + 1 != num2)
                                                        {
                                                            num2++;
                                                            break;
                                                        }
                                                        foreach (AffectedTile current5 in dictionary.Values)
                                                        {
                                                            TopItem = this.GetTopItem(current5.Int32_0, current5.Int32_1);
                                                            if (TopItem != null && TopItem != current4 && TopItem.Double_0 >= current4.Double_0 && num4 + 1 != num2)
                                                            {
                                                                num2++;
                                                                break;
                                                            }
                                                        }

                                                    }
                                                }
                                                continue;
                                            }
                                        }
                                        num++;
                                        current2.ExtraData = "1";
                                        current2.UpdateState(false, true);
                                        current2.ReqUpdate(1);
                                        current2.CheckExtraData3();
                                        if (current2.string_3.Length <= 0)
                                        {
                                            continue;
                                        }
                                        collection = current2.string_3.Split(new char[]
										{
											','
										});
                                        list = new List<string>(collection);
                                        list4 = new List<RoomItem>();
                                        foreach (string current3 in list)
                                        {
                                            list4.Add(this.method_28(Convert.ToUInt32(current3)));
                                        }
                                        bool flag3 = true;
                                        foreach (RoomItem current4 in list4)
                                        {
                                            if (current4 != null)
                                            {
                                                bool flag4 = false;
                                                Dictionary<int, AffectedTile> dictionary = current4.Dictionary_0;
                                                if (dictionary == null)
                                                {
                                                    dictionary = new Dictionary<int, AffectedTile>();
                                                }
                                                if (this.method_96(current4.GetX, current4.Int32_1))
                                                {
                                                    flag4 = true;
                                                }
                                                foreach (AffectedTile current5 in dictionary.Values)
                                                {
                                                    if (this.method_96(current5.Int32_0, current5.Int32_1))
                                                    {
                                                        flag4 = true;
                                                        break;
                                                    }
                                                }
                                                if (!flag4)
                                                {
                                                    flag3 = false;
                                                }
                                            }
                                        }
                                        if (flag3)
                                        {
                                            num2++;
                                            continue;
                                        }
                                        continue;
                                    }
                                    else
                                    {
                                        num4 = num2;
                                        num++;
                                        current2.ExtraData = "1";
                                        current2.UpdateState(false, true);
                                        current2.ReqUpdate(1);
                                        current2.CheckExtraData3();
                                        if (current2.string_3.Length <= 0)
                                        {
                                            continue;
                                        }
                                        string[] collection = current2.string_3.Split(new char[]
										{
											','
										});
                                        List<string> list = new List<string>(collection);
                                        List<RoomItem> list4 = new List<RoomItem>();
                                        foreach (string current3 in list)
                                        {
                                            list4.Add(this.method_28(Convert.ToUInt32(current3)));
                                        }
                                        if (RoomUser_1 == null)
                                        {
                                            continue;
                                        }
                                        using (List<RoomItem>.Enumerator enumerator3 = list4.GetEnumerator())
                                        {
                                            while (enumerator3.MoveNext())
                                            {
                                                RoomItem current4 = enumerator3.Current;
                                                if (current4 != null)
                                                {
                                                    Dictionary<int, AffectedTile> dictionary = current4.Dictionary_0;
                                                    if (dictionary == null)
                                                    {
                                                        dictionary = new Dictionary<int, AffectedTile>();
                                                    }
                                                    if (RoomUser_1.X == current4.GetX && RoomUser_1.Y == current4.Int32_1 && num4 + 1 != num2)
                                                    {
                                                        num2++;
                                                        break;
                                                    }
                                                    foreach (AffectedTile current5 in dictionary.Values)
                                                    {
                                                        if (RoomUser_1.X == current5.Int32_0 && RoomUser_1.Y == current5.Int32_1 && num4 + 1 != num2)
                                                        {
                                                            num2++;
                                                            break;
                                                        }
                                                    }
                                                }
                                            }
                                            continue;
                                        }
                                    }
                                }
                                num4 = num2;
                                num++;
                                current2.ExtraData = "1";
                                current2.UpdateState(false, true);
                                current2.ReqUpdate(1);
                                if (current2.string_2.Length > 0)
                                {
                                    string string_11 = current2.string_2.Split(new char[]
									{
										':'
									})[0].ToLower();
                                    string string_12 = current2.string_2.Split(new char[]
									{
										':'
									})[1];
                                    if (RoomUser_1 != null)
                                    {
                                        if (!RoomUser_1.IsBot && this.method_18(RoomUser_1, string_11, string_12))
                                        {
                                            num2++;
                                        }
                                    }
                                    else
                                    {
                                        RoomUser[] array = this.RoomUsers;
                                        for (int i = 0; i < array.Length; i++)
                                        {
                                            RoomUser class2 = array[i];
                                            if (class2 != null && !class2.IsBot && this.method_18(class2, string_11, string_12) && num4 + 1 != num2)
                                            {
                                                num2++;
                                                break;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        if (num != num2)
                        {
                            result = false;
                            return result;
                        }
                    }
                    catch
                    {
                        //Ignoring. Why? Because it spams the console if something isn't set.
                    }
                    if (flag && num == num2)
                    {
                        RoomItem_0.ExtraData = "1";
                        RoomItem_0.UpdateState(false, true);
                        RoomItem_0.ReqUpdate(1);
                        List<RoomItem> list6 = this.method_93(RoomItem_0.GetX, RoomItem_0.Int32_1);
                        if (list6 == null)
                        {
                            result = false;
                            return result;
                        }
                        bool flag5 = false;
                        foreach (RoomItem current2 in list6)
                        {
                            if (current2.GetBaseItem().InteractionType.ToLower() == "wf_xtra_random")
                            {
                                flag5 = true;
                                break;
                            }
                        }
                        if (flag5)
                        {
                            List<RoomItem> list7 = new List<RoomItem>();
                            Random random = new Random();
                            while (list6.Count != 0)
                            {
                                int index = random.Next(0, list6.Count);
                                list7.Add(list6[index]);
                                list6.RemoveAt(index);
                            }
                            list6 = list7;
                        }
                        foreach (RoomItem current2 in list6)
                        {
                            if (flag5 && flag2)
                            {
                                break;
                            }
                            text = current2.GetBaseItem().InteractionType.ToLower();
                            switch (text)
                            {
                                case "wf_act_give_phx":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        string string_11 = current2.string_2.Split(new char[]
									{
										':'
									})[0].ToLower();
                                        string string_12 = current2.string_2.Split(new char[]
									{
										':'
									})[1];
                                        if (RoomUser_1 != null)
                                        {
                                            if (!RoomUser_1.IsBot)
                                            {
                                                this.method_19(RoomUser_1, string_11, string_12, current2.uint_0);
                                            }
                                        }
                                        else
                                        {
                                            RoomUser[] array = this.RoomUsers;
                                            for (int i = 0; i < array.Length; i++)
                                            {
                                                RoomUser class2 = array[i];
                                                if (class2 != null && !class2.IsBot)
                                                {
                                                    this.method_19(class2, string_11, string_12, current2.uint_0);
                                                }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_yt":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if(current2.string_2.Length > 0)
                                    {
                                        if(RoomUser_1 != null && RoomUser_1.GetClient() != null)
                                        {
                                            try {
                                                Essential.getWebSocketManager().getWebSocketByName(RoomUser_1.GetClient().GetHabbo().Username).Send("32|https://youtube.com/watch?v=" + current2.string_2);
                                            }
                                            catch { }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_img":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if(current2.string_2.Length > 0)
                                    {
                                        if (RoomUser_1 != null && RoomUser_1.GetClient() != null)
                                        {
                                            try
                                            {
                                                Essential.getWebSocketManager().getWebSocketByName(RoomUser_1.GetClient().GetHabbo().Username).Send("39|" + current2.string_2);
                                            }
                                            catch { }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_bot_follow_avatar":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        foreach (RoomUser roomUser in this.RoomUsers)
                                        {
                                            if (roomUser != null && roomUser.IsBot && !roomUser.IsPet && roomUser.RoomBot.Name == current2.string_2.Split(';')[0] && !roomUser.BotAI.FollowsUser)
                                            {
                                                RoomUser_1.followingUser = roomUser;
                                                roomUser.BotAI.FollowsUser = true;
                                                roomUser.MoveTo(RoomUser_1.X, RoomUser_1.Y);
                                                Action<object> action4 = delegate(object obj)
                                                {
                                                    int timeinseconds = 30;
                                                    try { timeinseconds = int.Parse(current2.string_2.Split(';')[1]); }
                                                    catch { }

                                                    Thread.Sleep(timeinseconds * 1000);
                                                    if (roomUser != null)
                                                        roomUser.BotAI.FollowsUser = false;
                                                    if (RoomUser_1 != null)
                                                        RoomUser_1.followingUser = null;
                                                };
                                                new Task(action4, "break").Start();
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_bot_give_handitem":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        foreach (RoomUser roomUser in this.RoomUsers)
                                        {
                                            if (roomUser != null && roomUser.IsBot && !roomUser.IsPet && roomUser.RoomBot.Name == current2.string_2.Split(';')[1] && !roomUser.BotAI.FollowsUser)
                                            {
                                                Action<object> action4 = delegate(object obj)
                                                {
                                                    roomUser.CarryItem(int.Parse(current2.string_2.Split(';')[0]));
                                                    roomUser.BotAI.FollowsUser = true;
                                                    Thread.Sleep(1000);
                                                    roomUser.MoveTo(RoomUser_1.X - 1, RoomUser_1.Y);
                                                    while (roomUser.X != RoomUser_1.X - 1 && roomUser.Y != RoomUser_1.Y)
                                                    {
                                                        //waiting
                                                    }
                                                    RoomUser_1.CarryItem(roomUser.CarryItemID);
                                                    roomUser.CarryItem(0);
                                                    if (roomUser != null)
                                                        roomUser.BotAI.FollowsUser = false;
                                                    if (RoomUser_1 != null)
                                                        RoomUser_1.followingUser = null;
                                                };
                                                new Task(action4, "break").Start();
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_bot_talk_to_avatar":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        foreach (RoomUser roomUser in this.RoomUsers)
                                        {
                                            if (roomUser != null && roomUser.IsBot && !roomUser.IsPet && roomUser.RoomBot.Name == current2.string_2.Split(';')[0])
                                            {
                                                try
                                                {
                                                    bool whisper = current2.string_2.Split(';')[1] == "shout";
                                                    string message = current2.string_2.Split(';')[2];
                                                    ServerMessage Talk = new ServerMessage(whisper ? Outgoing.Whisp : Outgoing.Talk);
                                                    Talk.AppendInt32(roomUser.VirtualId);
                                                    Talk.AppendStringWithBreak(message);
                                                    Talk.AppendInt32(roomUser.ParseEmoticon(message));
                                                    Talk.AppendInt32(2);
                                                    Talk.AppendInt32(0);
                                                    Talk.AppendInt32(-1);
                                                    if (!Essential.GetAntiAd().ContainsIllegalWord(message))
                                                        RoomUser_1.GetClient().SendMessage(Talk);
                                                }
                                                catch{}// (Exception ex) { Console.WriteLine(ex.ToString()); }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_bot_talk":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        foreach (RoomUser roomUser in this.RoomUsers)
                                        {
                                            if (roomUser != null && roomUser.IsBot && !roomUser.IsPet && roomUser.RoomBot.Name == current2.string_2.Split(';')[0])
                                            {
                                                try
                                                {
                                                    bool shout = current2.string_2.Split(';')[1] == "whisper";
                                                    string message = current2.string_2.Split(';')[2];
                                                    roomUser.HandleSpeech(null, message, shout);
                                                }
                                                catch { }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_bot_teleport":
                                    break;
                                case "wf_act_bot_clothes":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        foreach (RoomUser roomUser in this.RoomUsers)
                                        {
                                            if (roomUser != null && roomUser.IsBot && !roomUser.IsPet && roomUser.RoomBot.Name == current2.string_2.Split(';')[0])
                                            {
                                                try
                                                {
                                                    roomUser.RoomBot.Look = current2.string_2.Split(';')[1];
                                                    this.method_6(roomUser.VirtualId, false);
                                                    uint id = roomUser.UId - 1000;
                                                    List<RandomSpeech> list = new List<RandomSpeech>();
                                                    List<BotResponse> list2 = new List<BotResponse>();
                                                    int currentX = roomUser.X;
                                                    int currentY = roomUser.Y;
                                                    int currentRot = roomUser.BodyRotation;
                                                    double currentH = roomUser.double_0;
                                                    UserBot bot = null;
                                                    using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
                                                    {
                                                        dbClient.AddParamWithValue("look", current2.string_2.Split(';')[1]);
                                                        dbClient.ExecuteQuery("UPDATE user_bots SET look=@look WHERE id=" + id);
                                                        bot = Essential.GetGame().GetCatalog().RetrBot(dbClient.ReadDataRow("SELECT * FROM user_bots WHERE id=" + id));
                                                    }
                                                    this.AddBotToRoom(new RoomBot(id, this.Id, AIType.UserBot, "freeroam", roomUser.RoomBot.Name, roomUser.RoomBot.Motto, current2.string_2.Split(';')[1], currentX, currentY, 0, currentRot, 0, 0, 0, 0, ref list, ref list2, 0), bot);
                                                }
                                                catch { }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_saymsg":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        string text2 = current2.string_2;
                                        text2 = ChatCommandHandler.ApplyFilter(text2);
                                        if (text2.Length > 100)
                                        {
                                            text2 = text2.Substring(0, 100);
                                        }
                                        if (RoomUser_1 != null)
                                        {
                                            if (!RoomUser_1.IsBot)
                                            {
                                                RoomUser_1.GetClient().GetHabbo().Whisper(text2);
                                            }
                                        }
                                        else
                                        {
                                            RoomUser[] array = this.RoomUsers;
                                            for (int i = 0; i < array.Length; i++)
                                            {
                                                RoomUser class2 = array[i];
                                                if (class2 != null && !class2.IsBot)
                                                {
                                                    class2.GetClient().GetHabbo().Whisper(text2);
                                                }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_moveuser":
                                    Action<object> action = delegate(object obj)
                                    {
                                        double waittime = 0.0;
                                        if (current2.string_2 != "" && double.TryParse(current2.string_2, out waittime))
                                        {
                                            Thread.Sleep(Convert.ToInt32(waittime * 1000));
                                        }
                                        current2.ExtraData = "1";
                                        current2.UpdateState(false, true);
                                        current2.ReqUpdate(1);
                                        current2.CheckExtraData3();
                                        if (current2.string_3.Length > 0)
                                        {
                                            string[] collection = current2.string_3.Split(new char[]
									        {
										        ','
									        });
                                            List<string> list = new List<string>(collection);
                                            Random random2 = new Random();
                                            int num5 = random2.Next(0, list.Count - 1);
                                            RoomItem class3 = this.method_28(Convert.ToUInt32(list[num5]));
                                            if (class3 != null)
                                            {
                                                if (RoomUser_1 != null)
                                                {
                                                    this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 1;
                                                    this.byte_0[RoomUser_1.int_12, RoomUser_1.int_13] = 1;
                                                    this.byte_0[class3.GetX, class3.Int32_1] = 1;
                                                    RoomUser_1.bool_6 = false;
                                                    RoomUser_1.int_12 = class3.GetX;
                                                    RoomUser_1.int_13 = class3.Int32_1;
                                                    RoomUser_1.double_1 = class3.Double_0;
                                                    RoomUser_1.method_7(class3.GetX, class3.Int32_1, class3.Double_0);
                                                    RoomUser_1.UpdateNeeded = true;
                                                    if (!current2.dictionary_1.ContainsKey(RoomUser_1))
                                                    {
                                                        current2.dictionary_1.Add(RoomUser_1, 10);
                                                    }
                                                    if (RoomUser_1.class34_1 != null)
                                                    {
                                                        RoomUser_1.class34_1.RoomUser_0 = null;
                                                        RoomUser_1.RoomUser_0 = null;
                                                        RoomUser_1.class34_1 = null;
                                                    }
                                                    this.method_87(RoomUser_1, true, false);
                                                }
                                                else
                                                {
                                                    RoomUser[] array = this.RoomUsers;
                                                    for (int i = 0; i < array.Length; i++)
                                                    {
                                                        RoomUser class2 = array[i];
                                                        if (class2 != null)
                                                        {
                                                            this.byte_0[class2.X, class2.Y] = 1;
                                                            this.byte_0[class3.GetX, class3.Int32_1] = 1;
                                                            class2.method_7(class3.GetX, class3.Int32_1, class3.Double_0);
                                                            class2.UpdateNeeded = true;
                                                            if (!current2.dictionary_1.ContainsKey(class2))
                                                            {
                                                                current2.dictionary_1.Add(class2, 10);
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    };
                                    new Task(action, "break").Start();
                                    flag2 = true;
                                    break;
                                case "wf_act_togglefurni":
                                    Action<object> action2 = delegate(object obj)
                                    {
                                        double waittime = 0.0;
                                        if (current2.string_2 != "" && double.TryParse(current2.string_2, out waittime))
                                        {
                                            Thread.Sleep(Convert.ToInt32(waittime * 1000));
                                        }
                                        current2.ExtraData = "1";
                                        current2.UpdateState(false, true);
                                        current2.ReqUpdate(1);
                                        if (current2.string_3.Length > 0)
                                        {
                                            string[] collection = current2.string_3.Split(new char[]
									{
										','
									});
                                            IEnumerable<string> enumerable = new List<string>(collection);
                                            List<string> list2 = enumerable.ToList<string>();
                                            foreach (string current in enumerable)
                                            {
                                                RoomItem class3 = this.method_28(Convert.ToUInt32(current));
                                                if (class3 != null)
                                                {
                                                    if (class3.GetBaseItem().InteractionType == "counter")
                                                    {
                                                        class3.Interactor.OnTrigger(null, class3, 1, true);
                                                    }
                                                    else if (class3.GetBaseItem().InteractionType == "gate")
                                                    {
                                                        int numa = 0;
                                                        if (class3.ExtraData.Length > 0)
                                                        {
                                                            numa = int.Parse(class3.ExtraData);
                                                        }
                                                        else
                                                        {
                                                            numa = 1;
                                                        }
                                                        if (numa == 0)
                                                        {
                                                            numa = 1;
                                                        }
                                                        else
                                                        {

                                                            numa = 0;

                                                        }
                                                        if (numa == 0)
                                                        {
                                                            if (class3.GetRoom().method_97(class3.GetX, class3.Int32_1))
                                                            {
                                                                return;
                                                            }
                                                            Dictionary<int, AffectedTile> dictionary = class3.GetRoom().method_94(class3.GetBaseItem().Length, class3.GetBaseItem().Width, class3.GetX, class3.Int32_1, class3.int_3);
                                                            if (dictionary == null)
                                                            {
                                                                dictionary = new Dictionary<int, AffectedTile>();
                                                            }
                                                            foreach (AffectedTile current3 in dictionary.Values)
                                                            {
                                                                if (class3.GetRoom().method_97(current3.Int32_0, current3.Int32_1))
                                                                {
                                                                    return;
                                                                }
                                                            }
                                                        }
                                                        class3.ExtraData = numa.ToString();
                                                        class3.UpdateState();
                                                        class3.GetRoom().method_22();
                                                    }
                                                    else
                                                    {
                                                        class3.Interactor.OnTrigger(null, class3, 0, true);
                                                    }
                                                }
                                                else
                                                {
                                                    list2.Remove(current);
                                                }
                                            }
                                        }
                                    };
                                    new Task(action2, "break").Start();
                                    flag2 = true;
                                    break;
                                case "wf_act_kick_user":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    GameClient GetPlayerSession = Essential.GetGame().GetClientManager().GetClientByHabbo(RoomUser_1.GetClient().GetHabbo().Username);
                                    if (GetPlayerSession != null)
                                    {
                                        Room class2 = RoomUser_1.GetClient().GetHabbo().CurrentRoom;
                                        if (!(class2.Owner == GetPlayerSession.GetHabbo().Username || GetPlayerSession.GetHabbo().HasFuse("acc_unkickable")))
                                        {

                                            ServerMessage Message5_ = new ServerMessage(Outgoing.OutOfRoom); // P
                                            GetPlayerSession.SendMessage(Message5_);
                                            ServerMessage Message2 = new ServerMessage(Outgoing.KickMessage); // Updated
                                            Message2.AppendBoolean(false);
                                            GetPlayerSession.SendMessage(Message2);

                                            if (current2.string_2.Length > 0)
                                            {
                                                GetPlayerSession.SendNotification(current2.string_2);
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_reset_timers":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    foreach (RoomItem current in this.list_14)
                                    {
                                        if (current.GetBaseItem().InteractionType.ToLower() == "wf_trg_attime")
                                        {
                                            current.WiredAtTimeNeedReset = false;
                                            current.WiredAtTimeTimer = 0;
                                            current.ReqUpdate(1);
                                        }
                                        flag2 = true;
                                    }

                                    foreach (RoomItem current in this.list_16)
                                    {
                                        if (current.GetBaseItem().InteractionType.ToLower() == "wf_cnd_time_more_than")
                                        {
                                            current.WiredCounter = 0;
                                            current.WiredNeedReset = false;
                                            current.ReqUpdate(1);
                                        }
                                        else if (current.GetBaseItem().InteractionType.ToLower() == "wf_cnd_time_less_than")
                                        {
                                            current.WiredCounter = 0;
                                            current.WiredNeedReset = false;
                                            current.ReqUpdate(1);
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_givepoints":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (RoomUser_1 != null && current2.string_2.Length > 0)
                                    {
                                        int team = 0;
                                        if (RoomUser_1.team == Team.Yellow)
                                            team = 14;
                                        else if (RoomUser_1.team == Team.Red)
                                            team = 5;
                                        else if (RoomUser_1.team == Team.Green)
                                            team = 8;
                                        else if (RoomUser_1.team == Team.Blue)
                                            team = 11;
                                        this.method_88(team, Convert.ToInt32(current2.string_2), current2, RoomUser_1.GetClient());
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_moverotate":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    current2.CheckExtraData4();
                                    if (current2.string_4.Length > 0)
                                    {
                                        string[] collection = current2.string_4.Split(new char[]
									{
										','
									});
                                        IEnumerable<string> enumerable2 = new List<string>(collection);
                                        foreach (string current in enumerable2)
                                        {
                                            RoomItem class3 = this.method_28(Convert.ToUInt32(current));
                                            if (class3 != null)
                                            {
                                                if (current2.string_2 != "0" && current2.string_2 != "")
                                                {
                                                    ThreeDCoord gstruct1_ = class3.GStruct1_1;
                                                    int num5 = 0;
                                                    int num6 = 0;
                                                    int num7 = 0;
                                                    if (current2.string_2 == "1")
                                                    {
                                                        Random random3 = new Random();
                                                        num5 = random3.Next(1, 5);
                                                    }
                                                    else
                                                    {
                                                        if (current2.string_2 == "2")
                                                        {
                                                            Random random3 = new Random();
                                                            num6 = random3.Next(1, 3);
                                                        }
                                                        else
                                                        {
                                                            if (current2.string_2 == "3")
                                                            {
                                                                Random random3 = new Random();
                                                                num7 = random3.Next(1, 3);
                                                            }
                                                        }
                                                    }
                                                    if (current2.string_2 == "4" || num5 == 1 || num7 == 1)
                                                    {
                                                        gstruct1_ = class3.GetNextThreeDCoord(4);
                                                    }
                                                    else
                                                    {
                                                        if (current2.string_2 == "5" || num5 == 2 || num6 == 1)
                                                        {
                                                            gstruct1_ = class3.GetNextThreeDCoord(6);
                                                        }
                                                        else
                                                        {
                                                            if (current2.string_2 == "6" || num5 == 3 || num7 == 2)
                                                            {
                                                                gstruct1_ = class3.GetNextThreeDCoord(0);
                                                            }
                                                            else
                                                            {
                                                                if (current2.string_2 == "7" || num5 == 4 || num6 == 2)
                                                                {
                                                                    gstruct1_ = class3.GetNextThreeDCoord(2);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    if (this.method_37(gstruct1_.x, gstruct1_.y, true, true, true, false, false, true, true) && class3.GetBaseItem().InteractionType != "wf_trg_timer")
                                                    {
                                                        this.method_41(class3, gstruct1_, current2.uint_0, this.GetTopItemHeight(gstruct1_.x, gstruct1_.y));
                                                    }
                                                }
                                                if (current2.string_3.Length > 0 && current2.string_3 != "0" && current2.string_3 != "")
                                                {
                                                    int num5 = 0;
                                                    if (current2.string_3 == "1")
                                                    {
                                                        num5 = class3.int_3 + 2;
                                                        if (num5 > 6)
                                                        {
                                                            num5 = 0;
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (current2.string_3 == "2")
                                                        {
                                                            num5 = class3.int_3 - 2;
                                                            if (num5 < 0)
                                                            {
                                                                num5 = 6;
                                                            }
                                                        }
                                                        else
                                                        {
                                                            if (current2.string_3 == "3")
                                                            {
                                                                Random random3 = new Random();
                                                                num5 = random3.Next(1, 5);
                                                                if (num5 == 1)
                                                                {
                                                                    num5 = 0;
                                                                }
                                                                else
                                                                {
                                                                    if (num5 == 2)
                                                                    {
                                                                        num5 = 2;
                                                                    }
                                                                    else
                                                                    {
                                                                        if (num5 == 3)
                                                                        {
                                                                            num5 = 4;
                                                                        }
                                                                        else
                                                                        {
                                                                            if (num5 == 4)
                                                                            {
                                                                                num5 = 6;
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                    if (current2.GetRoom().method_79(null, class3, class3.GetX, class3.Int32_1, num5, false, false, false))
                                                    {
                                                        flag2 = true;
                                                    }
                                                }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_matchfurni":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    current2.CheckExtraData4();
                                    if (current2.string_4.Length > 0 && current2.string_2.Length > 0)
                                    {
                                        string[] collection = current2.string_4.Split(new char[]
									    {
										    ','
									    });
                                        IEnumerable<string> enumerable = new List<string>(collection);
                                        string[] collection2 = current2.string_2.Split(new char[]
									    {
										    ';'
									    });
                                        List<string> list8 = new List<string>(collection2);
                                        int num8 = 0;
                                        foreach (string current in enumerable)
                                        {
                                            RoomItem class3 = this.method_28(Convert.ToUInt32(current));
                                            //!(class3.GetBaseItem().InteractionType.ToLower() == "dice") && !(class3.GetBaseItem().InteractionType.ToLower() == "bb_patch"))
                                            //class3.GetBaseItem().InteractionType.ToLower() != "dice" && class3.GetBaseItem().InteractionType.ToLower() != "bb_patch"

                                            if (class3 != null && !(class3.GetBaseItem().InteractionType.ToLower() == "dice") && !(class3.GetBaseItem().InteractionType.ToLower() == "bb_patch") && !(class3.GetBaseItem().InteractionType.ToLower() == "bb_counter"))
                                            {
                                                string[] collection3 = list8[num8].Split(new char[]
											{
												','
											});
                                                List<string> list9 = new List<string>(collection3);
                                                bool flag6 = false;
                                                bool flag7 = false;
                                                if (current2.string_3 != "" && class3 != null)
                                                {
                                                    int int_ = class3.GetX;
                                                    int int_2 = class3.Int32_1;
                                                    if (current2.string_3.StartsWith("I"))
                                                    {
                                                        class3.ExtraData = list9[4];
                                                        flag7 = true;
                                                    }
                                                    if (current2.string_3.Substring(1, 1) == "I")
                                                    {
                                                        class3.int_3 = Convert.ToInt32(list9[3]);
                                                        flag6 = true;
                                                    }
                                                    if (current2.string_3.EndsWith("I"))
                                                    {
                                                        int_ = Convert.ToInt32(list9[0]);
                                                        int_2 = Convert.ToInt32(list9[1]);
                                                        flag6 = true;
                                                        class3.int_3 = Convert.ToInt32(list9[3]);
                                                    }
                                                    if (flag6)
                                                    {
                                                        //this.method_79(null, class3, class3.GetX, class3.Int32_1, class3.int_3, false, false, false);
                                                        this.method_40(class3, int_, int_2, current2.uint_0, class3.Double_0);
                                                    }
                                                    if (flag7)
                                                    {
                                                        class3.UpdateState(false, true);
                                                    }
                                                    this.method_22();
                                                }
                                                num8++;
                                            }
                                        }
                                    }
                                    flag2 = true;
                                    break;
                            }
                        }
                    }
                    result = flag2;
                }
            }
            catch
            {
                result = false;
            }
            return result;
        }
Ejemplo n.º 19
0
 private void UnlockGate(RoomItem item)
 {
     switch (item.GetBaseItem().InteractionType)
     {
         case "freeze_blue_gate":
         case "freeze_red_gate":
         case "freeze_green_gate":
         case "freeze_yellow_gate":
             item.GetRoom().method_38(item.GetX, item.Int32_1);
             break;
     }
 }
Ejemplo n.º 20
0
		public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_1, bool bool_0)
		{
            if (this.Modes != 0 && (bool_0 || RoomItem_0.GetBaseItem().InteractionType.ToLower() == "switch"))
			{
				if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "switch" && Session != null)
				{
					RoomUser @class = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
					if (@class.Position.x - RoomItem_0.GStruct1_1.x > 1 || @class.Position.y - RoomItem_0.GStruct1_1.y > 1)
					{
						if (@class.bool_0)
						{
							@class.MoveTo(RoomItem_0.GStruct1_0);
							return;
						}
						return;
					}
				}
				int num = 0;
				if (RoomItem_0.ExtraData.Length > 0)
				{
					num = int.Parse(RoomItem_0.ExtraData);
				}
				int num2;
				if (num <= 0)
				{
					num2 = 1;
				}
				else
				{
					if (num >= this.Modes)
					{
						num2 = 0;
					}
					else
					{
						num2 = num + 1;
					}
				}
                //if (RoomItem_0.GetBaseItem().Name.Contains("jukebox"))
                //{
                //    ServerMessage Message = new ServerMessage(327u);
                //    if (num2 == 1)
                //    {
                //        Message.AppendInt32(7);
                //        Message.AppendInt32(6);
                //        Message.AppendInt32(7);
                //        Message.AppendInt32(0);
                //        Message.AppendInt32(0);
                //        RoomItem_0.int_0 = 1;
                //        RoomItem_0.bool_0 = true;
                //        RoomItem_0.bool_1 = true;
                //    }
                //    else
                //    {
                //        Message.AppendInt32(-1);
                //        Message.AppendInt32(-1);
                //        Message.AppendInt32(-1);
                //        Message.AppendInt32(-1);
                //        Message.AppendInt32(0);
                //        RoomItem_0.int_0 = 0;
                //        RoomItem_0.bool_0 = false;
                //        RoomItem_0.method_8().int_13 = 0;
                //    }
                //    RoomItem_0.method_8().SendMessage(Message, null);
                //}
				double double_ = RoomItem_0.Double_1;
				RoomItem_0.ExtraData = num2.ToString();
				RoomItem_0.UpdateState();
				if (double_ != RoomItem_0.Double_1)
				{
					Dictionary<int, AffectedTile> dictionary = RoomItem_0.Dictionary_0;
					if (dictionary == null)
					{
						dictionary = new Dictionary<int, AffectedTile>();
					}
                    RoomItem_0.GetRoom().method_87(RoomItem_0.GetRoom().method_43(RoomItem_0.GetX, RoomItem_0.Int32_1), true, false);
					foreach (AffectedTile current in dictionary.Values)
					{
						RoomItem_0.GetRoom().method_87(RoomItem_0.GetRoom().method_43(current.Int32_0, current.Int32_1), true, false);
					}
				}
				if (Session != null)
				{
					RoomUser RoomUser_ = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
					RoomItem_0.GetRoom().method_10(RoomUser_, RoomItem_0);
				}
			}
		}
Ejemplo n.º 21
0
        public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            try
            {
                string[] figureParts = Session.GetHabbo().Figure.Split('.');
                switch (Item.GetBaseItem().Name)
                {
                    case "clothing_goggles":

                        if (Session.GetHabbo().Figure.Contains("he"))
                        {
                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("he"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "he-3376-62-106");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".he-3376-62-106";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyhood":
                        if (Session.GetHabbo().Figure.Contains("ha"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("ha"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "ha-3382-64-105");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".ha-3382-64-105";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyphones":
                        if (Session.GetHabbo().Figure.Contains("he"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("he"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "he-3379-62-62");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".he-3379-62-62";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cymask":
                        if (Session.GetHabbo().Figure.Contains("fa"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("fa"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "fa-3378-62-82");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".fa-3378-62-82";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyquif":
                        if (Session.GetHabbo().Figure.Contains("hr"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("hr"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "hr-3386-53");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".hr-3386-53";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyglass":
                        if (Session.GetHabbo().Figure.Contains("ea"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("ea"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "ea-3388-62-62");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".ea-3388-62-62";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyhair":
                        if (Session.GetHabbo().Figure.Contains("hr"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("hr"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "hr-3377-42-55");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".hr-3377-42-55";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cycircuit":
                        if (Session.GetHabbo().Figure.Contains("he"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("he"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "he-3385-62-62");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".he-3385-62-62";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyboots":
                        if (Session.GetHabbo().Figure.Contains("sh"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("sh"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "sh-3375-79-106");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".sh-3375-79-106";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyskirt":
                        if (Session.GetHabbo().Figure.Contains("lg"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("lg"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "lg-3387-104-64");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".lg-3387-104-64";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cystrapboots":
                        if (Session.GetHabbo().Figure.Contains("sh"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("sh"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "sh-3383-64-62");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".sh-3383-64-62";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyleather":
                        if (Session.GetHabbo().Figure.Contains("cc"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("cc"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "cc-3374-64");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".cc-3374-64";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cyzipped":
                        if (Session.GetHabbo().Figure.Contains("cc"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("cc"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "cc-3380-64-62");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".cc-3380-64-62";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cystrappants":
                        if (Session.GetHabbo().Figure.Contains("lg"))
                        {

                            foreach (string Part in figureParts)
                            {
                                if (Part.StartsWith("lg"))
                                {
                                    Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "lg-3384-64-104");
                                }
                            }

                        }
                        else
                        {
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".lg-3384-64-104";
                        }
                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cystraphood":


                        foreach (string Part in figureParts)
                        {
                            if (Part.StartsWith("lg"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "lg-3384-64-104");
                            }
                            else if (Part.StartsWith("sh"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "sh-3383-64-62");
                            }
                            else if (Part.StartsWith("cc"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "cc-3380-64-62");
                            }
                            else if (Part.StartsWith("ha"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "ha-3382-64-105");
                            }
                        }

                        if (!Session.GetHabbo().Figure.Contains("lg"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".lg-3384-64-104";

                        if (!Session.GetHabbo().Figure.Contains("sh"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".sh-3383-64-62";

                        if (!Session.GetHabbo().Figure.Contains("cc"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".cc-3380-64-62";

                        if (!Session.GetHabbo().Figure.Contains("ha"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".ha-3382-64-105";


                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    case "clothing_cygirl":
                        foreach (string Part in figureParts)
                        {
                            if (Part.StartsWith("lg"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "lg-3387-104-64");
                            }
                            else if (Part.StartsWith("hr"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "hr-3377-42-55");
                            }
                            else if (Part.StartsWith("cc"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "cc-3374-64");
                            }
                            else if (Part.StartsWith("he"))
                            {
                                Session.GetHabbo().Figure = Session.GetHabbo().Figure.Replace(Part, "he-3376-62-106");
                            }
                        }

                        if (!Session.GetHabbo().Figure.Contains("lg"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".lg-3387-104-64";

                        if (!Session.GetHabbo().Figure.Contains("hr"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".hr-3377-42-55";

                        if (!Session.GetHabbo().Figure.Contains("cc"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".cc-3374-64";

                        if (!Session.GetHabbo().Figure.Contains("he"))
                            Session.GetHabbo().Figure = Session.GetHabbo().Figure + ".he-3376-62-106";


                        Session.GetHabbo().UpdateLook(false, Session);
                        break;
                    default:
                        break;
                }
                Session.GetHabbo().UpdateLook(false, Session);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Ejemplo n.º 22
0
 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (this.Modes != 0 && (bool_0 || RoomItem_0.GetBaseItem().InteractionType.ToLower() == "switch"))
     {
         if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "switch" && Session != null)
         {
             RoomUser @class = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
             if (@class.Position.x - RoomItem_0.GStruct1_1.x > 1 || @class.Position.y - RoomItem_0.GStruct1_1.y > 1)
             {
                 if (@class.bool_0)
                 {
                     @class.MoveTo(RoomItem_0.GStruct1_0);
                     return;
                 }
                 return;
             }
         }
         int num = 0;
         if (RoomItem_0.ExtraData.Length > 0)
         {
             num = int.Parse(RoomItem_0.ExtraData);
         }
         int num2;
         if (num <= 0)
         {
             num2 = 1;
         }
         else
         {
             if (num >= this.Modes)
             {
                 num2 = 0;
             }
             else
             {
                 num2 = num + 1;
             }
         }
         double double_ = RoomItem_0.Double_1;
         RoomItem_0.ExtraData = num2.ToString();
         RoomItem_0.UpdateState();
         if (double_ != RoomItem_0.Double_1)
         {
             Dictionary<int, AffectedTile> dictionary = RoomItem_0.Dictionary_0;
             if (dictionary == null)
             {
                 dictionary = new Dictionary<int, AffectedTile>();
             }
             RoomItem_0.GetRoom().method_87(RoomItem_0.GetRoom().method_43(RoomItem_0.GetX, RoomItem_0.Int32_1), true, false);
             foreach (AffectedTile current in dictionary.Values)
             {
                 RoomItem_0.GetRoom().method_87(RoomItem_0.GetRoom().method_43(current.Int32_0, current.Int32_1), true, false);
             }
         }
         if (Session != null)
         {
             RoomUser RoomUser_ = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
             RoomItem_0.GetRoom().method_10(RoomUser_, RoomItem_0);
         }
     }
 }