Author

Topic: 999autobet bot open source (Read 5314 times)

newbie
Activity: 24
Merit: 0
May 17, 2014, 10:47:21 AM
#3
bump
newbie
Activity: 24
Merit: 0
May 15, 2014, 06:42:41 AM
#2
bump
newbie
Activity: 24
Merit: 0
May 13, 2014, 05:27:24 PM
#1
Code:
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsApplication4
{
  [DesignerGenerated]
  public class Form1 : Form
  {
    private static List __ENCList = new List();
    private IContainer components;
    [AccessedThroughProperty("Panel1")]
    private Panel _Panel1;
    [AccessedThroughProperty("WebBrowser1")]
    private WebBrowser _WebBrowser1;
    [AccessedThroughProperty("Button1")]
    private Button _Button1;
    [AccessedThroughProperty("Button2")]
    private Button _Button2;
    [AccessedThroughProperty("Timer1")]
    private System.Windows.Forms.Timer _Timer1;
    [AccessedThroughProperty("Button3")]
    private Button _Button3;
    [AccessedThroughProperty("Timer2")]
    private System.Windows.Forms.Timer _Timer2;
    [AccessedThroughProperty("TextBox1")]
    private TextBox _TextBox1;
    [AccessedThroughProperty("TextBox2")]
    private TextBox _TextBox2;
    [AccessedThroughProperty("Label1")]
    private Label _Label1;
    [AccessedThroughProperty("Label2")]
    private Label _Label2;
    [AccessedThroughProperty("Label3")]
    private Label _Label3;
    [AccessedThroughProperty("Timer3")]
    private System.Windows.Forms.Timer _Timer3;
    [AccessedThroughProperty("Label4")]
    private Label _Label4;
    [AccessedThroughProperty("TextBox3")]
    private TextBox _TextBox3;
    private int x;
    private int t;
    private int z;
    private int ls;
    private int t3;
    private int rls;
    private HtmlElementCollection PageElement;
    private string WinProfit;
    private string NewWinProfit;

    internal virtual Panel Panel1
    {
      [DebuggerNonUserCode] get
      {
        return this._Panel1;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        this._Panel1 = value;
      }
    }

    internal virtual WebBrowser WebBrowser1
    {
      [DebuggerNonUserCode] get
      {
        return this._WebBrowser1;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        WebBrowserDocumentCompletedEventHandler completedEventHandler = new WebBrowserDocumentCompletedEventHandler(this.WebBrowser1_DocumentCompleted);
        if (this._WebBrowser1 != null)
          this._WebBrowser1.DocumentCompleted -= completedEventHandler;
        this._WebBrowser1 = value;
        if (this._WebBrowser1 == null)
          return;
        this._WebBrowser1.DocumentCompleted += completedEventHandler;
      }
    }

    internal virtual Button Button1
    {
      [DebuggerNonUserCode] get
      {
        return this._Button1;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Button1_Click);
        if (this._Button1 != null)
          this._Button1.Click -= eventHandler;
        this._Button1 = value;
        if (this._Button1 == null)
          return;
        this._Button1.Click += eventHandler;
      }
    }

    internal virtual Button Button2
    {
      [DebuggerNonUserCode] get
      {
        return this._Button2;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Button2_Click);
        if (this._Button2 != null)
          this._Button2.Click -= eventHandler;
        this._Button2 = value;
        if (this._Button2 == null)
          return;
        this._Button2.Click += eventHandler;
      }
    }

    internal virtual System.Windows.Forms.Timer Timer1
    {
      [DebuggerNonUserCode] get
      {
        return this._Timer1;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Timer1_Tick);
        if (this._Timer1 != null)
          this._Timer1.Tick -= eventHandler;
        this._Timer1 = value;
        if (this._Timer1 == null)
          return;
        this._Timer1.Tick += eventHandler;
      }
    }

    internal virtual Button Button3
    {
      [DebuggerNonUserCode] get
      {
        return this._Button3;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Button3_Click);
        if (this._Button3 != null)
          this._Button3.Click -= eventHandler;
        this._Button3 = value;
        if (this._Button3 == null)
          return;
        this._Button3.Click += eventHandler;
      }
    }

    internal virtual System.Windows.Forms.Timer Timer2
    {
      [DebuggerNonUserCode] get
      {
        return this._Timer2;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Timer2_Tick);
        if (this._Timer2 != null)
          this._Timer2.Tick -= eventHandler;
        this._Timer2 = value;
        if (this._Timer2 == null)
          return;
        this._Timer2.Tick += eventHandler;
      }
    }

    internal virtual TextBox TextBox1
    {
      [DebuggerNonUserCode] get
      {
        return this._TextBox1;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.TextBox1_TextChanged);
        if (this._TextBox1 != null)
          this._TextBox1.TextChanged -= eventHandler;
        this._TextBox1 = value;
        if (this._TextBox1 == null)
          return;
        this._TextBox1.TextChanged += eventHandler;
      }
    }

    internal virtual TextBox TextBox2
    {
      [DebuggerNonUserCode] get
      {
        return this._TextBox2;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.TextBox2_TextChanged);
        if (this._TextBox2 != null)
          this._TextBox2.TextChanged -= eventHandler;
        this._TextBox2 = value;
        if (this._TextBox2 == null)
          return;
        this._TextBox2.TextChanged += eventHandler;
      }
    }

    internal virtual Label Label1
    {
      [DebuggerNonUserCode] get
      {
        return this._Label1;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        this._Label1 = value;
      }
    }

    internal virtual Label Label2
    {
      [DebuggerNonUserCode] get
      {
        return this._Label2;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        this._Label2 = value;
      }
    }

    internal virtual Label Label3
    {
      [DebuggerNonUserCode] get
      {
        return this._Label3;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        this._Label3 = value;
      }
    }

    internal virtual System.Windows.Forms.Timer Timer3
    {
      [DebuggerNonUserCode] get
      {
        return this._Timer3;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Timer3_Tick);
        if (this._Timer3 != null)
          this._Timer3.Tick -= eventHandler;
        this._Timer3 = value;
        if (this._Timer3 == null)
          return;
        this._Timer3.Tick += eventHandler;
      }
    }

    internal virtual Label Label4
    {
      [DebuggerNonUserCode] get
      {
        return this._Label4;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        this._Label4 = value;
      }
    }

    internal virtual TextBox TextBox3
    {
      [DebuggerNonUserCode] get
      {
        return this._TextBox3;
      }
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.TextBox3_TextChanged);
        if (this._TextBox3 != null)
          this._TextBox3.TextChanged -= eventHandler;
        this._TextBox3 = value;
        if (this._TextBox3 == null)
          return;
        this._TextBox3.TextChanged += eventHandler;
      }
    }

    private bool pageready { [DebuggerNonUserCode] get; [DebuggerNonUserCode] set; }

    [DebuggerNonUserCode]
    static Form1()
    {
    }

    public Form1()
    {
      Form1.__ENCAddToList((object) this);
      this.pageready = false;
      this.InitializeComponent();
    }

    [DebuggerNonUserCode]
    private static void __ENCAddToList(object value)
    {
      List list = Form1.__ENCList;
      bool lockTaken = false;
      try
      {
        Monitor.Enter((object) list, ref lockTaken);
        if (Form1.__ENCList.Count == Form1.__ENCList.Capacity)
        {
          int index1 = 0;
          int num1 = 0;
          int num2 = checked (Form1.__ENCList.Count - 1);
          int index2 = num1;
          while (index2 <= num2)
          {
            if (Form1.__ENCList[index2].IsAlive)
            {
              if (index2 != index1)
                Form1.__ENCList[index1] = Form1.__ENCList[index2];
              checked { ++index1; }
            }
            checked { ++index2; }
          }
          Form1.__ENCList.RemoveRange(index1, checked (Form1.__ENCList.Count - index1));
          Form1.__ENCList.Capacity = Form1.__ENCList.Count;
        }
        Form1.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
      }
      finally
      {
        if (lockTaken)
          Monitor.Exit((object) list);
      }
    }

    [DebuggerNonUserCode]
    protected override void Dispose(bool disposing)
    {
      try
      {
        if ((!disposing || this.components == null) && !false)
          return;
        this.components.Dispose();
      }
      finally
      {
        base.Dispose(disposing);
      }
    }

    [DebuggerStepThrough]
    private void InitializeComponent()
    {
      this.components = (IContainer) new System.ComponentModel.Container();
      ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (Form1));
      this.Panel1 = new Panel();
      this.WebBrowser1 = new WebBrowser();
      this.Button1 = new Button();
      this.Button2 = new Button();
      this.Timer1 = new System.Windows.Forms.Timer(this.components);
      this.Button3 = new Button();
      this.Timer2 = new System.Windows.Forms.Timer(this.components);
      this.TextBox1 = new TextBox();
      this.TextBox2 = new TextBox();
      this.Label1 = new Label();
      this.Label2 = new Label();
      this.Label3 = new Label();
      this.Timer3 = new System.Windows.Forms.Timer(this.components);
      this.Label4 = new Label();
      this.TextBox3 = new TextBox();
      this.Panel1.SuspendLayout();
      this.SuspendLayout();
      this.Panel1.Controls.Add((Control) this.WebBrowser1);
      Panel panel1_1 = this.Panel1;
      Point point1 = new Point(27, 90);
      Point point2 = point1;
      panel1_1.Location = point2;
      this.Panel1.Name = "Panel1";
      Panel panel1_2 = this.Panel1;
      Size size1 = new Size(869, 499);
      Size size2 = size1;
      panel1_2.Size = size2;
      this.Panel1.TabIndex = 0;
      this.WebBrowser1.Dock = DockStyle.Fill;
      WebBrowser webBrowser1_1 = this.WebBrowser1;
      point1 = new Point(0, 0);
      Point point3 = point1;
      webBrowser1_1.Location = point3;
      WebBrowser webBrowser1_2 = this.WebBrowser1;
      size1 = new Size(20, 20);
      Size size3 = size1;
      webBrowser1_2.MinimumSize = size3;
      this.WebBrowser1.Name = "WebBrowser1";
      WebBrowser webBrowser1_3 = this.WebBrowser1;
      size1 = new Size(869, 499);
      Size size4 = size1;
      webBrowser1_3.Size = size4;
      this.WebBrowser1.TabIndex = 0;
      Button button1_1 = this.Button1;
      point1 = new Point(27, 13);
      Point point4 = point1;
      button1_1.Location = point4;
      this.Button1.Name = "Button1";
      Button button1_2 = this.Button1;
      size1 = new Size(75, 23);
      Size size5 = size1;
      button1_2.Size = size5;
      this.Button1.TabIndex = 1;
      this.Button1.Text = "Load Page";
      this.Button1.UseVisualStyleBackColor = true;
      Button button2_1 = this.Button2;
      point1 = new Point(109, 13);
      Point point5 = point1;
      button2_1.Location = point5;
      this.Button2.Name = "Button2";
      Button button2_2 = this.Button2;
      size1 = new Size(75, 23);
      Size size6 = size1;
      button2_2.Size = size6;
      this.Button2.TabIndex = 2;
      this.Button2.Text = "Start Betting";
      this.Button2.UseVisualStyleBackColor = true;
      Button button3_1 = this.Button3;
      point1 = new Point(191, 13);
      Point point6 = point1;
      button3_1.Location = point6;
      this.Button3.Name = "Button3";
      Button button3_2 = this.Button3;
      size1 = new Size(75, 23);
      Size size7 = size1;
      button3_2.Size = size7;
      this.Button3.TabIndex = 3;
      this.Button3.Text = "Stop Betting";
      this.Button3.UseVisualStyleBackColor = true;
      TextBox textBox1_1 = this.TextBox1;
      point1 = new Point(385, 15);
      Point point7 = point1;
      textBox1_1.Location = point7;
      this.TextBox1.Name = "TextBox1";
      TextBox textBox1_2 = this.TextBox1;
      size1 = new Size(42, 20);
      Size size8 = size1;
      textBox1_2.Size = size8;
      this.TextBox1.TabIndex = 4;
      TextBox textBox2_1 = this.TextBox2;
      point1 = new Point(502, 15);
      Point point8 = point1;
      textBox2_1.Location = point8;
      this.TextBox2.Name = "TextBox2";
      TextBox textBox2_2 = this.TextBox2;
      size1 = new Size(100, 20);
      Size size9 = size1;
      textBox2_2.Size = size9;
      this.TextBox2.TabIndex = 5;
      this.Label1.AutoSize = true;
      Label label1_1 = this.Label1;
      point1 = new Point(272, 18);
      Point point9 = point1;
      label1_1.Location = point9;
      this.Label1.Name = "Label1";
      Label label1_2 = this.Label1;
      size1 = new Size(107, 13);
      Size size10 = size1;
      label1_2.Size = size10;
      this.Label1.TabIndex = 6;
      this.Label1.Text = "Biggest losing streak:";
      this.Label2.AutoSize = true;
      Label label2_1 = this.Label2;
      point1 = new Point(433, 18);
      Point point10 = point1;
      label2_1.Location = point10;
      this.Label2.Name = "Label2";
      Label label2_2 = this.Label2;
      size1 = new Size(63, 13);
      Size size11 = size1;
      label2_2.Size = size11;
      this.Label2.TabIndex = 7;
      this.Label2.Text = "Biggest bet:";
      this.Label3.AutoSize = true;
      Label label3_1 = this.Label3;
      point1 = new Point(27, 43);
      Point point11 = point1;
      label3_1.Location = point11;
      this.Label3.Name = "Label3";
      Label label3_2 = this.Label3;
      size1 = new Size(859, 26);
      Size size12 = size1;
      label3_2.Size = size12;
      this.Label3.TabIndex = 8;
      this.Label3.Text = componentResourceManager.GetString("Label3.Text");
      this.Label4.AutoSize = true;
      Label label4_1 = this.Label4;
      point1 = new Point(608, 18);
      Point point12 = point1;
      label4_1.Location = point12;
      this.Label4.Name = "Label4";
      Label label4_2 = this.Label4;
      size1 = new Size(100, 13);
      Size size13 = size1;
      label4_2.Size = size13;
      this.Label4.TabIndex = 9;
      this.Label4.Text = "Reset losing streak:";
      TextBox textBox3_1 = this.TextBox3;
      point1 = new Point(714, 15);
      Point point13 = point1;
      textBox3_1.Location = point13;
      this.TextBox3.Name = "TextBox3";
      TextBox textBox3_2 = this.TextBox3;
      size1 = new Size(34, 20);
      Size size14 = size1;
      textBox3_2.Size = size14;
      this.TextBox3.TabIndex = 10;
      Form1 form1 = this;
      size1 = new Size(908, 601);
      Size size15 = size1;
      form1.ClientSize = size15;
      this.Controls.Add((Control) this.TextBox3);
      this.Controls.Add((Control) this.Label4);
      this.Controls.Add((Control) this.Label3);
      this.Controls.Add((Control) this.Label2);
      this.Controls.Add((Control) this.Label1);
      this.Controls.Add((Control) this.TextBox2);
      this.Controls.Add((Control) this.TextBox1);
      this.Controls.Add((Control) this.Button3);
      this.Controls.Add((Control) this.Button2);
      this.Controls.Add((Control) this.Button1);
      this.Controls.Add((Control) this.Panel1);
      this.FormBorderStyle = FormBorderStyle.FixedSingle;
      this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
      this.MaximizeBox = false;
      this.Name = "Form1";
      this.StartPosition = FormStartPosition.CenterScreen;
      this.Text = "999dice autobet bot v1.0.2";
      this.Panel1.ResumeLayout(false);
      this.ResumeLayout(false);
      this.PerformLayout();
    }

    private void WebBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
    {
    }

    private void Button1_Click(object sender, EventArgs e)
    {
      this.WebBrowser1.ScriptErrorsSuppressed = true;
      this.WebBrowser1.Navigate("https://www.999dice.com/?1099954");
      this.WaitForPageLoad();
    }

    private void Button2_Click(object sender, EventArgs e)
    {
      this.rls = 0;
      this.ls = 0;
      this.x = 1;
      this.WinProfit = this.WebBrowser1.Document.GetElementById("BetProfitLabel").InnerText;
      this.RandomN();
      this.t3 = 1;
      this.Timer3.Start();
    }

    private void Button3_Click(object sender, EventArgs e)
    {
      this.x = 3;
    }

    public Task RandomN()
    {
      if (this.x != 3)
      {
        VBMath.Randomize();
        this.x = checked ((int) Math.Round((double) Conversion.Int((float) unchecked (2.0 * (double) VBMath.Rnd() + 1.0))));
        this.WinLose();
      }
      Task task;
      return task;
    }

    public Task Bet()
    {
      if ((double) this.rls == Conversions.ToDouble(this.TextBox3.Text))
      {
        this.WebBrowser1.Document.GetElementById("BetResetButton").InvokeMember("click");
        this.rls = 0;
      }
      if (this.x == 1)
        this.WebBrowser1.Document.GetElementById("BetHighButton").InvokeMember("click");
      else if (this.x == 2)
        this.WebBrowser1.Document.GetElementById("BetLowButton").InvokeMember("click");
      Task task;
      return task;
    }

    public Task WinLose()
    {
      if (this.x != 3)
      {
        this.NewWinProfit = this.WebBrowser1.Document.GetElementById("BetProfitLabel").InnerText;
        if (Operators.CompareString(this.NewWinProfit, this.WinProfit, false) > 0)
        {
          this.WinProfit = this.NewWinProfit;
          this.ls = checked (this.ls + 1);
          this.TextBox1.Text = Conversions.ToString(this.ls);
          this.TextBox2.Text = this.WinProfit;
        }
        this.PageElement = this.WebBrowser1.Document.GetElementsByTagName("div");
        try
        {
          foreach (HtmlElement htmlElement in this.PageElement)
          {
            if (Operators.CompareString(htmlElement.GetAttribute("className"), "GoodNumber", false) == 0)
            {
              this.rls = 0;
              this.WebBrowser1.Document.GetElementById("BetResetButton").InvokeMember("click");
            }
            else if (Operators.CompareString(htmlElement.GetAttribute("className"), "BadNumber", false) == 0)
            {
              this.z = 1;
              this.Timer2.Start();
              this.rls = checked (this.rls + 1);
              this.WebBrowser1.Document.GetElementById("MultiplyBetButton").InvokeMember("click");
            }
          }
        }
        finally
        {
          IEnumerator enumerator;
          if (enumerator is IDisposable)
            (enumerator as IDisposable).Dispose();
        }
        this.Bet();
        this.t = 22;
        this.Timer1.Start();
      }
      Task task;
      return task;
    }

    private void WaitForPageLoad()
    {
      this.WebBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(this.PageWaiter);
      while (!this.pageready)
        Application.DoEvents();
      this.pageready = false;
    }

    private void PageWaiter(object sender, WebBrowserDocumentCompletedEventArgs e)
    {
      if (this.WebBrowser1.ReadyState != WebBrowserReadyState.Complete)
        return;
      this.pageready = true;
      this.WebBrowser1.DocumentCompleted -= new WebBrowserDocumentCompletedEventHandler(this.PageWaiter);
    }

    private void Timer1_Tick(object sender, EventArgs e)
    {
      if (this.t > 0)
      {
        this.t = checked (this.t - 1);
      }
      else
      {
        this.Timer1.Stop();
        try
        {
          foreach (HtmlElement htmlElement in this.PageElement)
          {
            if (Operators.CompareString(htmlElement.GetAttribute("className"), "GoodNumber", false) == 0)
              this.RandomN();
            else if (Operators.CompareString(htmlElement.GetAttribute("className"), "BadNumber", false) == 0)
              this.WinLose();
          }
        }
        finally
        {
          IEnumerator enumerator;
          if (enumerator is IDisposable)
            (enumerator as IDisposable).Dispose();
        }
      }
    }

    private void Timer2_Tick(object sender, EventArgs e)
    {
      if (this.z > 0)
      {
        this.z = checked (this.z - 1);
      }
      else
      {
        this.Timer2.Stop();
        this.Bet();
      }
    }

    private void Timer3_Tick(object sender, EventArgs e)
    {
      if (this.t3 > 0)
      {
        this.t3 = checked (this.t3 - 1);
        this.WebBrowser1.Document.GetElementById("MessageBox").Style = "visibility:hidden;";
      }
      else
      {
        this.Timer3.Stop();
        this.PageElement = this.WebBrowser1.Document.GetElementsByTagName("div");
        try
        {
          foreach (HtmlElement htmlElement in this.PageElement)
          {
            if (Operators.CompareString(htmlElement.GetAttribute("className"), "FaucetClaimButton", false) == 0)
              htmlElement.InvokeMember("click");
          }
        }
        finally
        {
          IEnumerator enumerator;
          if (enumerator is IDisposable)
            (enumerator as IDisposable).Dispose();
        }
        this.t3 = 601;
        this.Timer3.Start();
      }
    }

    private void TextBox1_TextChanged(object sender, EventArgs e)
    {
      this.TextBox1.Text = Conversions.ToString(this.ls);
    }

    private void TextBox2_TextChanged(object sender, EventArgs e)
    {
      this.TextBox2.Text = this.WinProfit;
    }

    private void TextBox3_TextChanged(object sender, EventArgs e)
    {
    }
  }
}
Jump to: