Exemplo n.º 1
0
        //всплывающее окно
        public void Logging(params FormatText[] text_log)
        {
            dispatcher.Invoke(DispatcherPriority.Background, new Action(() =>
            {
                try
                {
                    lock (thread_object)
                    {
                        string tray_text = "";
                        foreach (FormatText log in text_log)
                        {
                            tray_text = log.Text != null ? log.Text : "пустое сообщение";
                        }

                        if (FormatText.baloon_msg.Count() < 5)
                        {
                            FormatText.baloon_msg.Add(new FormatText(tray_text, Brushes.Black, 13, text_log[0].Type));
                        }
                        else
                        {
                            FormatText.baloon_msg.RemoveAt(0);
                            FormatText.baloon_msg.Add(new FormatText(tray_text, Brushes.Black, 13, text_log[0].Type));
                        }
                    }
                }
                catch (Exception ex)
                {
                    CalcMethods.ViewException(ex.Message);
                }
            }));
        }
Exemplo n.º 2
0
        public override void Do(object param)
        {
            if (!this.IsStart)
            {
                bot = PwUtils.Pw_CLient_Search(param.ToString(), bot);
                if (bot == null)
                {
                    return;
                }
                PwUtils.GetCords(this.bot, out this.x, out this.y, out this.z);

                this.IsStart = !this.IsStart;
            }

            while (true)
            {
                Thread.Sleep(1000);
                tempCount++;

                bot = PwUtils.Pw_CLient_Search(param.ToString(), bot);
                if (bot == null)
                {
                    continue;
                }
                //поиск адреса контрола
                btn_address = CalcMethods.CalcControlAddress(bot.Handle, "Win_QuickbarPetH", "Btn_Attack");
                //раз в 10 секунд проверяем бота на "стояние"
                if (tempCount % 10 == 0)
                {
                    double x_new, y_new, z_new;
                    //чекам координаты
                    PwUtils.GetCords(this.bot, out x_new, out y_new, out z_new);
                    if (x_new == this.x && y_new == this.y && z_new == this.z)
                    {
                        for (int i = 0; i < 4; i++)
                        {
                            //Посылаем F12 4 раза
                            WinApi.PostMessage(bot.Descrypt, WinApi.WM_KEYDOWN, (int)Keys.F12, 0);
                            Thread.Sleep(400);
                        }
                    }
                    this.x = x_new; this.y = y_new; this.z = z_new;
                }

                //раз в две минуты проверка
                if (tempCount % 120 == 0)
                {
                    //если не изменилось количество денег, то отправляем уведомление в телеграм
                    PwUtils.CheckMoney(bot);
                    oldMoneyValue = bot.Money;
                }
                //жмем атаку
                var visible = CalcMethods.CalcByteValue(bot.Handle, btn_address[0] + OfsPresenter.getInstance("WND_VIS")[0]);
                if (visible == 1)
                {
                    Injects.GUI_Inject(btn_address[0], btn_address[1], bot.Handle);
                }
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Конструктор, принимает объект иконки трея
 /// </summary>
 /// <param name="tb"></param>
 public HeadViewModel(TaskbarIcon tb)
 {
     try
     {
         dispatcher    = Dispatcher.CurrentDispatcher;
         thread_object = new Object();
         //инициализируем объект иконки и объект класса всплывающих сообщений
         this.Tb = tb;
         mb      = new MyBalloon(tb.GetPopupTrayPosition().X, tb.GetPopupTrayPosition().Y);
         mb.baloon_panel.ItemsSource = FormatText.baloon_msg;
         mb.Show();
         //инициализируем переменную для хранения настроек окна
         CheckBoxSettings = new MySettings();
         //инициализируем сериализатор
         formatter = new XmlSerializer(typeof(MySettings));
         //загружаем данные из xml при открытии приложения
         Deserializable();
         //выгружаем из бд список аккаунтов
         dbAccounts = new AccountContext();
         dbAccounts.Accounts.Load();
         Accounts = dbAccounts.Accounts.Local.ToBindingList();
         //выгружаем из бд офсеты
         dbOffsets = new OffsetContext();
         dbOffsets.Offsets.Load();
         offsetsFromDb = dbOffsets.Offsets.FirstOrDefault((p) => p.Version == "1.5.5_2591");
         if (offsetsFromDb != null)
         {
             OpenOffsets();
         }
         //выгружаем настройки из бд, в будующем планируется выполнять этот шаг через вебсервис
         dbSettings = new SettingContext();
         dbSettings.Settings.Load();
         //генерируем уникльный ключ компьютера
         String serial = CalcMethods.GenerateSerialNumber();
         //проверяем, есть ли в бд настройки, привязанные к этому ключу
         settings = dbSettings.Settings.FirstOrDefault((p) => p.Serialnumber == serial);
         //если настройки отсутствуют, то создаем новые и заносим в бд
         if (settings == null)
         {
             settings = new Models.Login.Setting
             {
                 Downloader   = "Downloader/12650 MailRuGameCenter/1265",
                 Serialnumber = CalcMethods.GenerateSerialNumber(),
                 UserId_1     = CalcMethods.RandomStringValue(20),
                 UserId_2     = CalcMethods.RandomStringValue(20),
                 Filepath     = String.Empty
             };
             dbSettings.Settings.Add(settings);
             dbSettings.SaveChanges();
         }
         ApplySettings();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemplo n.º 4
0
 private void Serializable()
 {
     try
     {
         using (FileStream fs = new FileStream(Environment.CurrentDirectory + "\\settings.xml", FileMode.Truncate))
         {
             formatter.Serialize(fs, CheckBoxSettings);
         }
     }
     catch (Exception ex)
     {
         CalcMethods.ViewException(ex.Message);
     }
 }
Exemplo n.º 5
0
 //применяем настройки
 private void ApplySettings()
 {
     try
     {
         Loging.Downloader   = settings.Downloader;
         Loging.UserId_1     = settings.UserId_1;
         Loging.UserId_2     = settings.UserId_2;
         Loging.PathToClient = settings.Filepath;
     }
     catch (Exception ex)
     {
         CalcMethods.ViewException(ex.Message);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Сохранение аккаунта в db
 /// </summary>
 private static void SaveAccounts(Account user, AccountContext db)
 {
     try
     {
         Account acc = db.Accounts.Find(user.ID);
         if (acc != null)
         {
             acc.Nickname        = user.Nickname;
             acc.Mail            = user.Mail;
             acc.Password        = user.Password;
             acc.Server          = user.Server;
             acc.TsaToken        = user.TsaToken;
             db.Entry(acc).State = EntityState.Modified;
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         CalcMethods.ViewException(ex.Message);
     }
 }
Exemplo n.º 7
0
        private void Deserializable()
        {
            FileStream fs = new FileStream("settings.xml", FileMode.OpenOrCreate);

            try
            {
                CheckBoxSettings = (MySettings)formatter.Deserialize(fs);
            }
            catch
            {
                CalcMethods.ViewException("Пока не сохранено настроек");
                CheckBoxSettings = new MySettings();
            }
            finally
            {
                if (fs != null)
                {
                    fs.Close();
                }
            }
        }
Exemplo n.º 8
0
        //метод обновления комбобоксов
        private void RefreshComboboxes(MainWindow wnd)
        {
            try
            {
                if (wnd == null)
                {
                    return;
                }

                foreach (ComboBox box in comboBoxes)
                {
                    if (box.ItemsSource is ICollectionView)
                    {
                        (box.ItemsSource as ICollectionView).Refresh();
                    }
                }
            }
            catch (Exception ex)
            {
                CalcMethods.ViewException(ex.Message);
            }
        }
Exemplo n.º 9
0
        public void SquarerootTest(int a, int c)
        {
            CalcMethods cal = new CalcMethods();

            Assert.That(cal.squareroot(a), Is.EqualTo(c));
        }
Exemplo n.º 10
0
        public void DivideTest(int a, int b, int c)
        {
            CalcMethods cal = new CalcMethods();

            Assert.That(cal.Divide(a, b), Is.EqualTo(c));
        }
Exemplo n.º 11
0
        public void PowerTest(int a, int b, int c)
        {
            CalcMethods cal = new CalcMethods();

            Assert.That(cal.Power(a, b), Is.EqualTo(c));
        }
Exemplo n.º 12
0
        public void MultiplyTest(int a, int b, int c)
        {
            CalcMethods cal = new CalcMethods();

            Assert.That(cal.Multiply(a, b), Is.EqualTo(c));
        }
Exemplo n.º 13
0
        public void SubtractTest(int a, int b, int c)
        {
            CalcMethods cal = new CalcMethods();

            Assert.That(cal.Subtract(a, b), Is.EqualTo(c));
        }
Exemplo n.º 14
0
 public void Start()
 {
     cl = new CalcMethods();
     Console.WriteLine("Application Started");
 }
Exemplo n.º 15
0
 public void Init()
 {
     calcMethods = new CalcMethods();
 }
Exemplo n.º 16
0
 //формат офсетов (String -> Int32)
 private void OpenOffsets()
 {
     try
     {
         Offsets.BaseAdress                 = Convert.ToInt32(offsetsFromDb.BA, 16);
         Offsets.GameAdress                 = Convert.ToInt32(offsetsFromDb.GA, 16);
         Offsets.GuiAdress                  = Convert.ToInt32(offsetsFromDb.GuiAdd, 16);
         Offsets.SendPacket                 = Convert.ToInt32(offsetsFromDb.SendPacket, 16);
         Offsets.AutoAttack                 = Convert.ToInt32(offsetsFromDb.AutoAttack, 16);
         Offsets.UseSkill                   = Convert.ToInt32(offsetsFromDb.UseSkill, 16);
         Offsets.Action_1                   = Convert.ToInt32(offsetsFromDb.Action_1, 16);
         Offsets.Action_2                   = Convert.ToInt32(offsetsFromDb.Action_2, 16);
         Offsets.Action_3                   = Convert.ToInt32(offsetsFromDb.Action_3, 16);
         Offsets.InviteCount                = Convert.ToInt32(offsetsFromDb.InviteCount, 16);
         Offsets.InviteStruct               = Convert.ToInt32(offsetsFromDb.InviteStruct, 16);
         Offsets.СhatStart                  = Convert.ToInt32(offsetsFromDb.ChatStart, 16);
         Offsets.СhatNumber                 = Convert.ToInt32(offsetsFromDb.ChatNumber, 16);
         Offsets.InviteWidParty             = Convert.ToInt32(offsetsFromDb.InviteWidParty, 16);
         Offsets.InviteWidPlayer            = Convert.ToInt32(offsetsFromDb.InviteWidPlayer, 16);
         Offsets.OffsetToGameAdress         = Convert.ToInt32(offsetsFromDb.OffsetToGameAdress, 16);
         Offsets.OffsetToPersStruct         = Convert.ToInt32(offsetsFromDb.OffsetToPersStruct, 16);
         Offsets.OffsetToParty              = Convert.ToInt32(offsetsFromDb.OffsetToParty, 16);
         Offsets.OffsetToCountParty         = Convert.ToInt32(offsetsFromDb.OffsetToCountParty, 16);
         Offsets.OffsetToName               = Convert.ToInt32(offsetsFromDb.OffsetToName, 16);
         Offsets.OffsetToClassID            = Convert.ToInt32(offsetsFromDb.OffsetToClassID, 16);
         Offsets.OffsetToMiningState        = Convert.ToInt32(offsetsFromDb.OffsetToMiningState, 16);
         Offsets.OffsetToWidWin_QuickAction = Convert.ToInt32(offsetsFromDb.OffsetToWidWin_QuickAction, 16);
         Offsets.OffsetToX                  = Convert.ToInt32(offsetsFromDb.OffsetToX, 16);
         Offsets.OffsetToY                  = Convert.ToInt32(offsetsFromDb.OffsetToY, 16);
         Offsets.OffsetToZ                  = Convert.ToInt32(offsetsFromDb.OffsetToZ, 16);
         Offsets.OffsetToWalkMode           = Convert.ToInt32(offsetsFromDb.OffsetToWalkMode, 16);
         Offsets.OffsetToWid                = Convert.ToInt32(offsetsFromDb.OffsetToWid, 16);
         Offsets.OffsetToTargetWid          = Convert.ToInt32(offsetsFromDb.OffsetToTargetWid, 16);
         Offsets.OffsetToStructParty        = Convert.ToInt32(offsetsFromDb.OffsetToStructParty, 16);
         Offsets.OffsetToSkillsCount        = Convert.ToInt32(offsetsFromDb.OffsetToSkillsCount, 16);
         Offsets.OffsetToCdSkill            = Convert.ToInt32(offsetsFromDb.OffsetToCdSkill, 16);
         Offsets.OffsetToIdSkill            = Convert.ToInt32(offsetsFromDb.OffsetToIdSkill, 16);
         Offsets.OffsetToSkillsArray        = Convert.ToInt32(offsetsFromDb.OffsetToSkillsArray, 16);
         Offsets.OffsetsLocationName        = new Int32[5];
         Offsets.OffsetsLocationName[0]     = Convert.ToInt32(offsetsFromDb.OffsetsLocationName_0, 16);
         Offsets.OffsetsLocationName[1]     = Convert.ToInt32(offsetsFromDb.OffsetsLocationName_1, 16);
         Offsets.OffsetsLocationName[2]     = Convert.ToInt32(offsetsFromDb.OffsetsLocationName_2, 16);
         Offsets.OffsetsLocationName[3]     = Convert.ToInt32(offsetsFromDb.OffsetsLocationName_3, 16);
         Offsets.OffsetsLocationName[4]     = Convert.ToInt32(offsetsFromDb.OffsetsLocationName_4, 16);
         Offsets.OffsetToCurrentSkill       = Convert.ToInt32(offsetsFromDb.OffsetToCurrentSkill, 16);
         Offsets.OffsetToCountBufs          = Convert.ToInt32(offsetsFromDb.OffsetToCountBufs, 16);
         Offsets.OffsetToBufsArray          = Convert.ToInt32(offsetsFromDb.OffsetToBufsArray, 16);
         Offsets.OffsetToBeginMobsStruct    = Convert.ToInt32(offsetsFromDb.OffsetToBeginMobsStruct, 16);
         Offsets.OffsetToMobsCount          = Convert.ToInt32(offsetsFromDb.OffsetToMobsCount, 16);
         Offsets.OffsetToMobWid             = Convert.ToInt32(offsetsFromDb.OffsetToMobWid, 16);
         Offsets.OffsetToMobName            = Convert.ToInt32(offsetsFromDb.OffsetToMobName, 16);
         Offsets.OffsetToMobsStruct         = Convert.ToInt32(offsetsFromDb.OffsetToMobsStruct, 16);
         Offsets.OffsetToHashTables         = Convert.ToInt32(offsetsFromDb.OffsetToHashTables, 16);
         Offsets.OffsetToPlayersCount       = Convert.ToInt32(offsetsFromDb.OffsetToPlayersCount, 16);
         Offsets.OffsetToBeginPlayersStruct = Convert.ToInt32(offsetsFromDb.OffsetToBeginPlayersStruct, 16);
         Offsets.OffsetToPlayersStruct      = Convert.ToInt32(offsetsFromDb.OffsetToPlayersStruct, 16);
         Offsets.MsgId           = Convert.ToInt32(offsetsFromDb.MsgId, 16);
         Offsets.MsgType         = Convert.ToInt32(offsetsFromDb.MsgType, 16);
         Offsets.Msg_form1       = Convert.ToInt32(offsetsFromDb.Msg_form1, 16);
         Offsets.Msg_form2       = Convert.ToInt32(offsetsFromDb.Msg_form2, 16);
         Offsets.MsgWid          = Convert.ToInt32(offsetsFromDb.MsgWid, 16);
         Offsets.Invent_struct   = Convert.ToInt32(offsetsFromDb.Invent_struct, 16);
         Offsets.Invent_struct_2 = Convert.ToInt32(offsetsFromDb.Invent_struct_2, 16);
         Offsets.CellsCount      = Convert.ToInt32(offsetsFromDb.CellsCount, 16);
         Offsets.ItemInCellCount = Convert.ToInt32(offsetsFromDb.ItemInCellCount, 16);
         Offsets.ItemInCellID    = Convert.ToInt32(offsetsFromDb.ItemInCellID, 16);
         Offsets.ItemInCellName  = Convert.ToInt32(offsetsFromDb.ItemInCellName, 16);
         Offsets.ItemInCellPrice = Convert.ToInt32(offsetsFromDb.ItemInCellPrice, 16);
         Offsets.ItemInCellType  = Convert.ToInt32(offsetsFromDb.ItemInCellType, 16);
         //определяем цепочки смещений
         Offsets.RefreshOffsets();
     }
     catch (Exception ex)
     {
         CalcMethods.ViewException(ex.Message);
     }
 }
Exemplo n.º 17
0
        public static async Task AuthAsync(Account user, AccountContext db)
        {
            try
            {
                String temp     = String.Empty;
                String answer_1 = String.Empty;
                #region АВТОРИЗАЦИЯ НА ПОЧТЕ
                if (user.TsaToken != null)
                {
                    //делаем запрос по сохраненному токену
                    temp = String.Format("client_id=gamecenter.mail.ru&grant_type=password&username={0}&password={1}&tsa_token={2}", user.Mail, user.Password, user.TsaToken);
                    Regex regex_1_1 = new Regex("\"tsa_token\":\".{32}\"");
                    Regex regex_1_2 = new Regex("\"access_token\":\".{48}\"");
                    answer_1 = await POST("https://o2.mail.ru//token", temp);

                    user.TsaToken = regex_1_1.Match(answer_1).Value;
                    user.TsaToken = user.TsaToken.Replace("\"tsa_token\":\"", "");
                    user.TsaToken = user.TsaToken.Replace("\"", "");
                    SaveAccounts(user, db);
                    answer_1 = regex_1_2.Match(answer_1).Value;
                    answer_1 = answer_1.Replace("\"access_token\":\"", "");
                    answer_1 = answer_1.Replace("\"", "");
                }
                else
                {
                    temp     = @"client_id=gamecenter.mail.ru&grant_type=password&username="******"&password="******"https://o2.mail.ru//token", temp);

                    if (answer_1.Contains("second step code check required to authenticate user") || answer_1.Contains("sms send timeout"))
                    {
                        Regex regex_1 = new Regex("\"tsa_token\":\".{32}\"");
                        do
                        {
                            answer_1 = regex_1.Match(answer_1).Value;
                            answer_1 = answer_1.Replace("\"tsa_token\":\"", "");
                            answer_1 = answer_1.Replace("\"", "");
                            //сохраняем полученный tsa токен для будущего использования
                            user.TsaToken = answer_1;
                            SaveAccounts(user, db);
                            //запрашиваем СМС код
                            GetSmsCode smsWindow = new GetSmsCode();
                            if (smsWindow.ShowDialog() == true)
                            {
                                //отправляем запрос с кодом из смс
                                temp     = String.Format("client_id=gamecenter.mail.ru&grant_type=password&username={0}&tsa_token={1}&auth_code={2}&permanent=1", user.Mail, user.TsaToken, smsWindow.smsCode);
                                answer_1 = await POST("https://o2.mail.ru//token", temp);
                            }
                        }while (answer_1.Contains("invalid auth_code was submitted"));
                    }
                    user.TsaToken = new Regex("\"tsa_token\":\".{32}").Match(answer_1).Value.Replace("\"tsa_token\":\"", "");
                    SaveAccounts(user, db);
                    Regex regex_1_1 = new Regex(".access_token...\\S{48}.}");
                    answer_1 = regex_1_1.Match(answer_1).Value;
                    answer_1 = answer_1.Replace("\"access_token\":\"", "");
                    answer_1 = answer_1.Replace("\"}", "");
                }



                temp = @"client_id=gamecenter.mail.ru&access_token=" + answer_1;
                String answer_2 = await POST(@"https://o2.mail.ru/userinfo", temp);

                temp = String.Format("<?xml version=\"1.0\" encoding=\"UTF-8\"?><MrPage2 SessionKey=\"{0}\" Page=\"http://dl.mail.ru/robots.txt\"/>", answer_1);
                Regex  regex_3  = new Regex("Location=\".*\" ErrorCode");
                String answer_3 = regex_3.Match(await POST(@"https://authdl.mail.ru/ec.php?hint=MrPage2", temp)).Value;
                answer_3 = answer_3.Replace("Location=\"", "");
                answer_3 = answer_3.Replace("\" ErrorCode", "");
                answer_3 = answer_3.Replace("&amp;", "&");

                String answer_4 = await GET(answer_3);

                Regex regex_4 = new Regex("Mpop=.*;");
                answer_4 = regex_4.Match(answer_4).Value;
                answer_4 = answer_4.Replace("Mpop=", "");
                answer_4 = answer_4.Replace(";", "");

                temp = String.Format(@"<?xml version=""1.0"" encoding=""UTF-8""?><Auth UserId=""" + UserId_1 + @""" UserId2=""" + UserId_2 + @""" Soft=""1"" Cookie=""{0}"" AppId="""" ChannelId=""27""/>", answer_4);
                String answer_5 = await POST(@"https://authdl.mail.ru/ec.php?hint=Auth", temp);

                #endregion

                #region АВТОРИЗАЦИЯ В ИГРЕ
                temp = String.Format(@"<?xml version=""1.0"" encoding=""UTF-8""?><AutoLogin ProjectId=""61"" SubProjectId=""0"" ShardId=""0"" UserId=""" + UserId_1 + @""" UserId2=""" + UserId_2 + @""" Mpop=""{0}"" FirstLink=""_1lp=1&amp;_1ld=300&amp;_1lnh=1"" RegionData=""""/>", answer_4);
                String answer_6 = await POST(@"https://authdl.mail.ru/sz.php?hint=AutoLogin", temp);

                temp = String.Format(@"<?xml version=""1.0"" encoding=""UTF-8""?><PersList ProjectId=""61"" SubProjectId=""0"" ShardId=""0"" UserId=""" + UserId_1 + @""" UserId2=""" + UserId_2 + @""" Mpop=""{0}""/>", answer_4);
                String answer_7 = await POST(@"https://authdl.mail.ru/sz.php?hint=AutoLogin", temp);

                Regex regex_uid_2 = new Regex("AutoLogin PersId=\"\\d*\"");
                Regex regex_uid_1 = new Regex("Pers Id=\"\\d*\"");
                Regex regex_token = new Regex("Key=\"\\w*\"");

                userId_1 = regex_uid_1.Match(answer_7).Value;
                userId_1 = userId_1.Replace("Pers Id=\"", "");
                userId_1 = userId_1.Replace("\"", "");

                userId_2 = regex_uid_2.Match(answer_6).Value;
                userId_2 = userId_2.Replace("AutoLogin PersId=\"", "");
                userId_2 = userId_2.Replace("\"", "");

                token = regex_token.Match(answer_6).Value;
                token = token.Replace("Key=\"", "");
                token = token.Replace("\"", "");
                #endregion

                #region ЗАПУСК КЛИЕНТА

                Process process = new Process();
                if (!File.Exists(PathToClient + "elementclient.exe"))
                {
                    throw new Exception("Не указан путь к elementclient.exe в настройках!");
                }
                process.StartInfo.WorkingDirectory = PathToClient;
                process.StartInfo.FileName         = "elementclient.exe";
                process.StartInfo.Arguments        = String.Format("startbypatcher user:{0} _user:{1} token2:{2}", userId_1, userId_2, token);
                process.StartInfo.Verb             = "runas";
                process.Start();

                #endregion
            }
            catch (Exception ex)
            {
                CalcMethods.ViewException(ex.Message);
            }
        }
Exemplo n.º 18
0
        public override void Do(object param)
        {
            if (!this.IsStart)
            {
                botId = ConfigurationManager.AppSettings[param.ToString()];
                if (String.IsNullOrEmpty(botId))
                {
                    throw new Exception($"Не найден телеграм-бот {param.ToString()}");
                }
                //запускаем бота
                telebot = new TelegramBotClient(botId);
                telebot.SetWebhookAsync("");
                //ищем id чата
                Int64.TryParse(ConfigurationManager.AppSettings["ChatId"], out chatid);
                bot = PwUtils.Pw_CLient_Search(param.ToString(), bot);
                if (bot == null)
                {
                    return;
                }



                this.IsStart = !this.IsStart;
            }

            while (true)
            {
                Thread.Sleep(1000);
                tempCount++;

                bot = PwUtils.Pw_CLient_Search(param.ToString(), bot);
                if (bot == null)
                {
                    continue;
                }

                btn_address = CalcMethods.CalcControlAddress(bot.Handle, "Win_QuickbarPetH", "Btn_Attack");
                //раз в две минуты проверка
                if (tempCount % 120 == 0)
                {
                    //если не изменилось количество денег, то отправляем уведомление в телеграм
                    PwUtils.CheckMoney(bot);
                    if (oldMoneyValue == bot.Money)
                    {
                        telebot.SendTextMessageAsync(chatid, $"У меня не меняется количество денег").Wait();
                    }
                    oldMoneyValue = bot.Money;

                    //обработка последних сообщений в телеграме
                    var updates = telebot.GetUpdatesAsync(msgCount).Result;
                    foreach (var update in updates) // Перебираем все обновления
                    {
                        if (update.Message.Type == Telegram.Bot.Types.Enums.MessageType.TextMessage)
                        {
                            if (update.Message.Text == "/addme")
                            {
                                //обработка текста
                            }
                        }
                        msgCount = update.Id + 1;
                    }
                }
            }
        }