private void button5_Click(object sender, EventArgs e) { MessageBox.Show("Press OK when ready to begin!"); Thread.Sleep(2000); BotFunctions.DoMouseClick(); Racing.startRacing(); Rectangle bounds = Screen.GetWorkingArea(Point.Empty); using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height)) { using (Graphics g = Graphics.FromImage(bitmap)) { g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size); } int x = 950; int y = 755; while (y <= 780 && x <= 970) { richTextBox1.AppendText(BotFunctions.HexConverter(bitmap.GetPixel(x, y)) + "\n"); x++; y++; } } }
private static bool checkIfFishCaught() { bool result = false; getCoords("15"); String color = BotFunctions.HexConverter(BotFunctions.GetColorAt(x, y - 600)); if (color.Equals("#FFFFBE") || color.Equals("#FFFFBF")) { result = true;//fish caught } // Check if boot caught (smaller catch window) color = BotFunctions.HexConverter(BotFunctions.GetColorAt(x, 110)); if (color.Equals("#FFFFBE") || color.Equals("#FFFFBF")) { result = true;//fish caught } return(result); }