Exemplo n.º 1
0
        private int method_4()
        {
            RoomUser @class = base.GetRoomUser();
            int      result = 5;

            if (@class.PetData.Level >= 1)
            {
                result = GoldTree.smethod_5(1, 8);
            }
            else
            {
                if (@class.PetData.Level >= 5)
                {
                    result = GoldTree.smethod_5(1, 7);
                }
                else
                {
                    if (@class.PetData.Level >= 10)
                    {
                        result = GoldTree.smethod_5(1, 6);
                    }
                }
            }
            return(result);
        }
Exemplo n.º 2
0
 public override void OnTimerTick()
 {
     if (this.int_2 <= 0)
     {
         if (base.method_3() != null && base.method_3().list_0.Count > 0)
         {
             RandomSpeech @class = base.method_3().method_3();
             base.GetRoomUser().HandleSpeech(null, @class.Message, @class.Shout);
         }
         this.int_2 = GoldTree.smethod_5(0, 150);
     }
     else
     {
         this.int_2--;
     }
     if (this.int_3 <= 0)
     {
         int int_  = GoldTree.smethod_5(0, base.method_1().RoomModel.int_4);
         int int_2 = GoldTree.smethod_5(0, base.method_1().RoomModel.int_5);
         base.GetRoomUser().MoveTo(int_, int_2);
         this.int_3 = GoldTree.smethod_5(0, 30);
     }
     else
     {
         this.int_3--;
     }
 }
Exemplo n.º 3
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Dictionary <Room, int> dictionary = GoldTree.GetGame().GetRoomManager().method_21();
            Room @class = null;
            IEnumerable <Room> arg_35_0 = dictionary.Keys;

            if (FindNewFriendsMessageEvent.func_0 == null)
            {
                FindNewFriendsMessageEvent.func_0 = new Func <Room, int>(FindNewFriendsMessageEvent.smethod_0);
            }
            IOrderedEnumerable <Room> orderedEnumerable = arg_35_0.OrderByDescending(FindNewFriendsMessageEvent.func_0);
            int num = 0;

            foreach (Room current in orderedEnumerable)
            {
                num++;
                string a = GoldTree.smethod_5(1, 5).ToString();
                if (a == "2")
                {
                    goto IL_83;
                }
                if (num == orderedEnumerable.Count <Room>())
                {
                    goto IL_83;
                }
                bool arg_A2_0 = true;
IL_A2:
                if (arg_A2_0)
                {
                    continue;
                }
                @class = current;
                break;
IL_83:
                arg_A2_0 = (Session.GetHabbo().CurrentRoom == null || Session.GetHabbo().CurrentRoom == current);
                goto IL_A2;
            }
            if (@class == null)
            {
                ServerMessage Message = new ServerMessage(831u);
                Message.AppendBoolean(false);
                Session.SendMessage(Message);
            }
            else
            {
                ServerMessage Message2 = new ServerMessage(286u);
                Message2.AppendBoolean(@class.Boolean_3);
                Message2.AppendUInt(@class.Id);
                Session.SendMessage(Message2);
                ServerMessage Message3 = new ServerMessage(831u);
                Message3.AppendBoolean(true);
                Session.SendMessage(Message3);
            }
        }
Exemplo n.º 4
0
 public RoomAdvertisement method_1()
 {
     if (this.RoomAdvertisements.Count <= 0)
     {
         return(null);
     }
     else
     {
         int index;
         do
         {
             index = GoldTree.smethod_5(0, this.RoomAdvertisements.Count - 1);
         }while (this.RoomAdvertisements[index] == null || this.RoomAdvertisements[index].Boolean_0);
         return(RoomAdvertisements[index]);
     }
 }
Exemplo n.º 5
0
        public Item method_10()
        {
            switch (GoldTree.smethod_5(0, 6))
            {
            case 0:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(164u));
            }

            case 1:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(165u));
            }

            case 2:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(166u));
            }

            case 3:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(167u));
            }

            case 4:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(168u));
            }

            case 5:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(169u));
            }

            case 6:
            {
                return(GoldTree.GetGame().GetItemManager().method_2(170u));
            }

            default:
            {
                return(null);
            }
            }
        }
Exemplo n.º 6
0
        private void method_5(int int_4, int int_5, bool bool_0)
        {
            RoomUser @class = base.GetRoomUser();

            if (bool_0)
            {
                int int_6 = GoldTree.smethod_5(0, base.method_1().RoomModel.int_4);
                int int_7 = GoldTree.smethod_5(0, base.method_1().RoomModel.int_5);
                @class.MoveTo(int_6, int_7);
            }
            else
            {
                if (int_4 < base.method_1().RoomModel.int_4&& int_5 < base.method_1().RoomModel.int_5&& int_4 >= 0 && int_5 >= 0)
                {
                    @class.MoveTo(int_4, int_5);
                }
            }
        }
Exemplo n.º 7
0
 public override void OnTimerTick()
 {
     if (this.int_2 <= 0)
     {
         if (base.method_3().list_0.Count > 0)
         {
             RandomSpeech @class = base.method_3().method_3();
             base.GetRoomUser().method_1(null, @class.Message, @class.Shout);
         }
         this.int_2 = GoldTree.smethod_5(10, 300);
     }
     else
     {
         this.int_2--;
     }
     if (this.int_3 <= 0)
     {
         string text = base.method_3().WalkMode.ToLower();
         if (text != null && !(text == "stand"))
         {
             if (!(text == "freeroam"))
             {
                 if (text == "specified_range")
                 {
                     int int_  = GoldTree.smethod_5(base.method_3().min_x, base.method_3().max_x);
                     int int_2 = GoldTree.smethod_5(base.method_3().min_y, base.method_3().max_y);
                     base.GetRoomUser().MoveTo(int_, int_2);
                 }
             }
             else
             {
                 int int_  = GoldTree.smethod_5(0, base.method_1().Class28_0.int_4);
                 int int_2 = GoldTree.smethod_5(0, base.method_1().Class28_0.int_5);
                 base.GetRoomUser().MoveTo(int_, int_2);
             }
         }
         this.int_3 = GoldTree.smethod_5(1, 30);
     }
     else
     {
         this.int_3--;
     }
 }
Exemplo n.º 8
0
        public EcotronReward method_15()
        {
            uint uint_ = 1u;

            if (GoldTree.smethod_5(1, 2000) == 2000)
            {
                uint_ = 5u;
            }
            else
            {
                if (GoldTree.smethod_5(1, 200) == 200)
                {
                    uint_ = 4u;
                }
                else
                {
                    if (GoldTree.smethod_5(1, 40) == 40)
                    {
                        uint_ = 3u;
                    }
                    else
                    {
                        if (GoldTree.smethod_5(1, 4) == 4)
                        {
                            uint_ = 2u;
                        }
                    }
                }
            }
            List <EcotronReward> list = this.method_16(uint_);

            if (list != null && list.Count >= 1)
            {
                return(list[GoldTree.smethod_5(0, list.Count - 1)]);
            }
            else
            {
                return(new EcotronReward(0u, 0u, 1479u, 0u));
            }
        }
Exemplo n.º 9
0
 public RandomSpeech method_3()
 {
     return(this.list_0[GoldTree.smethod_5(0, this.list_0.Count - 1)]);
 }
Exemplo n.º 10
0
        public override void OnTimerTick()
        {
            if (this.int_2 <= 0)
            {
                RoomUser @class = base.GetRoomUser();
                string[] array  = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog5")
                };
                string[] array2 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_cat1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_cat2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_cat3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_cat4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_cat5")
                };
                string[] array3 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_croc1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_croc2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_croc3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_croc4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_croc5")
                };
                string[] array4 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dog5")
                };
                string[] array5 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_bear1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_bear2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_bear3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_bear4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_bear5")
                };
                string[] array6 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_pig1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_pig2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_pig3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_pig4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_pig5")
                };
                string[] array7 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_lion1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_lion2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_lion3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_lion4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_lion5")
                };
                string[] array8 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_rhino1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_rhino2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_rhino3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_rhino4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_rhino5")
                };
                string[] array9 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_spider1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_spider2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_spider3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_spider4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_spider5")
                };
                string[] array10 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_turtle1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_turtle2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_turtle3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_turtle4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_turtle5")
                };
                string[] array11 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_chic1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_chic2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_chic3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_chic4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_chic5")
                };
                string[] array12 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_frog1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_frog2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_frog3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_frog4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_frog5")
                };
                string[] array13 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dragon1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dragon2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dragon3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dragon4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_dragon5")
                };
                string[] array14 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_horse1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_horse2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_horse3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_horse4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_horse5")
                };
                string[] array15 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_monkey1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_monkey2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_monkey3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_monkey4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_monkey5")
                };
                string[] array16 = new string[]
                {
                    GoldTreeEnvironment.GetExternalText("pet_chatter_generic1"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_generic2"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_generic3"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_generic4"),
                    GoldTreeEnvironment.GetExternalText("pet_chatter_generic5")
                };
                string[] array17 = new string[]
                {
                    "sit",
                    "lay",
                    "snf",
                    "ded",
                    "jmp",
                    "snf",
                    "sit",
                    "snf"
                };
                string[] array18 = new string[]
                {
                    "sit",
                    "lay"
                };
                string[] array19 = new string[]
                {
                    "wng",
                    "grn",
                    "flm",
                    "std",
                    "swg",
                    "sit",
                    "lay",
                    "snf",
                    "plf",
                    "jmp",
                    "flm",
                    "crk",
                    "rlx",
                    "flm"
                };
                if (@class != null)
                {
                    Random random = new Random();
                    int    num    = GoldTree.smethod_5(1, 4);
                    if (num == 2)
                    {
                        @class.Statusses.Clear();
                        if (base.GetRoomUser().RoomBot.RoomUser_0 == null)
                        {
                            if (@class.PetData.Type == 13u)
                            {
                                @class.Statusses.Add(array18[random.Next(0, array18.Length - 1)], @class.double_0.ToString());
                            }
                            else
                            {
                                if (@class.PetData.Type != 12u)
                                {
                                    @class.Statusses.Add(array17[random.Next(0, array17.Length - 1)], @class.double_0.ToString());
                                }
                                else
                                {
                                    @class.Statusses.Add(array19[random.Next(0, array19.Length - 1)], @class.double_0.ToString());
                                }
                            }
                        }
                    }
                    switch (@class.PetData.Type)
                    {
                    case 0u:
                        @class.HandleSpeech(null, array[random.Next(0, array.Length - 1)], false);
                        break;

                    case 1u:
                        @class.HandleSpeech(null, array2[random.Next(0, array2.Length - 1)], false);
                        break;

                    case 2u:
                        @class.HandleSpeech(null, array3[random.Next(0, array3.Length - 1)], false);
                        break;

                    case 3u:
                        @class.HandleSpeech(null, array4[random.Next(0, array4.Length - 1)], false);
                        break;

                    case 4u:
                        @class.HandleSpeech(null, array5[random.Next(0, array5.Length - 1)], false);
                        break;

                    case 5u:
                        @class.HandleSpeech(null, array6[random.Next(0, array6.Length - 1)], false);
                        break;

                    case 6u:
                        @class.HandleSpeech(null, array7[random.Next(0, array7.Length - 1)], false);
                        break;

                    case 7u:
                        @class.HandleSpeech(null, array8[random.Next(0, array8.Length - 1)], false);
                        break;

                    case 8u:
                        @class.HandleSpeech(null, array9[random.Next(0, array9.Length - 1)], false);
                        break;

                    case 9u:
                        @class.HandleSpeech(null, array10[random.Next(0, array10.Length - 1)], false);
                        break;

                    case 10u:
                        @class.HandleSpeech(null, array11[random.Next(0, array11.Length - 1)], false);
                        break;

                    case 11u:
                        @class.HandleSpeech(null, array12[random.Next(0, array12.Length - 1)], false);
                        break;

                    case 12u:
                        @class.HandleSpeech(null, array13[random.Next(0, array13.Length - 1)], false);
                        break;

                    case 13u:
                        @class.HandleSpeech(null, array14[random.Next(0, array14.Length - 1)], false);
                        break;

                    case 14u:
                        @class.HandleSpeech(null, array15[random.Next(0, array15.Length - 1)], false);
                        break;

                    default:
                        @class.HandleSpeech(null, array16[random.Next(0, array16.Length - 1)], false);
                        break;
                    }
                }
                this.int_2 = GoldTree.smethod_5(30, 120);
            }
            else
            {
                this.int_2--;
            }
            if (this.int_3 <= 0)
            {
                base.GetRoomUser().PetData.PetEnergy(-10);
                if (base.GetRoomUser().RoomBot.RoomUser_0 == null)
                {
                    this.method_5(0, 0, true);
                }
                this.int_3 = 30;
            }
            else
            {
                this.int_3--;
            }
        }