Example #1
0
        private static void Flee()
        {
            var target = TargetSelector.GetTarget(ObjectManager.Player.AttackRange + Q.Range, DamageType.Physical);

            if (target != null)
            {
                if (!Q.IsReady() || !KindredMenu.fleeSmart() ||
                    !(KindredMenu.MinmanaFlee() >= Player.Instance.ManaPercent))
                {
                    return;
                }
                if (ObjectManager.Player.Distance(target.Position) <= ObjectManager.Player.GetAutoAttackRange() && Player.Instance.HealthPercent <= KindredMenu.minQcombo() || ObjectManager.Player.CountEnemiesInRange(ObjectManager.Player.AttackRange) >= KindredMenu.minQaggresive())
                {
                    Player.CastSpell(SpellSlot.Q, -1 * target.Position);
                }
                else if (ObjectManager.Player.Distance(target.Position) >= (ObjectManager.Player.GetAutoAttackRange() + Q.Range))
                {
                    Player.CastSpell(SpellSlot.Q, target.Position);
                }
                else
                {
                    Player.CastSpell(SpellSlot.Q, Game.ActiveCursorPos);
                }
            }
            else
            {
                if (Q.IsReady() && KindredMenu.MinmanaFlee() >= Player.Instance.ManaPercent)
                {
                    Player.CastSpell(SpellSlot.Q, Game.CursorPos);
                }
            }
        }