Пример #1
0
 private static bool IsInRangeE(AIHeroClient target)
 {
     var pos = E.GetPredPosition(target);
     return pos.DistanceToPlayer() < E.Range || (wShadow.IsValid() && wShadow.Distance(pos) < E.Range)
            || (rShadow.IsValid() && rShadow.Distance(pos) < E.Range)
            || (IsCastingW && wMissile.EndPosition.Distance(pos) < E.Range);
 }
Пример #2
0
        public override void attackMinion(Obj_AI_Minion minion, bool onlyAA)
        {
            //  if (onlyAA)return;

            if (JungleOrbwalker.CanAttack())
            {
                if (minion.Distance(player) > 400 && minion.Distance(player) <= Q.Range)
                    UseQ(minion);
                UseW(minion);
                UseE(minion);
                UseR(minion);
            }
            JungleOrbwalker.attackMinion(minion, minion.Position.To2D().Extend(player.Position.To2D(), 100).To3D());
        }
Пример #3
0
 public override void UseW(Obj_AI_Minion minion)
 {
     if (W.IsReady() && getEnchCount() != 5 && minion.Distance(player) < 340 + minion.BoundingRadius && W.GetDamage(minion) * 0.7f < minion.Health)
     {
         W.Cast();
     }
 }
Пример #4
0
        public override void UseQ(Obj_AI_Minion minion)
        {
            if (Q.IsReady())
            {
                if (Q.Instance.Name == "BlindMonkQOne" && BuffCount() < 2)
                {
                    if ((minion.Health / getDPS(minion) < 2.3f))
                    {
                        return;
                    }

                    PredictionOutput po = Q.GetPrediction(minion);
                    if (po.Hitchance >= HitChance.Low)
                    {
                        Q.Cast(po.CastPosition);
                    }
                    if (po.Hitchance == HitChance.Collision)
                    {
                        if (player.Distance(minion) > 500)
                        {
                            Q.Cast(po.CastPosition);
                        }
                        player.IssueOrder(GameObjectOrder.MoveTo, minion.Position);
                    }
                }
                else if (BuffCount() == 0 || minion.Distance(player) > 250)
                {
                    Q.Cast();
                }
            }
        }
Пример #5
0
 public override void UseE(Obj_AI_Minion minion)
 {
     if (E.IsReady() && minion.Health / getDPS(minion) > 2 && minion.Distance(player) <= 950)
     {
         E.Cast(minion.Position);
     }
 }
Пример #6
0
        public override void attackMinion(Obj_AI_Minion minion, bool onlyAA)
        {
            //  if (onlyAA)return;

            if (JungleOrbwalker.CanAttack())
            {
                if (minion.Distance(player) > 400 && minion.Distance(player) <= Q.Range)
                {
                    UseQ(minion);
                }
                UseW(minion);
                UseE(minion);
                UseR(minion);
            }
            JungleOrbwalker.attackMinion(minion, minion.Position.To2D().Extend(player.Position.To2D(), 100).To3D());
        }
Пример #7
0
 public override void UseE(Obj_AI_Minion minion)
 {
     if (E.IsReady() && minion.Distance(player) < 340+minion.BoundingRadius && E.GetDamage(minion)*0.7f<minion.Health)
     {
         E.Cast();
     }
 }
Пример #8
0
 protected override void Harass(Menu menu)
 {
     if (Target != null)
     {
         if (IsHarass2)
         {
             if (ShouldWaitMana)
             {
                 return;
             }
             if (menu.CheckBox("WE") && W.IsReady && IsW1 && E.IsReady && !MyHero.IsInRange(Target, WRange + E.Radius))
             {
                 return;
             }
         }
         else
         {
             if (WShadowIsValid && WShadow.Distance(Target.ServerPosition) <= 290 && MyHero.ManaPercent >= menu.Slider("ManaPercent"))
             {
                 E.Cast();
             }
             if (WShadowIsValid && !E.IsReady)
             {
                 Q.Cast(Target.ServerPosition);
             }
         }
     }
     base.Harass(menu);
 }
Пример #9
0
 public override void UseE(Obj_AI_Minion minion)
 {
     Console.WriteLine(getEnchCount());
     if (E.IsReady() && getEnchCount() != 5 && minion.Distance(player) < 400)
     {
         E.Cast(minion.Position);
     }
 }
Пример #10
0
 static void GameObject_OnCreate(GameObject sender, EventArgs args)
 {
     if (Environment.TickCount < lastPlaced + 300)
     {
         Obj_AI_Minion ward = (Obj_AI_Minion)sender;
         if (ward.Name.ToLower().Contains("ward") && ward.Distance(lastWardPos) < 500)
         {
             Jmpspell.Cast(ward);
         }
     }
 }
Пример #11
0
 public override void UseE(Obj_AI_Minion minion)
 {
     if (E.IsReady() && minion.Distance(player) < 300)
     {
         if (E.Instance.Name == "BlindMonkEOne" && BuffCount() == 0)
         {
             E.Cast();
         }
         else if (BuffCount() == 0)
         {
             E.Cast();
         }
     }
 }
Пример #12
0
        private static void CastE(Obj_AI_Hero target, bool isCombo = false)
        {
            var canCombo = !MainMenu["Orbwalk"]["R"].GetValue <MenuBool>().Value ||
                           !MainMenu["Orbwalk"]["RCast" + target.ChampionName].GetValue <MenuBool>().Value ||
                           (Player.Distance(target) > MainMenu["Orbwalk"]["RStopRange"].GetValue <MenuSlider>().Value &&
                            RState == 0) || HaveRMark(target) || rShadow.IsValid() || RState == -1;

            if (!E.IsReady() || (isCombo && !canCombo))
            {
                return;
            }
            if (E.IsInRange(target) && E.Cast())
            {
                return;
            }
            if (wShadow.IsValid() && wShadow.Distance(target) < E.Range && E.Cast())
            {
                return;
            }
            if (rShadow.IsValid() && rShadow.Distance(target) < E.Range)
            {
                E.Cast();
            }
        }
Пример #13
0
 public override void attackMinion(Obj_AI_Minion minion, bool onlyAA)
 {
     if (JungleOrbwalker.CanAttack())
     {
         if (minion.Distance(player) < 250)
         {
             if (getEnchCount() == 5)
                 UseQ(minion);
             UseW(minion);
             UseE(minion);
             UseR(minion);
         }
     }
     JungleOrbwalker.attackMinion(minion, minion.Position.To2D().Extend(player.Position.To2D(), 150).To3D());
 }
Пример #14
0
        public static int CheckMinionNumber(Obj_AI_Minion target)
        {
            IEnumerable <Obj_AI_Minion> M = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, SpellOption.Spieler.Position, SpellOption.E.Range);
            int Number = 0;

            for (int i = 0; i < M.Count <Obj_AI_Minion>(); i++)
            {
                if (target.Distance(M.ElementAt(i).Position) <= 200)
                {
                    Number++;
                }
            }

            return(Number);
        }
Пример #15
0
 public override void attackMinion(Obj_AI_Minion minion, bool onlyAA)
 {
     if (JungleOrbwalker.CanAttack())
     {
         if (minion.Distance(player) < 250)
         {
             if (getEnchCount() == 5)
             {
                 UseQ(minion);
             }
             UseW(minion);
             UseE(minion);
             UseR(minion);
         }
     }
     JungleOrbwalker.attackMinion(minion, minion.Position.To2D().Extend(player.Position.To2D(), 150).To3D());
 }
Пример #16
0
 private static void CastE()
 {
     if (!E.IsReady())
     {
         return;
     }
     if (
         GameObjects.EnemyHeroes.Where(i => i.IsValidTarget())
         .Any(
             i =>
             E.IsInRange(i) || (wShadow.IsValid() && wShadow.Distance(i) < E.Range) ||
             (rShadow.IsValid() && rShadow.Distance(i) < E.Range)))
     {
         E.Cast();
     }
 }
Пример #17
0
        internal static float JsTravelTime(Obj_AI_Minion mob)
        {
            var tt        = mob.Distance(ObjectManager.Player);
            var travelime = tt;

            if (Spells.Q.IsReady() &&
                Program.JungleStealMenu[Player.Instance.ChampionName + "QJ"].Cast <CheckBox>().CurrentValue)
            // Qdamage
            {
                travelime += tt / (Spells.Q.Handle.SData.MissileSpeed + Spells.Q.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd     += 1;
            }

            if (Spells.W.IsReady() &&
                Program.JungleStealMenu[Player.Instance.ChampionName + "WJ"].Cast <CheckBox>().CurrentValue)
            // Wdamage
            {
                travelime += tt / (Spells.W.Handle.SData.MissileSpeed + Spells.W.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd     += 1;
            }

            if (Spells.E.IsReady() &&
                Program.JungleStealMenu[Player.Instance.ChampionName + "EJ"].Cast <CheckBox>().CurrentValue)
            // Edamage
            {
                travelime += tt / (Spells.E.Handle.SData.MissileSpeed + Spells.E.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd     += 1;
            }

            if (Spells.R.IsReady() &&
                Program.JungleStealMenu[Player.Instance.ChampionName + "RJ"].Cast <CheckBox>().CurrentValue)
            // Rdamage
            {
                travelime += tt / (Spells.R.Handle.SData.MissileSpeed + Spells.R.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd     += 1;
            }

            return((float)travelime / Jsadd);
        }
Пример #18
0
        internal static float JsTravelTime(Obj_AI_Minion mob)
        {
            var tt = mob.Distance(ObjectManager.Player);
            var travelime = tt;

            if (Spells.Q.IsReady()
                && Program.JungleStealMenu[Player.Instance.ChampionName + "QJ"].Cast<CheckBox>().CurrentValue)
                // Qdamage
            {
                travelime += tt / (Spells.Q.Handle.SData.MissileSpeed + Spells.Q.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd += 1;
            }

            if (Spells.W.IsReady()
                && Program.JungleStealMenu[Player.Instance.ChampionName + "WJ"].Cast<CheckBox>().CurrentValue)
                // Wdamage
            {
                travelime += tt / (Spells.W.Handle.SData.MissileSpeed + Spells.W.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd += 1;
            }

            if (Spells.E.IsReady()
                && Program.JungleStealMenu[Player.Instance.ChampionName + "EJ"].Cast<CheckBox>().CurrentValue)
                // Edamage
            {
                travelime += tt / (Spells.E.Handle.SData.MissileSpeed + Spells.E.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd += 1;
            }

            if (Spells.R.IsReady()
                && Program.JungleStealMenu[Player.Instance.ChampionName + "RJ"].Cast<CheckBox>().CurrentValue)
                // Rdamage
            {
                travelime += tt / (Spells.R.Handle.SData.MissileSpeed + Spells.R.CastDelay) + Game.Ping / 2f / 1000;
                Jsadd += 1;
            }

            return (float)travelime / Jsadd;
        }
Пример #19
0
        //---------------------------------------WhyInsec()-------------------------------------------------------

        static void WhyInsec(Obj_AI_Base target, Vector3 cursorpos)
        {
            //Back distance = 300

            //Why I did that

            if (!WhyIDidThatAddonInsec && Orbwalker.ValidAzirSoldiers.Any(it => it.Distance(target) >= E.Width + target.BoundingRadius && it.Distance(target) <= (R.Width/2) - 50))
            {
                if (!WhyIDidThatAddonInsec)

                WhyIDidThatAddonInsec = true;

                Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);

                if (E.IsReady())
                {
                    InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 50).OrderByDescending(it => it.Distance(target)).First();

                    var targetpos = Prediction.Position.PredictUnitPosition(target, 500).To3D();

                    var rectangle = new Geometry.Polygon.Rectangle(Player.Position, InsecSoldier.Position, E.Width + target.BoundingRadius);

                    if (!rectangle.IsInside(targetpos) && InsecSoldier.Distance(target) <= (R.Width / 2) - 50)
                    {
                        var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));

                        if (E.Cast(CorrectRange(InsecSoldier.Position, E.Range)))
                        {
                            //Delayed insec

                            Core.DelayAction(delegate
                            {
                                if (Player.Spellbook.CastSpell(SpellSlot.Q, CursorCorrectRange(Q.Range)))
                                {
                                    LastQTime = Game.Time;
                                }

                                else WhyIDidThatAddonInsec = false;
                            }, EDelay);
                        }
                        else WhyIDidThatAddonInsec = false;
                    }
                    else { WhyIDidThatAddonInsec = false; }
                }

                else WhyIDidThatAddonInsec = false;
            }

            return;
        }
Пример #20
0
 public override void UseE(Obj_AI_Minion minion)
 {
     if (E.IsReady() && minion.Distance(player) < 340+minion.BoundingRadius && E.GetDamage(minion)*0.7f<minion.Health)
     {
         E.Cast();
     }
 }
Пример #21
0
 public override void UseE(Obj_AI_Minion minion)
 {
     Console.WriteLine(getEnchCount());
     if (E.IsReady() && getEnchCount()!=5 && minion.Distance(player) < 400)
     {
         E.Cast(minion.Position);
     }
 }
Пример #22
0
 public static int countMinionsInrange(Obj_AI_Minion l, float p)
 {
     return ObjectManager.Get<Obj_AI_Minion>().Count(i => !i.IsDead && i.IsEnemy && l.Distance(i) < p);
 }
Пример #23
0
        //---------------------------------------WhyInsec()----------------------------------------------------

        void WhyInsec(Obj_AI_Base target)
        {
            //Back distance = 300

            //Why I did that

            EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, target);

            var targetpos = Prediction.Position.PredictUnitPosition(target, 500).To3D();

            if (!WhyIDidThatAddonInsec && Orbwalker.ValidAzirSoldiers.Any(it => it.Distance(target) >= E.Width + target.BoundingRadius && it.Distance(target) <= (R.Width / 2) - 20))
            {
                WhyIDidThatAddonInsec = true;

                Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);

                if (E.IsReady())
                {
                    InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 20).OrderByDescending(it => it.Distance(target)).First();

                    var rectangle = new Geometry.Polygon.Rectangle(Player.Position, InsecSoldier.Position, E.Width + target.BoundingRadius);

                    if (!rectangle.IsInside(targetpos) && InsecSoldier.Distance(target) <= (R.Width / 2) - 50)
                    {
                        var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));

                        if (E.Cast(Vectors.CorrectSpellRange(InsecSoldier.Position, E.Range)))
                        {
                            //Delayed insec

                            Core.DelayAction(delegate
                            {
                                if (Player.Spellbook.CastSpell(SpellSlot.Q, Vectors.CorrectSpellRange(Game.CursorPos, Q.Range)))
                                {
                                    LastQTime = Game.Time;
                                }

                                else
                                {
                                    WhyIDidThatAddonInsec = false;
                                }
                            }, EDelay);
                        }
                        else
                        {
                            WhyIDidThatAddonInsec = false;
                        }
                    }
                    else
                    {
                        WhyIDidThatAddonInsec = false;
                    }
                }
                else
                {
                    WhyIDidThatAddonInsec = false;
                }
            }

            else if (!WhyIDidThatAddonInsec && W.IsReady() && E.IsReady() && Q.IsReady() && W.IsInRange(target))
            {
                var rectangle = new Geometry.Polygon.Rectangle(Player.Position, targetpos, 2 * (target.BoundingRadius + E.Width + 20));
                //rectangle.Draw(System.Drawing.Color.Yellow);

                var circle = new Geometry.Polygon.Circle(targetpos, (R.Width - 20) / 2);
                //circle.Draw(System.Drawing.Color.Red);

                var point = circle.Points.Where(it => !NavMesh.GetCollisionFlags(it).HasFlag(CollisionFlags.Wall) && W.IsInRange(it.To3D()) && !rectangle.IsInside(it)).OrderByDescending(it => it.Distance(Player)).FirstOrDefault();

                if (point != null && W.Cast(point.To3D()))
                {
                    WhyIDidThatAddonInsec = true;

                    Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);

                    Core.DelayAction(delegate
                    {
                        InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 20).OrderByDescending(it => it.Distance(target)).First();

                        var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));

                        if (E.Cast(Vectors.CorrectSpellRange(InsecSoldier.Position, E.Range)))
                        {
                            //Delayed insec

                            Core.DelayAction(delegate
                            {
                                if (Player.Spellbook.CastSpell(SpellSlot.Q, Vectors.CorrectSpellRange(Game.CursorPos, Q.Range)))
                                {
                                    LastQTime = Game.Time;
                                }

                                else
                                {
                                    WhyIDidThatAddonInsec = false;
                                }
                            }, EDelay);
                        }
                        else
                        {
                            WhyIDidThatAddonInsec = false;
                        }
                    }, 350);
                }
            }

            return;
        }
Пример #24
0
        public static void OnUpdate()
        {
            if (MenuConfig.LaneClear["Check"].Enabled && Global.Player.CountEnemyHeroesInRange(2000) > 0 || Maths.GetEnergyPercent() < MenuConfig.LaneClear["Energy"].Value)
            {
                return;
            }

            if (_turretTarget != null && _turret != null && MenuConfig.LaneClear["TurretFarm"].Enabled)
            {
                if (_turretTarget.IsDead)
                {
                    _turret       = null;
                    _turretTarget = null;
                }
                else
                {
                    var turretDamage = _turret.GetAutoAttackDamage(_turretTarget);
                    var playerDamage = Global.Player.GetAutoAttackDamage(_turretTarget);
                    var inAaRange    = _turretTarget.Distance(Global.Player) <= Global.Player.AttackRange + 65;

                    if (!inAaRange)
                    {
                        return;
                    }

                    if (_turretTarget.Health < playerDamage * 2 + turretDamage && _turretTarget.Health > turretDamage + playerDamage && Global.Orbwalker.CanAttack())
                    {
                        Global.Orbwalker.Attack(_turretTarget);
                    }

                    else if (SpellManager.E.Ready && _turretTarget.Health < Global.Player.GetSpellDamage(_turretTarget, SpellSlot.E) + playerDamage)
                    {
                        SpellManager.CastE(_turretTarget);
                    }
                    else if (SpellManager.Q.Ready && _turretTarget.Health < Global.Player.GetSpellDamage(_turretTarget, SpellSlot.Q) + playerDamage)
                    {
                        SpellManager.CastQ(_turretTarget);
                    }
                }
            }
            else
            {
                var minion = GameObjects.EnemyMinions.FirstOrDefault(x => x.IsValidTarget(SpellManager.Q.Range));
                if (minion == null)
                {
                    return;
                }

                if (SpellManager.Q.Ready && MenuConfig.LaneClear["Q"].Enabled)
                {
                    SpellManager.CastQ(minion, MenuConfig.LaneClear["Q"].Value);
                }

                if (SpellManager.W.Ready && MenuConfig.LaneClear["W"].Enabled)
                {
                    if (GameObjects.EnemyMinions.Count(x => x.IsValidTarget(1300)) >= 6 && Global.Player.Level >= 12 && Maths.GetEnergyPercent() >= 70)
                    {
                        if (ShadowManager.CanCastFirst(SpellSlot.W))
                        {
                            SpellManager.W.Cast(minion.ServerPosition);
                        }
                        else
                        {
                            SpellManager.W.Cast();
                        }
                    }
                }

                if (SpellManager.E.Ready && MenuConfig.LaneClear["E"].Enabled)
                {
                    SpellManager.CastE(minion, MenuConfig.LaneClear["E"].Value, true);
                }
            }
        }
Пример #25
0
 public override void UseE(Obj_AI_Minion minion)
 {
     if (E.IsReady() && minion.Distance(player) < 300)
     {
         if (E.Instance.Name == "BlindMonkEOne" && BuffCount() == 0)
             E.Cast();
         else if (BuffCount() == 0)
             E.Cast();
     }
 }
Пример #26
0
        public override void UseQ(Obj_AI_Minion minion)
        {
            if (Q.IsReady())
            {
                if (Q.Instance.Name == "BlindMonkQOne" && BuffCount() < 2)
                {
                    if((minion.Health / getDPS(minion) < 2.3f))
                        return;

                    PredictionOutput po = Q.GetPrediction(minion);
                    if (po.Hitchance >= HitChance.Low)
                    {
                        Q.Cast(po.CastPosition);
                    }
                    if (po.Hitchance == HitChance.Collision)
                    {
                        if (player.Distance(minion) > 500)
                        {
                            Q.Cast(po.CastPosition);
                        }
                        player.IssueOrder(GameObjectOrder.MoveTo, minion.Position);
                    }
                }
                else if (BuffCount() == 0 || minion.Distance(player) > 250)
                    Q.Cast();
            }
        }
Пример #27
0
        private static int countMinionsInrange(Obj_AI_Minion l, float p)
        {
            int num = 0;

            foreach (var enemy in ObjectManager.Get <Obj_AI_Minion>().Where(i => !i.IsDead && i.IsEnemy && l.Distance(i) < p))
            {
                num++;
            }

            return(num);
        }
Пример #28
0
 public override void UseW(Obj_AI_Minion minion)
 {
     if (W.IsReady() && getEnchCount() != 5 && minion.Distance(player) < 340 + minion.BoundingRadius && W.GetDamage(minion) * 0.7f < minion.Health)
     {
         W.Cast();
     }
 }
Пример #29
0
 public static int countMinionsInrange(Obj_AI_Minion l, float p)
 {
     return(ObjectManager.Get <Obj_AI_Minion>().Count(i => !i.IsDead && i.IsEnemy && l.Distance(i) < p));
 }
Пример #30
0
        //---------------------------------------WhyInsec()----------------------------------------------------

        void WhyInsec(Obj_AI_Base target)
        {
            //Back distance = 300

            //Why I did that

            EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, target);

            var targetpos = Prediction.Position.PredictUnitPosition(target, 500).To3D();

            if (!WhyIDidThatAddonInsec && Orbwalker.ValidAzirSoldiers.Any(it => it.Distance(target) >= E.Width + target.BoundingRadius && it.Distance(target) <= (R.Width / 2) - 20))
            {
                WhyIDidThatAddonInsec = true;

                Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);

                if (E.IsReady())
                {
                    InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 20).OrderByDescending(it => it.Distance(target)).First();

                    var rectangle = new Geometry.Polygon.Rectangle(Player.Position, InsecSoldier.Position, E.Width + target.BoundingRadius);

                    if (!rectangle.IsInside(targetpos) && InsecSoldier.Distance(target) <= (R.Width / 2) - 50)
                    {
                        var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));

                        if (E.Cast(Vectors.CorrectSpellRange(InsecSoldier.Position, E.Range)))
                        {
                            //Delayed insec

                            Core.DelayAction(delegate
                            {
                                if (Player.Spellbook.CastSpell(SpellSlot.Q, Vectors.CorrectSpellRange(Game.CursorPos, Q.Range)))
                                {
                                    LastQTime = Game.Time;
                                }

                                else WhyIDidThatAddonInsec = false;
                            }, EDelay);
                        }
                        else WhyIDidThatAddonInsec = false;
                    }
                    else { WhyIDidThatAddonInsec = false; }
                }
                else WhyIDidThatAddonInsec = false;
            }

            else if (!WhyIDidThatAddonInsec && W.IsReady() && E.IsReady() && Q.IsReady() && W.IsInRange(target))
            {
                var rectangle = new Geometry.Polygon.Rectangle(Player.Position, targetpos, 2 * (target.BoundingRadius + E.Width + 20));
                //rectangle.Draw(System.Drawing.Color.Yellow);

                var circle = new Geometry.Polygon.Circle(targetpos, (R.Width - 20)/2);
                //circle.Draw(System.Drawing.Color.Red);

                var point = circle.Points.Where(it => !NavMesh.GetCollisionFlags(it).HasFlag(CollisionFlags.Wall) && W.IsInRange(it.To3D()) && !rectangle.IsInside(it)).OrderByDescending(it => it.Distance(Player)).FirstOrDefault();

                if (point != null && W.Cast(point.To3D()))
                {
                    WhyIDidThatAddonInsec = true;

                    Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);

                    Core.DelayAction(delegate
                    {
                        InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 20).OrderByDescending(it => it.Distance(target)).First();

                        var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));

                        if (E.Cast(Vectors.CorrectSpellRange(InsecSoldier.Position, E.Range)))
                        {
                            //Delayed insec

                            Core.DelayAction(delegate
                            {
                                if (Player.Spellbook.CastSpell(SpellSlot.Q, Vectors.CorrectSpellRange(Game.CursorPos, Q.Range)))
                                {
                                    LastQTime = Game.Time;
                                }

                                else WhyIDidThatAddonInsec = false;
                            }, EDelay);
                        }
                        else WhyIDidThatAddonInsec = false;

                    }, 350);
                }

            }

            return;
        }
Пример #31
0
 public override void UseE(Obj_AI_Minion minion)
 {
     if (E.IsReady() && minion.Health / getDPS(minion) > 2 && minion.Distance(player)<=950)
         E.Cast(minion.Position);
 }
Пример #32
0
        //---------------------------------------WhyInsec()-------------------------------------------------------

        static void WhyInsec(Obj_AI_Base target, Vector3 cursorpos)
        {
            //Back distance = 300

            //Why I did that

            if (!WhyIDidThatAddonInsec && Orbwalker.ValidAzirSoldiers.Any(it => it.Distance(target) >= E.Width + target.BoundingRadius && it.Distance(target) <= (R.Width / 2) - 50))
            {
                if (!WhyIDidThatAddonInsec)
                {
                    WhyIDidThatAddonInsec = true;
                }

                Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);

                if (E.IsReady())
                {
                    InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 50).OrderByDescending(it => it.Distance(target)).First();

                    var targetpos = Prediction.Position.PredictUnitPosition(target, 500).To3D();

                    var rectangle = new Geometry.Polygon.Rectangle(Player.Position, InsecSoldier.Position, E.Width + target.BoundingRadius);

                    if (!rectangle.IsInside(targetpos) && InsecSoldier.Distance(target) <= (R.Width / 2) - 50)
                    {
                        var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));

                        if (E.Cast(CorrectRange(InsecSoldier.Position, E.Range)))
                        {
                            //Delayed insec

                            Core.DelayAction(delegate
                            {
                                if (Player.Spellbook.CastSpell(SpellSlot.Q, CursorCorrectRange(Q.Range)))
                                {
                                    LastQTime = Game.Time;
                                }

                                else
                                {
                                    WhyIDidThatAddonInsec = false;
                                }
                            }, EDelay);
                        }
                        else
                        {
                            WhyIDidThatAddonInsec = false;
                        }
                    }
                    else
                    {
                        WhyIDidThatAddonInsec = false;
                    }
                }

                else
                {
                    WhyIDidThatAddonInsec = false;
                }
            }

            return;
        }
Пример #33
0
        private void Laneclear()
        {
            var arange     = Orbwalking.GetRealAutoAttackRange(ObjectManager.Player);
            var allMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q1.Range, MinionTypes.All,
                                                      MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (allMinions.Count == 0)
            {
                return;
            }
            Obj_AI_Minion nearstMinion = null;

            foreach (var obj in ObjectManager.Get <Obj_AI_Minion>())
            {
                if (nearstMinion == null || nearstMinion.Position.Distance(ObjectManager.Player.Position) > obj.Position.Distance(ObjectManager.Player.Position))
                {
                    nearstMinion = obj;
                }
            }

            if (Program.Menu.Item("LaneClear_W").GetValue <Slider>().Value >
                ObjectManager.Player.Health / ObjectManager.Player.MaxHealth * 100)
            {
                if (W1.IsReady())
                {
                    if (W1Ready() && PassiveDown())
                    {
                        if (nearstMinion.Distance(ObjectManager.Player.Position) <= arange)
                        {
                            W1.CastOnUnit(ObjectManager.Player, Packets());
                        }
                    }

                    if (W2Ready() && (PassiveDown() || Environment.TickCount - E1.LastCastAttemptT > 2800))
                    {
                        if (nearstMinion.Distance(ObjectManager.Player.Position) <= arange)
                        {
                            W2.Cast();
                        }
                    }
                }
            }
            if (Q1.IsReady() && Program.Menu.Item("LaneClear_Q").GetValue <bool>())
            {
                if (Q1Ready() && PassiveDown())
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= Q1.Range)
                    {
                        Cast_Basic_Farm(Q1, true);
                    }
                }

                if (Q2Ready() && (PassiveDown() || Environment.TickCount - Q1.LastCastAttemptT > 2800 || getQ2Target().Distance(ObjectManager.Player) >= 400))
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= Q2.Range)
                    {
                        Q2.Cast();
                    }
                }
            }
            if (E1.IsReady() && Program.Menu.Item("LaneClear_E").GetValue <bool>())
            {
                if (E1Ready() && PassiveDown())
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= E1.Range)
                    {
                        E1.Cast();
                    }
                }

                if (E2Ready() && (PassiveDown() || Environment.TickCount - E1.LastCastAttemptT > 2800))
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= arange)
                    {
                        E2.Cast();
                    }
                }
            }
        }
Пример #34
0
        private void JungleSmite()
        {
            if (!this.Menu.Item("ElSmite.Activated").GetValue<KeyBind>().Active)
            {
                return;
            }

            Minion =
                (Obj_AI_Minion)
                MinionManager.GetMinions(this.Player.ServerPosition, 900, MinionTypes.All, MinionTeam.Neutral)
                    .FirstOrDefault(
                        buff =>
                        buff.IsValidTarget() && BuffsThatActuallyMakeSenseToSmite.Contains(buff.CharData.BaseSkinName));

            if (Minion == null)
            {
                return;
            }

            if (this.Menu.Item(Minion.CharData.BaseSkinName).IsActive())
            {
                if (Minion.Distance(this.Player.ServerPosition)
                    <= 500 + Minion.BoundingRadius + this.Player.BoundingRadius)
                {
                    if (this.Menu.Item("Smite.Spell").IsActive())
                    {
                        this.ChampionSpellSmite(this.SmiteDamage(), Minion);
                    }
                    if (this.SmiteDamage() > Minion.Health)
                    {
                        this.Player.Spellbook.CastSpell(this.SmiteSpell.Slot, Minion);
                    }
                }
            }
        }
Пример #35
0
        /// <summary>
        ///     Process Karma Lane Clear
        /// </summary>
        public static void ProcessLaneClear()
        {
            // Get minions list
            var minions = ObjectManager.Get <Obj_AI_Minion>().FindAll(m => m.IsValidTarget(Instances.Range));

            if (minions.Count == 0)
            {
                // If no minions, ignore.
                return;
            }

            // player local value
            var player = Instances.Player;

            // Using menu & spells a lot, copy to local value.
            var menu   = Instances.Menu;
            var spells = Instances.Spells;

            var manaPercent = player.ManaPercentage();

            #region Lane Clear - Q

            if (spells[SpellSlot.Q].IsReady())
            {
                #region Lane Clear - R + Q

                // Check if R is ready, we allowed R+Q in menu, we have more or equal mana percent than what we placed in menu and if we have enough minions in lane.
                if (spells[SpellSlot.R].IsReady() && menu.Item("l33t.karma.farming.lcrq").GetValue <bool>() &&
                    manaPercent >= menu.Item("l33t.karma.farming.lcminmpq").GetValue <Slider>().Value&&
                    minions.Count >= menu.Item("l33t.karma.farming.lcminminions").GetValue <Slider>().Value)
                {
                    // Best minion
                    var minion = minions.FirstOrDefault();

                    // How many targets get hit by last minion because of AoE
                    var targeted = 0;

                    // Search for minion
                    foreach (var m in minions)
                    {
                        // Find all minions that are not our minion and check how many minions would it hit.
                        var lTargeted = minions.FindAll(lm => lm != m).Count(om => om.Distance(m) < 250f);

                        // If more minions it would hit than our last minion, continue with prediction.
                        if (lTargeted > targeted)
                        {
                            // Prediction
                            var pred = spells[SpellSlot.R].GetPrediction(m);

                            // Check if Q doesn't hit anything in travel
                            if (pred.CollisionObjects.Count == 0)
                            {
                                // Update minion if passes checks
                                minion   = m;
                                targeted = lTargeted;
                            }
                        }
                    }

                    // If minion is valid for our range
                    if (minion != null && (minion.IsValidTarget(spells[SpellSlot.R].Range)))
                    {
                        // Prediction
                        var pred = spells[SpellSlot.R].GetPrediction(minion);

                        // Casting
                        spells[SpellSlot.R].Cast();
                        spells[SpellSlot.Q].Cast(pred.CastPosition);
                        return;
                    }
                }

                #endregion

                #region Lane Clear - Solo Q

                // Check if we allowed Q in menu and we have enough mana by what we placed inside the menu
                if (menu.Item("l33t.karma.farming.lcq").GetValue <bool>() &&
                    manaPercent >= menu.Item("l33t.karma.farming.lcminmpq").GetValue <Slider>().Value)
                {
                    // Best minion
                    Obj_AI_Minion minion = null;

                    // Search for minion
                    foreach (var m in
                             from m in minions
                             let pred = spells[SpellSlot.Q].GetPrediction(m)
                                        where pred.CollisionObjects.Count == 0
                                        select m)
                    {
                        if (minion == null)
                        {
                            var healthPred = HealthPrediction.GetHealthPrediction(
                                m, (int)((player.AttackDelay * 1000) * 3));
                            if (healthPred < Damages.GetDamage(m, SpellSlot.Q, false) ||
                                healthPred > Damages.GetDamage(m, SpellSlot.Q, false) + player.GetAutoAttackDamage(m))
                            {
                                minion = m;
                            }
                        }
                        else if (minion.Health > m.Health)
                        {
                            minion = m;
                        }
                    }

                    // If minion is valid for our range
                    if (minion != null && (minion.IsValidTarget(spells[SpellSlot.Q].Range)) &&
                        minion.Distance(player.ServerPosition) > player.AttackRange)
                    {
                        // Prediction
                        var pred = spells[SpellSlot.Q].GetPrediction(minion);

                        // Cast
                        spells[SpellSlot.Q].Cast(pred.CastPosition);
                    }
                }

                #endregion
            }

            #endregion
        }