Advertisement
dcomicboy

Basic Bot - 1320Legends

Jun 27th, 2024
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.52 KB | None | 0 0
  1. [DllImport("gdi32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
  2. private static extern int GetPixel(IntPtr hdc, int X, int Y);
  3. [DllImport("user32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
  4. private static extern IntPtr GetDC(IntPtr hWnd);
  5. [DllImport("user32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
  6. private static extern IntPtr ReleaseDC(IntPtr hWnd);
  7.  
  8. private void Main_Bot()
  9. {
  10.     Form1.SetForegroundWindow((int)this.hWnd);
  11.     this.hDC = Form1.GetDC(this.hWnd);
  12.     Thread.Sleep(1000);
  13.     bool flag = Operators.CompareString(this.DomainUpDown1.Text, "One", false) == 0;
  14.     if (flag)
  15.     {
  16.         bool flag2 = Form1.GetPixel(this.hDC, 5, 275) == 16777215;
  17.         if (flag2)
  18.         {
  19.             while (Form1.GetPixel(this.hDC, 378, 175) != 12514557)
  20.             {
  21.             }
  22.             this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  23.             SendKeys.SendWait("{Up}");
  24.         }
  25.         else
  26.         {
  27.             do
  28.             {
  29.                 bool flag3 = this.StopButton;
  30.                 if (flag3)
  31.                 {
  32.                     break;
  33.                 }
  34.             }
  35.             while (Form1.GetPixel(this.hDC, 423, 175) != 12514557);
  36.             this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  37.             SendKeys.SendWait("{Up}");
  38.         }
  39.     }
  40.     else
  41.     {
  42.         bool flag3 = Operators.CompareString(this.DomainUpDown1.Text, "Two", false) == 0;
  43.         if (flag3)
  44.         {
  45.             bool flag2 = Form1.GetPixel(this.hDC, 5, 275) == 16777215;
  46.             if (flag2)
  47.             {
  48.                 while (Form1.GetPixel(this.hDC, 378, 175) != 12514557)
  49.                 {
  50.                 }
  51.                 this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  52.                 SendKeys.SendWait("{Up}");
  53.                 this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  54.                 SendKeys.SendWait("{Up}");
  55.             }
  56.             else
  57.             {
  58.                 do
  59.                 {
  60.                     flag3 = this.StopButton;
  61.                     if (flag3)
  62.                     {
  63.                         break;
  64.                     }
  65.                 }
  66.                 while (Form1.GetPixel(this.hDC, 423, 175) != 12514557);
  67.                 this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  68.                 SendKeys.SendWait("{Up}");
  69.                 this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  70.                 SendKeys.SendWait("{Up}");
  71.             }
  72.         }
  73.         else
  74.         {
  75.             flag3 = (Operators.CompareString(this.DomainUpDown1.Text, "Three", false) == 0);
  76.             if (flag3)
  77.             {
  78.                 bool flag2 = Form1.GetPixel(this.hDC, 5, 275) == 16777215;
  79.                 if (flag2)
  80.                 {
  81.                     while (Form1.GetPixel(this.hDC, 378, 175) != 12514557)
  82.                     {
  83.                     }
  84.                     this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  85.                     SendKeys.SendWait("{Up}");
  86.                     this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  87.                     SendKeys.SendWait("{Up}");
  88.                     this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  89.                     SendKeys.SendWait("{Up}");
  90.                 }
  91.                 else
  92.                 {
  93.                     do
  94.                     {
  95.                         flag3 = this.StopButton;
  96.                         if (flag3)
  97.                         {
  98.                             break;
  99.                         }
  100.                     }
  101.                     while (Form1.GetPixel(this.hDC, 423, 175) != 12514557);
  102.                     this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  103.                     SendKeys.SendWait("{Up}");
  104.                     this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  105.                     SendKeys.SendWait("{Up}");
  106.                     this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  107.                     SendKeys.SendWait("{Up}");
  108.                 }
  109.             }
  110.             else
  111.             {
  112.                 flag3 = (Operators.CompareString(this.DomainUpDown1.Text, "Four", false) == 0);
  113.                 if (flag3)
  114.                 {
  115.                     bool flag2 = Form1.GetPixel(this.hDC, 5, 275) == 16777215;
  116.                     if (flag2)
  117.                     {
  118.                         while (Form1.GetPixel(this.hDC, 378, 175) != 12514557)
  119.                         {
  120.                         }
  121.                         this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  122.                         SendKeys.SendWait("{Up}");
  123.                         this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  124.                         SendKeys.SendWait("{Up}");
  125.                         this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  126.                         SendKeys.SendWait("{Up}");
  127.                         this.Sleep(Conversions.ToInteger(this.TextBox4.Text));
  128.                         SendKeys.SendWait("{Up}");
  129.                     }
  130.                     else
  131.                     {
  132.                         do
  133.                         {
  134.                             flag3 = this.StopButton;
  135.                             if (flag3)
  136.                             {
  137.                                 break;
  138.                             }
  139.                         }
  140.                         while (Form1.GetPixel(this.hDC, 423, 175) != 12514557);
  141.                         this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  142.                         SendKeys.SendWait("{Up}");
  143.                         this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  144.                         SendKeys.SendWait("{Up}");
  145.                         this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  146.                         SendKeys.SendWait("{Up}");
  147.                         this.Sleep(Conversions.ToInteger(this.TextBox4.Text));
  148.                         SendKeys.SendWait("{Up}");
  149.                     }
  150.                 }
  151.                 else
  152.                 {
  153.                     flag3 = (Operators.CompareString(this.DomainUpDown1.Text, "Five", false) == 0);
  154.                     if (flag3)
  155.                     {
  156.                         bool flag2 = Form1.GetPixel(this.hDC, 5, 275) == 16777215;
  157.                         if (flag2)
  158.                         {
  159.                             while (Form1.GetPixel(this.hDC, 378, 175) != 12514557)
  160.                             {
  161.                             }
  162.                             this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  163.                             SendKeys.SendWait("{Up}");
  164.                             this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  165.                             SendKeys.SendWait("{Up}");
  166.                             this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  167.                             SendKeys.SendWait("{Up}");
  168.                             this.Sleep(Conversions.ToInteger(this.TextBox4.Text));
  169.                             SendKeys.SendWait("{Up}");
  170.                             this.Sleep(Conversions.ToInteger(this.TextBox5.Text));
  171.                             SendKeys.SendWait("{Up}");
  172.                         }
  173.                         else
  174.                         {
  175.                             do
  176.                             {
  177.                                 flag3 = this.StopButton;
  178.                                 if (flag3)
  179.                                 {
  180.                                     break;
  181.                                 }
  182.                             }
  183.                             while (Form1.GetPixel(this.hDC, 423, 175) != 12514557);
  184.                             this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  185.                             SendKeys.SendWait("{Up}");
  186.                             this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  187.                             SendKeys.SendWait("{Up}");
  188.                             this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  189.                             SendKeys.SendWait("{Up}");
  190.                             this.Sleep(Conversions.ToInteger(this.TextBox4.Text));
  191.                             SendKeys.SendWait("{Up}");
  192.                             this.Sleep(Conversions.ToInteger(this.TextBox5.Text));
  193.                             SendKeys.SendWait("{Up}");
  194.                         }
  195.                     }
  196.                     else
  197.                     {
  198.                         flag3 = (Operators.CompareString(this.DomainUpDown1.Text, "Six", false) == 0);
  199.                         if (flag3)
  200.                         {
  201.                             bool flag2 = Form1.GetPixel(this.hDC, 5, 275) == 16777215;
  202.                             if (flag2)
  203.                             {
  204.                                 while (Form1.GetPixel(this.hDC, 378, 175) != 12514557)
  205.                                 {
  206.                                 }
  207.                                 this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  208.                                 SendKeys.SendWait("{Up}");
  209.                                 this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  210.                                 SendKeys.SendWait("{Up}");
  211.                                 this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  212.                                 SendKeys.SendWait("{Up}");
  213.                                 this.Sleep(Conversions.ToInteger(this.TextBox4.Text));
  214.                                 SendKeys.SendWait("{Up}");
  215.                                 this.Sleep(Conversions.ToInteger(this.TextBox5.Text));
  216.                                 SendKeys.SendWait("{Up}");
  217.                                 this.Sleep(Conversions.ToInteger(this.TextBox6.Text));
  218.                                 SendKeys.SendWait("{Up}");
  219.                             }
  220.                             else
  221.                             {
  222.                                 do
  223.                                 {
  224.                                     flag3 = this.StopButton;
  225.                                     if (flag3)
  226.                                     {
  227.                                         break;
  228.                                     }
  229.                                 }
  230.                                 while (Form1.GetPixel(this.hDC, 423, 175) != 12514557);
  231.                                 this.Sleep(Conversions.ToInteger(this.TextBox1.Text));
  232.                                 SendKeys.SendWait("{Up}");
  233.                                 this.Sleep(Conversions.ToInteger(this.TextBox2.Text));
  234.                                 SendKeys.SendWait("{Up}");
  235.                                 this.Sleep(Conversions.ToInteger(this.TextBox3.Text));
  236.                                 SendKeys.SendWait("{Up}");
  237.                                 this.Sleep(Conversions.ToInteger(this.TextBox4.Text));
  238.                                 SendKeys.SendWait("{Up}");
  239.                                 this.Sleep(Conversions.ToInteger(this.TextBox5.Text));
  240.                                 SendKeys.SendWait("{Up}");
  241.                                 this.Sleep(Conversions.ToInteger(this.TextBox6.Text));
  242.                                 SendKeys.SendWait("{Up}");
  243.                             }
  244.                         }
  245.                     }
  246.                 }
  247.             }
  248.         }
  249.     }
  250.     Form1.ReleaseDC(this.hWnd);
  251. }
  252.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement