public void Handle(GameClient Session, ClientMessage Event)
        {
            Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
            if (@class != null)
            {
            RoomItem class2 = @class.method_28(Event.PopWiredUInt());
            if (class2 != null)
            {
                string text = class2.GetBaseItem().InteractionType.ToLower();
                if (text != null)
                {
                    if (!(text == "wf_trg_onsay"))
                    {
                        if (!(text == "wf_trg_enterroom"))
                        {
                            if (!(text == "wf_trg_timer"))
                            {
                                if (!(text == "wf_trg_attime"))
                                {
                                    if (text == "wf_trg_atscore")
                                    {
                                        Event.PopWiredBoolean();
                                        string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                                        string[] array = text2.Split(new char[]
                                        {
                                            '@'
                                        });
                                        class2.string_3 = array[0];
                                        class2.string_2 = Convert.ToString(Event.PopWiredInt32());
                                    }

                                    if (text != null && (text == "wf_cnd_time_more_than" || text == "wf_cnd_time_less_than"))
                                    {
                                        Event.PopWiredBoolean();
                                        string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                                        string[] array = text2.Split(new char[]
                                {
                                    '@'
                                });
                                        class2.string_3 = array[0];
                                        class2.string_2 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
                                    }
                                }
                                else
                                {
                                    Event.PopWiredBoolean();
                                    string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                                    string[] array = text2.Split(new char[]
                                    {
                                        '@'
                                    });
                                    class2.string_3 = array[0];
                                    class2.string_2 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
                                }
                            }
                            else
                            {
                                Event.PopWiredBoolean();
                                string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                                string[] array = text2.Split(new char[]
                                {
                                    '@'
                                });
                                class2.string_3 = array[0];
                                class2.string_2 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
                            }
                        }
                        else
                        {
                            Event.PopWiredBoolean();
                            string text3 = Event.PopFixedString();
                            class2.string_2 = text3;
                        }
                    }
                    else
                    {
                        Event.PopWiredBoolean();
                        bool value = Event.PopWiredBoolean();
                        string text3 = Event.PopFixedString();
                        text3 = GoldTree.DoFilter(text3, false, true);
                        if (text3.Length > 100)
                        {
                            text3 = text3.Substring(0, 100);
                        }
                        class2.string_2 = text3;
                        class2.string_3 = Convert.ToString(value);
                    }
                }
                class2.UpdateState(true, false);
            }
            }
        }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         uint uint_ = Event.PopWiredUInt();
         RoomItem class2 = @class.method_28(uint_);
         string text = class2.GetBaseItem().InteractionType.ToLower();
         switch (text)
         {
             case "wf_act_give_phx":
                 {
                     Event.PopWiredBoolean();
                     string text2 = Event.PopFixedString();
                     text2 = GoldTree.DoFilter(text2, false, true);
                     text2 = ChatCommandHandler.smethod_4(text2);
                     if (!(text2 == class2.string_2))
                     {
                         string string_ = text2.Split(new char[]
                 {
                     ':'
                 })[0].ToLower();
                         if (GoldTree.GetGame().GetRoleManager().method_12(string_, Session))
                         {
                             class2.string_2 = text2;
                         }
                         else
                         {
                             Session.GetHabbo().method_28(GoldTreeEnvironment.smethod_1("wired_error_permissions"));
                         }
                     }
                     break;
                 }
             case "wf_cnd_phx":
                 {
                     Event.PopWiredBoolean();
                     string text2 = Event.PopFixedString();
                     text2 = GoldTree.DoFilter(text2, false, true);
                     text2 = ChatCommandHandler.smethod_4(text2);
                     if (!(text2 == class2.string_2))
                     {
                         string string_ = text2.Split(new char[]
                 {
                     ':'
                 })[0].ToLower();
                         if (GoldTree.GetGame().GetRoleManager().method_11(string_, Session))
                         {
                             class2.string_2 = text2;
                         }
                         else
                         {
                             Session.GetHabbo().method_28(GoldTreeEnvironment.smethod_1("wired_error_permissions"));
                         }
                     }
                     break;
                 }
             case "wf_act_saymsg":
                 {
                     Event.PopWiredBoolean();
                     string text2 = Event.PopFixedString();
                     text2 = GoldTree.DoFilter(text2, false, true);
                     if (text2.Length > 100)
                     {
                         text2 = text2.Substring(0, 100);
                     }
                     class2.string_2 = text2;
                     break;
                 }
             case "wf_act_kick_user":
                 {
                     Event.PopWiredBoolean();
                     string text2 = Event.PopFixedString();
                     text2 = GoldTree.DoFilter(text2, false, true);
                     if (text2.Length > 200)
                     {
                         text2 = text2.Substring(0, 200);
                     }
                     class2.string_2 = text2;
                     break;
                 }
             case "wf_trg_furnistate":
             case "wf_trg_onfurni":
             case "wf_trg_offfurni":
             case "wf_act_moveuser":
             case "wf_act_togglefurni":
                 {
                     Event.PopWiredBoolean();
                     Event.PopFixedString();
                     class2.string_2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                     class2.string_2 = class2.string_2.Substring(0, class2.string_2.Length - 2);
                     Event.ResetPointer();
                     class2 = @class.method_28(Event.PopWiredUInt());
                     Event.PopWiredBoolean();
                     Event.PopFixedString();
                     int num2 = Event.PopWiredInt32();
                     class2.string_3 = "";
                     for (int i = 0; i < num2; i++)
                     {
                         class2.string_3 = class2.string_3 + "," + Convert.ToString(Event.PopWiredUInt());
                     }
                     if (class2.string_3.Length > 0)
                     {
                         class2.string_3 = class2.string_3.Substring(1);
                     }
                     break;
                 }
             case "wf_act_givepoints":
                 Event.PopWiredInt32();
                 class2.string_2 = Convert.ToString(Event.PopWiredInt32());
                 class2.string_3 = Convert.ToString(Event.PopWiredInt32());
                 break;
             case "wf_act_moverotate":
                 {
                     Event.PopWiredInt32();
                     class2.string_2 = Convert.ToString(Event.PopWiredInt32());
                     class2.string_3 = Convert.ToString(Event.PopWiredInt32());
                     Event.PopFixedString();
                     int num2 = Event.PopWiredInt32();
                     class2.string_4 = "";
                     class2.string_5 = "";
                     if (num2 > 0)
                     {
                         class2.string_5 = OldEncoding.encodeVL64(num2);
                         for (int i = 0; i < num2; i++)
                         {
                             int num3 = Event.PopWiredInt32();
                             class2.string_5 += OldEncoding.encodeVL64(num3);
                             class2.string_4 = class2.string_4 + "," + Convert.ToString(num3);
                         }
                         class2.string_4 = class2.string_4.Substring(1);
                     }
                     class2.string_6 = Convert.ToString(Event.PopWiredInt32());
                     break;
                 }
             case "wf_act_matchfurni":
                 {
                     Event.PopWiredInt32();
                     class2.string_3 = "";
                     if (Event.PopWiredBoolean())
                     {
                         RoomItem expr_4A8 = class2;
                         expr_4A8.string_3 += "I";
                     }
                     else
                     {
                         RoomItem expr_4C0 = class2;
                         expr_4C0.string_3 += "H";
                     }
                     if (Event.PopWiredBoolean())
                     {
                         RoomItem expr_4E1 = class2;
                         expr_4E1.string_3 += "I";
                     }
                     else
                     {
                         RoomItem expr_4F9 = class2;
                         expr_4F9.string_3 += "H";
                     }
                     if (Event.PopWiredBoolean())
                     {
                         RoomItem expr_51A = class2;
                         expr_51A.string_3 += "I";
                     }
                     else
                     {
                         RoomItem expr_532 = class2;
                         expr_532.string_3 += "H";
                     }
                     Event.PopFixedString();
                     int num2 = Event.PopWiredInt32();
                     class2.string_2 = "";
                     class2.string_4 = "";
                     class2.string_5 = "";
                     if (num2 > 0)
                     {
                         class2.string_5 = OldEncoding.encodeVL64(num2);
                         for (int i = 0; i < num2; i++)
                         {
                             int num3 = Event.PopWiredInt32();
                             class2.string_5 += OldEncoding.encodeVL64(num3);
                             class2.string_4 = class2.string_4 + "," + Convert.ToString(num3);
                             RoomItem class3 = @class.method_28(Convert.ToUInt32(num3));
                             RoomItem expr_5E6 = class2;
                             object string_2 = expr_5E6.string_2;
                             expr_5E6.string_2 = string.Concat(new object[]
                     {
                         string_2,
                         ";",
                         class3.Int32_0,
                         ",",
                         class3.Int32_1,
                         ",",
                         class3.Double_0,
                         ",",
                         class3.int_3,
                         ",",
                         class3.ExtraData
                     });
                         }
                         class2.string_4 = class2.string_4.Substring(1);
                         class2.string_2 = class2.string_2.Substring(1);
                     }
                     class2.string_6 = Convert.ToString(Event.PopWiredInt32());
                     break;
                 }
         }
         class2.UpdateState(true, false);
     }
     catch
     {
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(827u);
     string text = Event.ToString().Split(new char[]
     {
         ' '
     })[1];
     if (text.ToLower().Contains("pet"))
     {
         int num = Convert.ToInt32(text.Substring(3));
         Message.AppendStringWithBreak("a0 pet" + num);
         switch (num)
         {
         case 0:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_0"));
             break;
         case 1:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_1"));
             break;
         case 2:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_2"));
             break;
         case 3:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_3"));
             break;
         case 4:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_4"));
             break;
         case 5:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_5"));
             break;
         case 6:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_6"));
             break;
         case 7:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_7"));
             break;
         case 8:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_8"));
             break;
         case 9:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_9"));
             break;
         case 10:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_10"));
             break;
         case 11:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_11"));
             break;
         case 12:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_12"));
             break;
         case 13:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_13"));
             break;
         case 14:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_14"));
             break;
         case 15:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_15"));
             break;
         case 16:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_16"));
             break;
         case 17:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_17"));
             break;
         case 18:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_18"));
             break;
         case 19:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_19"));
             break;
         case 20:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_20"));
             break;
         case 21:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_21"));
             break;
         case 22:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_22"));
             break;
         case 23:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_23"));
             break;
         case 24:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_24"));
             break;
         case 25:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_25"));
             break;
         case 26:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_26"));
             break;
         case 27:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_27"));
             break;
         case 28:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_28"));
             break;
         case 29:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_29"));
             break;
         case 30:
             Message.AppendString(GoldTreeEnvironment.smethod_1("pet_breeds_30"));
             break;
         }
         Session.SendMessage(Message);
     }
 }