예제 #1
0
        public static void Combo()
        {
            var target = TargetSelector.GetTarget(spells[Spells.Q].Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }

            if (Misc.GetMenuItem("ElLeeSin.Combo.Q") && spells[Spells.Q].IsReady() && Misc.IsQOne)
            {
                CastQ(target, Misc.GetMenuItem("ElLeeSin.Smite.Q"));
            }

            if (spells[Spells.R].IsReady() && Misc.GetMenuItem("ElLeeSin.Combo.R") &&
                Misc.GetMenuItem("ElLeeSin.Combo.Q") && Misc.GetMenuItem("ElLeeSin.Combo.Q2"))
            {
                var qTarget = HeroManager.Enemies.FirstOrDefault(x => x.HasBuff("BlindMonkSonicWave"));
                if (qTarget != null)
                {
                    if ((target.Health + target.AttackShield
                         > spells[Spells.Q].GetDamage(target, 1) + ObjectManager.Player.GetAutoAttackDamage(target)) &&
                        (target.Health + target.AttackShield
                         <= Misc.Q2Damage(target, spells[Spells.R].GetDamage(target))
                         + ObjectManager.Player.GetAutoAttackDamage(target)))
                    {
                        if (spells[Spells.R].CastOnUnit(target))
                        {
                            return;
                        }

                        if (Misc.GetMenuItem("ElLeeSin.Combo.StarKill1") && !spells[Spells.R].IsInRange(target) &&
                            (target.Distance(ObjectManager.Player) < 600 + spells[Spells.R].Range - 50) &&
                            (ObjectManager.Player.Mana >= 80) && !ObjectManager.Player.IsDashing())
                        {
                            Wardmanager.WardJump(target.Position, false, true);
                        }
                    }
                }
            }


            if (Misc.GetMenuItem("ElLeeSin.Combo.Q2") && !ObjectManager.Player.IsDashing() && target.HasQBuff() &&
                target.IsValidTarget(1300f) && !isInQ2)
            {
                if (castQAgain || (spells[Spells.Q].GetDamage(target, 1) > target.Health + target.AttackShield) ||
                    ((Misc.ReturnQBuff()?.Distance(target) < ObjectManager.Player.Distance(target)) &&
                     !target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(ObjectManager.Player))))
                {
                    spells[Spells.Q].Cast();
                }
            }

            if ((spells[Spells.R].GetDamage(target) > target.Health) && Misc.GetMenuItem("ElLeeSin.Combo.KS.R") &&
                target.IsValidTarget(spells[Spells.R].Range))
            {
                spells[Spells.R].CastOnUnit(target);
            }

            if (Misc.GetMenuItem("ElLeeSin.Combo.AAStacks") &&
                (PassiveStacks > MyMenu.Menu.Item("ElLeeSin.Combo.PassiveStacks").GetValue <Slider>().Value) &&
                (Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) > ObjectManager.Player.Distance(target)))
            {
                return;
            }

            if (Misc.GetMenuItem("ElLeeSin.Combo.W"))
            {
                if (Misc.GetMenuItem("ElLeeSin.Combo.Mode.WW") &&
                    (target.Distance(ObjectManager.Player) > Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)))
                {
                    Wardmanager.WardJump(target.Position, false, true);
                }

                if (!Misc.GetMenuItem("ElLeeSin.Combo.Mode.WW") &&
                    (target.Distance(ObjectManager.Player) > spells[Spells.Q].Range))
                {
                    Wardmanager.WardJump(target.Position, false, true);
                }
            }

            if (Misc.GetMenuItem("ElLeeSin.Combo.E"))
            {
                SpellE.CastE();
            }

            if (spells[Spells.W].IsReady() && Misc.GetMenuItem("ElLeeSin.Combo.W2") &&
                (!Misc.GetMenuItem("ElLeeSin.Combo.W") || !Misc.GetMenuItem("ElLeeSin.Combo.Mode.WW")))
            {
                if (Environment.TickCount - lastSpellCastTime <= 500)
                {
                    return;
                }

                if (Misc.IsWOne)
                {
                    if (target.IsValidTarget(ObjectManager.Player.AttackRange + 50))
                    {
                        spells[Spells.W].Cast();
                        lastSpellCastTime = Environment.TickCount;
                    }
                }
                else
                {
                    if ((PassiveStacks == 0) || (Environment.TickCount - LastW >= 2500))
                    {
                        spells[Spells.W].Cast();
                        lastSpellCastTime = Environment.TickCount;
                    }
                }
            }
        }
예제 #2
0
        public static void BubbKushGo(AIHeroClient target)
        {
            int posChecked    = 0;
            int maxPosToCheck = 50;
            int posRadius     = 50;
            int radiusIndex   = 0;

            var bubba     = new Bubba();
            var bubbaList = new List <Bubba>();

            while (posChecked < maxPosToCheck)
            {
                radiusIndex++;
                var curRadius       = radiusIndex * (2 * posRadius);
                var curCurcleChecks = (int)Math.Ceiling((2 * Math.PI * curRadius) / (2 * (double)posRadius));

                for (var i = 1; i < curCurcleChecks; i++)
                {
                    posChecked++;

                    var cRadians = (0x2 * Math.PI / (curCurcleChecks - 1)) * i;
                    var startPos = new Vector2((float)Math.Floor(target.Position.X + curRadius *
                                                                 Math.Cos(cRadians)), (float)Math.Floor(target.Position.Y + curRadius * Math.Sin(cRadians)));

                    var endPos     = startPos.Extend(target.Position.To2D(), 1000f);
                    var targetProj = target.Position.To2D().ProjectOn(startPos, endPos);

                    foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                    {
                        if (hero.NetworkId != target.NetworkId && hero.Distance(targetProj.SegmentPoint) <= 1000)
                        {
                            Vector2 mPos = Prediction.GetPrediction(hero, 250 + Game.Ping / 2).UnitPosition.To2D();
                            Geometry.ProjectionInfo mProj = mPos.ProjectOn(startPos, endPos);
                            if (mProj.IsOnSegment && mProj.SegmentPoint.Distance(hero.Position) <= hero.BoundingRadius + 100)
                            {
                                if (bubba.HeroesOnSegment.Contains(hero) == false)
                                {
                                    bubba.HeroToKick = hero;
                                    bubba.TargetHero = target;
                                    bubba.KickPos    = hero.Position.To2D().Extend(startPos, -(hero.BoundingRadius + 35));
                                    bubba.HeroesOnSegment.Add(hero);
                                }
                            }
                        }
                    }

                    bubbaList.Add(bubba);

                    BubbaFat =
                        bubbaList.Where(x => x.HeroesOnSegment.Count > 0)
                        .OrderByDescending(x => x.HeroesOnSegment.Count)
                        .ThenByDescending(x => x.HeroToKick.MaxHealth).FirstOrDefault();

                    if (BubbaFat != null)
                    {
                        if (!LeeSin.spells[LeeSin.Spells.R].IsReady())
                        {
                            return;
                        }

                        if (BubbaFat.KickPos.To3D().IsValid() &&
                            BubbaFat.KickPos.Distance(ObjectManager.Player) < LeeSin.spells[LeeSin.Spells.W].Range &&
                            Wardmanager.FindBestWardItem() != null &&
                            Misc.IsWOne)
                        {
                            Wardmanager.WardJump(BubbaFat.KickPos.To3D(), false, true, true);
                            LeeSin.spells[LeeSin.Spells.R].CastOnUnit(BubbaFat.HeroToKick);
                        }

                        if (MyMenu.Menu.Item("bubbaflash").IsActive() && Wardmanager.FindBestWardItem() == null && BubbaFat.KickPos.To3D().IsValid() &&
                            BubbaFat.KickPos.Distance(ObjectManager.Player) < 425)
                        {
                            if (ObjectManager.Player.Spellbook.CanUseSpell(LeeSin.flashSlot) == SpellState.Ready && Wardmanager.LastWard + 1000 < Environment.TickCount)
                            {
                                ObjectManager.Player.Spellbook.CastSpell(LeeSin.flashSlot, BubbaFat.KickPos.To3D());
                                LeeSin.spells[LeeSin.Spells.R].CastOnUnit(BubbaFat.HeroToKick);
                            }
                        }
                    }
                }
            }
        }
예제 #3
0
        private static void StarCombo()
        {
            try
            {
                var target = TargetSelector.GetTarget(
                    spells[Spells.W].Range + spells[Spells.R].Range,
                    TargetSelector.DamageType.Physical);

                Orbwalking.Orbwalk(
                    target ?? null,
                    Game.CursorPos,
                    MyMenu.Menu.Item("ExtraWindup").GetValue <Slider>().Value,
                    MyMenu.Menu.Item("HoldPosRadius").GetValue <Slider>().Value);

                if (target == null)
                {
                    return;
                }

                if (ItemManager.IsActive())
                {
                    ItemManager.CastItems(target);
                }

                if (spells[Spells.Q].IsReady())
                {
                    if (Misc.IsQOne)
                    {
                        if (spells[Spells.R].IsReady() && spells[Spells.Q].Cast(target).IsCasted())
                        {
                            return;
                        }
                    }
                    else if (target.HasQBuff() &&
                             (spells[Spells.Q].IsKillable(target, 1) ||
                              (!spells[Spells.R].IsReady() &&
                               (Utils.TickCount - spells[Spells.R].LastCastAttemptT > 300) &&
                               (Utils.TickCount - spells[Spells.R].LastCastAttemptT < 1500) &&
                               spells[Spells.Q].Cast())))
                    {
                        return;
                    }
                }

                if (spells[Spells.E].IsReady())
                {
                    if (Misc.IsEOne)
                    {
                        if (spells[Spells.E].IsInRange(target) && target.HasQBuff() && !spells[Spells.R].IsReady() &&
                            (Utils.TickCount - spells[Spells.R].LastCastAttemptT < 1500) &&
                            (ObjectManager.Player.Mana >= 80) && spells[Spells.E].Cast())
                        {
                            return;
                        }
                    }
                }

                if (!spells[Spells.Q].IsReady() || !spells[Spells.R].IsReady() || Misc.IsQOne || !target.HasQBuff())
                {
                    return;
                }

                if (spells[Spells.R].IsInRange(target))
                {
                    spells[Spells.R].CastOnUnit(target);
                }
                else if (spells[Spells.W].IsReady())
                {
                    if ((target.Distance(ObjectManager.Player) > spells[Spells.R].Range) &&
                        (target.Distance(ObjectManager.Player) < spells[Spells.R].Range + 580) && target.HasQBuff())
                    {
                        Wardmanager.WardJump(target.Position, false);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }