public static void ReturnHome(bool takeSS = true, bool goldChangeCheck = true) { if (goldChangeCheck) { //TODO: CHECK KING AND QUEENS POWER } //TODO: SET KING AND QUEEN POWER TO FALSE Main.Bot.WriteToOutput("Returning Home..."); CoCHelper.ClickBad(new Point(62, 519), 1); Thread.Sleep(500); CoCHelper.ClickBad(new Point(512, 394), 1); Thread.Sleep(2000); if (takeSS) { Main.Bot.WriteToOutput("Taking snapshot of your loot"); DateTime now = DateTime.Now; string date = string.Format("{0}.{1}.{2}", now.Day, now.Month, now.Year); string time = string.Format("{0}.{1}", now.Hour, now.Minute); CoCHelper.MakeFullScreenCapture(string.Format("{0}/{1} at {2}", GlobalVariables.LogPath, date, time)); } Thread.Sleep(2000); CoCHelper.ClickBad(new Point(428, 544), 1); int counter = 0; do { Thread.Sleep(2000); if (CoCHelper.CheckPixelColorBad(new Point(284, 28), Color.FromArgb(65, 177, 205), 20)) { CoCHelper.ClickBad(new Point(331, 330), 1); //TODO: _GUICtrlEdit_SetText($txtLog, "") return; } counter++; if (counter >= 50) { Main.Bot.WriteToOutput("Cannot return home..."); CheckMainScreen(); return; } } while (true); }