public void UsePotionOrWait() { var tibiaWindowFocused = TibiaClient.IsFocused(); if (!tibiaWindowFocused) { return; } if (MustUsePotion()) { SendKeys.Send("{" + Configuration.Settings.Mana.HotKey + "}"); } }
public static void FindHealthAndManaBar() { TibiaClient.SetForeground(); Thread.Sleep(350); var screenShot = Screenshot.FullDesktop(); HealthBarPosition = new HealthBar().Find(screenShot); ManaBarPosition = new ManaBar().Find(screenShot); screenShot.Dispose(); CopyBarsCoordinatesToConfigurationModel(); Save(); }