Пример #1
0
        public static void farmQ()
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var mobs = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                }
            }

            minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);
            foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId))
            {
                if (!Orbwalker.InAutoAttackRange(minion))
                {
                    if (minion.Health < Q.GetDamage(minion))
                    {
                        Q.Cast(minion);
                        FarmId = minion.NetworkId;
                        return;
                    }
                }
                else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Config.Item("LC").GetValue <bool>())
                {
                    if (minion.Health < Q.GetDamage(minion) * 0.9)
                    {
                        Q.Cast(minion);
                        FarmId = minion.NetworkId;
                        return;
                    }
                }
            }
        }
Пример #2
0
 private static void YorickSharpAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe && spells[SpellSlot.Q].CanCast() && orbwalker.InAutoAttackRange(target))
     {
         spells[SpellSlot.Q].Cast();
         Orbwalking.ResetAutoAttackTimer();
     }
 }
Пример #3
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (!target.IsValidTarget())
            {
                return;
            }

            if (W.IsReady() && Config.Item("wCombo").GetValue <bool>() && target.IsValidTarget(500))
            {
                W.Cast();
            }

            //Ardud Q logic
            if (Q.IsReady())
            {
                target = TargetSelector.GetTarget(Q.Range + 500, TargetSelector.DamageType.Physical);
            }
            var allMinion = MinionManager.GetMinions(target.Position, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (target.IsValidTarget(Q.Range))
            {
                Q.Cast(target.Position);
            }
            Obj_AI_Base nearestMinion =
                allMinion.Where(
                    minion =>
                    minion.Distance(ObjectManager.Player) <= target.Distance(ObjectManager.Player) &&
                    target.Distance(minion) < 450)
                .OrderBy(minion => minion.Distance(ObjectManager.Player))
                .FirstOrDefault();

            {
                if (nearestMinion != null && nearestMinion.IsValidTarget(Q.Range))
                {
                    Q.CastOnUnit(nearestMinion);
                }
            }

            if (E.CanCast(target) && Config.Item("eCombo").GetValue <bool>() && !Orbwalker.InAutoAttackRange(target))
            {
                E.Cast(target);
            }

            if (R.CanCast(target) && Config.Item("rCombo").GetValue <bool>() && !Q.IsReady() && !W.IsReady() &&
                !E.IsReady())
            {
                var slidercount = Config.Item("rComboxEnemy").GetValue <Slider>().Value;

                R.CastIfWillHit(target, slidercount);

                if (R.IsKillable(target) || target.HealthPercent <= 20)
                {
                    R.Cast(target.Position);
                }
            }
        }
Пример #4
0
        //Combo
        static void Combo()
        {
            var target = TargetSelector.GetSelectedTarget();

            if (!Orbwalker.InAutoAttackRange(target))
            {
                target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            }
            useItems();
            if (Config.Item("cq").GetValue <bool>())
            {
                if (Player.Mana >= (Q.Instance.SData.Mana + E.Instance.SData.Mana - 10))
                {
                    if (Q.IsReady() && !Player.IsDashing())
                    {
                        Q.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    }
                }
            }
            if (Config.Item("ce").GetValue <bool>())
            {
                if (!target.HasBuffOfType(BuffType.Invulnerability) && !target.HasBuff("shenstandunitedshield", true) && !HasUndyingBuff(target))
                {
                    if ((target.Health + target.HPRegenRate) <= GetEDamage(target) && E.IsReady() && target.IsValidTarget(E.Range))
                    {
                        debug("Ecombo kill target"); E.Cast();
                    }
                }
                else if (ObjectManager.Get <Obj_AI_Minion>().Any(o => o.Health < GetEDamage(o) && E.IsInRange(o) && E.IsReady()))
                {
                    if (!Orbwalker.InAutoAttackRange(target) && target.HasBuff("KalistaExpungeMarker"))
                    {
                        E.Cast(); debug("combo E target out of range");
                    }
                    if (Config.Item("Ekillminion").GetValue <bool>() && target.HasBuff("KalistaExpungeMarker"))
                    {
                        E.Cast(); debug("Combo E mionions");
                    }
                }
            }
        }
Пример #5
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && Config.Item("Qon" + t.ChampionName).GetValue <bool>())
            {
                if (Q.GetDamage(t) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA + WMANA)
                {
                    Program.CastSpell(Q, t);
                }
                if (Program.Farm && Orbwalking.CanAttack() && !Player.IsWindingUp && Config.Item("harrasQ", true).GetValue <bool>() &&
                    Config.Item("harras" + t.ChampionName).GetValue <bool>() && Player.ManaPercent > Config.Item("QHarassMana", true).GetValue <Slider>().Value)
                {
                    Program.CastSpell(Q, t);
                }
                foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                {
                    Program.CastSpell(Q, t);
                }
            }

            if (!Player.IsWindingUp && !Program.None && !Program.Combo && Player.Mana > RMANA + QMANA * 2)
            {
                var allMinions = MinionManager.GetMinions(Player.ServerPosition, Q.Range);
                if (Config.Item("farmQout", true).GetValue <bool>())
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range)))
                    {
                        if (!Orbwalker.InAutoAttackRange(minion) || (Program.LaneClear && Config.Item("farmQ", true).GetValue <bool>() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value) || (!minion.UnderTurret(true) && minion.UnderTurret()))
                        {
                            var hpPred = HealthPrediction.GetHealthPrediction(minion, 1000);
                            if (hpPred < GetQDamage(minion) * 0.9 && hpPred > minion.Health - hpPred * 2)
                            {
                                Q.Cast(minion);
                                return;
                            }
                        }
                    }
                }
                if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>())
                {
                    var farmPos = Q.GetCircularFarmLocation(allMinions, Q.Width);
                    if (farmPos.MinionsHit >= Config.Item("QLCminions", true).GetValue <Slider>().Value)
                    {
                        Q.Cast(farmPos.Position);
                    }
                }
            }
        }
Пример #6
0
 private static void Freeze()
 {
     Killsteal();
     var allMinions = MinionManager.GetMinions(Player.Position, Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
     if (allMinions.Count < 1) return;
     foreach (var minion in allMinions)
     {
         if (Damage.GetAutoAttackDamage(Player, minion, false) > minion.Health && Orbwalker.InAutoAttackRange(minion))
         {
             Orbwalker.ForceTarget(minion);
         }
     }
 }
Пример #7
0
        private void LogicR()
        {
            foreach (var t in Program.Enemies.Where(t => t.IsValidTarget() && BallPos.Distance(Prediction.GetPrediction(t, R.Delay).CastPosition) < R.Width && BallPos.Distance(t.ServerPosition) < R.Width))
            {
                if (Program.Combo && Config.Item("Ralways" + t.ChampionName, true).GetValue <bool>())
                {
                    R.Cast();
                }

                if (Config.Item("Rks", true).GetValue <bool>())
                {
                    var comboDmg = OktwCommon.GetKsDamage(t, R);

                    if (t.IsValidTarget(Q.Range))
                    {
                        comboDmg += Q.GetDamage(t);
                    }
                    if (W.IsReady())
                    {
                        comboDmg += W.GetDamage(t);
                    }
                    if (Orbwalker.InAutoAttackRange(t))
                    {
                        comboDmg += (float)Player.GetAutoAttackDamage(t) * 2;
                    }
                    if (t.Health < comboDmg)
                    {
                        R.Cast();
                    }
                    Program.debug("ks");
                }
                if (Config.Item("Rturrent", true).GetValue <bool>() && BallPos.UnderTurret(false) && !BallPos.UnderTurret(true))
                {
                    R.Cast();
                    Program.debug("Rturrent");
                }
                if (Config.Item("Rlifesaver", true).GetValue <bool>() && Player.Health < Player.CountEnemiesInRange(800) * Player.Level * 20 && Player.Distance(BallPos) > t.Distance(Player.Position))
                {
                    R.Cast();
                    Program.debug("ls");
                }
            }

            int countEnemies = CountEnemiesInRangeDeley(BallPos, R.Width, R.Delay);

            if (countEnemies >= Config.Item("rCount", true).GetValue <Slider>().Value&& BallPos.CountEnemiesInRange(R.Width) == countEnemies)
            {
                R.Cast();
            }
        }
Пример #8
0
        private static void OnUpdate(EventArgs args)
        {
            var focusE  = menu.Item("CFE").GetValue <bool>();
            var eTarget =
                HeroManager.Enemies.FirstOrDefault(
                    target =>
                    target.IsValidTarget() && Orb.InAutoAttackRange(target) &&
                    target.HasBuff("tristanaechargesound"));

            if (focusE && eTarget != null)
            {
                Orb.ForceTarget(eTarget);
            }
            SetRanges();
            switch (Orb.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                break;

            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Freeze:
                break;

            case Orbwalking.OrbwalkingMode.CustomMode:
                break;

            case Orbwalking.OrbwalkingMode.None:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Пример #9
0
        public static void OnGameProcessPacket(GamePacketEventArgs args)
        {
            return;

            if (Config.Item("comboWreset").GetValue <bool>() && args.PacketData[0] == 0x65 && MasterYi.W.IsReady() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                // LogPacket(args);
                GamePacket gp = new GamePacket(args.PacketData);
                gp.Position = 1;
                Packet.S2C.Damage.Struct dmg = Packet.S2C.Damage.Decoded(args.PacketData);

                int   targetID            = gp.ReadInteger();
                int   dType               = (int)gp.ReadByte();
                int   Unknown             = gp.ReadShort();
                float DamageAmount        = gp.ReadFloat();
                int   TargetNetworkIdCopy = gp.ReadInteger();
                int   SourceNetworkId     = gp.ReadInteger();
                float dmga =
                    (float)
                    MasterYi.player.GetAutoAttackDamage(
                        ObjectManager.GetUnitByNetworkId <Obj_AI_Base>((uint)targetID));
                if (dmga - 10 > DamageAmount || dmga + 10 < DamageAmount)
                {
                    return;
                }
                if (MasterYi.player.NetworkId != dmg.SourceNetworkId && MasterYi.player.NetworkId == targetID)
                {
                    return;
                }
                Obj_AI_Base targ = ObjectManager.GetUnitByNetworkId <Obj_AI_Base>((uint)dmg.TargetNetworkId);
                if ((int)dmg.Type == 12 || (int)dmg.Type == 4 || (int)dmg.Type == 3)
                {
                    if (MasterYi.W.IsReady() && Orbwalker.InAutoAttackRange(targ))
                    {
                        MasterYi.W.Cast(targ.Position);
                        // DeathWalker.ResetAutoAttackTimer();
                    }
                }
                // Console.WriteLine("dtyoe: " + dType);
            }
        }
Пример #10
0
        private void LogicW()
        {
            if (Player.Mana < RMANA + WMANA)
            {
                return;
            }

            if (HeroManager.Enemies.Any(enemy => enemy.IsValidTarget(350) && enemy.IsMoving && enemy.IsFacing(Player) && Config.Item("autoWnear", true).GetValue <bool>()))
            {
                W.Cast();
            }

            if (Program.Combo && Config.Item("autoWout", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(800, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget() && !Orbwalker.InAutoAttackRange(t) && !t.IsFacing(Player))
                {
                    W.Cast();
                }
            }
        }
Пример #11
0
        private static void Interrupter2OnOnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (sender.IsEnemy && sender.Distance(Player) <= Q.Range && args.DangerLevel == Interrupter2.DangerLevel.High || args.DangerLevel == Interrupter2.DangerLevel.Medium)
            {
                var hitchance = Q.GetPrediction(sender, false, 0,
                                                new[]
                {
                    CollisionableObjects.Heroes, CollisionableObjects.Minions, CollisionableObjects.Walls,
                    CollisionableObjects.YasuoWall
                }).Hitchance;

                if (hitchance == HitChance.VeryHigh || hitchance == HitChance.High || hitchance == HitChance.Immobile ||
                    hitchance == HitChance.Dashing)
                {
                    Q.Cast(sender);
                }
            }
            else if (sender.IsEnemy && _orbwalker.InAutoAttackRange(sender) && args.DangerLevel == Interrupter2.DangerLevel.High || args.DangerLevel == Interrupter2.DangerLevel.Medium)
            {
                EloBuddy.Player.IssueOrder(GameObjectOrder.AutoAttack, sender);
            }
        }
Пример #12
0
        /*   private static void OnPlayAnimation(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
         * {
         *     if (!sender.IsMe || _orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo) return;
         *
         *     if (args.Animation.Contains("Spell1"))
         *     {
         *         Utility.DelayAction.Add(125 + Game.Ping/2, CancelAnimation);
         *     }
         *     if (WaitForMove && args.Animation.Contains("Run") && _target != null)
         *     {
         *         WaitForMove = false;
         *         Orbwalking.LastAATick = Utils.TickCount + Game.Ping/2;
         *         Player.IssueOrder(GameObjectOrder.AttackUnit, _target);
         *     }
         *     if (WaitForMove && args.Animation.Contains("Idle") && _target != null)
         *     {
         *         WaitForMove = false;
         *         Orbwalking.LastAATick = Utils.TickCount + Game.Ping/2;
         *         Player.IssueOrder(GameObjectOrder.AttackUnit, _target);
         *     }
         * } */

        private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var spellname = args.SData.Name;

            if (spellname == "RivenTriCleave")
            {
                lastQCast = Utils.TickCount;
            }
            if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                lastSpellName = spellname;
                if (spellname.Contains("Attack"))
                {
                    if (_Tiamat.IsReady() && target.IsValidTarget(_Tiamat.Range))
                    {
                        nextSpell = null;
                        UseTiamat = true;
                    }
                    else if (_Hydra.IsReady() && target.IsValidTarget(_Hydra.Range))
                    {
                        nextSpell = null;
                        UseTiamat = true;
                    }
                }
                else if (spellname == "RivenTriCleave")
                {
                    nextSpell = null;
                    Utility.DelayAction.Add(125 + Game.Ping / 2, CancelAnimation);

                    if (orbwalker.InAutoAttackRange(target))
                    {
                        nextSpell = null;
                        UseAttack = true;
                        return;
                    }

                    if (W.IsReady() && target.IsValidTarget(W.Range))
                    {
                        nextSpell = W;
                    }
                    else
                    {
                        nextSpell = null;
                        UseAttack = true;
                    }
                }
                else if (spellname == "RivenMartyr")
                {
                    if (Q.IsReady())
                    {
                        nextSpell = Q;
                        UseAttack = false;
                        UseTiamat = false;
                        //Utility.DelayAction.Add(175, delegate { nextSpell = _Q; });
                    }
                    else
                    {
                        nextSpell = null;
                        UseAttack = true;
                    }
                }
                else if (spellname == "ItemTiamatCleave")
                {
                    UseTiamat = false;
                    if (W.IsReady() && target.IsValidTarget(W.Range))
                    {
                        nextSpell = W;
                    }
                    else if (Q.IsReady() && target.IsValidTarget(Q.Range))
                    {
                        nextSpell = Q;
                    }
                }
                else if (spellname == "RivenFengShuiEngine")
                {
                    ultiOn = true;
                    if ((_Tiamat.IsReady() && target.IsValidTarget(_Tiamat.Range)) ||
                        (_Hydra.IsReady() && target.IsValidTarget(_Hydra.Range)))
                    {
                        nextSpell = null;
                        UseTiamat = true;
                    }
                    else if (Q.IsReady() && target.IsValidTarget(Q.Range))
                    {
                        nextSpell = Q;
                    }
                    else if (E.IsReady())
                    {
                        nextSpell = E;
                    }
                }
            }
        }
Пример #13
0
        public static void farmQ()
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var mobs = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                }
            }

            if (!Config.Item("farmQ").GetValue <bool>())
            {
                return;
            }

            minions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);
            foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                if (minion.IsMoving)
                {
                    Q.Cast(minion);
                }
                else
                {
                    Q.Cast(minion.Position);
                }
                FarmId = minion.NetworkId;
            }
            if (Config.Item("LC").GetValue <bool>() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && !Orbwalking.CanAttack() && (ObjectManager.Player.ManaPercentage() > Config.Item("Mana").GetValue <Slider>().Value || ObjectManager.Player.UnderTurret(false)))
            {
                foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && Orbwalker.InAutoAttackRange(minion)))
                {
                    if (minion.Health < Q.GetDamage(minion) * 0.8 && minion.Health > minion.FlatPhysicalDamageMod)
                    {
                        if (minion.IsMoving)
                        {
                            Q.Cast(minion);
                        }
                        else
                        {
                            Q.Cast(minion.Position);
                        }
                    }
                }
                if (Config.Item("LCP").GetValue <bool>() && ((!E.IsReady() || Game.Time - GetPassiveTime() > -1.5)) && !ObjectManager.Player.UnderTurret(false))
                {
                    foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && minion.Health > Q.GetDamage(minion) * 1.5 && Orbwalker.InAutoAttackRange(minion)))
                    {
                        if (minion.IsMoving)
                        {
                            Q.Cast(minion);
                        }
                        else
                        {
                            Q.Cast(minion.Position);
                        }
                    }
                }
            }
        }
Пример #14
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = MinionManager.GetMinions(Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                    return;
                }
            }

            if (!Config.Item("farmQ", true).GetValue <bool>())
            {
                return;
            }

            var minions = MinionManager.GetMinions(Player.ServerPosition, Q.Range);

            int orbTarget = 0;

            if (Orbwalker.GetTarget() != null)
            {
                orbTarget = Orbwalker.GetTarget().NetworkId;
            }

            foreach (var minion in minions.Where(minion => orbTarget != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                {
                    return;
                }
            }

            if (Config.Item("LC", true).GetValue <bool>() && Program.LaneClear && !Orbwalking.CanAttack() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion) && orbTarget != minion.NetworkId))
                {
                    var hpPred    = HealthPrediction.GetHealthPrediction(minion, 300);
                    var dmgMinion = minion.GetAutoAttackDamage(minion);
                    var qDmg      = Q.GetDamage(minion);
                    if (hpPred < qDmg)
                    {
                        if (hpPred > dmgMinion)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                    else if (LCP)
                    {
                        if (hpPred > dmgMinion + qDmg)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Пример #15
0
        private void OnUpdate(EventArgs args)
        {
            if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 2 || !Orbwalking.CanAttack() || !Program.Combo)
            {
                return;
            }

            var orbT = Orbwalker.GetTarget();

            if (orbT != null && orbT.Type == GameObjectType.obj_AI_Hero)
            {
                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);
                }
            }
        }
Пример #16
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob.Position);
                }
            }

            if (!Orbwalking.CanMove(50) || (Orbwalker.ShouldWait() && Orbwalking.CanAttack()))
            {
                return;
            }

            var minions   = Cache.GetMinions(Player.ServerPosition, Q.Range);
            int orbTarget = 0;

            if (Orbwalker.GetTarget() != null)
            {
                orbTarget = Orbwalker.GetTarget().NetworkId;
            }

            if (Config.Item("FQ", true).GetValue <bool>())
            {
                foreach (var minion in minions.Where(minion => minion.IsValidTarget() && orbTarget != minion.NetworkId && minion.HealthPercent < 70 && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
                {
                    if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (Config.Item("farmQ", true).GetValue <bool>() && Program.LaneClear && !Orbwalking.CanAttack() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();
                var PT  = Game.Time - GetPassiveTime() > -1.5 || !E.IsReady();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion)))
                {
                    var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 300);
                    if (hpPred < 20)
                    {
                        continue;
                    }

                    var qDmg = Q.GetDamage(minion);
                    if (hpPred < qDmg && orbTarget != minion.NetworkId)
                    {
                        if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                    else if (PT || LCP)
                    {
                        if (minion.HealthPercent > 80)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Пример #17
0
        /// <summary>
        /// Actions before attacking
        /// </summary>
        /// <param name="args">Attack Action</param>
        static void OrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            #region LastHit

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit)
            {
                foreach (var minion in MinionManager.GetMinions(ObjectManager.Player.Position, Player.AttackRange))
                {
                    if (minion.Health <= ObjectManager.Player.GetAutoAttackDamage(minion) + TeemoE(minion))
                    {
                        Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
                    }
                    else
                    {
                        return;
                    }
                }
            }

            #endregion

            #region Harass

            else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                var enemy  = HeroManager.Enemies.OrderBy(t => t.Health).FirstOrDefault();
                var minion = MinionManager.GetMinions(ObjectManager.Player.Position, Player.AttackRange).Where(t => t.IsEnemy && Orbwalker.InAutoAttackRange(t)).OrderBy(t => t.Health).FirstOrDefault();

                if (minion == null)
                {
                    if (enemy != null &&
                        Orbwalker.InAutoAttackRange(enemy))
                    {
                        Player.IssueOrder(GameObjectOrder.AttackUnit, enemy);
                    }
                }
                else
                {
                    if (enemy != null &&
                        minion.Health > ObjectManager.Player.GetAutoAttackDamage(minion) + TeemoE(minion) &&
                        Orbwalker.InAutoAttackRange(enemy))
                    {
                        Player.IssueOrder(GameObjectOrder.AttackUnit, enemy);
                    }

                    else if (minion.Health <= ObjectManager.Player.GetAutoAttackDamage(minion) + TeemoE(minion))
                    {
                        Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
                    }

                    else
                    {
                        return;
                    }
                }
            }

            #endregion

            #region LaneClear

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var attackTurret = Config.SubMenu("LaneClear").Item("attackTurret").GetValue <bool>();
                var attackWard   = Config.SubMenu("LaneClear").Item("attackWard").GetValue <bool>();
                var useQ         = Config.SubMenu("LaneClear").Item("qclear").GetValue <bool>();
                var turret       = ObjectManager.Get <Obj_AI_Turret>().Where(t => Orbwalking.InAutoAttackRange(t) && t.IsEnemy).OrderBy(t => t.Health).FirstOrDefault();
                var inhib        = ObjectManager.Get <Obj_BarracksDampener>().Where(t => Orbwalking.InAutoAttackRange(t) && t.IsEnemy).OrderBy(t => t.Health).FirstOrDefault();
                var nexus        = ObjectManager.Get <Obj_HQ>().Where(t => Orbwalking.InAutoAttackRange(t) && t.IsEnemy).OrderBy(t => t.Health).FirstOrDefault();
                var ward         = MinionManager.GetMinions(Player.AttackRange, MinionTypes.Wards).FirstOrDefault();
                var mob          = MinionManager.GetMinions(Player.AttackRange, MinionTypes.All, MinionTeam.NotAlly);

                foreach (var m in mob)
                {
                    if (!Orbwalker.InAutoAttackRange(m))
                    {
                        #region Turret

                        if (attackTurret)
                        {
                            if (turret != null)
                            {
                                Player.IssueOrder(GameObjectOrder.AttackUnit, turret);
                                Utility.DelayAction.Add(1500, () => Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos));
                            }
                            if (inhib != null)
                            {
                                Player.IssueOrder(GameObjectOrder.AttackUnit, inhib);
                                Utility.DelayAction.Add(1500, () => Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos));
                            }
                            if (nexus != null)
                            {
                                Player.IssueOrder(GameObjectOrder.AttackUnit, nexus);
                                Utility.DelayAction.Add(1500, () => Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos));
                            }
                        }

                        #endregion

                        #region Ward

                        if (attackWard)
                        {
                            if (ward.IsValid && Orbwalker.InAutoAttackRange(ward) && ward.IsEnemy)
                            {
                                Player.IssueOrder(GameObjectOrder.AttackUnit, ward);
                            }
                        }

                        #endregion
                    }

                    else if (Orbwalker.InAutoAttackRange(m))
                    {
                        if (Orbwalker.InAutoAttackRange(turret) && attackTurret ||
                            Orbwalker.InAutoAttackRange(inhib) && attackTurret ||
                            Orbwalker.InAutoAttackRange(nexus) && attackTurret ||
                            Orbwalker.InAutoAttackRange(ward) && attackWard)
                        {
                            #region Turret

                            if (attackTurret)
                            {
                                if (m.Health < Player.GetAutoAttackDamage(m) + TeemoE(m))
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, m);
                                }

                                if (turret != null && m.Health > Player.GetAutoAttackDamage(m) + TeemoE(m))
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, turret);
                                }
                                if (inhib != null && m.Health > Player.GetAutoAttackDamage(m) + TeemoE(m))
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, inhib);
                                }
                                if (nexus != null && m.Health > Player.GetAutoAttackDamage(m) + TeemoE(m))
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, nexus);
                                }
                            }

                            #endregion

                            #region Ward

                            if (attackWard)
                            {
                                if (m.Health < Player.GetAutoAttackDamage(m) + TeemoE(m))
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, m);
                                }

                                if (ward.IsValid && Orbwalker.InAutoAttackRange(ward) && ward.IsEnemy &&
                                    m.Health > Player.GetAutoAttackDamage(m) + TeemoE(m))
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, ward);
                                }
                            }

                            #endregion
                        }

                        else
                        {
                            #region Variables

                            var qManaManager = Config.SubMenu("LaneClear").Item("qManaManager").GetValue <Slider>().Value;

                            #endregion

                            #region Cannot Kill Minion

                            if (useQ && m.Health > Q.GetDamage(m))
                            {
                                Q.CastOnUnit(m, Packets);
                            }

                            if (Player.GetAutoAttackDamage(m) + TeemoE(m) < m.Health)
                            {
                                Player.IssueOrder(GameObjectOrder.AttackUnit, m);
                            }

                            #endregion

                            #region Can Kill Minion

                            else if (m.Health <= Player.GetAutoAttackDamage(m) + TeemoE(m) || m.Health <= Q.GetDamage(m))
                            {
                                if (useQ)
                                {
                                    if (Q.IsReady() && Q.IsInRange(m) && Q.GetDamage(m) >= m.Health &&
                                        qManaManager >= (int)Player.ManaPercent)
                                    {
                                        Q.CastOnUnit(m, Packets);
                                    }

                                    else if (Player.Distance3D(m) <= Player.AttackRange)
                                    {
                                        Player.IssueOrder(GameObjectOrder.AttackUnit, m);
                                    }
                                }
                                else
                                {
                                    Player.IssueOrder(GameObjectOrder.AttackUnit, m);
                                }
                            }

                            #endregion

                            #region No Minions

                            else
                            {
                                args.Process = true;
                                return;
                            }

                            #endregion
                        }
                    }
                }
            }

            #endregion

            #region Other Modes

            else
            {
                args.Process = true;
            }

            #endregion
        }
Пример #18
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + QMANA + EMANA && !E.IsReady())
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Config.Item("harras" + t.ChampionName).GetValue <bool>() && Player.ManaPercent > Config.Item("QHarassMana", true).GetValue <Slider>().Value&& OktwCommon.CanHarras())
                {
                    Program.CastSpell(Q, t);
                }
                else if (OktwCommon.GetKsDamage(t, Q) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Player.Mana > RMANA + QMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Program.CastSpell(Q, t);
                    }
                }
            }

            if (Player.Spellbook.IsAutoAttacking)
            {
                return;
            }

            if (!Program.None && !Program.Combo && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
            {
                var allMinions = Cache.GetMinions(Player.ServerPosition, Q.Range);

                if (Config.Item("farmQout", true).GetValue <bool>())
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range) && (!Orbwalker.InAutoAttackRange(minion) || (!minion.UnderTurret(true) && minion.UnderTurret()))))
                    {
                        var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 600);
                        if (hpPred < Q.GetDamage(minion) && hpPred > minion.Health - hpPred * 2)
                        {
                            Q.Cast(minion);
                            return;
                        }
                    }
                }
                if (Program.LaneClear && Config.Item("farmQ", true).GetValue <bool>())
                {
                    var farmPos = Q.GetCircularFarmLocation(allMinions, Q.Width);
                    if (farmPos.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                    {
                        Q.Cast(farmPos.Position);
                    }
                }
            }
        }
Пример #19
0
        private void LogicFarm()
        {
            var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All);

            if (Program.Farm && Config.Item("farmQ").GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA + EMANA)
            {
                foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range) && !Orbwalker.InAutoAttackRange(minion) && minion.Health <Q.GetDamage(minion) && minion.Health> minion.FlatPhysicalDamageMod))
                {
                    Q.Cast(minion);
                }
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Player.Mana > RMANA + QMANA)
            {
                var mobs = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    if (Q.IsReady())
                    {
                        Q.Cast(mob.Position);
                    }
                    if (W.IsReady() && BallPos.Distance(mob.Position) < W.Width)
                    {
                        W.Cast();
                    }
                    else if (E.IsReady())
                    {
                        E.CastOnUnit(Player);
                    }
                    return;
                }
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
                (Player.ManaPercentage() > Config.Item("Mana").GetValue <Slider>().Value || (Player.UnderTurret(false) && !Player.UnderTurret(true) && Player.ManaPercentage() > 20)))
            {
                var Qfarm = Q.GetCircularFarmLocation(allMinions, 100);

                var QWfarm = Q.GetCircularFarmLocation(allMinions, W.Width);
                if (Qfarm.MinionsHit + QWfarm.MinionsHit == 0)
                {
                    return;
                }
                if (Config.Item("clearQ").GetValue <bool>())
                {
                    if (Qfarm.MinionsHit > 2 && !W.IsReady() && Q.IsReady())
                    {
                        Q.Cast(Qfarm.Position);
                    }
                    else if (QWfarm.MinionsHit > 2 && Q.IsReady())
                    {
                        Q.Cast(QWfarm.Position);
                    }
                }

                foreach (var minion in allMinions)
                {
                    if (W.IsReady() && minion.Distance(BallPos) < W.Range && minion.Health < W.GetDamage(minion) && Config.Item("clearW").GetValue <bool>())
                    {
                        W.Cast();
                    }
                    if (!W.IsReady() && E.IsReady() && minion.Distance(BallPos) < E.Width && Config.Item("clearE").GetValue <bool>())
                    {
                        E.CastOnUnit(Player);
                    }
                }
            }
        }
Пример #20
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }

            if (IsActive("ElTristana.Combo.Focus.E"))
            {
                var passiveTarget = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() && x.HasBuff("TristanaECharge") ||
                                                                       x.HasBuff("tristanaechargesound") && Orbwalker.InAutoAttackRange(x));

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

            try
            {
                switch (Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Combo:
                    OnCombo();
                    break;

                case Orbwalking.OrbwalkingMode.LaneClear:
                    OnLaneClear();
                    OnJungleClear();
                    break;

                case Orbwalking.OrbwalkingMode.Mixed:
                    OnHarass();
                    break;
                }

                if (IsActive("ElTristana.killsteal.Active"))
                {
                    DoKillsteal();
                }

                spells[Spells.Q].Range = 550 + 9 * (Player.Level - 1);
                spells[Spells.E].Range = 625 + 9 * (Player.Level - 1);
                spells[Spells.R].Range = 517 + 9 * (Player.Level - 1);
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }
Пример #21
0
        private static void FullCombo()
        {
            var target = TargetSelector.GetSelectedTarget();

            if (target == null || !target.IsValidTarget())
            {
                target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            }

            if (!target.IsValidTarget(Q.Range) || target.UnderTurret(true))
            {
                return;
            }

            var useChase = Menu.Item("chaseMode").GetValue <KeyBind>().Active;
            var useQc    = Menu.Item("useQcombo").GetValue <bool>();
            var useRc    = Menu.Item("useRcombo").GetValue <bool>();
            var useEc    = Menu.Item("useEcombo").GetValue <bool>();
            var useWc    = Menu.Item("useWcombo").GetValue <bool>();

            if (useQc && Q.IsReady() && target.IsValidTarget(Q.Range))
            {
                if (useChase)
                {
                    qKI();
                }

                if (!useChase)
                {
                    Q.Cast(target);
                }
            }

            if (useRc && R.IsReady())
            {
                rKI();
            }

            if (useEc && E.IsReady() && Orbwalker.InAutoAttackRange(target))
            {
                E.Cast();
            }

            else if (useWc && W.IsReady() && Orbwalker.InAutoAttackRange(target))
            {
                Player.IssueOrder(GameObjectOrder.AttackTo, target);
                W.Cast();
                Player.IssueOrder(GameObjectOrder.AttackTo, target);
                Orbwalking.ResetAutoAttackTimer();
            }

            if (youmuu.IsReady() && Orbwalker.InAutoAttackRange(target))
            {
                youmuu.Cast(Player);
            }

            if (Orbwalker.InAutoAttackRange(target))
            {
                HydraCast();
            }
        }
Пример #22
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = MinionManager.GetMinions(Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                    return;
                }
            }

            if (!Config.Item("farmQ").GetValue <bool>())
            {
                return;
            }

            var minions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);

            foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                Program.CastSpell(Q, minion);
                FarmId = minion.NetworkId;
            }

            if (Program.LaneClear && !Orbwalking.CanAttack() && (Player.ManaPercent > Config.Item("Mana").GetValue <Slider>().Value || ObjectManager.Player.UnderTurret(false)))
            {
                foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && Orbwalker.InAutoAttackRange(minion) && minion.Health <Q.GetDamage(minion) * 0.8 && minion.Health> minion.FlatPhysicalDamageMod))
                {
                    Program.CastSpell(Q, minion);
                }
            }
        }