Exemplo n.º 1
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.IsRecalling())
            {
                return;
            }

            Healing();

            if (Misc.Active("Misc.AutoEStunned"))
            {
                AutoEStunned();
            }

            if (Misc.Active("ultifadcignited"))
            {
                AutoUltIgniteADC();
            }

            if (Misc.Active("Misc.UseMikael"))
            {
                UseMikaels();
            }


            Killsteal();

            var target = TargetSelector.GetTarget(
                Spells[SpellSlot.Q].Range, TargetSelector.DamageType.Magical);

            if (target != null && Misc.ActiveKeyBind("Keys.HarassT"))
            {
                Harass(target);
            }


            switch (SorakaMenu.Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (target != null)
                {
                    Combo(target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                WaveClear();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                MixedModeLogic(target, true);
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                MixedModeLogic(target, false);
                break;
            }
        }
Exemplo n.º 2
0
        private static void Killsteal()
        {
            if (!Misc.Active("Killsteal"))
            {
                return;
            }

            var targets = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie);

            if (Spells[SpellSlot.Q].IsReady() && Misc.Active("Killsteal.UseQ"))
            {
                Obj_AI_Hero qtarget =
                    targets.Where(x => x.Distance(Player.Position) < Spells[SpellSlot.Q].Range)
                    .MinOrDefault(x => x.Health);
                if (qtarget != null)
                {
                    var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q);
                    if (qtarget.Health < qdmg)
                    {
                        var pred = Spells[SpellSlot.Q].GetPrediction(qtarget);
                        if (pred != null && pred.Hitchance >= Misc.GetHitChance("Hitchance.Q"))
                        {
                            Spells[SpellSlot.Q].Cast(pred.CastPosition);
                            return;
                        }
                    }
                }

                if (Spells[SpellSlot.E].IsReady() && Misc.Active("Killsteal.UseE"))
                {
                    Obj_AI_Hero etarget =
                        targets.Where(x => x.Distance(Player.Position) < Spells[SpellSlot.E].Range)
                        .MinOrDefault(x => x.Health);
                    if (etarget != null)
                    {
                        var edmg = Player.GetSpellDamage(etarget, SpellSlot.E);
                        if (etarget.Health < edmg)
                        {
                            Spells[SpellSlot.E].Cast(etarget);
                        }
                    }
                }

                if (Spells[IgniteSlot].IsReady() && Misc.Active("Killsteal.UseIgnite"))
                {
                    var targ =
                        HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() &&
                                                           Vector3.Distance(Player.ServerPosition, x.ServerPosition) <
                                                           Spells[IgniteSlot].Range &&
                                                           x.Health <
                                                           (Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite)));
                    if (targ != null)
                    {
                        Spells[IgniteSlot].Cast(targ);
                    }
                }
            }
        }
Exemplo n.º 3
0
 static void Healing()
 {
     if (Misc.Active("Healing.UseW"))
     {
         UseW();
     }
     if (Misc.Active("Healing.UseR"))
     {
         UseR();
     }
 }
Exemplo n.º 4
0
        static void DangerDetector(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var ally = args.Target as Obj_AI_Hero;

            if (sender.IsChampion() && sender.Team != Player.Team && ally != null && ally.IsAlly && (!Misc.Active("Misc.Nohealshop") || !ally.InShop()))
            {
                if (Misc.Active("Healing.UseW"))
                {
                    if (Misc.Active("w" + ally.ChampionName) && !ally.IsMe && !ally.IsZombie &&
                        ally.Distance(Player) <= Spells[SpellSlot.W].Range)
                    {
                        var damage   = sender.GetSpellDamage(ally, args.SData.Name);
                        var afterdmg = ((ally.Health - damage) / (ally.MaxHealth)) * 100f;
                        if (ally.HealthPercent < Misc.GetSlider("wpct" + ally.ChampionName) ||
                            Misc.Active("wcheckdmgafter") && afterdmg < Misc.GetSlider("wpct" + ally.ChampionName))
                        {
                            if (Misc.Active("wonlyadc") &&
                                (ally == myADC || myADC.HealthPercent <= Misc.GetSlider("wpct" + myADC.ChampionName)))
                            {
                                Spells[SpellSlot.W].CastOnUnit(myADC);
                            }
                            else if (!Misc.Active("wonlyadc"))
                            {
                                Spells[SpellSlot.W].CastOnUnit(ally);
                            }
                        }
                    }
                }
                if (Misc.Active("Healing.UseR") && Misc.Active("r" + ally.ChampionName) && !ally.IsZombie)
                {
                    var damage   = sender.GetSpellDamage(ally, args.SData.Name);
                    var afterdmg = ((ally.Health - damage) / (ally.MaxHealth)) * 100f;
                    if (ally.HealthPercent < Misc.GetSlider("rpct" + ally.ChampionName) || (Misc.Active("rcheckdmgafter") && afterdmg < Misc.GetSlider("rpct" + ally.ChampionName)))
                    {
                        var otherallies = HeroManager.Allies.Where(x => x != ally && Misc.Active("r" + x.ChampionName) && Misc.GetSlider("rpct" + x.ChampionName) > x.HealthPercent);

                        var count = otherallies.Count() + 1;

                        if (count >= Misc.GetSlider("minallies"))
                        {
                            if (Misc.Active("ultonlyadc") && (ally == myADC || myADC.HealthPercent <= Misc.GetSlider("rpct" + myADC.ChampionName)))
                            {
                                Spells[SpellSlot.R].Cast();
                            }

                            else if (!Misc.Active("ultonlyadc"))
                            {
                                Spells[SpellSlot.R].Cast();
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 5
0
 static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (Misc.Active("Farm.Disableauto") && args.Target.Type != GameObjectType.obj_AI_Hero)
     {
         var alliesinrange = HeroManager.Allies.Count(x => !x.IsMe && x.Distance(Player) <= FarmRange);
         if (alliesinrange > 0)
         {
             args.Process = false;
         }
     }
 }
Exemplo n.º 6
0
        static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (Misc.Active("Farm.Disableauto") && args.Target.Type == GameObjectType.obj_AI_Minion && SorakaMenu.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LastHit)
            {
                var alliesinrange = HeroManager.Allies.Count(x => !x.IsMe && x.Distance(Player) <= FarmRange);
                if (alliesinrange > 0)
                {
                    args.Process = false;
                }
            }

            if (Misc.Active("Combo.Disableauto") && SorakaMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                args.Process = false;
            }
        }
Exemplo n.º 7
0
 static void Harass(Obj_AI_Hero target)
 {
     if (Spells[SpellSlot.Q].IsReady() && Misc.Active("Harass.UseQ") && Player.ManaPercent > Misc.GetSlider("Harass.Mana"))
     {
         var pred = Spells[SpellSlot.Q].GetPrediction(target, true);
         if (pred.Hitchance > Misc.GetHitChance("Hitchance.Q"))
         {
             Spells[SpellSlot.Q].Cast(pred.CastPosition);
         }
     }
     if (Spells[SpellSlot.E].IsReady() && Misc.Active("Harass.UseE"))
     {
         var pred = Spells[SpellSlot.E].GetPrediction(target, true);
         if (pred.Hitchance >= Misc.GetHitChance("Hitchance.E"))
         {
             Spells[SpellSlot.E].Cast(pred.CastPosition);
         }
     }
 }
Exemplo n.º 8
0
        static void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (Player.IsDead || Player.IsRecalling())
            {
                return;
            }
            if (sender.IsValidTarget())
            {
                if (Misc.Active("Interrupter.UseQ") && Vector3.Distance(sender.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range)
                {
                    Spells[SpellSlot.Q].Cast(sender.Position);
                }

                if (Misc.Active("Interrupter.UseE") && Vector3.Distance(sender.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range)
                {
                    Spells[SpellSlot.E].Cast(sender.Position);
                }
            }
        }
Exemplo n.º 9
0
        private static void Combo(Obj_AI_Hero target)
        {
            if (Spells[SpellSlot.Q].IsReady() && Misc.Active("Combo.UseQ"))
            {
                var pred = Spells[SpellSlot.Q].GetPrediction(target);
                if (pred.Hitchance >= Misc.GetHitChance("Hitchance.Q"))
                {
                    Spells[SpellSlot.Q].Cast(pred.CastPosition);
                }
            }

            if (Spells[SpellSlot.E].IsReady() && Misc.Active("Combo.UseE"))
            {
                var pred = Spells[SpellSlot.E].GetPrediction(target);
                if (pred.Hitchance >= Misc.GetHitChance("Hitchance.E"))
                {
                    Spells[SpellSlot.E].Cast(pred.CastPosition);
                }
            }
        }
Exemplo n.º 10
0
        private static void WaveClear()
        {
            var minions =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    m =>
                    m.IsValidTarget(Spells[SpellSlot.Q].Range) && m.IsMinion && MinionManager.IsMinion(m));

            if (SpellSlot.Q.IsReady() && Misc.Active("Farm.UseQ"))
            {
                MinionManager.FarmLocation QLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.Q].Width,
                        Spells[SpellSlot.Q].Range);
                if (QLocation.MinionsHit >= 1)
                {
                    Spells[SpellSlot.Q].Cast(QLocation.Position);
                }
            }
        }
Exemplo n.º 11
0
        private static void UltDefault()
        {
            List <Obj_AI_Hero> alliesinneed = HeroManager.Allies.Where(
                hero =>
                !hero.IsDead && !hero.IsZombie && hero.Distance(Player) <= Spells[SpellSlot.W].Range &&
                hero.HealthPercent <= Misc.GetSlider("rpct" + hero.ChampionName))
                                              .ToList();

            if (alliesinneed.Count >= Misc.GetSlider("minallies"))
            {
                if (Misc.Active("ultonlyadc") && alliesinneed.Contains(myADC))
                {
                    Spells[SpellSlot.R].Cast();
                }

                else if (!Misc.Active("ultonlyadc"))
                {
                    Spells[SpellSlot.R].Cast();
                }
            }
        }
Exemplo n.º 12
0
        private static void Combo(AIHeroClient target)
        {
            if (Spells[SpellSlot.Q].IsReady() && Misc.Active("Combo.UseQ") && target.Distance(Player) < Spells[SpellSlot.Q].Range)
            {
                var pred = Misc.GetQPrediction(target);

                if (pred.Hitchance >= Misc.GetHitChance("Hitchance.Q"))
                {
                    Spells[SpellSlot.Q].Cast(pred.CastPosition);
                }
            }

            if (Spells[SpellSlot.E].IsReady() && Misc.Active("Combo.UseE") && target.Distance(Player) < Spells[SpellSlot.E].Range)
            {
                var pred = Spells[SpellSlot.E].GetPrediction(target);
                if (pred.Hitchance >= Misc.GetHitChance("Hitchance.E"))
                {
                    Spells[SpellSlot.E].Cast(pred.CastPosition);
                }
            }
        }
Exemplo n.º 13
0
        private static void UltDefault()
        {
            List <AIHeroClient> alliesinneed = HeroManager.Allies.Where(
                hero =>
                !hero.IsDead && !hero.IsZombie && (!Misc.Active("Misc.Nohealshop") || !hero.InShop()) && hero.Distance(Player) <= Spells[SpellSlot.W].Range &&
                hero.HealthPercent <= Misc.GetSlider("rpct" + hero.ChampionName) && hero.HealthPercent >= Misc.GetSlider("Healing.MinHP"))
                                               .ToList();

            if (alliesinneed.Count >= Misc.GetSlider("minallies"))
            {
                if (Misc.Active("ultonlyadc") && alliesinneed.Any(x => x.NetworkId == myADC.NetworkId))
                {
                    Spells[SpellSlot.R].Cast();
                }

                else if (!Misc.Active("ultonlyadc"))
                {
                    Spells[SpellSlot.R].Cast();
                }
            }
        }
Exemplo n.º 14
0
        static void OnGapClose(ActiveGapcloser args)
        {
            if (Player.IsDead || Player.IsRecalling())
            {
                return;
            }
            var sender = args.Sender;

            if (sender.IsValidTarget())
            {
                if (Misc.Active("Interrupter.AG.UseQ") && Vector3.Distance(args.End, Player.ServerPosition) <= Spells[SpellSlot.Q].Range)
                {
                    Spells[SpellSlot.Q].Cast(sender.ServerPosition);
                }
            }
            if (sender.IsValidTarget())
            {
                if (Misc.Active("Interrupter.AG.UseE") && Vector3.Distance(args.End, Player.ServerPosition) <= Spells[SpellSlot.E].Range)
                {
                    Spells[SpellSlot.E].Cast(sender.ServerPosition);
                }
            }
        }
Exemplo n.º 15
0
 static void Harass(AIHeroClient target)
 {
     if (SorakaMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     if (Spells[SpellSlot.Q].IsReady() && Misc.Active("Harass.UseQ") && Player.ManaPercent > Misc.GetSlider("Harass.Mana") && target.Distance(Player) < Spells[SpellSlot.Q].Range)
     {
         var pred = Spells[SpellSlot.Q].GetPrediction(target, true);
         if (pred.Hitchance >= Misc.GetHitChance("Hitchance.Q"))
         {
             Spells[SpellSlot.Q].Cast(pred.CastPosition);
         }
     }
     if (Spells[SpellSlot.E].IsReady() && Misc.Active("Harass.UseE") && target.Distance(Player) < Spells[SpellSlot.E].Range)
     {
         var pred = Spells[SpellSlot.E].GetPrediction(target, true);
         if (pred.Hitchance >= Misc.GetHitChance("Hitchance.E"))
         {
             Spells[SpellSlot.E].Cast(pred.CastPosition);
         }
     }
 }
Exemplo n.º 16
0
        private static void UltAdvanced()
        {
            List <Obj_AI_Hero> alliesinneed = HeroManager.Allies.Where(
                hero =>
                !hero.IsDead && !hero.IsZombie && (!Misc.Active("Misc.Nohealshop") || !hero.InShop()) && hero.Distance(Player) <= Spells[SpellSlot.W].Range && Misc.Active("r" + hero.ChampionName) &&
                hero.HealthPercent <= Misc.GetSlider("rpct" + hero.HealthPercent))
                                              .ToList();

            var indanger = alliesinneed.Count(x => x.CountEnemiesInRange(600) > 0);

            if (alliesinneed.Count >= Misc.GetSlider("minallies") && indanger >= 1)
            {
                if (Misc.Active("ultonlyadc") && alliesinneed.Contains(myADC))
                {
                    Spells[SpellSlot.R].Cast();
                }

                else if (!Misc.Active("ultonlyadc"))
                {
                    Spells[SpellSlot.R].Cast();
                }
            }
        }
Exemplo n.º 17
0
        static void OnDraw(EventArgs args)
        {
            if (Player.IsDead || Player.IsRecalling() || Misc.Active("Drawing.Disable"))
            {
                return;
            }

            if (Misc.Active("Drawing.DrawQ"))
            {
                Render.Circle.DrawCircle(Player.Position, Spells[SpellSlot.Q].Range, System.Drawing.Color.White);
            }
            if (Misc.Active("Drawing.DrawW"))
            {
                Render.Circle.DrawCircle(Player.Position, Spells[SpellSlot.E].Range, System.Drawing.Color.DarkCyan);
            }
            if (Misc.Active("Drawing.DrawE"))
            {
                Render.Circle.DrawCircle(Player.Position, Spells[SpellSlot.E].Range, System.Drawing.Color.RoyalBlue);
            }
            if (Misc.Active("Drawing.Drawfarm"))
            {
                Render.Circle.DrawCircle(Player.Position, FarmRange, System.Drawing.Color.Red);
            }
        }