Example #1
0
 private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe)
     {
         Orbwalker.ForceTarget(null);
     }
 }
Example #2
0
        //Lane
        private static void Lane()
        {
            if (Player.ManaPercentage() < Menu.Item("laneclearEMinimumMana").GetValue <Slider>().Value || Player.ManaPercentage() < Menu.Item("laneclearQMinimumMana").GetValue <Slider>().Value || Player.ManaPercentage() < Menu.Item("laneclearWMinimumMana").GetValue <Slider>().Value)
            {
                return;
            }

            var infectedminion = MinionManager.GetMinions(Player.Position, E.Range).Find(x => x.HasBuff("malzahare") && x.IsValidTarget(E.Range));
            //var allMinions = Cache.GetMinions(ObjectManager.Player.ServerPosition, E.Range, MinionTeam.Enemy);
            //var allMinionsW = Cache.GetMinions(ObjectManager.Player.ServerPosition, 450f, MinionTeam.Enemy);
            var allMinions  = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Enemy);
            var allMinionsW = MinionManager.GetMinions(450f, MinionTypes.All, MinionTeam.Enemy);

            if (allMinionsW.Count > 1)
            {
                if (infectedminion != null) // Replaced Sebby with Common
                {
                    Orbwalker.ForceTarget(infectedminion);
                }
                else
                {
                    Orbwalker.ForceTarget(null);
                }
            }
            if (allMinions.Count > Menu.Item("LaneClearEMinMinions").GetValue <Slider>().Value)
            {
                if (Menu.Item("laneclearE").GetValue <bool>() && E.IsReady())
                {
                    foreach (var minion in allMinions)
                    {
                        if (minion.IsValidTarget() && !minion.HasBuff("malzahare") && minion.Health < E.GetDamage(minion))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                }
            }
            if (Menu.Item("laneclearW").GetValue <bool>() && W.IsReady())
            {
                foreach (var minion in allMinionsW)
                {
                    if (minion.IsValidTarget())
                    {
                        W.Cast(minion);
                    }
                }
            }
            if (Menu.Item("laneclearQ").GetValue <bool>() && Q.IsReady())
            {
                var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range);
                var farmPos     = Q.GetCircularFarmLocation(allMinionsQ, 150);
                if (farmPos.MinionsHit > Menu.Item("LaneClearMinions").GetValue <Slider>().Value)
                {
                    Q.Cast(farmPos.Position);
                }
            }
        }
Example #3
0
        private void Game_OnUpdate(EventArgs args)
        {

            if (Config.Item("focusE", true).GetValue<bool>())
            {
                var eTarget = HeroManager.Enemies.FirstOrDefault(target => target.IsValidTarget() && SebbyLib.Orbwalking.InAutoAttackRange(target) && target.HasBuff("tristanaechargesound"));
                if(eTarget != null)
                {
                    Orbwalker.ForceTarget(eTarget);
                }
            }

            if (W.IsReady() && Config.Item("smartW", true).GetValue<KeyBind>().Active)
            {
                W.Cast(Game.CursorPos);
            }

            if (Program.LagFree(1))
            {
                var lvl = 7 * (Player.Level - 1);

                E.Range = 620 + lvl;
                R.Range = 620 + lvl;

                SetMana();
                Jungle();
            }

            if ((Program.LagFree(4) || Program.LagFree(2)) && R.IsReady() )
                LogicR();
            if (Program.LagFree(3) && W.IsReady() && !Player.IsWindingUp)
                LogicW();
        }
Example #4
0
        private void BeforeAttack(SebbyLib.Orbwalking.BeforeAttackEventArgs args)
        {
            if (Config.Item("visibleR", true).GetValue <bool>() && Player.HasBuff("vaynetumblefade") && Player.CountEnemiesInRange(800) > 1)
            {
                args.Process = false;
            }

            if (args.Target.Type != GameObjectType.obj_AI_Hero)
            {
                return;
            }

            var t = args.Target as Obj_AI_Hero;

            if (GetWStacks(t) < 2 && args.Target.Health > 5 * Player.GetAutoAttackDamage(t))
            {
                foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(800) && GetWStacks(target) == 2))
                {
                    if (SebbyLib.Orbwalking.InAutoAttackRange(target) && args.Target.Health > 3 * Player.GetAutoAttackDamage(target))
                    {
                        args.Process = false;
                        Orbwalker.ForceTarget(target);
                    }
                }
            }
        }
Example #5
0
        private void BeforeAttack(SebbyLib.Orbwalking.BeforeAttackEventArgs args)
        {
            if (E.IsReady() && args.Target is Obj_AI_Hero)
            {
                var t = (Obj_AI_Hero)args.Target;

                if (t.IsValidTarget())
                {
                    if (E.GetDamage(t) > t.Health)
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                        {
                            args.Process = false;
                        }
                    }
                    else if (R.IsReady() && E.GetDamage(t) + R.GetDamage(t) > t.Health && Player.Mana > RMANA + EMANA)
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                        {
                            args.Process = false;
                        }
                    }
                    else if (Program.Combo && Player.Mana > RMANA + EMANA && Config.Item("useEon" + t.ChampionName).GetValue <bool>())
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                        {
                            args.Process = false;
                        }
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + WMANA + RMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>())
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                        {
                            args.Process = false;
                        }
                    }
                }
            }

            if (Config.Item("focusE", true).GetValue <bool>())
            {
                foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(900) && target.HasBuff("tristanaechargesound")))
                {
                    if (SebbyLib.Orbwalking.InAutoAttackRange(target))
                    {
                        Orbwalker.ForceTarget(target);
                    }
                }
            }
        }
Example #6
0
        private void LogicQ()
        {
            if (Program.Farm && !FishBoneActive && !Player.IsWindingUp && Orbwalker.GetTarget() == null && SebbyLib.Orbwalking.CanAttack() && Config.Item("farmQout", true).GetValue <bool>() && Player.Mana > RMANA + WMANA + EMANA + 10)
            {
                foreach (var minion in Cache.GetMinions(Player.Position, bonusRange() + 30).Where(
                             minion => !SebbyLib.Orbwalking.InAutoAttackRange(minion) && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 400, 70);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForceTarget(minion);
                        Q.Cast();
                        return;
                    }
                }
            }

            var t = TargetSelector.GetTarget(bonusRange() + 60, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (!FishBoneActive && (!SebbyLib.Orbwalking.InAutoAttackRange(t) || t.CountEnemiesInRange(250) > 2) && Orbwalker.GetTarget() == null)
                {
                    var distance = GetRealDistance(t);
                    if (Program.Combo && (Player.Mana > RMANA + WMANA + 10 || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Program.Farm && !Player.IsWindingUp && SebbyLib.Orbwalking.CanAttack() && Config.Item("Qharras", true).GetValue <bool>() && !ObjectManager.Player.UnderTurret(true) && Player.Mana > RMANA + WMANA + EMANA + 20 && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Program.Combo && Player.Mana > RMANA + WMANA + 20 && Player.CountEnemiesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.Mana < RMANA + WMANA + 20)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.CountEnemiesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && (Program.Farm || Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.LastHit))
            {
                Q.Cast();
            }
        }
Example #7
0
        private void Orbwalking_BeforeAttack(SebbyLib.Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Target.Type == GameObjectType.obj_AI_Hero && Config.Item("focusP", true).GetValue <bool>() && args.Target.HealthPercent > 40)
            {
                var orbTarget = args.Target as Obj_AI_Hero;
                if (!orbTarget.HasBuff("quinnw"))
                {
                    var best = HeroManager.Enemies.FirstOrDefault(enemy => enemy.IsValidTarget() && SebbyLib.Orbwalking.InAutoAttackRange(enemy) && enemy.HasBuff("quinnw"));
                    if (best != null)
                    {
                        Orbwalker.ForceTarget(best);
                    }
                }
            }
            else if (Program.LaneClear && args.Target.Type == GameObjectType.obj_AI_Minion && Config.Item("farmP", true).GetValue <bool>())
            {
                var bestMinion = Cache.GetMinions(Player.Position, Player.AttackRange).FirstOrDefault(minion => minion.IsValidTarget() && SebbyLib.Orbwalking.InAutoAttackRange(minion) && minion.HasBuff("quinnw"));

                if (bestMinion != null)
                {
                    Orbwalker.ForceTarget(bestMinion);
                }
            }
        }
Example #8
0
        private void OnUpdate(EventArgs args)
        {
            if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 2 || !SebbyLib.Orbwalking.CanAttack() || !Program.Combo)
            {
                return;
            }

            var orbT = Orbwalker.GetTarget();

            if (orbT != null)
            {
                var bestTarget      = (Obj_AI_Hero)orbT;
                var hitToBestTarget = bestTarget.Health / Player.GetAutoAttackDamage(bestTarget);

                if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 0)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget() && Orbwalker.InAutoAttackRange(enemy)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < hitToBestTarget)
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                else
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget() && Orbwalker.InAutoAttackRange(enemy)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < 3)
                        {
                            bestTarget = enemy;
                            break;
                        }
                        if (Config.Item("TsAaPriority" + enemy.ChampionName).GetValue <Slider>().Value > Config.Item("TsAaPriority" + bestTarget.ChampionName).GetValue <Slider>().Value)
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                if (bestTarget.NetworkId != orbT.NetworkId)
                {
                    Program.debug("force " + bestTarget.ChampionName);
                    Orbwalker.ForceTarget(bestTarget);
                }
            }
        }
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                var  poutput = Q.GetPrediction(t);
                var  col     = poutput.CollisionObjects;
                bool cast    = true;
                foreach (var colobj in col)
                {
                    if (Q.GetDamage(colobj) < colobj.Health)
                    {
                        cast = false;
                    }
                }

                var qDmg = OktwCommon.GetKsDamage(t, Q) + Player.GetAutoAttackDamage(t);
                var eDmg = GetEdmg(t);

                if (qDmg > t.Health && eDmg < t.Health && Player.Mana > QMANA + EMANA)      // Q 데미지만으로 죽일 수 있다면...
                {
                    castQ(cast, t);
                }
                else if ((qDmg * 1.1) + eDmg > t.Health && eDmg < t.Health && Player.Mana > QMANA + EMANA && SebbyLib.Orbwalking.InAutoAttackRange(t))
                {
                    castQ(cast, t);
                }
                else if ((Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo) && Player.Mana > RMANA + QMANA + EMANA)
                {
                    if (!SebbyLib.Orbwalking.InAutoAttackRange(t) || CountMeleeInRange(400) > 0)
                    {
                        castQ(cast, t);
                    }
                }
                else if ((Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo) && Player.Mana > QMANA && !OktwCommon.CanMove(t))        // 움직일 수 없는 상황이면
                {
                    Entry.OKTWCast_SebbyLib(Q, t, false);
                    Orbwalker.ForceTarget(t);
                }
            }
        }
Example #10
0
 private static void Qlogic()
 {
     if (FishBoneActive)
     {
         var orbT = Orbwalker.GetTarget();
         if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.LaneClear && Player.ManaPercent > Config.Item("QmanaLC").GetValue <Slider>().Value&& orbT.IsValid <Obj_AI_Minion>())
         {
         }
         else if (Config.Item("Qchange").GetValue <StringList>().SelectedIndex == 0 && orbT.IsValid <Obj_AI_Hero>())
         {
             var t = (Obj_AI_Hero)Orbwalker.GetTarget();
             FishBoneToMiniGun(t);
         }
         else
         {
             if (!Combo && Orbwalker.ActiveMode != SebbyLib.Orbwalking.OrbwalkingMode.None)
             {
                 Q.Cast();
             }
         }
     }
     else
     {
         var t = TargetSelector.GetTarget(Q.Range + 40, TargetSelector.DamageType.Physical);
         if (t.IsValidTarget())
         {
             if ((!SebbyLib.Orbwalking.InAutoAttackRange(t) || t.CountEnemiesInRange(250) >= Config.Item("Qaoe").GetValue <Slider>().Value))
             {
                 if (Combo && Config.Item("Qcombo").GetValue <bool>() && (Player.ManaPercent > Config.Item("QmanaCombo").GetValue <Slider>().Value || Player.GetAutoAttackDamage(t) * Config.Item("QmanaIgnore").GetValue <Slider>().Value > t.Health))
                 {
                     Q.Cast();
                 }
                 if (Farm && SebbyLib.Orbwalking.CanAttack() && !Player.IsWindingUp && Config.Item("harasQ" + t.ChampionName).GetValue <bool>() && Config.Item("Qharass").GetValue <bool>() && (Player.ManaPercent > Config.Item("QmanaHarass").GetValue <Slider>().Value || Player.GetAutoAttackDamage(t) * Config.Item("QmanaIgnore").GetValue <Slider>().Value > t.Health))
                 {
                     Q.Cast();
                 }
             }
         }
         else
         {
             if (Combo && Player.ManaPercent > Config.Item("QmanaCombo").GetValue <Slider>().Value)
             {
                 Q.Cast();
             }
             else if (Farm && !Player.IsWindingUp && Config.Item("farmQout").GetValue <bool>() && SebbyLib.Orbwalking.CanAttack())
             {
                 foreach (var minion in MinionManager.GetMinions(Q.Range + 30).Where(
                              minion => !SebbyLib.Orbwalking.InAutoAttackRange(minion) && minion.Health < Player.GetAutoAttackDamage(minion) * 1.2 && GetRealPowPowRange(minion) < GetRealDistance(minion) && Q.Range < GetRealDistance(minion)))
                 {
                     Orbwalker.ForceTarget(minion);
                     Q.Cast();
                     return;
                 }
             }
             if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.LaneClear && Player.ManaPercent > Config.Item("QmanaLC").GetValue <Slider>().Value)
             {
                 var orbT = Orbwalker.GetTarget();
                 if (orbT.IsValid <Obj_AI_Minion>() && CountMinionsInRange(250, orbT.Position) >= Config.Item("Qlaneclear").GetValue <Slider>().Value)
                 {
                     Q.Cast();
                 }
             }
         }
     }
 }
Example #11
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (Config.Item("disableBlock", true).GetValue <KeyBind>().Active)
            {
                SebbyLib.Orbwalking.Attack = true;
                SebbyLib.Orbwalking.Move   = true;
                OktwCommon.blockSpells     = false;
                OktwCommon.blockAttack     = false;
                OktwCommon.blockMove       = false;
                return;
            }
            else if (Player.IsChannelingImportantSpell() || Game.Time - RCastTime < 0.3)
            {
                if (Config.Item("forceBlockMove", true).GetValue <bool>())
                {
                    OktwCommon.blockMove   = true;
                    OktwCommon.blockAttack = true;
                    OktwCommon.blockSpells = true;
                }

                SebbyLib.Orbwalking.Attack = false;
                SebbyLib.Orbwalking.Move   = false;

                Program.debug("cast R");
                return;
            }
            else
            {
                SebbyLib.Orbwalking.Attack = true;
                SebbyLib.Orbwalking.Move   = true;
                if (Config.Item("forceBlockMove", true).GetValue <bool>())
                {
                    OktwCommon.blockAttack = false;
                    OktwCommon.blockMove   = false;
                    OktwCommon.blockSpells = false;
                }
                if (R.IsReady() && Config.Item("useR", true).GetValue <KeyBind>().Active)
                {
                    var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                    if (t.IsValidTarget(R.Range))
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                        return;
                    }
                }
            }

            if (Config.Item("newTarget", true).GetValue <bool>())
            {
                var orbT = Orbwalker.GetTarget();

                Obj_AI_Hero t2 = null;

                if (orbT != null && orbT is Obj_AI_Hero)
                {
                    t2 = (Obj_AI_Hero)orbT;
                }

                if (t2.IsValidTarget() && t2.NetworkId == LastAttackId)
                {
                    var ta = ObjectManager.Get <Obj_AI_Hero>().Where(enemy =>
                                                                     enemy.IsValidTarget() && SebbyLib.Orbwalking.InAutoAttackRange(enemy) &&
                                                                     (enemy.NetworkId != LastAttackId || enemy.Health < Player.GetAutoAttackDamage(enemy) * 2)).FirstOrDefault();

                    if (ta != null)
                    {
                        Orbwalker.ForceTarget(ta);
                    }
                }
            }

            if (Program.LagFree(1))
            {
                SetMana();
                Jungle();
            }

            if (Program.LagFree(2) && !Player.IsWindingUp && Q.IsReady() && Config.Item("autoQ", true).GetValue <bool>())
            {
                LogicQ();
            }

            if (Program.LagFree(3) && !Player.IsWindingUp && E.IsReady() && Config.Item("autoE", true).GetValue <bool>())
            {
                LogicE();
            }

            if (Program.LagFree(4) && !Player.IsWindingUp && R.IsReady() && Config.Item("autoR", true).GetValue <bool>())
            {
                LogicR();
            }
        }
Example #12
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            BarrelList.RemoveAll(x => !x.IsValid || x.Health < 1);
            var eAmmo           = Player.Spellbook.GetSpell(SpellSlot.E).Ammo;
            var barrelCount     = BarrelList.Count();
            var barrelInAaRange = BarrelList.FirstOrDefault(x => SebbyLib.Orbwalking.InAutoAttackRange(x) && CanAa(x));
            var barrelInQRange  = BarrelList.FirstOrDefault(x => x.IsValidTarget(Q.Range) && CanQ(x));
            var barrelFullHp    = BarrelList.FirstOrDefault(x => SebbyLib.Orbwalking.InAutoAttackRange(x) && !CanQ(x));

            if (barrelFullHp != null)
            {
                Orbwalker.ForceTarget(barrelFullHp);
            }
            else
            {
                Orbwalker.ForceTarget(null);
            }


            if (eAmmo > 1 && barrelCount == 0 && E.IsReady())
            {
                var t = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    var healthDecayRate = Player.Level >= 13 ? 0.5f : (Player.Level >= 7 ? 1f : 2f);
                    var predPos         = SebbyLib.Prediction.Prediction.GetPrediction(t, healthDecayRate * 2 - 0.5f);

                    var ePos = Player.Position.Extend(predPos.CastPosition, 500);
                    if (predPos.CastPosition.Distance(Player.Position) < Q.Range)
                    {
                        ePos = predPos.CastPosition;
                    }

                    if (!OktwCommon.CirclePoints(8, 450, ePos).Any(x => x.IsWall()))
                    {
                        E.Cast(ePos);
                    }
                }
            }

            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(1500)))
            {
                var eRadius = 290 + enemy.BoundingRadius;
                var pred    = E.GetPrediction(enemy, true);
                Utility.DrawCircle(pred.CastPosition, 100, System.Drawing.Color.Yellow, 1, 1);
                foreach (var barrel in BarrelList)
                {
                    if (barrel.Distance(pred.CastPosition) < eRadius && barrel.Distance(pred.UnitPosition) < eRadius)
                    {
                        //continue;
                        if (barrelInAaRange != null)
                        {
                            if (barrelInAaRange == barrel)
                            {
                                Orbwalker.ForceTarget(barrelInAaRange);
                            }
                            else if (barrelInAaRange.HasBuff("gangplankebarrellink") && barrel.HasBuff("gangplankebarrellink"))
                            {
                                Orbwalker.ForceTarget(barrelInAaRange);
                            }
                        }
                        else if (Q.IsReady() && barrelInQRange != null)
                        {
                            if (barrelInQRange == barrel)
                            {
                                Q.CastOnUnit(barrelInQRange);
                            }
                            else if (barrelInQRange.HasBuff("gangplankebarrellink") && barrel.HasBuff("gangplankebarrellink"))
                            {
                                Q.CastOnUnit(barrelInQRange);
                            }
                        }
                        break;
                    }
                    else if (E.IsReady())
                    {
                        var tryPosition = barrel.Position.Extend(pred.CastPosition, 670);

                        if (tryPosition.Distance(Player.ServerPosition) < E.Range)
                        {
                            if (tryPosition.Distance(pred.CastPosition) < eRadius && tryPosition.Distance(pred.UnitPosition) < eRadius)
                            {
                                if (barrelInAaRange != null)
                                {
                                    if (barrelInAaRange == barrel)
                                    {
                                        E.Cast(tryPosition);
                                        Orbwalker.ForceTarget(barrelInAaRange);
                                    }
                                    else if (barrelInAaRange.HasBuff("gangplankebarrellink") && barrel.HasBuff("gangplankebarrellink"))
                                    {
                                        E.Cast(tryPosition);
                                        Orbwalker.ForceTarget(barrelInAaRange);
                                    }
                                }
                                else if (Q.IsReady() && barrelInQRange != null)
                                {
                                    if (barrelInQRange == barrel)
                                    {
                                        E.Cast(tryPosition);
                                        Q.CastOnUnit(barrelInQRange);
                                    }
                                    else if (barrelInQRange.HasBuff("gangplankebarrellink") && barrel.HasBuff("gangplankebarrellink"))
                                    {
                                        E.Cast(tryPosition);
                                        Q.CastOnUnit(barrelInQRange);
                                    }
                                }
                                break;
                            }
                        }
                    }
                }
            }
        }
Example #13
0
        private static void LaneClear()
        {
            // LaneClear | Notes: Rework on early levels not using that much abilities since Spell Damage is lower, higher Lvl is fine
            if (Menu.Item("UseQLC").GetValue <bool>() || Menu.Item("UseELC").GetValue <bool>())
            {
                if (Player.ManaPercent > Menu.Item("LaneClearManaManager").GetValue <Slider>().Value)
                {
                    var ryzeebuffed    = MinionManager.GetMinions(Player.Position, Q.Range).Find(x => x.HasBuff("RyzeE") && x.IsValidTarget(Q.Range));
                    var ryzenotebuffed = MinionManager.GetMinions(Player.Position, Q.Range).Find(x => !x.HasBuff("RyzeE") && x.IsValidTarget(Q.Range));
                    var allMinionsQ    = Cache.GetMinions(Player.ServerPosition, Q.Range, MinionTeam.Enemy);
                    var allMinions     = Cache.GetMinions(Player.ServerPosition, E.Range, MinionTeam.Enemy);
                    if (Q.IsReady() && !E.IsReady())
                    {
                        if (allMinionsQ.Count > 0)
                        {
                            foreach (var minion in allMinionsQ)
                            {
                                if (!minion.IsValidTarget() || minion == null)
                                {
                                    return;
                                }
                                if (minion.Health < QGetRealDamage(minion))
                                {
                                    Q.Cast(minion);
                                }
                            }
                        }
                    }
                    if ((!Q.IsReady() && Q.Level > 0) && E.IsReady())
                    {
                        if (ryzeebuffed != null)
                        {
                            if (ryzeebuffed.Health < E.GetDamage(ryzeebuffed) + QGetRealDamage(ryzeebuffed) + 20 && ryzeebuffed.IsValidTarget(E.Range))
                            {
                                E.CastOnUnit(ryzeebuffed);
                                if (Q.IsReady())
                                {
                                    Q.Cast(ryzeebuffed);
                                }

                                Orbwalker.ForceTarget(ryzeebuffed);
                            }
                        }
                        else if (ryzeebuffed == null)
                        {
                            foreach (var minion in allMinions)
                            {
                                if (minion.IsValidTarget(E.Range) && minion.Health < E.GetDamage(minion) + QGetRealDamage(minion) + 20)
                                {
                                    E.CastOnUnit(minion);
                                    if (Q.IsReady())
                                    {
                                        Q.Cast(ryzeebuffed);
                                    }
                                }
                            }
                        }
                    }
                    if (Q.IsReady() && E.IsReady())
                    {
                        if (ryzeebuffed != null)
                        {
                            if (ryzeebuffed.Health < Q.GetDamage(ryzeebuffed) + E.GetDamage(ryzeebuffed) + Q.GetDamage(ryzeebuffed) && ryzeebuffed.IsValidTarget(E.Range))
                            {
                                Q.Cast(ryzeebuffed);
                                if (ryzeebuffed.IsValidTarget(E.Range))
                                {
                                    E.CastOnUnit(ryzeebuffed);
                                }
                                if (!E.IsReady() && Q.IsReady())
                                {
                                    Q.Cast(ryzeebuffed);
                                }
                            }
                        }
                        else if (ryzeebuffed == null)
                        {
                            if (ryzenotebuffed.Health < Q.GetDamage(ryzenotebuffed) + E.GetDamage(ryzenotebuffed) + Q.GetDamage(ryzenotebuffed) && ryzenotebuffed.IsValidTarget(E.Range))
                            {
                                Q.Cast(ryzenotebuffed);
                                if (ryzenotebuffed.IsValidTarget(E.Range))
                                {
                                    Orbwalker.ForceTarget(ryzenotebuffed);
                                    E.CastOnUnit(ryzenotebuffed);
                                }
                                if (!E.IsReady() && Q.IsReady())
                                {
                                    Q.Cast(ryzenotebuffed);
                                }
                            }
                        }
                    }
                }
            }
        } // LaneClear End
Example #14
0
        private static void QUsage()
        {
            var m = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (!m.IsValidTarget())
            {
                return;
            }
            // Q Improvement + KS Below
            if (OktwCommon.GetKsDamage(m, Q) + BonusDmg(m) + OktwCommon.GetEchoLudenDamage(m) > m.Health)
            {
                SebbySpell(Q, m);
            }
            if (Menu.Item("QOnlyAblazed").GetValue <bool>() && m.HasBuff("brandablaze"))
            {
                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                {
                    SebbySpell(Q, enemy);
                }
            }
            else
            {
                if (m.HasBuff("brandablaze") && Menu.Item("QAblazedEnemy").GetValue <bool>())
                {
                    var spreadTarget = m;

                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                    {
                        m = enemy;
                    }

                    if (spreadTarget == m && !LogQUse(m))
                    {
                        return;
                    }
                }

                if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo && !W.IsReady() && Player.ManaPercentage() > RManaC + Q.ManaCost)
                {
                    var enemystunned = HeroManager.Enemies.Find(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("stun") || enemy.IsStunned && Menu.Item("PrioritizeStunned").GetValue <bool>());
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        SebbySpell(Q, enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(m);
                        SebbySpell(Q, m);
                    }
                }
                if (Player.Mana > RManaC + Q.ManaCost)
                {
                    var enemystunned = HeroManager.Enemies.Find(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("stun") || enemy.IsStunned && Menu.Item("PrioritizeStunned").GetValue <bool>());
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        SebbySpell(Q, enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(m);
                        SebbySpell(Q, m);
                    }
                }
            }
        }