Esempio n. 1
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            //Draw the ranges of the spells.
            var menuItem = DrawMenu["QERange"].Cast <CheckBox>().CurrentValue;

            if (menuItem)
            {
                Render.Circle.DrawCircle(Player.Position, Eq.Range, System.Drawing.Color.FromArgb(100, 255, 0, 255));
            }

            foreach (var spell in SpellList)
            {
                menuItem = DrawMenu[spell.Slot + "Range"].Cast <CheckBox>().CurrentValue;
                if (menuItem)
                {
                    Render.Circle.DrawCircle(Player.Position, spell.Range, System.Drawing.Color.FromArgb(100, 255, 0, 255));
                }
            }

            if (OrbManager.WObject(false) != null)
            {
                Render.Circle.DrawCircle(OrbManager.WObject(false).Position, 100, System.Drawing.Color.White);
            }
        }
Esempio n. 2
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            //Draw the ranges of the spells.
            var menuItem = Config.Item("QERange").GetValue <Circle>();

            if (menuItem.Active)
            {
                Render.Circle.DrawCircle(Player.Position, Eq.Range, menuItem.Color);
            }

            foreach (var spell in SpellList)
            {
                menuItem = Config.Item(spell.Slot + "Range").GetValue <Circle>();
                if (menuItem.Active)
                {
                    Render.Circle.DrawCircle(Player.Position, spell.Range, menuItem.Color);
                }
            }

            if (OrbManager.WObject(false) != null)
            {
                Render.Circle.DrawCircle(OrbManager.WObject(false).Position, 100, System.Drawing.Color.White);
            }
        }
Esempio n. 3
0
        private void UseE(Obj_AI_Base enemy)
        {
            OrbManager orbsManager = new OrbManager();

            foreach (var orb in orbsManager.GetDict().)
            {
                if (ObjectManager.Player.Distance(orb) < SpellManager.E.Range + 100)
                {
                    Logger.Log("Hi");
                    var startPoint = orb.Value.Pos.To2D().Extend(ObjectManager.Player.ServerPosition.To2D(), 100);
                    var endPoint   = ObjectManager.Player.ServerPosition.To2D()
                                     .Extend(orb.Value.Pos.To2D(), ObjectManager.Player.Distance(orb.Value.Pos) > 200 ? 1300 : 1000);
                    SpellManager.Eq.Delay = SpellManager.E.Delay +
                                            ObjectManager.Player.Distance(orb.Value.Pos) / SpellManager.E.Speed;
                    SpellManager.Eq.From = orb.Value.Pos;
                    var enemyPred = SpellManager.Eq.GetPrediction(enemy);
                    if (enemyPred.Hitchance >= HitChance.High &&
                        enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false)
                        < SpellManager.Eq.Width + enemy.BoundingRadius)
                    {
                        Logger.Log("Hi");
                        SpellManager.E.Cast(orb.Value.Pos, true);
                        SpellManager.W.LastCastAttemptT = Utils.TickCount;
                        return;
                    }
                }
            }
        }
Esempio n. 4
0
        private static bool UseE(Obj_AI_Base enemy)
        {
            foreach (var orb in OrbManager.GetAllOrbs())
            {
                if (Vector3.Distance(_Player.ServerPosition, orb.ServerPosition) < Program.Q.Range)
                {
                    var startPoint = _Player.ServerPosition.To2D();// orb.ServerPosition.To2D();//.Extend(_Player.ServerPosition.To2D(), 100); //_Player.ServerPosition.To2D();//
                    var endPoint   = _Player.ServerPosition.To2D()
                                     .Extend(orb.ServerPosition.To2D(), Program.EQ.Range /*Vector3.Distance(_Player.Position, orb) > 200 ? 1300 : 1000*/);
                    //Program.EQ.CastDelay = (int)Program.E.CastDelay;// +(int)(_Player.Distance(enemy) / Program.EQ.Speed * 1000);//(int)Vector3.Distance(_Player.Position, orb) / Program.E.Speed;
                    Program.EQ.SourcePosition = _Player.ServerPosition;//orb;
                    var enemyPred = Program.EQ.GetPrediction(enemy);

                    if (debug)
                    {
                        Chat.Print(enemy.Name + " E PREDICTION RESULT: " + enemyPred.HitChance);
                        Chat.Print("EQ delay = " + Program.EQ.CastDelay);
                    }

                    if ((enemyPred.HitChance == HitChance.High || enemyPred.HitChance == HitChance.Collision || enemyPred.HitChance == HitChance.Medium) &&
                        enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) <
                        Program.EQ.Width + enemy.BoundingRadius)
                    {
                        //preventing reverse E,hopefully
                        double deltaY = enemyPred.UnitPosition.Y - _Player.Position.Y;
                        double deltaX = enemyPred.UnitPosition.X - _Player.Position.X;
                        double angleInDegreesEnemy = Math.Atan2(deltaY, deltaX) * 180 / Math.PI;
                        deltaY = orb.ServerPosition.Y - _Player.Position.Y;
                        deltaX = orb.ServerPosition.X - _Player.Position.X;
                        double angleInDegreesOrb = Math.Atan2(deltaY, deltaX) * 180 / Math.PI;
                        angleInDegreesEnemy += 360;
                        angleInDegreesOrb   += 360;
                        angleInDegreesEnemy %= 360;
                        angleInDegreesOrb   %= 360;
                        if (Math.Abs(angleInDegreesEnemy - angleInDegreesOrb) > 45)
                        {
                            if (debug)
                            {
                                Chat.Print("Prevented a weird angle E: " + Math.Abs(angleInDegreesEnemy - angleInDegreesOrb));
                            }
                            continue;
                        }

                        Program.QECombo = Program.tickCount;
                        if (debug)
                        {
                            Chat.Print("Use E " + enemy.Name + " " + Program.EQ.Range);
                        }
                        Program.E.Cast(orb.ServerPosition);
                        qe  = orb.ServerPosition;
                        qeb = true;
                        return(true);
                    }
                }
            }
            return(false);
        }
Esempio n. 5
0
 private static Vector3 GetGrabableObjectPos(bool onlyOrbs)
 {
     if (!onlyOrbs)
     {
         foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(minion => minion.IsValidTarget(W.Range)))
         {
             return(minion.ServerPosition);
         }
     }
     return(OrbManager.GetOrbToGrab((int)W.Range));
 }
Esempio n. 6
0
        private void OnTick()
        {
            OrbManager orbsManager = new OrbManager();

            orbsManager.LoadOrbs();
            //  orbsManager.Display();
            // AntiAfk();

            foreach (var enemy in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(SpellManager.Eq.Range)))
            {
                UseE(enemy);
            }
        }
Esempio n. 7
0
 private static void UseE(Obj_AI_Base enemy)
 {
     foreach (var orb in OrbManager.GetOrbs(true))
         if (Player.LSDistance(orb) < E.Range + 100)
         {
             var startPoint = orb.LSTo2D().LSExtend(Player.ServerPosition.LSTo2D(), 100);
             var endPoint = Player.ServerPosition.LSTo2D()
                 .LSExtend(orb.LSTo2D(), Player.LSDistance(orb) > 200 ? 1300 : 1000);
             Eq.Delay = E.Delay + Player.LSDistance(orb) / E.Speed;
             Eq.From = orb;
             var enemyPred = Eq.GetPrediction(enemy);
             if (enemyPred.Hitchance >= HitChance.High
                 && enemyPred.UnitPosition.LSTo2D().LSDistance(startPoint, endPoint, false)
                 < Eq.Width + enemy.BoundingRadius)
             {
                 E.Cast(orb, true);
                 W.LastCastAttemptT = Utils.TickCount;
                 return;
             }
         }
 }
Esempio n. 8
0
        private void Game_OnGameLoaded()
        {
            if (ObjectManager.Me.ChampionName != ChampName)
            {
                return;
            }

            SpellManager spellManager = new SpellManager();

            spellManager.LoadSpells();

            MenuL loadMenu = new MenuL();

            loadMenu.LoadMenu();

            OrbManager loadOrb = new OrbManager();

            loadOrb.LoadEvents();

            Game.OnTick += OnTick;
            // Drawing.OnEndScene += EndScene;
        }
Esempio n. 9
0
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            if (Player.Instance.Hero != Champion.Syndra)
            {
                return;
            }
            Print("Loading..");
            // Initialize classes
            Config.Initialize();

            Bootstrap.Init(null);

            OrbManager.init();

            Q  = new Spell.Skillshot(SpellSlot.Q, 800, SkillShotType.Circular, 600, int.MaxValue, 125);
            W  = new Spell.Skillshot(SpellSlot.W, 950, SkillShotType.Circular, 250, 1600, 140);
            E  = new Spell.Skillshot(SpellSlot.E, 700, SkillShotType.Cone, 250, 2500, 22);
            R  = new Spell.Targeted(SpellSlot.R, 675);
            EQ = new Spell.Skillshot(SpellSlot.Q, 1200, SkillShotType.Linear, 500, 2500, 55);
            try
            {
                ignite    = Player.Spells.FirstOrDefault(o => o.SData.Name == "summonerdot").Slot;
                gotIgnite = true;
            } catch (Exception e)
            {
            }
            TargetSelector.ActiveMode = TargetSelectorMode.LeastHealth;

            DamageIndicator.Initialize(StateHandler.GetComboDamage);
            Game.OnUpdate  += Game_OnTick;
            Drawing.OnDraw += Drawing_OnDraw;
            Interrupter.OnInterruptableSpell += OnInterruptableSpell;
            Gapcloser.OnGapcloser            += OnGapCloser;
            //Player.OnIssueOrder += OnIssueOrder;
            AIHeroClient.OnProcessSpellCast += Obj_AI_Hero_OnProcessSpellCast;
            AIHeroClient.OnBasicAttack      += Obj_AI_Hero_OnBasicAttack;
            Print("Loaded!");
        }
Esempio n. 10
0
 private static void UseE(Obj_AI_Base enemy)
 {
     foreach (var orb in OrbManager.GetOrbs(true))
     {
         if (Player.Distance(orb) < E.Range + 100)
         {
             var startPoint = orb.To2D().Extend(Player.ServerPosition.To2D(), 100);
             var endPoint   = Player.ServerPosition.To2D()
                              .Extend(orb.To2D(), Player.Distance(orb) > 200 ? 1300 : 1000);
             EQ.Delay = E.Delay + Player.Distance(orb) / E.Speed;
             EQ.From  = orb;
             var enemyPred = EQ.GetPrediction(enemy);
             if (enemyPred.Hitchance >= HitChance.High && E.IsReady() &&
                 enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) <
                 EQ.Width + enemy.BoundingRadius)
             {
                 E.Cast(orb, packets());
                 E.LastCastAttemptT = Environment.TickCount;
                 return;
             }
         }
     }
 }
Esempio n. 11
0
        public static void FinishW()
        {
            var wTarget = !Program.W.IsReady() ? null : TargetSelector.GetTarget(Program.W.Range, DamageType.Magical);

            if (wTarget != null)
            {
                //if(debug) Chat.Print(wTarget.Name);
                SpellDataInst data = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W);
                if (wTarget != null && data.ToggleState == 2 && Program.W.IsReady() && (Program.tickCount - Program.LastWCastAttempt > 15) /*&&
                                                                                                                                            * ((Program.tickCount - Program.QECombo > 30) || (!Program.E.IsReady()))*/)
                {
                    if (OrbManager.Get_Current_Orb() != null)
                    {
                        //Program.W.SourcePosition = OrbManager.WObject(false).ServerPosition;
                        Program.W.Cast(wTarget);
                        if (debug)
                        {
                            Chat.Print("Finish W");
                        }
                        Program.LastWCastAttempt = Program.tickCount;
                    }
                }
            }
        }
Esempio n. 12
0
        private static void UseSpells(bool useQ, bool useW, bool useE, bool useR, bool useQe,
                                      bool useIgnite, bool isHarass)
        {
            var qTarget     = TargetSelector.GetTarget(Q.Range + (isHarass ? Q.Width / 3 : Q.Width), TargetSelector.DamageType.Magical);
            var wTarget     = TargetSelector.GetTarget(W.Range + W.Width, TargetSelector.DamageType.Magical);
            var rTarget     = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
            var qeTarget    = TargetSelector.GetTarget(Eq.Range, TargetSelector.DamageType.Magical);
            var comboDamage = rTarget != null?GetComboDamage(rTarget) : 0;

            //Q
            if (qTarget != null && useQ)
            {
                Q.Cast(qTarget, false, true);
            }

            //E
            if (Utils.TickCount - W.LastCastAttemptT > Game.Ping + 150 && E.IsReady() && useE)
            {
                foreach (var enemy in HeroManager.Enemies)
                {
                    if (enemy.IsValidTarget(Eq.Range))
                    {
                        UseE(enemy);
                    }
                }
            }


            //W
            if (useW)
            {
                if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady() && qeTarget != null)
                {
                    var gObjectPos = GetGrabableObjectPos(wTarget == null);

                    if (gObjectPos.To2D().IsValid() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 300 &&
                        Utils.TickCount - E.LastCastAttemptT > Game.Ping + 600)
                    {
                        W.Cast(gObjectPos);
                        W.LastCastAttemptT = Utils.TickCount;
                    }
                }
                else if (wTarget != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() &&
                         Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100)
                {
                    if (OrbManager.WObject(false) != null)
                    {
                        W.From = OrbManager.WObject(false).ServerPosition;
                        W.Cast(wTarget, false, true);
                    }
                }
            }


            if (rTarget != null && useR)
            {
                useR = (Config.Item("DontUlt" + rTarget.CharData.BaseSkinName) != null &&
                        Config.Item("DontUlt" + rTarget.CharData.BaseSkinName).GetValue <bool>() == false);
            }


            if (rTarget != null && useR && R.IsReady() && comboDamage > rTarget.Health && !rTarget.IsZombie && !Q.IsReady())
            {
                R.Cast(rTarget);
            }

            //Ignite
            if (rTarget != null && useIgnite && IgniteSlot != SpellSlot.Unknown &&
                Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
            {
                if (comboDamage > rTarget.Health)
                {
                    Player.Spellbook.CastSpell(IgniteSlot, rTarget);
                }
            }

            //QE
            if (wTarget == null && qeTarget != null && Q.IsReady() && E.IsReady() && useQe)
            {
                UseQe(qeTarget);
            }

            //WE
            if (wTarget == null && qeTarget != null && E.IsReady() && useE && OrbManager.WObject(true) != null)
            {
                Eq.Delay = E.Delay + Q.Range / W.Speed;
                Eq.From  = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D();
                var prediction = Eq.GetPrediction(qeTarget);
                if (prediction.Hitchance >= HitChance.High)
                {
                    W.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100));
                    weComboT = Utils.TickCount;
                }
            }
        }
Esempio n. 13
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Drawing.DrawQ)
            {
                new Circle()
                {
                    Color = Color.Red, BorderWidth = 1, Radius = Q.Range
                }.Draw(Player.Instance.Position);
            }
            if (Config.Drawing.DrawW)
            {
                new Circle()
                {
                    Color = Color.Blue, BorderWidth = 1, Radius = W.Range
                }.Draw(Player.Instance.Position);
            }
            if (Config.Drawing.DrawQE)
            {
                new Circle()
                {
                    Color = Color.Purple, BorderWidth = 1, Radius = EQ.Range
                }.Draw(Player.Instance.Position);
            }
            if (Config.Modes.Harass.AutoHarass && !Config.Drawing.RemoveHarassText)
            {
                Drawing.DrawText(Drawing.WorldToScreen(Player.Instance.Position) - new SharpDX.Vector2(30, 11), System.Drawing.Color.White, "自动骚扰", 15);
            }
            if (Config.Modes.Harass.AutoAaHarass && !Config.Drawing.RemoveHarassText)
            {
                Drawing.DrawText(Drawing.WorldToScreen(Player.Instance.Position) - new SharpDX.Vector2(30, 22), System.Drawing.Color.White, "敌人普攻时骚扰", 15);
            }

            if (OrbManager.Get_Current_Orb() != null)
            {
                Drawing.DrawCircle(OrbManager.Get_Current_Orb().Position, W.Width, Color.Green);
            }

            if (StateHandler.debug)
            {
                Drawing.DrawCircle(StateHandler.qe, 80, Color.Red);
            }

            if (Config.Drawing.DrawQELines)
            {
                foreach (var orb in OrbManager.GetAllOrbs())
                {
                    if (!orb.Equals(OrbManager.Get_Current_Orb()) && SharpDX.Vector3.Distance(Player.Instance.Position, orb.ServerPosition) < Q.Range)
                    {
                        Drawing.DrawCircle(orb.Position, W.Width, Color.Red);

                        //var startPoint = orb.ServerPosition.To2D();//.Extend(_Player.ServerPosition.To2D(), 100); //_Player.ServerPosition.To2D();//
                        var endPoint = Player.Instance.ServerPosition.To2D()
                                       .Extend(orb.ServerPosition.To2D(), EQ.Range /*Vector3.Distance(_Player.Position, orb) > 200 ? 1300 : 1000*/);
                        //Program.EQ.CastDelay = (int)Program.E.CastDelay;// +(int)(_Player.Distance(enemy) / Program.EQ.Speed * 1000);//(int)Vector3.Distance(_Player.Position, orb) / Program.E.Speed;
                        //EQ.SourcePosition = Player.Instance.ServerPosition;//orb;
                        Drawing.DrawLine(Player.Instance.Position.WorldToScreen(), endPoint.To3D().WorldToScreen(), 5, Color.Black);
                    }
                }

                /*foreach (var enemy in ObjectManager.Get<AIHeroClient>().Where(a => a.IsEnemy == true))
                 *  if (enemy.IsValidTarget(EQ.Range))
                 *  {
                 *      Program.EQ.SourcePosition = Player.Instance.ServerPosition;//orb;
                 *      var enemyPred = Program.EQ.GetPrediction(enemy);
                 *      Drawing.DrawCircle(enemyPred.UnitPosition, enemy.BoundingRadius, Color.Black);
                 *      Drawing.DrawCircle(enemyPred.UnitPosition, enemy.BoundingRadius-1, Color.Black);
                 *      Drawing.DrawCircle(enemyPred.UnitPosition, enemy.BoundingRadius-2, Color.Black);
                 *
                 *  }*/
            }
        }
Esempio n. 14
0
        private static void UseSpells(bool useQ, bool useW, bool useE, bool useR, bool useQE, bool useIgnite, bool isHarass)
        {
            var qTarget     = SimpleTs.GetTarget(Q.Range + (isHarass ? Q.Width / 3 : Q.Width), SimpleTs.DamageType.Magical);
            var wTarget     = SimpleTs.GetTarget(W.Range + W.Width, SimpleTs.DamageType.Magical);
            var rTarget     = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Magical);
            var qeTarget    = SimpleTs.GetTarget(EQ.Range, SimpleTs.DamageType.Magical);
            var comboDamage = rTarget != null?GetComboDamage(rTarget) : 0;

            //Q
            if (qTarget != null && useQ)
            {
                Q.Cast(qTarget, false, true);
            }

            //E
            if (Environment.TickCount - W.LastCastAttemptT > Game.Ping + 150 && E.IsReady() && useE)
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>())
                {
                    if (enemy.IsValidTarget(EQ.Range))
                    {
                        UseE(enemy);
                    }
                }
            }

            //W
            if (useW)
            {
                if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady() && qeTarget != null)
                {
                    //WObject
                    var gObjectPos = GetGrabableObjectPos(wTarget == null);

                    if (gObjectPos.To2D().IsValid() && Environment.TickCount - W.LastCastAttemptT > Game.Ping + 100 && Environment.TickCount - E.LastCastAttemptT > Game.Ping + 100)
                    {
                        W.Cast(gObjectPos);
                        W.LastCastAttemptT = Environment.TickCount;
                    }
                }
                else if (wTarget != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() &&
                         Environment.TickCount - W.LastCastAttemptT > Game.Ping + 100)
                {
                    if (OrbManager.WObject(false) != null)
                    {
                        W.From = OrbManager.WObject(false).ServerPosition;
                        W.Cast(wTarget, false, true);
                    }
                }
            }

            if (rTarget != null)
            {
                useR = (Config.Item("DontUlt" + rTarget.BaseSkinName) != null &&
                        Config.Item("DontUlt" + rTarget.BaseSkinName).GetValue <bool>() == false) && useR;
            }

            //DFG (and ult if ready)
            if (rTarget != null && useR && comboDamage > rTarget.Health && DFG.IsReady())
            {
                DFG.Cast(rTarget);
                if (R.IsReady())
                {
                    R.Cast(rTarget);
                }
            }

            //R
            if (rTarget != null && useR && R.IsReady() && !Q.IsReady() && !DFG.IsReady())
            {
                if (comboDamage > rTarget.Health)
                {
                    R.Cast(rTarget);
                }
            }

            //Ignite
            if (rTarget != null && useIgnite && IgniteSlot != SpellSlot.Unknown &&
                Player.SummonerSpellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
            {
                if (comboDamage > rTarget.Health)
                {
                    Player.SummonerSpellbook.CastSpell(IgniteSlot, rTarget);
                }
            }

            //QE
            if (wTarget == null && qeTarget != null && Q.IsReady() && E.IsReady() && useQE)
            {
                UseQE(qeTarget);
            }

            //WE
            if (wTarget == null && qeTarget != null && E.IsReady() && useE && OrbManager.WObject(true) != null)
            {
                EQ.Delay = E.Delay + Q.Range / W.Speed;
                EQ.From  = Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D();
                var prediction = EQ.GetPrediction(qeTarget);
                if (prediction.Hitchance >= HitChance.High)
                {
                    W.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100));
                    WEComboT = Environment.TickCount;
                }
            }
        }
Esempio n. 15
0
        private static void UseSpells(bool useQ, bool useW, bool useE, bool useR, bool useQE, bool useIgnite, bool isAAHarass, AIHeroClient forcedEnemy = null)
        {
            //Chat.Print(qeb);

            debug = Config.Misc.Menu["debug"].Cast <CheckBox>().CurrentValue;
            if (instaE())
            {
                return;
            }

            if (forcedEnemy != null && debug)
            {
                Chat.Print("Forcing " + forcedEnemy.Name);
            }
            qTarget  = !Program.Q.IsReady() ? null : (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.Q.Range + Program.Q.Width, DamageType.Magical));
            wTarget  = !Program.W.IsReady() ? null : (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.W.Range, DamageType.Magical));
            rTarget  = (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.R.Range, DamageType.Magical));
            qeTarget = !Program.E.IsReady() ? null : (forcedEnemy != null ? forcedEnemy : TargetSelector.GetTarget(Program.EQ.Range, DamageType.Magical));

            comboDamage = rTarget != null?GetComboDamage(rTarget) : 0;

            //QE
            if (qeTarget != null && Program.Q.IsReady() && Program.E.IsReady() && useQE && (Program.tickCount - Program.QECombo > 15) && (Program.tickCount - Program.LastWGrabAttempt > 15))
            {
                UseQE(qeTarget);
                return;
            }

            //E
            if (qeTarget != null && Program.tickCount - Program.LastWGrabAttempt > 30 && Program.E.IsReady() && useE && (Program.tickCount - Program.QECombo > 15))
            {
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(a => a.IsEnemy == true))
                {
                    if (enemy.IsValidTarget(Program.EQ.Range))
                    {
                        if (UseE(enemy))
                        {
                            return;
                        }
                    }
                }
            }

            // if(debug) Chat.Print(qTarget.Name);
            //Q
            if (qTarget != null && useQ && Program.Q.IsReady() && (Program.tickCount - Program.LastQCastAttempt > 15))
            {
                Program.LastQCastAttempt = Program.tickCount;

                if (isAAHarass)
                {
                    Program.Q.Cast(qTarget.ServerPosition);
                    if (debug)
                    {
                        Chat.Print("Q AA harass");
                    }
                }
                //Chat.Print(_Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, 600)));
                else if (Program.Q.Range + Program.Q.Radius > _Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay)) &&
                         _Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay)) > Program.Q.Range)
                {
                    Program.Q.Cast(_Player.ServerPosition.To2D().Extend(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay), Program.Q.Range).To3D());
                    if (debug)
                    {
                        Chat.Print("Over max range Q ");
                    }
                    return;
                }
                else if (_Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay)) <= Program.Q.Range)
                {
                    Program.Q.Cast(Prediction.Position.PredictUnitPosition(qTarget, Program.Q.CastDelay).To3D());
                    if (debug)
                    {
                        Chat.Print("Under max range Q");
                    }
                    return;
                }
                else
                if (debug)
                {
                    Chat.Print("Target Q OOR");
                }
            }
            //W
            if (useW && wTarget != null)
            {
                SpellDataInst data = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W);
                if (data.ToggleState == 1 && Program.W.IsReady() && (Program.tickCount - Program.LastWGrabAttempt > 30) && ((Program.tickCount - Program.QECombo > 30)))
                {
                    if (debug)
                    {
                        Chat.Print("Grabbing shit");
                    }
                    var gObjectPos = GetGrabableObjectPos(false);
                    Program.W.Cast(gObjectPos);
                    Program.LastWGrabAttempt = Program.tickCount;
                    return;
                }
                else if (wTarget != null && data.ToggleState == 2 && Program.W.IsReady() && (Program.tickCount - Program.LastWCastAttempt > 30) /*&&
                                                                                                                                                 * ((Program.tickCount - Program.QECombo > 30) || (!Program.E.IsReady()))*/&& OrbManager.Get_Current_Orb() != null)
                {
                    if (debug)
                    {
                        Chat.Print("IN W CAST");
                    }
                    Program.W.SourcePosition = OrbManager.Get_Current_Orb().ServerPosition;
                    if (debug)
                    {
                        Chat.Print("Plain W");
                    }

                    if (isAAHarass)
                    {
                        Program.W.Cast(wTarget.ServerPosition);
                        if (debug)
                        {
                            Chat.Print("W AA harass");
                        }
                    }
                    //Chat.Print(_Player.Distance(Prediction.Position.PredictUnitPosition(qTarget, 600)));
                    else if (Program.W.Range + Program.W.Radius > _Player.Distance(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay)) &&
                             _Player.Distance(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay)) > Program.W.Range)
                    {
                        Program.W.Cast(_Player.ServerPosition.To2D().Extend(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay), Program.W.Range).To3D());
                        if (debug)
                        {
                            Chat.Print("Over max range W ");
                        }
                        return;
                    }
                    else if (_Player.Distance(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay)) <= Program.W.Range)
                    {
                        Program.W.Cast(Prediction.Position.PredictUnitPosition(wTarget, Program.W.CastDelay).To3D());
                        if (debug)
                        {
                            Chat.Print("Under max range W");
                        }
                        return;
                    }
                    else
                    if (debug)
                    {
                        Chat.Print("Target W OOR");
                    }

                    Program.LastWCastAttempt = Program.tickCount;
                    return;
                }
            }


            //R
            if (rTarget != null && (Program.tickCount - Program.LastRCastAttempt > 15))
            {
                useR = (!Config.Misc.Menu["DontUlt" + rTarget.BaseSkinName].Cast <CheckBox>().CurrentValue&& useR);
                //useR = !antiOverkill.Contains(rTarget) && useR;
                //if(debug) Chat.Print("R1 PRE");
                if (useR && (comboDamage > rTarget.Health) /* && (comboDamage - RDamage(rTarget) < rTarget.Health)*/ && Program.R.IsReady() && !rTarget.IsInvulnerable && !rTarget.IsZombie)
                {
                    if (debug)
                    {
                        Chat.Print("R1");
                    }
                    Program.R.Cast(rTarget);
                    Program.LastRCastAttempt = Program.tickCount;
                    return;
                }

                /*  else if (useR && (comboDamage > rTarget.Health) && (comboDamage - RDamage(rTarget) > rTarget.Health) && Program.R.IsReady() && !rTarget.IsInvulnerable && !rTarget.IsZombie)
                 * {
                 *    antiOverkill.Add(rTarget);
                 * }*/
            }



            //Ignite
            if (Program.gotIgnite && useIgnite && useR && rTarget != null && Program.ignite != SpellSlot.Unknown &&
                _Player.Spellbook.CanUseSpell(Program.ignite) == SpellState.Ready && !rTarget.IsInvulnerable && !rTarget.IsZombie && EntityManager.Heroes.Allies.Count(m => m.Distance(rTarget) < 400 && !m.IsMe) <= 1)
            {
                if (comboDamage < rTarget.Health && comboDamage + ObjectManager.Player.GetSummonerSpellDamage(rTarget, DamageLibrary.SummonerSpells.Ignite) > rTarget.Health)
                {
                    _Player.Spellbook.CastSpell(Program.ignite, rTarget);
                    Program.R.Cast(rTarget);
                    return;
                }
            }

            //WE

            /* if (wTarget == null && qeTarget != null && Program.E.IsReady() && useE && OrbManager.Grab_Shit(true) != null)
             * {
             *   if(debug) Chat.Print("Use WE");
             *  // Program.EQ.CastDelay = Program.E.CastDelay + (int)Program.Q.Range / Program.W.Speed;
             *   Program.EQ.SourcePosition = _Player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Program.Q.Range-200).To3D();
             *   var prediction = Program.EQ.GetPrediction(qeTarget);
             *   if (prediction.HitChance >= HitChance.High)
             *   {
             *       Program.W.Cast(_Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Program.Q.Range - 200).To3D());
             *       Program.WECombo = Program.tickCount;
             *       return;
             *   }
             * }*/
        }