Esempio n. 1
0
 private static void CastQ(AIHeroClient unit)
 {
     if (LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q))
     {
         if (MenuManager.myMenu.Item("pred.list2").GetValue <StringList>().SelectedIndex == 0)
         {
             PredictionOutput qPred = LeeSin.Q.GetPrediction(unit);
             if ((int)qPred.Hitchance >= MenuManager.myMenu.Item("combo.qHitChance").GetValue <Slider>().Value)
             {
                 LeeSin.Q.Cast(qPred.CastPosition);
             }
         }
         else if (MenuManager.myMenu.Item("pred.list2").GetValue <StringList>().SelectedIndex == 1)
         {
             resultPred qPred = myPred.GetPrediction(unit, LeeSin.Q);
             if (qPred.Hitchance >= MenuManager.myMenu.Item("combo.qHitChance").GetValue <Slider>().Value)
             {
                 LeeSin.Q.Cast(qPred.predPos);
             }
         }
     }
     else if (LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q) && unit.HasBuff("BlindMonkQOne"))
     {
         if (LeeSin.myHero.Position.Distance(unit.Position) > 700 || Environment.TickCount - LeeSin.lastQ > 2800 || LeeSin.GetDamage_Q2(unit, 0) > unit.Health)
         {
             LeeSin.Q.Cast();
         }
     }
 }
Esempio n. 2
0
 private static void CastE(AIHeroClient target)
 {
     if (LeeSin.E.IsReady() && !LeeSin.IsSecondCast(LeeSin.E) && LeeSin.myHero.Position.Distance(target.Position) < LeeSin.E.Range - 20)
     {
         LeeSin.E.Cast();
     }
     else if (LeeSin.E.IsReady() && LeeSin.IsSecondCast(LeeSin.E) && (LeeSin.myHero.Position.Distance(target.Position) > LeeSin.E.Range || LeeSin.PassiveStack == 0))
     {
         LeeSin.E.Cast();
     }
 }
Esempio n. 3
0
        private static void CastR(AIHeroClient target)
        {
            if (LeeSin.R.IsReady())
            {
                if (MenuManager.myMenu.Item("combo.rLogic").GetValue <Boolean>())
                {
                    // Find best pos to kick
                    Spell    wardSpell = LeeSin.FindWard();
                    rUtility value     = Find_R_BestPos(target);
                    if (value.hit > 1 && value.pos.Distance(LeeSin.myHero.Position) < 600)
                    {
                        if (target.Position.Distance(LeeSin.myHero.Position) < LeeSin.R.Range && Environment.TickCount - jumpToPos < 2000)
                        {
                            LeeSin.R.Cast(target);
                        }
                        else if (LeeSin.W.IsReady() && !LeeSin.IsSecondCast(LeeSin.W) && wardSpell != null)
                        {
                            jumpToPos = Environment.TickCount;
                            LeeSin.WardJump_Position(value.pos);
                        }
                    }
                }
                // Kill
                if (LeeSin.myHero.Position.Distance(target.Position) < LeeSin.R.Range)
                {
                    var r_dmg = LeeSin.GetDamage_R(target);
                    if (target.Health < r_dmg)
                    {
                        LeeSin.R.Cast(target);
                    }

                    if (LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q))
                    {
                        if (LeeSin.GetDamage_Q(target, r_dmg) + r_dmg > target.Health)
                        {
                            LeeSin.R.Cast(target);
                        }
                    }

                    if (LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q) && target.HasBuff("BlindMonkQOne"))
                    {
                        if (LeeSin.GetDamage_Q2(target, r_dmg) + r_dmg > target.Health)
                        {
                            LeeSin.R.Cast(target);
                        }
                    }
                }
            }
        }
Esempio n. 4
0
 private static void CastQ(Obj_AI_Hero target)
 {
     if (LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q))
     {
         PredictionOutput qPred = LeeSin.Q.GetPrediction(target);
         if ((int)qPred.Hitchance >= MenuManager.myMenu.Item("combo.qHitChance").GetValue <Slider>().Value)
         {
             LeeSin.Q.Cast(qPred.CastPosition);
         }
     }
     else if (LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q) && target.HasBuff("BlindMonkQOne"))
     {
         if (LeeSin.myHero.Position.Distance(target.Position) > 700 || Environment.TickCount - LeeSin.lastQ > 2800 || LeeSin.GetDamage_Q2(target, 0) > target.Health)
         {
             LeeSin.Q.Cast();
         }
     }
 }
Esempio n. 5
0
        private static void Update(EventArgs args)
        {
            if (LeeSin.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
            {
                return;
            }

            enemyMinion = MinionManager.GetMinions(LeeSin.Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.None);
            if (enemyMinion.Count() != 0 && enemyMinion[0].IsValidTarget(LeeSin.Q.Range, true, LeeSin.myHero.Position))
            {
                var    target = enemyMinion[0];
                double Q1_dmg = 0;
                double Q2_dmg = 0;

                if (LeeSin.Q.IsReady())
                {
                    Q1_dmg = LeeSin.GetDamage_Q1(target);
                    Q2_dmg = LeeSin.GetDamage_Q2(target, Q1_dmg);
                }

                if (MenuManager.myMenu.Item("lane.useE").GetValue <Boolean>() && LeeSin.E.IsReady() && LeeSin.IsSecondCast(LeeSin.E)) // Second E
                {
                    if (LeeSin.PassiveStack < 1)
                    {
                        LeeSin.E.Cast();
                        return;
                    }
                }
                if (MenuManager.myMenu.Item("lane.useW").GetValue <Boolean>() && LeeSin.W.IsReady() && LeeSin.IsSecondCast(LeeSin.W)) // Second W
                {
                    if (LeeSin.PassiveStack < 1)
                    {
                        LeeSin.W.Cast();
                        return;
                    }
                }
                if (MenuManager.myMenu.Item("lane.useQ").GetValue <Boolean>() && LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q)) // Second Q
                {
                    if (LeeSin.PassiveStack < 1 || Q2_dmg > target.Health || LeeSin.myHero.Distance(target) > 500)
                    {
                        LeeSin.Q.Cast();
                        return;
                    }
                }
                if (MenuManager.myMenu.Item("lane.useE").GetValue <Boolean>() && LeeSin.E.IsReady() && !LeeSin.IsSecondCast(LeeSin.E) && LeeSin.myHero.Distance(target) < LeeSin.E.Range) // First E
                {
                    if (LeeSin.PassiveStack < 1 || LeeSin.E.CountHits(enemyMinion, LeeSin.myHero.Position) > MenuManager.myMenu.Item("lane.countE").GetValue <Slider>().Value)
                    {
                        LeeSin.E.Cast();
                        return;
                    }
                }
                if (MenuManager.myMenu.Item("lane.useW").GetValue <Boolean>() && LeeSin.W.IsReady() && !LeeSin.IsSecondCast(LeeSin.W) && LeeSin.myHero.Distance(target) < LeeSin.E.Range) // First W
                {
                    if (LeeSin.PassiveStack < 1)
                    {
                        LeeSin.W.Cast();
                        return;
                    }
                }
                if (MenuManager.myMenu.Item("lane.useQ").GetValue <Boolean>() && LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q)) // First Q
                {
                    if (LeeSin.PassiveStack < 1 || (Q1_dmg + Q2_dmg) > target.Health)
                    {
                        LeeSin.Q.Cast(target.Position);
                        return;
                    }
                }
            }
        }
Esempio n. 6
0
        private static void startInsec()
        {
            LeeSin.myHero.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

            if (insecTarget == null || !insecTarget.IsValidTarget() || !LeeSin.R.IsReady())
            {
                return;
            }

            Vector3 endPos = new Vector3();

            if (insecAlly != default(Obj_AI_Hero))
            {
                endPos = insecAlly.Position;
            }
            else if (insecTurret != default(Obj_AI_Turret))
            {
                endPos = insecTurret.Position;
            }
            else
            {
                endPos = insecPos;
            }

            if (endPos == default(Vector3))
            {
                return;
            }

            Vector3 WardPos = insecTarget.Position + (insecTarget.Position - endPos).Normalized() * 300;

            if (LeeSin.myHero.Distance(WardPos) < 100)
            {
                LeeSin.R.Cast(insecTarget);
                return;
            }

            Spell wardSpell = LeeSin.FindWard();

            if (LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q) && LeeSin.W.IsReady() && !LeeSin.IsSecondCast(LeeSin.W) && wardSpell != null)
            {
                int     HitChance = 0;
                Vector3 pos       = new Vector3();

                if (MenuManager.myMenu.Item("pred.list2").GetValue <StringList>().SelectedIndex == 0)
                {
                    PredictionOutput pred = LeeSin.Q.GetPrediction(insecTarget);
                    HitChance = (int)pred.Hitchance;
                    pos       = pred.CastPosition;
                }
                else
                {
                    resultPred pred = myPred.GetPrediction(insecTarget, LeeSin.Q);
                    HitChance = pred.Hitchance;
                    pos       = pred.predPos;
                }

                if (HitChance >= MenuManager.myMenu.Item("insec.qHitChance").GetValue <Slider>().Value)
                {
                    LeeSin.Q.Cast(pos);
                    return;
                }
                else
                {
                    var enemyMinion = MinionManager.GetMinions(LeeSin.Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.None);
                    var isMinion    = enemyMinion.Where(unit => unit.Position.Distance(WardPos) < 500 && unit.Health > LeeSin.GetDamage_Q1(unit));
                    if (isMinion.Count() > 0)
                    {
                        PredictionOutput qPred = LeeSin.Q.GetPrediction(isMinion.First());
                        if ((int)qPred.Hitchance >= MenuManager.myMenu.Item("combo.qHitChance").GetValue <Slider>().Value)
                        {
                            LeeSin.Q.Cast(qPred.CastPosition);
                        }
                    }

                    var secondUnit = HeroManager.Enemies.Where(unit => unit.Position.Distance(WardPos) < 500);
                    if (secondUnit.Count() > 0)
                    {
                        if (MenuManager.myMenu.Item("pred.list2").GetValue <StringList>().SelectedIndex == 0)
                        {
                            PredictionOutput qPred = LeeSin.Q.GetPrediction(secondUnit.First());
                            if ((int)qPred.Hitchance >= MenuManager.myMenu.Item("combo.qHitChance").GetValue <Slider>().Value)
                            {
                                LeeSin.Q.Cast(qPred.CastPosition);
                            }
                        }
                        else
                        {
                            resultPred qPred = myPred.GetPrediction(secondUnit.First(), LeeSin.Q);
                            if (qPred.Hitchance >= MenuManager.myMenu.Item("combo.qHitChance").GetValue <Slider>().Value)
                            {
                                LeeSin.Q.Cast(qPred.predPos);
                            }
                        }
                    }
                }
            }

            if (LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q) && qHit != null && qHit.Position.Distance(WardPos) < 600)
            {
                LeeSin.Q.Cast();
                return;
            }

            if (LeeSin.myHero.Distance(WardPos) < 600 && LeeSin.W.IsReady() && !LeeSin.IsSecondCast(LeeSin.W))
            {
                LeeSin.WardJump_Position(WardPos);
                return;
            }
        }
Esempio n. 7
0
        private static void Cast_Smite(Obj_AI_Base target)
        {
            if (!MenuManager.myMenu.Item("smite.use").GetValue <KeyBind>().Active)
            {
                return;
            }

            int    smite_dmg = smiteDmg();
            double q1_dmg    = 0;
            double q2_dmg    = 0;
            double q_dmg     = 0;

            if (LeeSin.Q.IsReady())
            {
                q1_dmg = LeeSin.GetDamage_Q1(target);
                q2_dmg = LeeSin.GetDamage_Q2(target, (q1_dmg + smite_dmg));
                q_dmg  = q1_dmg + q2_dmg;
            }


            if (MenuManager.myMenu.Item("smite.useQ").GetValue <Boolean>() && LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q))
            {
                if (q_dmg + smite_dmg > target.Health)
                {
                    LeeSin.Q.Cast(target.Position);
                }
            }
            else if (MenuManager.myMenu.Item("smite.useQ").GetValue <Boolean>() && LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q))
            {
                if (q2_dmg + smite_dmg > target.Health)
                {
                    LeeSin.SmiteSpell.Cast(target);
                    LeeSin.Q.Cast();
                }
            }
            else if (smite_dmg > target.Health)
            {
                LeeSin.SmiteSpell.Cast(target);
            }
        }
Esempio n. 8
0
        private static void startInsec()
        {
            LeeSin.myHero.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

            if (insecTarget != null && insecTarget.IsValidTarget(50000) && LeeSin.R.IsReady())
            {
                return;
            }

            Vector3 endPos = new Vector3();

            if (insecAlly != default(Obj_AI_Hero))
            {
                endPos = insecAlly.Position;
            }
            else if (insecTurret != default(Obj_AI_Turret))
            {
                endPos = insecTurret.Position;
            }
            else
            {
                endPos = insecPos;
            }

            if (endPos == default(Vector3))
            {
                return;
            }


            Vector3 WardPos = insecTarget.Position + (insecTarget.Position - endPos).Normalized() * 250;

            if (LeeSin.myHero.Distance(WardPos) < 100 || (!LeeSin.W.IsReady() || LeeSin.IsSecondCast(LeeSin.W)))
            {
                LeeSin.R.Cast(insecTarget);
                return;
            }

            Spell wardSpell = LeeSin.FindWard();

            if (LeeSin.Q.IsReady() && !LeeSin.IsSecondCast(LeeSin.Q) && LeeSin.W.IsReady() && !LeeSin.IsSecondCast(LeeSin.W) && wardSpell != null)
            {
                PredictionOutput qPred = LeeSin.Q.GetPrediction(insecTarget);
                if (qPred.Hitchance >= HitChance.Medium)
                {
                    LeeSin.Q.Cast(qPred.CastPosition);
                    return;
                }
                else
                {
                    var enemyMinion = MinionManager.GetMinions(LeeSin.Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.None);
                    var isMinion    = enemyMinion.Where(unit => unit.Position.Distance(WardPos) < 500 && unit.Health > LeeSin.GetDamage_Q1(unit));
                    if (isMinion.Count() > 0)
                    {
                        qPred = LeeSin.Q.GetPrediction(isMinion.First());
                        if (qPred.Hitchance >= HitChance.Medium)
                        {
                            LeeSin.Q.Cast(qPred.CastPosition);
                            return;
                        }
                    }
                    var secondUnit = HeroManager.Enemies.Where(unit => unit.Position.Distance(WardPos) < 500);
                    if (secondUnit.Count() > 0)
                    {
                        qPred = LeeSin.Q.GetPrediction(secondUnit.First());
                        if (qPred.Hitchance >= HitChance.Medium)
                        {
                            LeeSin.Q.Cast(qPred.CastPosition);
                            return;
                        }
                    }
                }
            }

            if (LeeSin.Q.IsReady() && LeeSin.IsSecondCast(LeeSin.Q) && qHit != null && qHit.Position.Distance(WardPos) < 600)
            {
                LeeSin.Q.Cast();
                return;
            }

            if (LeeSin.myHero.Distance(WardPos) < 600 && LeeSin.W.IsReady() && !LeeSin.IsSecondCast(LeeSin.W))
            {
                LeeSin.WardJump_Position(WardPos);
                return;
            }
        }