예제 #1
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);
                        }
                    }
                }
            }
        }
예제 #2
0
        private static void Update(EventArgs args)
        {
            if (!MenuManager.myMenu.Item("wardjump.key").GetValue <KeyBind>().Active)
            {
                return;
            }

            LeeSin.myHero.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

            Vector3 endPos = (Game.CursorPos);

            if (LeeSin.myHero.Distance(endPos) > 600)
            {
                endPos = LeeSin.myHero.Position + (Game.CursorPos - LeeSin.myHero.Position).Normalized() * 600;
            }

            LeeSin.WardJump_Position(endPos);
        }
예제 #3
0
        private static void CastW(AIHeroClient target)
        {
            if (target.CountEnemiesInRange(2000) == 1 || !LeeSin.R.IsReady() || !MenuManager.myMenu.Item("combo.rLogic").GetValue <Boolean>())
            {
                if (Environment.TickCount - LeeSin.qCast < 1000)
                {
                    return;
                }

                var allyMinion = MinionManager.GetMinions(LeeSin.W.Range, MinionTypes.All, MinionTeam.Ally, MinionOrderTypes.None);

                if (target.Position.Distance(LeeSin.myHero.Position) > 600)
                {
                    var ally = HeroManager.Allies.Where(unit => (unit.Position.Distance(target.Position) < LeeSin.Q.Range && (unit.NetworkId != LeeSin.myHero.NetworkId)));
                    if (ally.Count() > 0)
                    {
                        LeeSin.W.Cast(ally.First());
                        return;
                    }

                    var minion = allyMinion.Where(unit => (unit.Distance(target.Position) < LeeSin.Q.Range));
                    if (minion.Count() > 0)
                    {
                        LeeSin.W.Cast(minion.First());
                        return;
                    }

                    if (MenuManager.myMenu.Item("combo.ward").GetValue <Boolean>() && LeeSin.myHero.Position.Distance(target.Position) > LeeSin.Q.Range)
                    {
                        Vector3 wardPos = LeeSin.myHero.Position + (target.Position - LeeSin.myHero.Position).Normalized() * 600;
                        LeeSin.WardJump_Position(wardPos);
                        return;
                    }
                }
                else if (target.Position.Distance(LeeSin.myHero.Position) < 400)
                {
                    LeeSin.W.Cast(LeeSin.myHero);
                    return;
                }
            }
        }
예제 #4
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;
            }
        }
예제 #5
0
파일: Insec.cs 프로젝트: Rambe/LeagueSharp
        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;
            }
        }