コード例 #1
0
 public static void smethod_1(RoomUser RoomUser_0, string string_0)
 {
     if (string_0.Contains("hr-"))
     {
         string text = Regex.Split(string_0, "hr-")[1];
         text = "hr-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("hr-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "hr-")[1];
             text2 = "hr-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("hd-"))
     {
         string text = Regex.Split(string_0, "hd-")[1];
         text = "hd-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("hd-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "hd-")[1];
             text2 = "hd-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("ch-"))
     {
         string text = Regex.Split(string_0, "ch-")[1];
         text = "ch-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("ch-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "ch-")[1];
             text2 = "ch-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("lg-"))
     {
         string text = Regex.Split(string_0, "lg-")[1];
         text = "lg-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("lg-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "lg-")[1];
             text2 = "lg-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("sh-"))
     {
         string text = Regex.Split(string_0, "sh-")[1];
         text = "sh-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("sh-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "sh-")[1];
             text2 = "sh-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("ea-"))
     {
         string text = Regex.Split(string_0, "ea-")[1];
         text = "ea-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("ea-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "ea-")[1];
             text2 = "ea-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("ca-"))
     {
         string text = Regex.Split(string_0, "ca-")[1];
         text = "ca-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("ca-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "ca-")[1];
             text2 = "ca-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("ha-"))
     {
         string text = Regex.Split(string_0, "ha-")[1];
         text = "ha-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("ha-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "ha-")[1];
             text2 = "ha-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("he-"))
     {
         string text = Regex.Split(string_0, "he-")[1];
         text = "he-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("he-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "he-")[1];
             text2 = "he-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("wa-"))
     {
         string text = Regex.Split(string_0, "wa-")[1];
         text = "wa-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("wa-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "wa-")[1];
             text2 = "wa-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("fa-"))
     {
         string text = Regex.Split(string_0, "fa-")[1];
         text = "fa-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("fa-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "fa-")[1];
             text2 = "fa-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
     if (string_0.Contains("cc-"))
     {
         string text = Regex.Split(string_0, "cc-")[1];
         text = "cc-" + text.Split(new char[]
         {
             '.'
         })[0];
         int num = RoomUser_0.GetClient().GetHabbo().Figure.IndexOf("cc-");
         if (num == -1)
         {
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure + text;
         }
         else
         {
             string text2 = Regex.Split(RoomUser_0.GetClient().GetHabbo().Figure, "cc-")[1];
             text2 = "cc-" + text2.Split(new char[]
             {
                 '.'
             })[0];
             RoomUser_0.GetClient().GetHabbo().Figure = RoomUser_0.GetClient().GetHabbo().Figure.Replace(text2, text);
         }
     }
 }
コード例 #2
0
 public void method_77(RoomUser RoomUser_1, RoomUser RoomUser_2)
 {
     if (RoomUser_1 != null && RoomUser_2 != null && (!RoomUser_1.IsBot || RoomUser_1.class34_0.Boolean_1) && (!RoomUser_2.IsBot || RoomUser_2.class34_0.Boolean_1) && !RoomUser_1.Boolean_3 && !RoomUser_2.Boolean_3 && !this.method_73(RoomUser_1) && !this.method_73(RoomUser_2))
     {
         this.list_2.Add(new Trade(RoomUser_1.GetClient().GetHabbo().Id, RoomUser_2.GetClient().GetHabbo().Id, this.Id));
     }
 }
コード例 #3
0
 private void method_42(RoomUser RoomUser_1, ThreeDCoord gstruct1_1, uint uint_2, double double_3)
 {
     ServerMessage Message = new ServerMessage();
     Message.Init(230u);
     Message.AppendInt32(RoomUser_1.int_3);
     Message.AppendInt32(RoomUser_1.int_4);
     Message.AppendInt32(gstruct1_1.x);
     Message.AppendInt32(gstruct1_1.y);
     Message.AppendInt32(0);
     Message.AppendUInt(uint_2);
     Message.AppendString("J");
     Message.AppendInt32(RoomUser_1.VirtualId);
     Message.AppendStringWithBreak(RoomUser_1.double_0.ToString().Replace(',', '.'));
     Message.AppendStringWithBreak(double_3.ToString().Replace(',', '.'));
     this.SendMessage(Message, null);
     this.byte_0[RoomUser_1.int_3, RoomUser_1.int_4] = 1;
     RoomUser_1.int_3 = gstruct1_1.x;
     RoomUser_1.int_4 = gstruct1_1.y;
     RoomUser_1.double_0 = double_3;
     RoomUser_1.int_12 = gstruct1_1.x;
     RoomUser_1.int_13 = gstruct1_1.y;
     RoomUser_1.double_1 = double_3;
     RoomUser_1.int_9 = 2;
     this.byte_0[RoomUser_1.int_3, RoomUser_1.int_4] = 0;
     this.method_87(RoomUser_1, false, true);
 }
コード例 #4
0
 public override void OnUserShout(RoomUser RoomUser_0, string string_0)
 {
 }
コード例 #5
0
 public void method_91(RoomItem RoomItem_0, RoomUser RoomUser_1)
 {
     RoomItem_0.ExtraData = "1";
     RoomItem_0.UpdateState(false, true);
     RoomItem_0.ReqUpdate(1);
     List<RoomItem> list = new List<RoomItem>();
     RoomUser_1.method_3(true);
     foreach (RoomItem @class in this.Hashtable_0.Values)
     {
         if (@class != RoomItem_0 && !(@class.GetBaseItem().InteractionType.ToLower() != "bb_teleport"))
         {
             list.Add(@class);
         }
     }
     if (list.Count > 0)
     {
         Random random = new Random((int)GoldTree.GetUnixTimestamp() * (int)RoomUser_1.uint_0);
         int index = random.Next(0, list.Count);
         list[index].ExtraData = "1";
         list[index].UpdateState(false, true);
         list[index].ReqUpdate(1);
         this.byte_0[RoomUser_1.int_3, RoomUser_1.int_4] = 1;
         this.byte_0[list[index].Int32_0, list[index].Int32_1] = 1;
         RoomUser_1.method_7(list[index].Int32_0, list[index].Int32_1, list[index].Double_0);
         RoomUser_1.UpdateNeeded = true;
     }
 }
コード例 #6
0
 public void method_14(RoomUser RoomUser_1)
 {
     try
     {
         foreach (RoomItem current in this.list_14)
         {
             if (current.GetBaseItem().InteractionType.ToLower() == "wf_trg_gamestart")
             {
                 this.method_21(RoomUser_1, current, "GameBegun");
             }
         }
     }
     catch
     {
     }
 }
コード例 #7
0
 public string method_20(RoomUser RoomUser_1, string string_10)
 {
     if (RoomUser_1 != null)
     {
         if (string_10.ToUpper().Contains("#USERNAME#"))
         {
             string_10 = Regex.Replace(string_10, "#USERNAME#", RoomUser_1.GetClient().GetHabbo().Username, RegexOptions.IgnoreCase);
         }
         if (string_10.ToUpper().Contains("#USERID#"))
         {
             string_10 = Regex.Replace(string_10, "#USERID#", RoomUser_1.GetClient().GetHabbo().Id.ToString(), RegexOptions.IgnoreCase);
         }
         if (string_10.ToUpper().Contains("#USERRANK#"))
         {
             string_10 = Regex.Replace(string_10, "#USERRANK#", RoomUser_1.GetClient().GetHabbo().Rank.ToString(), RegexOptions.IgnoreCase);
         }
     }
     if (string_10.ToUpper().Contains("#ROOMNAME#"))
     {
         string_10 = Regex.Replace(string_10, "#ROOMNAME#", this.Name, RegexOptions.IgnoreCase);
     }
     if (string_10.ToUpper().Contains("#ROOMID#"))
     {
         string_10 = Regex.Replace(string_10, "#ROOMID#", this.uint_0.ToString(), RegexOptions.IgnoreCase);
     }
     int num = GoldTree.GetGame().GetClientManager().ClientCount + -1;
     int int32_ = GoldTree.GetGame().GetRoomManager().LoadedRoomsCount;
     if (string_10.ToUpper().Contains("#ONLINECOUNT#"))
     {
         string_10 = Regex.Replace(string_10, "#ONLINECOUNT#", num.ToString(), RegexOptions.IgnoreCase);
     }
     if (string_10.ToUpper().Contains("#ROOMSLOADED#"))
     {
         string_10 = Regex.Replace(string_10, "#ROOMSLOADED#", int32_.ToString(), RegexOptions.IgnoreCase);
     }
     return string_10;
 }
コード例 #8
0
        public void method_87(RoomUser User, bool bool_13, bool bool_14)
        {
            int num = 0;
            try
            {
                if (User != null)
                {
                    num = 1;
                    if (User.isPet)
                    {
                        User.PetData.X = User.int_3;
                        User.PetData.Y = User.int_4;
                        User.PetData.Z = User.double_0;
                    }
                    else
                    {
                        if (User.IsBot)
                        {
                            User.class34_0.x = User.int_3;
                            User.class34_0.y = User.int_4;
                            User.class34_0.z = User.double_0;
                        }
                        else
                        {
                            if (User.class34_1 != null && User.RoomUser_0 != null)
                            {
                                return;
                            }
                        }
                    }
                    num = 2;
                    if (!User.bool_12)
                    {
                        User.UpdateNeeded = false;
                    }
                    else
                    {
                        num = 3;
                        if (bool_13)
                        {
                            num = 4;
                            if (User.byte_1 > 0)
                            {
                                num = 5;
                                if (User.IsBot)
                                {
                                    if (this.byte_1[User.int_3, User.int_4] == 0)
                                    {
                                        User.class34_0.EffectId = -1;
                                        User.byte_1 = 0;
                                    }
                                }
                                else
                                {
                                    num = 6;
                                    if ((User.GetClient().GetHabbo().Gender.ToLower() == "m" && this.byte_1[User.int_3, User.int_4] == 0) || (User.GetClient().GetHabbo().Gender.ToLower() == "f" && this.byte_2[User.int_3, User.int_4] == 0))
                                    {
                                        User.GetClient().GetHabbo().method_24().method_2(-1, true);
                                        User.byte_1 = 0;
                                    }
                                }
                            }
                            num = 7;
                            if (User.Statusses.ContainsKey("lay") || User.Statusses.ContainsKey("sit"))
                            {
                                User.Statusses.Remove("lay");
                                User.Statusses.Remove("sit");
                                User.UpdateNeeded = true;
                            }
                            List<RoomItem> list = this.method_93(User.int_3, User.int_4);
                            double num2 = this.method_84(User.int_3, User.int_4, list);
                            if (num2 != User.double_0)
                            {
                                User.double_0 = num2;
                                User.UpdateNeeded = true;
                            }
                            num = 8;
                            if (this.Class28_0.squareState[User.int_3, User.int_4] == SquareState.SEAT)
                            {
                                if (!User.Statusses.ContainsKey("sit"))
                                {
                                    User.Statusses.Add("sit", "1.0");
                                    if (User.byte_1 > 0)
                                    {
                                        if (!User.IsBot)
                                        {
                                            User.GetClient().GetHabbo().method_24().method_2(-1, true);
                                        }
                                        else
                                        {
                                            User.class34_0.EffectId = -1;
                                        }
                                        User.byte_1 = 0;
                                    }
                                }
                                num = 9;
                                User.double_0 = this.Class28_0.double_1[User.int_3, User.int_4];
                                User.int_7 = this.Class28_0.int_3[User.int_3, User.int_4];
                                User.int_8 = this.Class28_0.int_3[User.int_3, User.int_4];
                                if (User.IsBot && User.class34_0.RoomUser_0 != null)
                                {
                                    User.class34_0.RoomUser_0.double_0 = User.double_0 + 1.0;
                                    User.class34_0.RoomUser_0.int_7 = User.int_7;
                                    User.class34_0.RoomUser_0.int_8 = User.int_8;
                                }
                                User.UpdateNeeded = true;
                            }
                            if (list.Count < 1 && this.list_4.Contains(User.uint_0))
                            {
                                User.GetClient().GetHabbo().method_24().method_2(-1, false);
                                this.list_4.Remove(User.uint_0);
                                User.int_14 = 0;
                                User.UpdateNeeded = true;
                            }
                            num = 10;
                            lock (list)
                            {
                                foreach (RoomItem Item in list)
                                {
                                    num = 11;
                                    if (Item.GetBaseItem().IsSeat && (!User.isPet || User.class34_0.RoomUser_0 == null))
                                    {
                                        if (!User.Statusses.ContainsKey("sit"))
                                        {
                                            double num3;
                                            try
                                            {
                                                if (Item.GetBaseItem().Height_Adjustable.Count > 1)
                                                {
                                                    num3 = Item.GetBaseItem().Height_Adjustable[(int)Convert.ToInt16(Item.ExtraData)];
                                                }
                                                else
                                                {
                                                    num3 = Item.GetBaseItem().Height;
                                                }
                                                goto IL_BCA;
                                            }
                                            catch
                                            {
                                                num3 = Item.GetBaseItem().Height;
                                                goto IL_BCA;
                                            }
                                        IL_51B:
                                            if (User.byte_1 > 0)
                                            {
                                                if (!User.IsBot)
                                                {
                                                    User.GetClient().GetHabbo().method_24().method_2(-1, true);
                                                }
                                                else
                                                {
                                                    User.class34_0.EffectId = -1;
                                                }
                                                User.byte_1 = 0;
                                                goto IL_55D;
                                            }
                                            goto IL_55D;
                                        IL_BCA:
                                            if (User.Statusses.ContainsKey("sit"))
                                            {
                                                goto IL_51B;
                                            }
                                            User.Statusses.Add("sit", num3.ToString().Replace(',', '.'));
                                            goto IL_51B;
                                        }
                                    IL_55D:
                                        User.double_0 = Item.Double_0;
                                        User.int_7 = Item.int_3;
                                        User.int_8 = Item.int_3;
                                        if (User.IsBot && User.class34_0.RoomUser_0 != null)
                                        {
                                            User.class34_0.RoomUser_0.double_0 = User.double_0 + 1.0;
                                            User.class34_0.RoomUser_0.int_7 = User.int_7;
                                            User.class34_0.RoomUser_0.int_8 = User.int_8;
                                        }
                                        User.UpdateNeeded = true;
                                    }
                                    num = 12;
                                    if (Item.GetBaseItem().InteractionType.ToLower() == "bed")
                                    {
                                        if (!User.Statusses.ContainsKey("lay"))
                                        {
                                            double num3;
                                            try
                                            {
                                                if (Item.GetBaseItem().Height_Adjustable.Count > 1)
                                                {
                                                    num3 = Item.GetBaseItem().Height_Adjustable[(int)Convert.ToInt16(Item.ExtraData)];
                                                }
                                                else
                                                {
                                                    num3 = Item.GetBaseItem().Height;
                                                }
                                            }
                                            catch
                                            {
                                                //num3 = ;
                                            }
                                            if (!User.Statusses.ContainsKey("lay"))
                                            {
                                                User.Statusses.Add("lay", Item.GetBaseItem().Height.ToString().Replace(',', '.') + " null");
                                            }
                                            if (User.byte_1 > 0)
                                            {
                                                if (!User.IsBot)
                                                {
                                                    User.GetClient().GetHabbo().method_24().method_2(-1, true);
                                                }
                                                else
                                                {
                                                    User.class34_0.EffectId = -1;
                                                }
                                                User.byte_1 = 0;
                                            }
                                        }
                                        User.double_0 = Item.Double_0;
                                        User.int_7 = Item.int_3;
                                        User.int_8 = Item.int_3;
                                        if (User.IsBot && User.class34_0.RoomUser_0 != null)
                                        {
                                            User.class34_0.RoomUser_0.double_0 = User.double_0 + 1.0;
                                            User.class34_0.RoomUser_0.int_7 = User.int_7;
                                            User.class34_0.RoomUser_0.int_8 = User.int_8;
                                        }
                                        User.UpdateNeeded = true;
                                    }

                                    if (!User.IsBot && !User.isPet)
                                    {
                                        if (User.team != Team.None)
                                        {
                                            if (Item.method_8().frzTimer == true)
                                            {
                                                if (Item.GetBaseItem().Name == "es_box")
                                                {
                                                    if (Item.freezePowerUp != FreezePowerUp.None)
                                                    {
                                                        this.GetFreeze().PickUpPowerUp(Item, User);
                                                    }
                                                }
                                            }
                                        }
                                    }

                                    TeamManager roomTeamManager;
                                    roomTeamManager = Item.method_8().GetRoomTeamManager();

                                    if (!User.IsBot && !User.isPet && (Item.GetBaseItem().InteractionType.ToLower() == "freeze_blue_gate" || Item.GetBaseItem().InteractionType.ToLower() == "freeze_red_gate" || Item.GetBaseItem().InteractionType.ToLower() == "freeze_green_gate" || Item.GetBaseItem().InteractionType.ToLower() == "freeze_yellow_gate"))
                                    {
                                        if (roomTeamManager.CanEnterOnTeam(Item.team))
                                        {
                                            if (User.team == Team.None)
                                            {
                                                User.game = Rooms.Games.Game.Freeze;
                                                User.team = Item.team;
                                                roomTeamManager.AddUser(User);
                                                int FreezeEffect = ((int)Item.team) + 39;
                                                if (User.GetClient().GetHabbo().method_24().int_0 != FreezeEffect)
                                                {
                                                    User.GetClient().GetHabbo().method_24().method_2(FreezeEffect, true);
                                                }
                                            }
                                            else
                                            {
                                                roomTeamManager.OnUserLeave(User);
                                                User.GetClient().GetHabbo().method_24().method_2(0, true);
                                            }
                                        }
                                    }

                                    /*if (!User.IsBot && (Item.GetBaseItem().InteractionType.ToLower() == "bb_blue_gate" || Item.GetBaseItem().InteractionType.ToLower() == "bb_red_gate" || Item.GetBaseItem().InteractionType.ToLower() == "bb_green_gate" || Item.GetBaseItem().InteractionType.ToLower() == "bb_yellow_gate"))
                                    {
                                        if (teamManagerForBanzai.CanEnterOnTeam(Item.team))
                                        {
                                            if (User.team != Team.None)
                                            {
                                                teamManagerForBanzai.OnUserLeave(User);
                                                teamManagerForFreeze.OnUserLeave(User);
                                            }
                                            User.team = Item.team;
                                            teamManagerForBanzai.AddUser(User);
                                            int BanzaiEffect = ((int)Item.team) + 32;
                                            if (User.GetClient().GetHabbo().method_24().int_0 != BanzaiEffect)
                                            {
                                                User.GetClient().GetHabbo().method_24().method_2(BanzaiEffect, true);
                                            }
                                        }
                                    }*/

                                    /*if (Item.GetBaseItem().Name == "es_gate_r" && Item.method_8().frzTimer == false)
                                    {
                                        #region es_gate_r
                                        User.GetClient().GetHabbo().method_24().method_2(40, true);
                                        User.GetClient().GetHabbo().frzTeam = 1;
                                        User.GetClient().GetHabbo().frzRange = 3;
                                        User.GetClient().GetHabbo().frzLives = 3;
                                        User.GetClient().GetHabbo().frzBalls = 1;
                                        User.GetClient().GetHabbo().frzBall = 0;
                                        #endregion
                                    }

                                    if (Item.GetBaseItem().Name == "es_gate_g" && Item.method_8().frzTimer == false)
                                    {
                                        #region es_gate_g
                                        User.GetClient().GetHabbo().method_24().method_2(41, true);
                                        User.GetClient().GetHabbo().frzTeam = 2;
                                        User.GetClient().GetHabbo().frzRange = 3;
                                        User.GetClient().GetHabbo().frzLives = 3;
                                        User.GetClient().GetHabbo().frzBalls = 1;
                                        User.GetClient().GetHabbo().frzBall = 0;
                                        #endregion
                                    }

                                    if (Item.GetBaseItem().Name == "es_gate_b" && Item.method_8().frzTimer == false)
                                    {
                                        #region es_gate_b
                                        User.GetClient().GetHabbo().method_24().method_2(42, true);
                                        User.GetClient().GetHabbo().frzTeam = 3;
                                        User.GetClient().GetHabbo().frzRange = 3;
                                        User.GetClient().GetHabbo().frzLives = 3;
                                        User.GetClient().GetHabbo().frzBalls = 1;
                                        User.GetClient().GetHabbo().frzBall = 0;
                                        #endregion
                                    }

                                    if (Item.GetBaseItem().Name == "es_gate_y" && Item.method_8().frzTimer == false)
                                    {
                                        #region es_gate_y
                                        User.GetClient().GetHabbo().method_24().method_2(43, true);
                                        User.GetClient().GetHabbo().frzTeam = 4;
                                        User.GetClient().GetHabbo().frzRange = 3;
                                        User.GetClient().GetHabbo().frzLives = 3;
                                        User.GetClient().GetHabbo().frzBalls = 1;
                                        User.GetClient().GetHabbo().frzBall = 0;
                                        #endregion
                                    }*/

                                    num = 13;
                                    if (Item.GetBaseItem().InteractionType.ToLower().IndexOf("bb_") > -1 && !User.IsBot && !User.isPet)
                                    {
                                        if (Item.GetBaseItem().InteractionType.ToLower().IndexOf("_gate") > -1)
                                        {
                                            if (Item.GetBaseItem().InteractionType.ToLower() == "bb_yellow_gate" || Item.GetBaseItem().InteractionType.ToLower() == "bb_red_gate" || Item.GetBaseItem().InteractionType.ToLower() == "bb_green_gate" || Item.GetBaseItem().InteractionType.ToLower() == "bb_blue_gate")
                                            {
                                                if (roomTeamManager.CanEnterOnTeam(Item.team))
                                                {
                                                    if (User.team == Team.None)
                                                    {
                                                        User.game = Rooms.Games.Game.BattleBanzai;
                                                        User.team = Item.team;
                                                        roomTeamManager.AddUser(User);
                                                        int FreezeEffect = ((int)Item.team) + 32;
                                                        if (User.GetClient().GetHabbo().method_24().int_0 != FreezeEffect)
                                                        {
                                                            User.GetClient().GetHabbo().method_24().method_2(FreezeEffect, true);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        roomTeamManager.OnUserLeave(User);
                                                        User.GetClient().GetHabbo().method_24().method_2(0, true);
                                                    }
                                                }
                                            }
                                        }

                                        if (Item.GetBaseItem().InteractionType.ToLower() == "bb_teleport")
                                        {
                                            this.method_91(Item, User);
                                        }
                                        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")
                                        {
                                            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);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }

                                            }
                                            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();
                                            }

                                            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);
                                            Item.UpdateState(true, true);
                                        }
                                    }
                                }
                                goto IL_1155;
                            }
                        }
                        num = 14;
                        List<RoomItem> list2 = this.method_93(User.int_12, User.int_13);
                        lock (list2)
                        {
                            foreach (RoomItem current in list2)
                            {
                                if (this.double_0[current.Int32_0, current.Int32_1] <= current.Double_0)
                                {
                                    if (bool_14)
                                    {
                                        this.method_11(User, current);
                                    }
                                    if (current.GetBaseItem().InteractionType.ToLower() == "pressure_pad")
                                    {
                                        current.ExtraData = "1";
                                        current.UpdateState(false, true);
                                    }
                                    num = 15;
                                    if (current.GetBaseItem().InteractionType.ToLower() == "fbgate" && (!string.IsNullOrEmpty(current.string_2) || !string.IsNullOrEmpty(current.string_3)) && User != null && !User.IsBot)
                                    {
                                        if (User.string_0 != "")
                                        {
                                            User.GetClient().GetHabbo().Figure = User.string_0;
                                            User.string_0 = "";
                                            ServerMessage Message = new ServerMessage(266u);
                                            Message.AppendInt32(User.VirtualId);
                                            Message.AppendStringWithBreak(User.GetClient().GetHabbo().Figure);
                                            Message.AppendStringWithBreak(User.GetClient().GetHabbo().Gender.ToLower());
                                            Message.AppendStringWithBreak(User.GetClient().GetHabbo().Motto);
                                            Message.AppendInt32(User.GetClient().GetHabbo().AchievementScore);
                                            Message.AppendStringWithBreak("");
                                            this.SendMessage(Message, null);
                                        }
                                        else
                                        {
                                            string a = User.GetClient().GetHabbo().Gender;
                                            User.string_0 = User.GetClient().GetHabbo().Figure;
                                            if (a == "m")
                                            {
                                                AntiMutant.smethod_1(User, current.string_2);
                                            }
                                            else
                                            {
                                                AntiMutant.smethod_1(User, current.string_3);
                                            }
                                            ServerMessage Message = new ServerMessage(266u);
                                            Message.AppendInt32(User.VirtualId);
                                            Message.AppendStringWithBreak(User.GetClient().GetHabbo().Figure);
                                            Message.AppendStringWithBreak(User.GetClient().GetHabbo().Gender.ToLower());
                                            Message.AppendStringWithBreak(User.GetClient().GetHabbo().Motto);
                                            Message.AppendInt32(User.GetClient().GetHabbo().AchievementScore);
                                            Message.AppendStringWithBreak("");
                                            this.SendMessage(Message, null);
                                        }
                                    }
                                    num = 16;
                                    if (current.GetBaseItem().InteractionType.ToLower() == "ball")
                                    {
                                        int num6 = current.Int32_0;
                                        int num7 = current.Int32_1;
                                        current.ExtraData = "11";
                                        current.LastPlayerHitFootball = User.GetClient().GetHabbo().Username;
                                        if (User.int_8 == 4)
                                        {
                                            num7++;
                                            if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                            {
                                                this.method_79(null, current, num6, num7 - 2, 0, false, true, true);
                                            }
                                        }
                                        else
                                        {
                                            if (User.int_8 == 0)
                                            {
                                                num7--;
                                                if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                {
                                                    this.method_79(null, current, num6, num7 + 2, 0, false, true, true);
                                                }
                                            }
                                            else
                                            {
                                                if (User.int_8 == 6)
                                                {
                                                    num6--;
                                                    if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                    {
                                                        this.method_79(null, current, num6 + 2, num7, 0, false, true, true);
                                                    }
                                                }
                                                else
                                                {
                                                    if (User.int_8 == 2)
                                                    {
                                                        num6++;
                                                        if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                        {
                                                            this.method_79(null, current, num6 - 2, num7, 0, false, true, true);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (User.int_8 == 3)
                                                        {
                                                            num6++;
                                                            num7++;
                                                            if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                            {
                                                                this.method_79(null, current, num6 - 2, num7 - 2, 0, false, true, true);
                                                            }
                                                        }
                                                        else
                                                        {
                                                            if (User.int_8 == 1)
                                                            {
                                                                num6++;
                                                                num7--;
                                                                if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                                {
                                                                    this.method_79(null, current, num6 - 2, num7 + 2, 0, false, true, true);
                                                                }
                                                            }
                                                            else
                                                            {
                                                                if (User.int_8 == 7)
                                                                {
                                                                    num6--;
                                                                    num7--;
                                                                    if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                                    {
                                                                        this.method_79(null, current, num6 + 2, num7 + 2, 0, false, true, true);
                                                                    }
                                                                }
                                                                else
                                                                {
                                                                    if (User.int_8 == 5)
                                                                    {
                                                                        num6--;
                                                                        num7++;
                                                                        if (!this.method_79(null, current, num6, num7, 0, false, true, false))
                                                                        {
                                                                            this.method_79(null, current, num6 + 2, num7 - 2, 0, false, true, true);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    IL_1155: ;
                    }
                }
            }
            catch (Exception ex)
            {
                Logging.LogThreadException(ex.ToString(), string.Concat(new object[]
                {
                    "Room [ID: ",
                    this.Id,
                    "] [Part: ",
                    num,
                    "] Update User Status"
                }));
                this.method_34();
            }
        }
コード例 #9
0
 public RoomUser(uint UserId, uint RoomId, int VirtualId, bool Invisible)
 {
     this.bool_5 = false;
     this.uint_0 = UserId;
     this.uint_1 = RoomId;
     this.VirtualId = VirtualId;
     this.int_1 = 0;
     this.int_3 = 0;
     this.int_4 = 0;
     this.double_0 = 0.0;
     this.int_7 = 0;
     this.int_8 = 0;
     this.UpdateNeeded = true;
     this.Statusses = new Dictionary<string, string>();
     this.int_16 = 0;
     this.int_19 = -1;
     this.RoomUser_0 = null;
     this.bool_1 = false;
     this.bool_0 = true;
     this.bool_11 = false;
     this.byte_0 = 3;
     this.int_2 = 0;
     this.int_20 = 0;
     this.byte_1 = 0;
     this.bool_12 = Invisible;
     this.string_0 = "";
 }
コード例 #10
0
        public void method_19(RoomUser RoomUser_1, string string_10, string string_11, uint Item)
        {
            string_11 = this.method_20(RoomUser_1, string_11);
            if (string_10 != null)
            {
                if (MusCommands.dictionary_5 == null)
                {
                    MusCommands.dictionary_5 = new Dictionary<string, int>(13)
                    {

                        {
                            "sql",
                            0
                        },

                        {
                            "badge",
                            1
                        },

                        {
                            "effect",
                            2
                        },

                        {
                            "award",
                            3
                        },

                        {
                            "dance",
                            4
                        },

                        {
                            "send",
                            5
                        },

                        {
                            "credits",
                            6
                        },

                        {
                            "pixels",
                            7
                        },

                        {
                            "points",
                            8
                        },

                        {
                            "rank",
                            9
                        },

                        {
                            "respect",
                            10
                        },

                        {
                            "handitem",
                            11
                        },

                        {
                            "alert",
                            12
                        },

                        {
                            "wiredactived",
                            13
                        }
                    };
                }
                int num;
                if (MusCommands.dictionary_5.TryGetValue(string_10, out num))
                {
                    switch (num)
                    {
                        case 0:
                            using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                            {
                                @class.ExecuteQuery(string_11);
                                return;
                            }
                        case 1:
                            break;
                        case 2:
                            if (RoomUser_1.GetClient() != null)
                            {
                                RoomUser_1.GetClient().GetHabbo().method_24().method_0(Convert.ToInt32(string_11), 3600);
                                RoomUser_1.GetClient().GetHabbo().method_24().method_3(Convert.ToInt32(string_11));
                                return;
                            }
                            return;
                        case 3:
                            if (RoomUser_1.GetClient() != null)
                            {
                                GoldTree.GetGame().GetAchievementManager().addAchievement(RoomUser_1.GetClient(), Convert.ToUInt32(string_11));
                                return;
                            }
                            return;
                        case 4:
                            if (RoomUser_1.GetClient() != null)
                            {
                                RoomUser class2 = this.GetRoomUserByHabbo(RoomUser_1.GetClient().GetHabbo().Id);
                                class2.DanceId = Convert.ToInt32(string_11);
                                ServerMessage Message = new ServerMessage(480u);
                                Message.AppendInt32(class2.VirtualId);
                                Message.AppendInt32(Convert.ToInt32(string_11));
                                this.SendMessage(Message, null);
                                return;
                            }
                            return;
                        case 5:
                            {
                                if (RoomUser_1.GetClient() == null)
                                {
                                    return;
                                }
                                uint num2 = Convert.ToUInt32(string_11);
                                Room class3;
                                if (GoldTree.GetGame().GetRoomManager().method_13(num2) || GoldTree.GetGame().GetRoomManager().method_14(num2))
                                {
                                    class3 = GoldTree.GetGame().GetRoomManager().GetRoom(num2);
                                }
                                else
                                {
                                    class3 = GoldTree.GetGame().GetRoomManager().method_15(num2);
                                }
                                if (RoomUser_1 == null)
                                {
                                    return;
                                }
                                if (class3 == null)
                                {
                                    this.method_47(RoomUser_1.GetClient(), true, false);
                                    return;
                                }
                                ServerMessage Message2 = new ServerMessage(286u);
                                Message2.AppendBoolean(class3.Boolean_3);
                                Message2.AppendUInt(Convert.ToUInt32(string_11));
                                RoomUser_1.GetClient().SendMessage(Message2);
                                return;
                            }
                        case 6:
                            if (RoomUser_1.GetClient() != null)
                            {
                                RoomUser_1.GetClient().GetHabbo().Credits = RoomUser_1.GetClient().GetHabbo().Credits + Convert.ToInt32(string_11);
                                RoomUser_1.GetClient().GetHabbo().method_13(true);
                                return;
                            }
                            return;
                        case 7:
                            if (RoomUser_1.GetClient() != null)
                            {
                                RoomUser_1.GetClient().GetHabbo().ActivityPoints = RoomUser_1.GetClient().GetHabbo().ActivityPoints + Convert.ToInt32(string_11);
                                RoomUser_1.GetClient().GetHabbo().method_15(true);
                                return;
                            }
                            return;
                        case 8:
                            if (RoomUser_1.GetClient() != null)
                            {
                                RoomUser_1.GetClient().GetHabbo().VipPoints = RoomUser_1.GetClient().GetHabbo().VipPoints + Convert.ToInt32(string_11);
                                RoomUser_1.GetClient().GetHabbo().method_14(false, true);
                                return;
                            }
                            return;
                        case 9:
                            if (RoomUser_1.GetClient() != null && (int)Convert.ToUInt16(string_11) < GoldTree.GetGame().GetRoleManager().method_9())
                            {
                                using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                                {
                                    @class.ExecuteQuery(string.Concat(new object[]
                                {
                                    "UPDATE users SET rank = '",
                                    Convert.ToUInt16(string_11),
                                    "' WHERE Id = ",
                                    RoomUser_1.GetClient().GetHabbo().Id,
                                    " LIMIT 1;"
                                }));
                                }
                                RoomUser_1.GetClient().method_12();
                                return;
                            }
                            return;
                        case 10:
                            {
                                if (RoomUser_1.GetClient() == null)
                                {
                                    return;
                                }
                                RoomUser_1.GetClient().GetHabbo().Respect++;
                                using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                                {
                                    @class.ExecuteQuery("UPDATE user_stats SET Respect = respect + 1 WHERE Id = '" + RoomUser_1.GetClient().GetHabbo().Id + "' LIMIT 1");
                                }
                                ServerMessage Message3 = new ServerMessage(440u);
                                Message3.AppendUInt(RoomUser_1.GetClient().GetHabbo().Id);
                                Message3.AppendInt32(RoomUser_1.GetClient().GetHabbo().Respect);
                                this.SendMessage(Message3, null);
                                RoomUser_1.GetClient().GetHabbo().CheckRespectReceivedAchievements();
                                return;
                            }
                        case 11:
                            if (RoomUser_1.GetClient() != null)
                            {
                                this.GetRoomUserByHabbo(RoomUser_1.GetClient().GetHabbo().Id).CarryItem((int)Convert.ToInt16(string_11));
                                return;
                            }
                            return;
                        case 12:
                            if (RoomUser_1.GetClient() != null)
                            {
                                RoomUser_1.GetClient().SendNotif(string_11);
                                return;
                            }
                            return;
                        case 13:
                            if (RoomUser_1.GetClient() != null)
                            {
                                using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                                {
                                    @class.AddParamWithValue("itemid", Convert.ToInt32(Item));
                                    @class.AddParamWithValue("userid", RoomUser_1.GetClient().GetHabbo().Id);

                                    DataRow dataRow2 = @class.ReadDataRow("SELECT wiredid FROM user_wiredactived WHERE wiredid = @itemid AND userid = @userid");
                                    if (dataRow2 == null)
                                    {
                                        @class.ExecuteQuery("INSERT INTO user_wiredactived (wiredid, userid) VALUES (@itemid, @userid)");
                                    }
                                }
                                return;
                            }
                            return;
                        default:
                            return;
                    }
                    if (RoomUser_1.GetClient() != null)
                    {
                        RoomUser_1.GetClient().GetHabbo().method_22().method_2(RoomUser_1.GetClient(), GoldTree.FilterString(string_11), true);
                        RoomUser_1.GetClient().SendMessage(RoomUser_1.GetClient().GetHabbo().method_22().method_7());
                    }
                }
            }
        }
コード例 #11
0
ファイル: BotAI.cs プロジェクト: ArneVanDaele/GoldenTreeEMU
 public abstract void OnUserShout(RoomUser User, string Message);
コード例 #12
0
ファイル: BotAI.cs プロジェクト: ArneVanDaele/GoldenTreeEMU
 public abstract void OnUserEnterRoom(RoomUser User);
コード例 #13
0
ファイル: PetBot.cs プロジェクト: ArneVanDaele/GoldenTreeEMU
 public override void OnUserSay(RoomUser RoomUser_0, string string_0)
 {
     RoomUser @class = base.GetRoomUser();
     if (@class.class34_0.RoomUser_0 == null)
     {
         if (string_0.ToLower().Equals(@class.PetData.Name.ToLower()))
         {
             @class.method_9(Class107.smethod_0(@class.int_3, @class.int_4, RoomUser_0.int_3, RoomUser_0.int_4));
         }
         else
         {
             if (string_0.ToLower().StartsWith(@class.PetData.Name.ToLower() + " ") && RoomUser_0.GetClient().GetHabbo().Username.ToLower() == base.GetRoomUser().PetData.OwnerName.ToLower())
             {
                 string key = string_0.Substring(@class.PetData.Name.ToLower().Length + 1);
                 if ((@class.PetData.Energy >= 10 && this.method_4() < 6) || @class.PetData.Level >= 15)
                 {
                     @class.Statusses.Clear();
                     if (!GoldTree.GetGame().GetRoleManager().dictionary_5.ContainsKey(key))
                     {
                         string[] array = new string[]
                         {
                             GoldTreeEnvironment.smethod_1("pet_response_confused1"),
                             GoldTreeEnvironment.smethod_1("pet_response_confused2"),
                             GoldTreeEnvironment.smethod_1("pet_response_confused3"),
                             GoldTreeEnvironment.smethod_1("pet_response_confused4"),
                             GoldTreeEnvironment.smethod_1("pet_response_confused5"),
                             GoldTreeEnvironment.smethod_1("pet_response_confused6"),
                             GoldTreeEnvironment.smethod_1("pet_response_confused7")
                         };
                         Random random = new Random();
                         @class.method_1(null, array[random.Next(0, array.Length - 1)], false);
                     }
                     else
                     {
                         switch (GoldTree.GetGame().GetRoleManager().dictionary_5[key])
                         {
                         case 1:
                             @class.PetData.AddExpirience(10, -25);
                             @class.method_1(null, GoldTreeEnvironment.smethod_1("pet_response_sleep"), false);
                             @class.Statusses.Add("lay", @class.double_0.ToString());
                             break;
                         case 2:
                             this.method_5(0, 0, true);
                             @class.PetData.AddExpirience(5, 5);
                             break;
                         case 3:
                             @class.PetData.AddExpirience(5, 5);
                             @class.Statusses.Add("sit", @class.double_0.ToString());
                             break;
                         case 4:
                             @class.PetData.AddExpirience(5, 5);
                             @class.Statusses.Add("lay", @class.double_0.ToString());
                             break;
                         case 5:
                             @class.PetData.AddExpirience(10, 10);
                             this.int_3 = 60;
                             break;
                         case 6:
                         {
                             int int_ = RoomUser_0.int_3;
                             int int_2 = RoomUser_0.int_4;
                             if (RoomUser_0.int_8 == 4)
                             {
                                 int_2 = RoomUser_0.int_4 + 1;
                             }
                             else
                             {
                                 if (RoomUser_0.int_8 == 0)
                                 {
                                     int_2 = RoomUser_0.int_4 - 1;
                                 }
                                 else
                                 {
                                     if (RoomUser_0.int_8 == 6)
                                     {
                                         int_ = RoomUser_0.int_3 - 1;
                                     }
                                     else
                                     {
                                         if (RoomUser_0.int_8 == 2)
                                         {
                                             int_ = RoomUser_0.int_3 + 1;
                                         }
                                         else
                                         {
                                             if (RoomUser_0.int_8 == 3)
                                             {
                                                 int_ = RoomUser_0.int_3 + 1;
                                                 int_2 = RoomUser_0.int_4 + 1;
                                             }
                                             else
                                             {
                                                 if (RoomUser_0.int_8 == 1)
                                                 {
                                                     int_ = RoomUser_0.int_3 + 1;
                                                     int_2 = RoomUser_0.int_4 - 1;
                                                 }
                                                 else
                                                 {
                                                     if (RoomUser_0.int_8 == 7)
                                                     {
                                                         int_ = RoomUser_0.int_3 - 1;
                                                         int_2 = RoomUser_0.int_4 - 1;
                                                     }
                                                     else
                                                     {
                                                         if (RoomUser_0.int_8 == 5)
                                                         {
                                                             int_ = RoomUser_0.int_3 - 1;
                                                             int_2 = RoomUser_0.int_4 + 1;
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                             @class.PetData.AddExpirience(15, 15);
                             this.method_5(int_, int_2, false);
                             break;
                         }
                         case 7:
                             @class.PetData.AddExpirience(20, 20);
                             @class.Statusses.Add("ded", @class.double_0.ToString());
                             break;
                         case 8:
                             @class.PetData.AddExpirience(10, 10);
                             @class.Statusses.Add("beg", @class.double_0.ToString());
                             break;
                         case 9:
                             @class.PetData.AddExpirience(15, 15);
                             @class.Statusses.Add("jmp", @class.double_0.ToString());
                             break;
                         case 10:
                             @class.PetData.AddExpirience(25, 25);
                             @class.method_1(null, GoldTreeEnvironment.smethod_1("pet_response_silent"), false);
                             this.int_2 = 120;
                             break;
                         case 11:
                             @class.PetData.AddExpirience(15, 15);
                             this.int_2 = 2;
                             break;
                         }
                     }
                 }
                 else
                 {
                     string[] array2 = new string[]
                     {
                         GoldTreeEnvironment.smethod_1("pet_response_sleeping1"),
                         GoldTreeEnvironment.smethod_1("pet_response_sleeping2"),
                         GoldTreeEnvironment.smethod_1("pet_response_sleeping3"),
                         GoldTreeEnvironment.smethod_1("pet_response_sleeping4"),
                         GoldTreeEnvironment.smethod_1("pet_response_sleeping5")
                     };
                     string[] array3 = new string[]
                     {
                         GoldTreeEnvironment.smethod_1("pet_response_refusal1"),
                         GoldTreeEnvironment.smethod_1("pet_response_refusal2"),
                         GoldTreeEnvironment.smethod_1("pet_response_refusal3"),
                         GoldTreeEnvironment.smethod_1("pet_response_refusal4"),
                         GoldTreeEnvironment.smethod_1("pet_response_refusal5")
                     };
                     @class.int_10 = @class.int_12;
                     @class.int_11 = @class.int_13;
                     @class.Statusses.Clear();
                     if (@class.PetData.Energy < 10)
                     {
                         Random random2 = new Random();
                         @class.method_1(null, array2[random2.Next(0, array2.Length - 1)], false);
                         if (@class.PetData.Type != 13u)
                         {
                             @class.Statusses.Add("lay", @class.double_0.ToString());
                         }
                         else
                         {
                             @class.Statusses.Add("lay", (@class.double_0 - 1.0).ToString());
                         }
                         this.int_2 = 25;
                         this.int_3 = 20;
                         base.GetRoomUser().PetData.PetEnergy(-25);
                     }
                     else
                     {
                         Random random2 = new Random();
                         @class.method_1(null, array3[random2.Next(0, array3.Length - 1)], false);
                     }
                 }
                 @class.UpdateNeeded = true;
             }
         }
     }
 }
コード例 #14
0
 public void method_85(RoomUser RoomUser_1)
 {
     List<RoomItem> list = this.method_93(RoomUser_1.int_3, RoomUser_1.int_4);
     foreach (RoomItem current in list)
     {
         this.method_12(RoomUser_1, current);
         if (current.GetBaseItem().InteractionType.ToLower() == "pressure_pad")
         {
             current.ExtraData = "0";
             current.UpdateState(false, true);
         }
     }
     this.byte_0[RoomUser_1.int_3, RoomUser_1.int_4] = 1;
 }
コード例 #15
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 (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.Int32_0, 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++;
                                                        break;
                                                    }
                                                }
                                                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++;
                                                        break;
                                                    }
                                                }
                                                else
                                                    continue;
                                            }
                                            num4 = num2;
                                            num++;
                                            current2.ExtraData = "1";
                                            current2.UpdateState(false, true);
                                            current2.ReqUpdate(1);
                                            current2.method_10();
                                            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.Int32_0, 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.method_10();
                                        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.Int32_0, 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.method_10();
                                        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.int_3 == current4.Int32_0 && RoomUser_1.int_4 == current4.Int32_1 && num4 + 1 != num2)
                                                    {
                                                        num2++;
                                                        break;
                                                    }
                                                    foreach (AffectedTile current5 in dictionary.Values)
                                                    {
                                                        if (RoomUser_1.int_3 == current5.Int32_0 && RoomUser_1.int_4 == 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.RoomUser_0;
                                        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
                    {
                    }
                    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.Int32_0, 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.RoomUser_0;
                                            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_saymsg":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    if (current2.string_2.Length > 0)
                                    {
                                        string text2 = current2.string_2;
                                        text2 = ChatCommandHandler.smethod_4(text2);
                                        if (text2.Length > 100)
                                        {
                                            text2 = text2.Substring(0, 100);
                                        }
                                        if (RoomUser_1 != null)
                                        {
                                            if (!RoomUser_1.IsBot)
                                            {
                                                RoomUser_1.GetClient().GetHabbo().method_28(text2);
                                            }
                                        }
                                        else
                                        {
                                            RoomUser[] array = this.RoomUser_0;
                                            for (int i = 0; i < array.Length; i++)
                                            {
                                                RoomUser class2 = array[i];
                                                if (class2 != null && !class2.IsBot)
                                                {
                                                    class2.GetClient().GetHabbo().method_28(text2);
                                                }
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_moveuser":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    current2.method_10();
                                    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.int_3, RoomUser_1.int_4] = 1;
                                                this.byte_0[RoomUser_1.int_12, RoomUser_1.int_13] = 1;
                                                this.byte_0[class3.Int32_0, class3.Int32_1] = 1;
                                                RoomUser_1.bool_6 = false;
                                                RoomUser_1.int_12 = class3.Int32_0;
                                                RoomUser_1.int_13 = class3.Int32_1;
                                                RoomUser_1.double_1 = class3.Double_0;
                                                RoomUser_1.method_7(class3.Int32_0, 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.RoomUser_0;
                                                for (int i = 0; i < array.Length; i++)
                                                {
                                                    RoomUser class2 = array[i];
                                                    if (class2 != null)
                                                    {
                                                        this.byte_0[class2.int_3, class2.int_4] = 1;
                                                        this.byte_0[class3.Int32_0, class3.Int32_1] = 1;
                                                        class2.method_7(class3.Int32_0, class3.Int32_1, class3.Double_0);
                                                        class2.UpdateNeeded = true;
                                                        if (!current2.dictionary_1.ContainsKey(class2))
                                                        {
                                                            current2.dictionary_1.Add(class2, 10);
                                                        }
                                                    }
                                                }
                                            }
                                            flag2 = true;
                                        }
                                    }
                                    break;
                                case "wf_act_togglefurni":
                                    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)
                                            {
                                                class3.Class69_0.OnTrigger(null, class3, 0, true);
                                            }
                                            else
                                            {
                                                list2.Remove(current);
                                            }
                                        }
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_kick_user":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    GameClient GetPlayerSession = GoldTree.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")))
                                        {
                                            class2.method_47(GetPlayerSession, true, false);
                                            if (current2.string_2.Length > 0)
                                            {
                                                GetPlayerSession.SendNotif(current2.string_2);
                                            }
                                            else
                                            {
                                                GetPlayerSession.SendNotif("Wired: Potki käyttäjä wired-tavara on potkinut sinut huoneesta!");
                                            }
                                        }
                                        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 = 12;
                                        }
                                        else if (RoomUser_1.team == Team.Red)
                                        {
                                            team = 3;
                                        }
                                        else if (RoomUser_1.team == Team.Green)
                                        {
                                            team = 6;
                                        }
                                        else if (RoomUser_1.team == Team.Blue)
                                        {
                                            team = 9;
                                        }
                                        this.method_88(team, Convert.ToInt32(current2.string_2), current2);
                                        flag2 = true;
                                    }
                                    break;
                                case "wf_act_moverotate":
                                    current2.ExtraData = "1";
                                    current2.UpdateState(false, true);
                                    current2.ReqUpdate(1);
                                    current2.method_9();
                                    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.method_1(4);
                                                    }
                                                    else
                                                    {
                                                        if (current2.string_2 == "5" || num5 == 2 || num6 == 1)
                                                        {
                                                            gstruct1_ = class3.method_1(6);
                                                        }
                                                        else
                                                        {
                                                            if (current2.string_2 == "6" || num5 == 3 || num7 == 2)
                                                            {
                                                                gstruct1_ = class3.method_1(0);
                                                            }
                                                            else
                                                            {
                                                                if (current2.string_2 == "7" || num5 == 4 || num6 == 2)
                                                                {
                                                                    gstruct1_ = class3.method_1(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.method_8().method_79(null, class3, class3.Int32_0, 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.method_9();
                                    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));
                                            if (class3 != null && !(class3.GetBaseItem().InteractionType.ToLower() == "dice"))
                                            {
                                                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.Int32_0;
                                                    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;
                                                    }
                                                    if (flag6)
                                                    {
                                                        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;
        }
コード例 #16
0
 public void method_86(RoomUser RoomUser_1)
 {
     List<RoomItem> list = this.method_93(RoomUser_1.int_3, RoomUser_1.int_4);
     foreach (RoomItem current in list)
     {
         string text = current.GetBaseItem().InteractionType.ToLower();
         if (text != null)
         {
             if (!(text == "pressure_pad"))
             {
                 if (text == "fbgate" && (!string.IsNullOrEmpty(current.string_2) || !string.IsNullOrEmpty(current.string_3)))
                 {
                     RoomUser_1 = this.method_43(current.GStruct1_0.x, current.GStruct1_0.y);
                     if (RoomUser_1 != null && !RoomUser_1.IsBot && current.string_2 != null && current.string_3 != null)
                     {
                         string a = RoomUser_1.GetClient().GetHabbo().Gender;
                         if (a == "m")
                         {
                             AntiMutant.smethod_1(RoomUser_1, current.string_2);
                         }
                         else
                         {
                             AntiMutant.smethod_1(RoomUser_1, current.string_3);
                         }
                         ServerMessage Message = new ServerMessage(266u);
                         Message.AppendInt32(RoomUser_1.VirtualId);
                         Message.AppendStringWithBreak(RoomUser_1.GetClient().GetHabbo().Figure);
                         Message.AppendStringWithBreak(RoomUser_1.GetClient().GetHabbo().Gender.ToLower());
                         Message.AppendStringWithBreak(RoomUser_1.GetClient().GetHabbo().Motto);
                         Message.AppendInt32(RoomUser_1.GetClient().GetHabbo().AchievementScore);
                         Message.AppendStringWithBreak("");
                         this.SendMessage(Message, null);
                     }
                 }
             }
             else
             {
                 current.ExtraData = "1";
                 current.UpdateState(false, true);
             }
         }
     }
 }
コード例 #17
0
 public RoomUser method_4(RoomBot Bot, Pet PetData)
 {
     int num = this.method_5();
     RoomUser user = new RoomUser(Convert.ToUInt32(num + 100000), this.Id, this.int_7++, true);
     user.int_20 = num;
     this.RoomUser_0[num] = user;
     if (Bot.x > 0 && Bot.y > 0 && Bot.x < this.Class28_0.int_4 && Bot.y < this.Class28_0.int_5)
     {
         user.method_7(Bot.x, Bot.y, Bot.z);
         user.method_9(Bot.Rotation);
     }
     else
     {
         Bot.x = this.Class28_0.int_0;
         Bot.y = this.Class28_0.int_1;
         user.method_7(this.Class28_0.int_0, this.Class28_0.int_1, this.Class28_0.double_0);
         user.method_9(this.Class28_0.int_2);
     }
     user.class34_0 = Bot;
     user.BotAI = Bot.method_4(user.VirtualId);
     if (user.isPet)
     {
         user.BotAI.Init((int)Bot.Id, user.VirtualId, this.Id);
         user.PetData = PetData;
         user.PetData.VirtualId = user.VirtualId;
     }
     else
     {
         user.BotAI.Init(-1, user.VirtualId, this.Id);
     }
     this.method_87(user, true, true);
     user.UpdateNeeded = true;
     ServerMessage Message = new ServerMessage(28u);
     Message.AppendInt32(1);
     user.method_14(Message);
     this.SendMessage(Message, null);
     user.BotAI.OnSelfEnterRoom();
     return user;
 }
コード例 #18
0
 public bool method_9(RoomUser RoomUser_1, string string_10)
 {
     bool result = false;
     try
     {
         foreach (RoomItem current in this.list_14)
         {
             if (current.GetBaseItem().InteractionType.ToLower() == "wf_trg_onsay" && this.method_21(RoomUser_1, current, string_10.ToLower()))
             {
                 result = true;
             }
         }
     }
     catch
     {
     }
     return result;
 }
コード例 #19
0
        public void method_46(GameClient Session, bool bool_13)
        {
            RoomUser @class = new RoomUser(Session.GetHabbo().Id, this.Id, this.int_7++, Session.GetHabbo().isVisible);
            if (@class != null && @class.GetClient() != null && @class.GetClient().GetHabbo() != null)
            {
                if (bool_13 || [email protected]_12)
                {
                    @class.bool_11 = true;
                }
                else
                {
                    @class.method_7(this.Class28_0.int_0, this.Class28_0.int_1, this.Class28_0.double_0);
                    @class.method_9(this.Class28_0.int_2);
                    if (this.CheckRights(Session, true))
                    {
                        @class.AddStatus("flatctrl", "useradmin");
                    }
                    else
                    {
                        if (this.method_26(Session))
                        {
                            @class.AddStatus("flatctrl", "");
                        }
                    }
                    if ([email protected] && @class.GetClient().GetHabbo().bool_7)
                    {
                        RoomItem class2 = this.method_28(@class.GetClient().GetHabbo().uint_5);
                        if (class2 != null)
                        {
                            @class.method_7(class2.Int32_0, class2.Int32_1, class2.Double_0);
                            @class.method_9(class2.int_3);
                            class2.uint_4 = Session.GetHabbo().Id;
                            class2.ExtraData = "2";
                            class2.UpdateState(false, true);
                        }
                    }
                    @class.GetClient().GetHabbo().bool_7 = false;
                    @class.GetClient().GetHabbo().uint_5 = 0u;
                    ServerMessage Message = new ServerMessage(28u);
                    Message.AppendInt32(1);
                    @class.method_14(Message);
                    this.SendMessage(Message, null);
                }
                int num = this.method_5();
                @class.int_20 = num;
                this.RoomUser_0[num] = @class;
                if (!bool_13)
                {
                    this.bool_10 = true;
                }
                Session.GetHabbo().CurrentRoomId = this.uint_0;
                Session.GetHabbo().GetMessenger().method_5(false);
                Session.GetHabbo().RoomVisits++;
                Session.GetHabbo().CheckRoomEntryAchievements();
                Session.GetHabbo().method_10(this.uint_0);
                if (Session.GetHabbo().int_0 > 0)
                {
                    GroupsManager class3 = Groups.smethod_2(Session.GetHabbo().int_0);
                    if (class3 != null && !this.list_17.Contains(class3))
                    {
                        this.list_17.Add(class3);
                        ServerMessage Message2 = new ServerMessage(309u);
                        Message2.AppendInt32(this.list_17.Count);
                        foreach (GroupsManager current in this.list_17)
                        {
                            Message2.AppendInt32(current.int_0);
                            Message2.AppendStringWithBreak(current.string_2);
                        }
                        this.SendMessage(Message2, null);
                    }
                }
                if (!bool_13)
                {
                    this.method_51();
                    for (int i = 0; i < this.RoomUser_0.Length; i++)
                    {
                        RoomUser class4 = this.RoomUser_0[i];
                        if (class4 != null && class4.IsBot)
                        {
                            class4.BotAI.OnUserEnterRoom(@class);
                        }
                    }
                }

                bool RoomHasPoll = false;
                bool UserFilledPoll = false;
                using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
                {
                    if (dbClient.ReadDataRow("SELECT null FROM room_polls WHERE room_id = '" + Session.GetHabbo().CurrentRoomId + "' LIMIT 1") != null)
                    {
                        RoomHasPoll = true;
                    }
                }

                if (RoomHasPoll == true)
                {

                    int PollId;
                    string PollDetails;

                    using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
                    {
                        PollId = dbClient.ReadInt32("SELECT id FROM room_polls WHERE room_id = '" + Session.GetHabbo().CurrentRoomId + "' LIMIT 1");
                        PollDetails = dbClient.ReadString("SELECT details FROM room_polls WHERE id = '" + PollId + "' LIMIT 1");

                        if (dbClient.ReadDataRow("SELECT null FROM room_poll_results WHERE user_id = '" + Session.GetHabbo().Id + "' AND poll_id = '" + PollId + "' LIMIT 1") != null)
                        {
                            UserFilledPoll = true;
                        }

                    }

                    if (UserFilledPoll == false)
                    {
                        Thread ShowPoll = new Thread(delegate() { Room.ShowPoll(Session, PollId, PollDetails); });
                        ShowPoll.Start();

                    }

                }
            }
        }
コード例 #20
0
 public void method_12(RoomUser RoomUser_1, RoomItem RoomItem_0)
 {
     try
     {
         foreach (RoomItem current in this.list_14)
         {
             if (current.GetBaseItem().InteractionType.ToLower() == "wf_trg_offfurni")
             {
                 this.method_21(RoomUser_1, current, Convert.ToString(RoomItem_0.uint_0));
             }
         }
     }
     catch
     {
     }
 }
コード例 #21
0
 public void method_7(RoomUser RoomUser_1, string string_10, bool bool_13)
 {
     for (int i = 0; i < this.RoomUser_0.Length; i++)
     {
         RoomUser @class = this.RoomUser_0[i];
         if (@class != null && @class.IsBot)
         {
             if (bool_13)
             {
                 @class.BotAI.OnUserShout(RoomUser_1, string_10);
             }
             else
             {
                 @class.BotAI.OnUserSay(RoomUser_1, string_10);
             }
         }
     }
 }
コード例 #22
0
        public bool method_18(RoomUser RoomUser_1, string string_10, string string_11)
        {
            string_11 = this.method_20(RoomUser_1, string_11);
            bool result;
            if (string_10 != null)
            {
                if (MusCommands.dictionary_4 == null)
                {
                    MusCommands.dictionary_4 = new Dictionary<string, int>(39)
                    {

                        {
                            "roomuserseq",
                            0
                        },

                        {
                            "roomuserslt",
                            1
                        },

                        {
                            "roomusersmt",
                            2
                        },

                        {
                            "roomusersmte",
                            3
                        },

                        {
                            "roomuserslte",
                            4
                        },

                        {
                            "userhasachievement",
                            5
                        },

                        {
                            "userhasntachievement",
                            6
                        },

                        {
                            "userhasbadge",
                            7
                        },

                        {
                            "userhasntbadge",
                            8
                        },

                        {
                            "userhasvip",
                            9
                        },

                        {
                            "userhasntvip",
                            10
                        },

                        {
                            "userhaseffect",
                            11
                        },

                        {
                            "userhasnteffect",
                            12
                        },

                        {
                            "userrankeq",
                            13
                        },

                        {
                            "userrankmt",
                            14
                        },

                        {
                            "userrankmte",
                            15
                        },

                        {
                            "userranklt",
                            16
                        },

                        {
                            "userranklte",
                            17
                        },

                        {
                            "usercreditseq",
                            18
                        },

                        {
                            "usercreditsmt",
                            19
                        },

                        {
                            "usercreditsmte",
                            20
                        },

                        {
                            "usercreditslt",
                            21
                        },

                        {
                            "usercreditslte",
                            22
                        },

                        {
                            "userpixelseq",
                            23
                        },

                        {
                            "userpixelsmt",
                            24
                        },

                        {
                            "userpixelsmte",
                            25
                        },

                        {
                            "userpixelslt",
                            26
                        },

                        {
                            "userpixelslte",
                            27
                        },

                        {
                            "userpointseq",
                            28
                        },

                        {
                            "userpointsmt",
                            29
                        },

                        {
                            "userpointsmte",
                            30
                        },

                        {
                            "userpointslt",
                            31
                        },

                        {
                            "userpointslte",
                            32
                        },

                        {
                            "usergroupeq",
                            33
                        },

                        {
                            "userisingroup",
                            34
                        },

                        {
                            "wearing",
                            35
                        },

                        {
                            "notwearing",
                            36
                        },

                        {
                            "carrying",
                            37
                        },

                        {
                            "notcarrying",
                            38
                        },

                        {
                            "wiredactived",
                            39
                        },

                        {
                            "notwiredactived",
                            40
                        }
                    };
                }
                int num;
                if (MusCommands.dictionary_4.TryGetValue(string_10, out num))
                {
                    switch (num)
                    {
                        case 0:
                            if (this.Int32_0 == Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 1:
                            if (this.Int32_0 < Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 2:
                            if (this.Int32_0 > Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 3:
                            if (this.Int32_0 >= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 4:
                            if (this.Int32_0 <= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 5:
                            result = GoldTree.GetGame().GetAchievementManager().method_1(RoomUser_1.GetClient(), (uint)Convert.ToUInt16(string_11), 1);
                            return result;
                        case 6:
                            if (!GoldTree.GetGame().GetAchievementManager().method_1(RoomUser_1.GetClient(), (uint)Convert.ToUInt16(string_11), 1))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 7:
                            result = RoomUser_1.GetClient().GetHabbo().method_22().method_1(string_11);
                            return result;
                        case 8:
                            if (!RoomUser_1.GetClient().GetHabbo().method_22().method_1(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 9:
                            result = RoomUser_1.GetClient().GetHabbo().Vip;
                            return result;
                        case 10:
                            if (!RoomUser_1.GetClient().GetHabbo().Vip)
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 11:
                            if (RoomUser_1.GetClient().GetHabbo().method_24().int_0 == Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 12:
                            if (RoomUser_1.GetClient().GetHabbo().method_24().int_0 != Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 13:
                            if ((ulong)RoomUser_1.GetClient().GetHabbo().Rank == (ulong)((long)Convert.ToInt32(string_11)))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 14:
                            if ((ulong)RoomUser_1.GetClient().GetHabbo().Rank > (ulong)((long)Convert.ToInt32(string_11)))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 15:
                            if ((ulong)RoomUser_1.GetClient().GetHabbo().Rank >= (ulong)((long)Convert.ToInt32(string_11)))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 16:
                            if ((ulong)RoomUser_1.GetClient().GetHabbo().Rank < (ulong)((long)Convert.ToInt32(string_11)))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 17:
                            if ((ulong)RoomUser_1.GetClient().GetHabbo().Rank <= (ulong)((long)Convert.ToInt32(string_11)))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 18:
                            if (RoomUser_1.GetClient().GetHabbo().Credits == Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 19:
                            if (RoomUser_1.GetClient().GetHabbo().Credits > Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 20:
                            if (RoomUser_1.GetClient().GetHabbo().Credits >= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 21:
                            if (RoomUser_1.GetClient().GetHabbo().Credits < Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 22:
                            if (RoomUser_1.GetClient().GetHabbo().Credits <= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 23:
                            if (RoomUser_1.GetClient().GetHabbo().ActivityPoints == Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 24:
                            if (RoomUser_1.GetClient().GetHabbo().ActivityPoints > Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 25:
                            if (RoomUser_1.GetClient().GetHabbo().ActivityPoints >= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 26:
                            if (RoomUser_1.GetClient().GetHabbo().ActivityPoints < Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 27:
                            if (RoomUser_1.GetClient().GetHabbo().ActivityPoints <= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 28:
                            if (RoomUser_1.GetClient().GetHabbo().VipPoints == Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 29:
                            if (RoomUser_1.GetClient().GetHabbo().VipPoints > Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 30:
                            if (RoomUser_1.GetClient().GetHabbo().VipPoints >= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 31:
                            if (RoomUser_1.GetClient().GetHabbo().VipPoints < Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 32:
                            if (RoomUser_1.GetClient().GetHabbo().VipPoints <= Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 33:
                            if (RoomUser_1.GetClient().GetHabbo().int_0 == Convert.ToInt32(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 34:
                            {
                                IEnumerator enumerator = RoomUser_1.GetClient().GetHabbo().dataTable_0.Rows.GetEnumerator();
                                try
                                {
                                    while (enumerator.MoveNext())
                                    {
                                        DataRow dataRow = (DataRow)enumerator.Current;
                                        if ((int)dataRow["groupid"] == Convert.ToInt32(string_11))
                                        {
                                            result = true;
                                            return result;
                                        }
                                    }
                                    goto IL_89E;
                                }
                                finally
                                {
                                    IDisposable disposable = enumerator as IDisposable;
                                    if (disposable != null)
                                    {
                                        disposable.Dispose();
                                    }
                                }
                            }
                        case 35:
                            break;
                        case 36:
                            if (!RoomUser_1.GetClient().GetHabbo().Figure.Contains(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 37:
                            if (this.GetRoomUserByHabbo(RoomUser_1.GetClient().GetHabbo().Id).CarryItemID == (int)Convert.ToInt16(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 38:
                            if (this.GetRoomUserByHabbo(RoomUser_1.GetClient().GetHabbo().Id).CarryItemID != (int)Convert.ToInt16(string_11))
                            {
                                result = true;
                                return result;
                            }
                            goto IL_89E;
                        case 39:
                            {
                                using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                                {
                                    @class.AddParamWithValue("itemid", string_11);
                                    @class.AddParamWithValue("userid", RoomUser_1.GetClient().GetHabbo().Id);

                                    DataRow dataRow2 = @class.ReadDataRow("SELECT wiredid FROM user_wiredactived WHERE wiredid = @itemid AND userid = @userid");
                                    if (dataRow2 != null)
                                    {
                                        result = true;
                                        return result;
                                    }
                                }
                            }
                            goto IL_89E;
                        case 40:
                            {
                                using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                                {
                                    @class.AddParamWithValue("itemid", string_11);
                                    @class.AddParamWithValue("userid", RoomUser_1.GetClient().GetHabbo().Id);

                                    DataRow dataRow2 = @class.ReadDataRow("SELECT wiredid FROM user_wiredactived WHERE wiredid = @itemid AND userid = @userid");
                                    if (dataRow2 == null)
                                    {
                                        result = true;
                                        return result;
                                    }
                                }
                            }
                            goto IL_89E;
                        default:
                            goto IL_89E;
                    }
                    if (RoomUser_1.GetClient().GetHabbo().Figure.Contains(string_11))
                    {
                        result = true;
                        return result;
                    }
                }
            }
            IL_89E:
            result = false;
            return result;
        }
コード例 #23
0
 public bool method_73(RoomUser RoomUser_1)
 {
     return !RoomUser_1.IsBot && this.method_74(RoomUser_1.GetClient().GetHabbo().Id);
 }
コード例 #24
0
 public override void OnUserEnterRoom(RoomUser RoomUser_0)
 {
 }
コード例 #25
0
 public Trade method_75(RoomUser RoomUser_1)
 {
     Trade result;
     if (RoomUser_1.IsBot)
     {
         result = null;
     }
     else
     {
         result = this.method_76(RoomUser_1.GetClient().GetHabbo().Id);
     }
     return result;
 }
コード例 #26
0
        internal void OnNewUserEnter(RoomUser user)
        {
            if ((user.GetClient() != null) && (this.mSong != null))
            {
                this.mSongQueuePosition++;
                user.GetClient().SendMessage(JukeboxDiscksComposer.ComposePlayingComposer(this.mSong.SongData.Id, this.mSongQueuePosition, this.SongSyncTimestamp));
            }

            if (HasLinkedItem)
            {
                if (this.mIsPlaying != true && this.mSong == null && this.mRoomOutputItem.ExtraData == "1" && this.mPlaylist.Count >= 1)
                {
                    this.Start(0);
                }
            }
        }
コード例 #27
0
 public override void OnUserSay(RoomUser RoomUser_0, string string_0)
 {
     if (base.method_1().method_100(base.GetRoomUser().int_3, base.GetRoomUser().int_4, RoomUser_0.int_3, RoomUser_0.int_4) <= 8)
     {
         BotResponse @class = base.method_3().method_2(string_0);
         if (@class != null)
         {
             string text = base.method_1().method_20(RoomUser_0, @class.Response);
             string text2 = @class.ResponseType.ToLower();
             if (text2 != null)
             {
                 if (!(text2 == "say"))
                 {
                     if (!(text2 == "shout"))
                     {
                         if (text2 == "whisper")
                         {
                             ServerMessage Message = new ServerMessage(25u);
                             Message.AppendInt32(base.GetRoomUser().VirtualId);
                             Message.AppendStringWithBreak(text);
                             Message.AppendBoolean(false);
                             RoomUser_0.GetClient().SendMessage(Message);
                         }
                     }
                     else
                     {
                         base.GetRoomUser().method_1(null, text, true);
                     }
                 }
                 else
                 {
                     base.GetRoomUser().method_1(null, text, false);
                 }
             }
             if (@class.ServeId >= 1)
             {
                 RoomUser_0.CarryItem(@class.ServeId);
             }
         }
     }
 }