public override void Render() { base.Render(); if (Settings.Enable.Value) { // Panic Quit Key. if (WinApi.IsKeyDown(Keys.F4)) { PoeProcessHandler.ExitPoe("cports.exe", "/close * * * * " + GameController.Window.Process.ProcessName + ".exe"); } FlaskUi(); BuffUi(); SplashPage(); } }
private void AutoChicken() { var LocalPlayer = GameController.Game.IngameState.Data.LocalPlayer; var PlayerHealth = LocalPlayer.GetComponent <Life>(); if (Settings.isPercentQuit.Value && LocalPlayer.IsValid) { if (Math.Round(PlayerHealth.HPPercentage, 3) * 100 < (Settings.percentHPQuit.Value)) { try { PoeProcessHandler.ExitPoe("cports.exe", "/close * * * * " + GameController.Window.Process.ProcessName + ".exe"); if (Settings.debugMode.Value) { File.AppendAllText("autoflaskmanagerDebug.log", DateTime.Now + " AUTO QUIT: Your Health was at: " + (Math.Round(PlayerHealth.HPPercentage, 3) * 100 + "%" + Environment.NewLine)); } } catch (Exception) { LogError("Error: Cannot find cports.exe, you must die now!", errmsg_time); } } if (Math.Round(PlayerHealth.ESPercentage, 3) * 100 < (Settings.percentESQuit.Value)) { try { PoeProcessHandler.ExitPoe("cports.exe", "/close * * * * " + GameController.Window.Process.ProcessName + ".exe"); if (Settings.debugMode.Value) { File.AppendAllText("autoflaskmanagerDebug.log", DateTime.Now + " AUTO QUIT: Your Energy Shield was at: " + (Math.Round(PlayerHealth.ESPercentage, 3) * 100 + "%" + Environment.NewLine)); } } catch (Exception) { LogError("Error: Cannot find cports.exe, you must die now!", errmsg_time); } } } return; }