private static Dictionary <int, Bitmap> GetAvailableCrystals(Point startPoint) { var availableCrystals = new Dictionary <int, Bitmap>(); for (var i = 0; i < 3; i++) { var point = new Point(startPoint.X + 15, startPoint.Y + i * 15); availableCrystals.Add(i, ImageWorker.GetBmp(point, 15, 50)); } return(availableCrystals); }
public void WarpToBookmark() { const int sleepTime = 40; _clicker.OpenMenuAndClick(_areas[Constants.Areas.BeltBookmark], 0); Thread.Sleep(TimeSpan.FromSeconds(sleepTime)); var flag = false; for (var i = 0; i < 3; i++) { flag |= ImageWorker.AreBitmapsSameEquals(ImageWorker.GetBmp(new Point(615, 646), new Point(664, 658)), _images["WarpImage"]); } if (flag) { WaitForWarp(-sleepTime); } else { WarpToBookmark(); } }
private void button1_Click(object sender, EventArgs e) { ImageWorker.SaveImage(ImageWorker.GetBmp(new Point(Int16.Parse(TBX1.Text), Int16.Parse(TBY1.Text)), new Point(Int16.Parse(TBX2.Text), Int16.Parse(TBY2.Text)))); }
public bool HaveEnoughShield() { return(ImageWorker.AreBitmapsSameEquals(_images["Shield"], ImageWorker.GetBmp(new Point(225, 513), 5, 5))); }