Exemple #1
0
        private void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, DamageType.Physical);
            var t1 = TargetSelector.GetTarget(Q1.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (OktwCommon.GetKsDamage(t, Q) + AaDamage(t) > t.Health)
                {
                    Q.Cast(t);
                }
                else if (Combo && Player.Mana > QMANA + RMANA)
                {
                    Q.Cast(t);
                }
                else if (Harass && HarassList.Any(e => e.Enabled && e.Name == "harass" + t.CharacterName) && Player.Mana > QMANA + WMANA + EMANA + RMANA)
                {
                    Q.Cast(t);
                }
            }
            else if ((Combo || Harass) && harassQ.Enabled && t1.IsValidTarget() && HarassList.Any(e => e.Enabled && e.Name == "harass" + t1.CharacterName) && Player.Distance(t1.PreviousPosition) > Q.Range + 100)
            {
                if (Combo && Player.Mana < QMANA + RMANA)
                {
                    return;
                }

                if (Harass && Player.Mana < QMANA + WMANA + EMANA + RMANA)
                {
                    return;
                }

                if (!OktwCommon.CanHarass())
                {
                    return;
                }

                var prepos = Prediction.GetPrediction(t1, Q1.Delay);

                if (prepos.Hitchance < HitChance.VeryHigh)
                {
                    return;
                }

                var distance = Player.Distance(prepos.CastPosition);
                var minions  = GameObjects.EnemyMinions.Where(e => e.IsValidTarget(Q.Range));

                foreach (var minion in minions)
                {
                    if (prepos.CastPosition.Distance(Player.Position.Extend(minion.Position, distance)) < 25)
                    {
                        Q.Cast(minion);
                        return;
                    }
                }
            }
        }
Exemple #2
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                var inAARange = t.InAutoAttackRange();

                if (ignoreCol.Enabled && inAARange)
                {
                    W.Collision = false;
                }
                else
                {
                    W.Collision = true;
                }

                var qDmg = Q.GetDamage(t);
                var wDmg = OktwCommon.GetKsDamage(t, W);

                if (inAARange)
                {
                    qDmg += (float)AaDamage(t);
                    wDmg += (float)AaDamage(t);
                }

                if (wDmg > t.Health)
                {
                    CastSpell(W, t);
                }
                else if (qDmg + wDmg > t.Health && Q.IsReady() && Player.Mana > QMANA + WMANA + RMANA)
                {
                    CastSpell(W, t);
                }

                var orbT = Orbwalker.GetTarget() as AIHeroClient;

                if (orbT == null)
                {
                    if (wInAaRange.Enabled)
                    {
                        return;
                    }
                }
                else if (orbT.IsValidTarget())
                {
                    t = orbT;
                }

                if (Orbwalker.ActiveMode == OrbwalkerMode.Combo && Player.Mana > QMANA + WMANA + EMANA + RMANA)
                {
                    CastSpell(W, t);
                }
                else if (Harass && HarassList.Any(e => e.Enabled && e.Name == "harass" + t.CharacterName) && !Player.IsUnderEnemyTurret() && Player.ManaPercent > 80 && Player.Mana > QMANA + WMANA + WMANA + EMANA + RMANA)
                {
                    CastSpell(W, t);
                }
                else if ((Combo || Harass) && Player.Mana > WMANA + EMANA + RMANA)
                {
                    foreach (var enemy in GameObjects.EnemyHeroes.Where(e => e.IsValidTarget(W.Range) && !OktwCommon.CanMove(e)))
                    {
                        W.Cast(enemy);
                    }
                }
            }
        }
Exemple #3
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                var step = t.Distance(Player) / 20;

                for (var i = 0; i < 20; i++)
                {
                    var p = Player.Position.Extend(t.Position, step * i);
                    if (p.IsWall())
                    {
                        return;
                    }
                }

                if (Combo && Player.Mana > QMANA + RMANA)
                {
                    CastSpell(Q, t);
                }
                else if (Harass && harassQ.Enabled && Player.Mana > QMANA + QMANA + WMANA + EMANA + RMANA && HarassList.Any(e => e.Enabled && e.Name == "harass" + t.CharacterName))
                {
                    CastSpell(Q, t);
                }
                else
                {
                    var qDmg = OktwCommon.GetKsDamage(t, Q);
                    var rDmg = R.GetDamage(t);

                    if (qDmg > t.Health)
                    {
                        Q.Cast(t);
                    }
                    else if (qDmg + rDmg > t.Health && R.IsReady() && Player.Mana > QMANA + RMANA)
                    {
                        CastSpell(Q, t);

                        if (fastR.Enabled && rDmg < t.Health)
                        {
                            CastSpell(R, t);
                        }
                    }
                }

                if (!None && Player.Mana > QMANA + EMANA + RMANA)
                {
                    foreach (var enemy in GameObjects.EnemyHeroes.Where(e => e.IsValidTarget(Q.Range) && !OktwCommon.CanMove(e)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
            else if (FarmSpells && farmQ.Enabled)
            {
                var allMinionsQ = GameObjects.EnemyMinions.Where(e => e.IsValidTarget(Q.Range)).ToList();
                var farmRsQ     = Q.GetLineFarmLocation(allMinionsQ);
                if (farmRsQ.MinionsHit > 2)
                {
                    Q.Cast(farmRsQ.Position);
                }
            }
        }