/// <summary> /// Checks if the player can go to the selected Shadow. /// </summary> /// <param name="shadow">The shadow</param> /// <returns></returns> public static bool CanGoToShadow(Shadow shadow) //TODO safety Checks lel { if (MenuHelper.IsMenuEnabled("safetyChecks") && !MenuHelper.GetKeybindValue("fleeActive")) { if (shadow.State == ShadowState.Created) { if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) || (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 && shadow.ShadowObject.CountEnemiesInRange(1200f) < 2)) // add a slider for the health percent. { return(false); } } } return(shadow.State == ShadowState.Created); }
public static Vector3[] GetVertices(AIHeroClient target, bool forZhonyas = false) //TODO Zhonyas triangular ult { Shadow ultShadow = ShadowManager.RShadow; if (!ultShadow.Exists) { return(new[] { Vector3.Zero, Vector3.Zero }); } if (forZhonyas) { Vector2 vertex1 = ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize( ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D()) * Zed._spells[SpellSlot.W].Range - ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D()) .Perpendicular() * Zed._spells[SpellSlot.W].Range).Perpendicular() * Zed._spells[SpellSlot.W].Range; // Vector2 vertex2 = ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize( ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D()) .Perpendicular() * Zed._spells[SpellSlot.W].Range - ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize(target.ServerPosition.To2D() - ultShadow.Position.To2D()) * Zed._spells[SpellSlot.W].Range).Perpendicular() * Zed._spells[SpellSlot.W].Range; return(new[] { vertex1.To3D(), vertex2.To3D() }); } Vector2 vertex3 = ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize( target.ServerPosition.To2D() - ultShadow.ShadowObject.ServerPosition.To2D()) .Perpendicular() * Zed._spells[SpellSlot.W].Range; Vector2 vertex4 = ObjectManager.Player.ServerPosition.To2D() + Vector2.Normalize( ultShadow.ShadowObject.ServerPosition.To2D() - target.ServerPosition.To2D()) .Perpendicular() * Zed._spells[SpellSlot.W].Range; return(new[] { vertex3.To3D(), vertex4.To3D() }); }
/// <summary> /// Checks if the player can go to the selected Shadow. /// </summary> /// <param name="shadow">The shadow</param> /// <returns></returns> public static bool CanGoToShadow(Shadow shadow) //TODO safety Checks lel { if (Zed.getCheckBoxItem(Zed.miscMenu, "safetyChecks") && (!Zed.getKeyBindItem(Zed.fleeMenu, "fleeActive") || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))) { if (shadow.State == ShadowState.Created) { if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) || (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 && shadow.ShadowObject.CountEnemiesInRange(1200f) < 2)) { return(false); } } } return(shadow.State == ShadowState.Created); }
//TODO safety Checks lel /// <summary> /// Checks if the player can go to the selected Shadow. /// </summary> /// <param name="shadow">The shadow</param> /// <returns></returns> public static bool CanGoToShadow(Shadow shadow) { if (Zed.getCheckBoxItem(Zed.miscMenu, "safetyChecks") && (!Zed.getKeyBindItem(Zed.fleeMenu, "fleeActive") || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))) { if (shadow.State == ShadowState.Created) { if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) || (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 && shadow.ShadowObject.CountEnemiesInRange(1200f) < 2)) { return false; } } } return shadow.State == ShadowState.Created; }
/// <summary> /// Checks if the player can go to the selected Shadow. /// </summary> /// <param name="shadow">The shadow</param> /// <returns></returns> public static bool CanGoToShadow(Shadow shadow) //TODO safety Checks lel { if (MenuHelper.IsMenuEnabled("safetyChecks") && !MenuHelper.GetKeybindValue("fleeActive")) { if (shadow.State == ShadowState.Created) { if (ObjectManager.Player.HealthPercent < 35 || shadow.Position.UnderTurret(true) || (shadow.ShadowObject.CountEnemiesInRange(1200f) > 1 && shadow.ShadowObject.CountEnemiesInRange(1200f) < 2)) // add a slider for the health percent. { return false; } } } return shadow.State == ShadowState.Created; }