Exemplo n.º 1
0
        private static void Combo()
        {
            var t = GetTarget(E.Range);

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

            if (E.IsReady() && t.IsValidTarget(E.Range))
            {
                E.CastOnUnit(t);
            }

            if (Q.IsReady() && t.IsValidTarget(Q.Range))
            {
                Q.Cast();
            }

            if (E.IsReady() && t.IsValidTarget(E.Range))
            {
                E.CastOnUnit(t);
            }

            if (IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
            {
                if (Player.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite) > t.Health &&
                    Player.Distance(t) <= 550)
                {
                    Player.Spellbook.CastSpell(IgniteSlot, t);
                }
            }

            if (R.IsReady())
            {
                var valR = getSliderItem(menuCombo, "UseRComboEnemyCount");
                if (valR > 0 && Player.CountEnemiesInRange(R.Range) >= valR)
                {
                    R.Cast();
                }
                else if (menuCombo["forceUlti" + t.NetworkId] != null && t.IsValidTarget(R.Range))
                {
                    switch (getBoxItem(menuCombo, "forceUlti" + t.NetworkId))
                    {
                    case 1:
                        R.CastIfHitchanceEquals(t, HitChance.High);
                        break;

                    case 2:
                    {
                        if (t.Health < GetComboDamage(t))
                        {
                            R.CastIfHitchanceEquals(t, HitChance.High);
                        }
                    }
                    break;
                    }
                }
            }
        }
Exemplo n.º 2
0
        private static void Combo()
        {
            var useQ  = getCheckBoxItem(comboMenu, "UseQC");
            var useW  = getCheckBoxItem(comboMenu, "UseWC");
            var useR  = getCheckBoxItem(comboMenu, "UseRC");
            var autoR = getCheckBoxItem(comboMenu, "UseRE");

            if (getCheckBoxItem(comboMenu, "smitecombo"))
            {
                Smiteontarget();
            }

            if (useQ && _q.IsReady())
            {
                var t = TargetSelector.GetTarget(_q.Range, DamageType.Physical);
                if (t.IsValidTarget(_q.Range - 70))
                {
                    _q.CastIfHitchanceEquals(t, HitChance.High, true);
                }
            }

            if (useW && _w.IsReady())
            {
                var t = TargetSelector.GetTarget(_w.Range, DamageType.Magical);
                if (t.IsValidTarget(_w.Range))
                {
                    _w.CastIfHitchanceEquals(t, HitChance.High, true);
                }
            }

            if (_r.IsReady() && useR)
            {
                var t = TargetSelector.GetTarget(_r.Range, DamageType.Physical);
                if (t.IsInvulnerable)
                {
                    return;
                }
                if (_q.IsReady() && t.IsValidTarget(_q.Range) &&
                    (_q.GetDamage(t) > t.Health || _player.GetAutoAttackDamage(t, true) > t.Health))
                {
                    return;
                }
                if (_r.GetDamage(t) - 80 > t.Health && t.IsValidTarget(_r.Range))
                {
                    _r.CastIfHitchanceEquals(t, HitChance.High, true);
                }

                if (autoR)
                {
                    var fuckr = _r.GetPrediction(t, true);
                    if (fuckr.AoeTargetsHitCount >= getSliderItem(comboMenu, "MinTargets") &&
                        t.IsValidTarget(_r.Range))
                    {
                        _r.CastIfHitchanceEquals(t, HitChance.High, true);
                    }
                }
            }

            UseItemes();
        }
Exemplo n.º 3
0
 private void handeQ(AIHeroClient target, HitChance hitChance)
 {
     if (player.Distance(target) <= Orbwalking.GetRealAutoAttackRange(target) && !EloBuddy.SDK.Orbwalker.CanAutoAttack &&
         Orbwalking.CanMove(100) && target.GetBuffCount("TahmKenchPDebuffCounter") != 2)
     {
         if (Program.IsSPrediction)
         {
             Q.SPredictionCast(target, hitChance);
         }
         else
         {
             Q.CastIfHitchanceEquals(target, hitChance);
         }
     }
     else if (player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
     {
         if (Program.IsSPrediction)
         {
             Q.SPredictionCast(target, hitChance);
         }
         else
         {
             Q.CastIfHitchanceEquals(target, hitChance);
         }
     }
 }
Exemplo n.º 4
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (Q.IsReady() && (Config.Item("UseQCombo").GetValue <bool>()))
            {
                Q.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                Q.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                var Qprediction = Q.GetPrediction(target);

                if (Qprediction.Hitchance >= HitChance.High && Qprediction.CollisionObjects.Count(h => h.IsEnemy && !h.IsDead && h is Obj_AI_Minion) < 2)
                {
                    Q.Cast(Qprediction.CastPosition);
                }
            }

            if (E.IsReady() && Config.Item("UseECombo").GetValue <bool>() && Vector3.Distance(target.Position, Player.Position) < E.Range)
            {
                if (!Config.Item("EPush").GetValue <bool>())
                {
                    E.Cast(target.Position.Extend(Player.Position, Vector3.Distance(target.Position, Player.Position) + 450));
                }
                else
                {
                    E.Cast(target.Position);
                }
            }

            if (R.IsReady() && (Config.Item("UseRCombo").GetValue <bool>()) && Player.CountEnemiesInRange(R.Range) >= 1)
            {
                R.Cast();
            }
        }
Exemplo n.º 5
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsMe && args.SData.Name.ToLower() == "summonerflash")
            {
                LastFlash = Utils.GameTimeTickCount;
            }

            var hero = sender as AIHeroClient;

            if (hero != null && hero.IsEnemy && Q.IsReady() && getCheckBoxItem(comenu, "useqcombo"))
            {
                if (Player.HealthPercent < getSliderItem(qsmenu, "grabhp"))
                {
                    return;
                }

                if (hero.LSIsValidTarget(getSliderItem(qsmenu, "maxq")) && hero.Health > Q.GetDamage(hero))
                {
                    if (!getCheckBoxItem(qsmenu, "blq" + hero.NetworkId) &&
                        getCheckBoxItem(qsmenu, "auq" + hero.NetworkId))
                    {
                        if (hero.LSDistance(Player.ServerPosition) > getSliderItem(qsmenu, "minq"))
                        {
                            Q.CastIfHitchanceEquals(hero, HitChance.VeryHigh);
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(1300, DamageType.Magical);

            if (Q.IsReady() && (getCheckBoxItem(comboMenu, "UseQCombo")))
            {
                Q.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.Dashing, true);
                Q.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.Immobile, true);
                var Qprediction = Q.GetPrediction(target);

                if (Qprediction.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High && Qprediction.CollisionObjects.Count(h => h.IsEnemy && !h.IsDead && h is Obj_AI_Minion) < 2)
                {
                    Q.Cast(Qprediction.CastPosition);
                }
            }

            if (E.IsReady() && getCheckBoxItem(comboMenu, "UseECombo") && Vector3.Distance(target.Position, Player.Position) < E.Range)
            {
                if (!getCheckBoxItem(comboMenu, "EPush"))
                {
                    E.Cast(target.Position.Extend(Player.Position, Vector3.Distance(target.Position, Player.Position) + 400));
                }
                else
                {
                    E.Cast(target.Position);
                }
            }

            if (R.IsReady() && (getCheckBoxItem(comboMenu, "UseRCombo")) && Player.LSCountEnemiesInRange(R.Range) >= 1)
            {
                R.Cast();
            }
        }
Exemplo n.º 7
0
        private void Harass()
        {
            float perc = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(1300, LeagueSharp.Common.TargetSelector.DamageType.Magical, true);

            if (target == null || target.IsInvulnerable)
            {
                return;
            }
            if (Q.CanCast(target) && config.Item("useqH", true).GetValue <bool>() && savedQ == null && SimpleQ)
            {
                if (Program.IsSPrediction)
                {
                    Q.SPredictionCast(target, HitChance.High);
                }
                else
                {
                    Q.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                }
            }
            if (Q.IsReady() && config.Item("useqH", true).GetValue <bool>() && savedQ != null &&
                target.Distance(savedQ.position) < QExplosionRange)
            {
                DetonateQ();
            }
            if (E.CanCast(target) && config.Item("useeH", true).GetValue <bool>())
            {
                CastE(target);
            }
        }
Exemplo n.º 8
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            Orbwalker.DisableMovement  = false;
            Orbwalker.DisableAttacking = player.HasBuff("KennenLightningRush");

            var target = getTarget();


            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Harass();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Clear();
            }

            if (target == null)
            {
                return;
            }
            if (getCheckBoxItem(miscMenu, "autoq"))
            {
                if (Q.CanCast(target) && !target.IsDashing() &&
                    (MarkOfStorm(target) > 1 || (MarkOfStorm(target) > 0 && player.Distance(target) < W.Range)))
                {
                    Q.Cast(target, getCheckBoxItem(config, "packets"));
                }
            }
            if (getCheckBoxItem(miscMenu, "autow") && W.IsReady() && MarkOfStorm(target) > 1 &&
                !player.HasBuff("KennenShurikenStorm"))
            {
                if (player.Distance(target) < W.Range)
                {
                    W.Cast(getCheckBoxItem(config, "packets"));
                }
            }
            if (getKeyBindItem(autoHarassMenu, "KenAutoQ") && Q.IsReady() &&
                getSliderItem(autoHarassMenu, "KenminmanaaQ") < player.ManaPercent &&
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) &&
                !player.UnderTurret(true))
            {
                if (target != null && Q.CanCast(target) && target.IsValidTarget())
                {
                    Q.CastIfHitchanceEquals(
                        target, CombatHelper.GetHitChance(getSliderItem(autoHarassMenu, "qHit")),
                        getCheckBoxItem(config, "packets"));
                }
            }
        }
Exemplo n.º 9
0
 private void handeQ(AIHeroClient target, HitChance hitChance)
 {
     if (player.LSDistance(target) <= Orbwalking.GetRealAutoAttackRange(target) && !Orbwalker.CanAutoAttack &&
         target.GetBuffCount("TahmKenchPDebuffCounter") != 2)
     {
         Q.CastIfHitchanceEquals(target, hitChance, getCheckBoxItem(config, "packets"));
     }
     else if (player.LSDistance(target) > Orbwalking.GetRealAutoAttackRange(target))
     {
         Q.CastIfHitchanceEquals(target, hitChance, getCheckBoxItem(config, "packets"));
     }
 }
Exemplo n.º 10
0
        private void Harass()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(Q.Range, LeagueSharp.Common.TargetSelector.DamageType.Magical);

            if (config.Item("useqH", true).GetValue <bool>() && Q.CanCast(target))
            {
                Q.CastIfHitchanceEquals(target, HitChance.Medium);
            }
            if (config.Item("usewH", true).GetValue <bool>() && W.IsReady())
            {
                if (player.Distance(target) < W.Range)
                {
                    W.Cast();
                }
            }
        }
Exemplo n.º 11
0
        private static void OnCombo()
        {
            if (getCheckBoxItem(comboMenu, "q.combo"))
            {
                switch (getBoxItem(qsettings, "q.settings"))
                {
                case 0:
                    foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Q.Range)))
                    {
                        Q.CastIfHitchanceEquals(enemy, HikiChance("q.normal.hit.chance"));
                    }
                    break;

                case 1:
                    if (ObjectManager.Player.CountEnemiesInRange(Q.Range) >= getSliderItem(qsettings, "q.hit.count"))
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Q.Range) && Q.GetHitCount() >= getSliderItem(qsettings, "q.hit.count")))
                        {
                            Q.CastIfWillHit(enemy, getSliderItem(qsettings, "q.hit.count"));
                        }
                    }
                    break;
                }
            }
            if (getCheckBoxItem(comboMenu, "w.combo") && Q.IsReady())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range)))
                {
                    W.CastOnUnit(enemy);
                }
            }
        }
Exemplo n.º 12
0
        private void Harass()
        {
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (getCheckBoxItem(menuH, "useqH") && Q.CanCast(target))
            {
                Q.CastIfHitchanceEquals(target, HitChance.Medium, getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(menuH, "usewH") && W.IsReady())
            {
                if (player.LSDistance(target) < W.Range)
                {
                    W.Cast(getCheckBoxItem(config, "packets"));
                }
            }
        }
Exemplo n.º 13
0
        private static void Qlogic()
        {
            if (!Q.IsReady() || !q["AutoQ"].Cast <CheckBox>().CurrentValue || Helper.GetMana(Q) < 80)
            {
                return;
            }

            var target = TargetSelector.GetTarget(E.Range * 1.2f, DamageType.Physical);

            if (target.LSIsValidTarget())
            {
                var predout = Q.GetPrediction(target);
                var coll    = predout.CollisionObjects;

                if (coll.Count() < 1)
                {
                    Q.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.High);
                }
                if (coll.Count() == 1 && q["AutoQM"].Cast <CheckBox>().CurrentValue)
                {
                    foreach (var c in coll)
                    {
                        if (Damage.GetEdamage(c) > c.Health)
                        {
                            Q.Cast(predout.CastPosition);
                        }
                    }
                }
            }
        }
Exemplo n.º 14
0
        public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance, bool towerCheck = false)
        {
            var target = TargetSelector.GetTarget(range, type);

            if (target == null || !spell.IsReady())
                return;

            if (towerCheck && target.UnderTurret(true))
                return;

            spell.UpdateSourcePosition();

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                var pred = Prediction.GetPrediction(target, spell.Delay);

                if (pred.Hitchance >= hitChance)
                    spell.Cast(pred.CastPosition);
            }
            else
            {
                spell.CastIfHitchanceEquals(target, hitChance); 
            }
           
        }
Exemplo n.º 15
0
        private static void OnCombo()
        {
            var target = TargetSelector.GetTarget(W.Range, DamageType.Magical);

            if (target != null)
            {
                if (getCheckBoxItem(comboMenu, "w.combo") && W.IsReady())
                {
                    W.Cast(target);
                }
            }

            if (getCheckBoxItem(comboMenu, "q.combo"))
            {
                switch (getBoxItem(qsettings, "q.settings"))
                {
                case 0:
                    foreach (var enemy in EntityManager.Heroes.Enemies.Where(x => x.LSIsValidTarget(Q.Range)))
                    {
                        Q.CastIfHitchanceEquals(enemy, HikiChance("q.normal.hit.chance"));
                    }
                    break;

                case 1:
                    if (ObjectManager.Player.CountEnemiesInRange(Q.Range) >= getSliderItem(qsettings, "q.hit.count"))
                    {
                        foreach (var enemy in EntityManager.Heroes.Enemies.Where(x => x.LSIsValidTarget(Q.Range) && Q.GetHitCount() >= getSliderItem(qsettings, "q.hit.count")))
                        {
                            Q.CastIfWillHit(enemy, getSliderItem(qsettings, "q.hit.count"));
                        }
                    }
                    break;
                }
            }
        }
Exemplo n.º 16
0
        private static void AutoCast(bool dashing, bool immobile, bool soil)
        {
            if (_q.IsReady())
            {
                foreach (var itarget in HeroManager.Enemies.Where(h => h.LSIsValidTarget(_q.Range)))
                {
                    if (immobile && Immobile(itarget))
                    {
                        _q.Cast(itarget);
                    }

                    if (immobile)
                    {
                        _q.CastIfHitchanceEquals(itarget, HitChance.Immobile);
                    }

                    if (dashing && itarget.LSDistance(Me.ServerPosition) <= 400f)
                    {
                        _q.CastIfHitchanceEquals(itarget, HitChance.Dashing);
                    }
                }
            }

            if (_w.IsReady() && soil)
            {
                foreach (var itarget in HeroManager.Enemies.Where(h => h.LSIsValidTarget(_w.Range)))
                {
                    if (immobile && Immobile(itarget))
                    {
                        _w.Cast(itarget.ServerPosition);
                    }
                }
            }

            if (_r.IsReady())
            {
                if (Me.CountEnemiesInRange(_r.Range) >= getSliderItem(menuR, "useautor"))
                {
                    if (_e.IsReady())
                    {
                        _e.CastOnUnit(Me);
                    }

                    _r.Cast();
                }
            }
        }
Exemplo n.º 17
0
        private void LogicE()
        {
            if (Program.Combo && Player.Spellbook.IsAutoAttacking)
            {
                return;
            }
            if (Config.Item("autoE", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    var positionT = Player.ServerPosition - (t.Position - Player.ServerPosition);

                    if (Player.Position.Extend(positionT, 400).CountEnemiesInRange(700) < 2)
                    {
                        var eDmg = E.GetDamage(t);
                        var qDmg = Q.GetDamage(t);
                        if (Config.Item("EQks", true).GetValue <bool>() && qDmg + eDmg + Player.GetAutoAttackDamage(t) > t.Health && Player.Mana > EMANA + QMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q FINISH");
                        }
                        else if ((Program.Farm || Program.Combo) && Config.Item("harrasEQ", true).GetValue <bool>() && Player.Mana > EMANA + QMANA + RMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q Harras");
                        }
                    }

                    if (Player.Mana > RMANA + EMANA)
                    {
                        if (Config.Item("Ehitchance", true).GetValue <bool>())
                        {
                            E.CastIfHitchanceEquals(t, HitChance.Dashing);
                        }
                        if (Player.Health < Player.MaxHealth * 0.3)
                        {
                            if (GetRealDistance(t) < 500)
                            {
                                E.Cast(t, true);
                            }
                            if (Player.CountEnemiesInRange(250) > 0)
                            {
                                E.Cast(t, true);
                            }
                        }
                    }
                }
            }
            if (Config.Item("useE", true).GetValue <KeyBind>().Active)
            {
                var position = Player.ServerPosition - (Game.CursorPos - Player.ServerPosition);
                E.Cast(position, true);
            }
        }
Exemplo n.º 18
0
        private void LogicE()
        {
            if (Program.Combo && Player.Spellbook.IsAutoAttacking)
            {
                return;
            }
            if (getCheckBoxItem(eMenu, "autoE"))
            {
                var t = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                if (t.LSIsValidTarget())
                {
                    var positionT = Player.ServerPosition - (t.Position - Player.ServerPosition);

                    if (Q.IsReady() && Player.Position.LSExtend(positionT, 400).LSCountEnemiesInRange(700) < 2)
                    {
                        var eDmg = E.GetDamage(t);
                        var qDmg = Q.GetDamage(t);
                        if (getCheckBoxItem(eMenu, "EQks") && qDmg + eDmg + Player.LSGetAutoAttackDamage(t) > t.Health && Player.Mana > EMANA + QMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q FINISH");
                        }
                        else if ((Program.Farm || Program.Combo) && getCheckBoxItem(eMenu, "harrasEQ") && Player.Mana > EMANA + QMANA + RMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q Harras");
                        }
                    }

                    if (Player.Mana > RMANA + EMANA)
                    {
                        if (getCheckBoxItem(eMenu, "Ehitchance"))
                        {
                            E.CastIfHitchanceEquals(t, EloBuddy.SDK.Enumerations.HitChance.Dashing);
                        }
                        if (Player.Health < Player.MaxHealth * 0.3)
                        {
                            if (GetRealDistance(t) < 500)
                            {
                                E.Cast(t, true);
                            }
                            if (Player.CountEnemiesInRange(250) > 0)
                            {
                                E.Cast(t, true);
                            }
                        }
                    }
                }
            }
            if (getKeyBindItem(eMenu, "useE"))
            {
                var position = Player.ServerPosition - (Game.CursorPos - Player.ServerPosition);
                E.Cast(position, true);
            }
        }
Exemplo n.º 19
0
        private void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            var t2 = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && t2.IsValidTarget() && t == t2 && !(Config.Item("separate", true).GetValue <bool>() && Program.LaneClear))
            {
                if (Q.IsCharging)
                {
                    Program.CastSpell(Q, t);
                    if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 1 || (Player.CountEnemiesInRange(800) > 0) || Player.Distance(t) > 1450)
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    else if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 2 || (Player.CountEnemiesInRange(1000) > 0))
                    {
                        Q.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                    }

                    return;
                }
                else if (t.IsValidTarget(Q.Range - 300))
                {
                    if (t.Health < OktwCommon.GetKsDamage(t, Q))
                    {
                        Q.StartCharging();
                    }
                    else if (Program.Combo && Player.Mana > EMANA + QMANA)
                    {
                        Q.StartCharging();
                    }
                    else if (t.IsValidTarget(1200) && Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        Q.StartCharging();
                    }
                    else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            Q.StartCharging();
                        }
                    }
                }
            }
            else if (Program.LaneClear && Q.Range > 1000 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA)))
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Exemplo n.º 20
0
 static void CastQ(Obj_AI_Base t)
 {
     if (t.LSIsValidTarget() && Q.IsReady() && ObjectManager.Player.LSDistance(t.ServerPosition) <= Q.Range)
     {
         if (Q.CastIfHitchanceEquals(t, Q.GetHitchance()))
         {
             Q.Cast(t);
         }
         return;
     }
 }
Exemplo n.º 21
0
        private static void CastQEnemy()
        {
            if (!_q.IsReady())
            {
                return;
            }
            var target = TargetSelector.GetTarget(_q.Range + _q.Width / 2, DamageType.Magical);

            if (!target.LSIsValidTarget(_q.Range))
            {
                return;
            }
            _q.CastIfHitchanceEquals(target, HitChance.High);
            if (_w.IsReady() && getCheckBoxItem(comboMenu, "useW_Passive"))
            {
                var pos = _q.GetPrediction(target).CastPosition;
                Utility.DelayAction.Add(50, () => _w.Cast(new Vector3(pos.X - 2, pos.Y - 2, pos.Z)));
                Utility.DelayAction.Add(150, () => _w.Cast(new Vector3(pos.X + 2, pos.Y + 2, pos.Z)));
            }
        }
Exemplo n.º 22
0
        private static void Combo()
        {
            Ulti();
            float        perc   = (float)config.Item("minmana", true).GetValue <Slider>().Value / 100f;
            var          minHit = config.Item("useemin", true).GetValue <Slider>().Value;
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(R.Range, LeagueSharp.Common.TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }

            var buffs = CombatHelper.SejuaniCountFrostHero(E.Range);

            if (E.IsReady() && me.Distance(target.Position) < E.Range && buffs > 0 &&
                ((buffs > minHit) || (Damage.GetSpellDamageLS(me, target, SpellSlot.E) >= target.Health) ||
                 (me.Distance(target) > config.Item("useEminr", true).GetValue <Slider>().Value&&
                  me.Distance(target) < E.Range && buffs == 1)))
            {
                if (!(Q.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.Q).SData.Mana < me.MaxMana * perc) ||
                    !(W.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.W).SData.Mana < me.MaxMana * perc))
                {
                    E.Cast();
                }
            }
            if (Q.IsReady() && config.Item("useq", true).GetValue <bool>() &&
                me.Distance(target.Position) > config.Item("useQminr", true).GetValue <Slider>().Value)
            {
                var hits = Q.GetHitCount(HitChance.High);
                if (target.CountEnemiesInRange(Q.Width) >= hits)
                {
                    if (Program.IsSPrediction)
                    {
                        Q.SPredictionCast(target, HitChance.High);
                    }
                    else
                    {
                        Q.CastIfHitchanceEquals(target, HitChance.High);
                    }
                }
            }
            bool hasIgnite = me.Spellbook.CanUseSpell(me.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  ignitedmg = (float)me.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (ignitedmg > target.Health && hasIgnite && !E.CanCast(target) && !W.CanCast(target) && !Q.CanCast(target))
            {
                me.Spellbook.CastSpell(me.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 23
0
        private static void CastQ(Obj_AI_Base target, EloBuddy.SDK.Enumerations.HitChance hitChance = EloBuddy.SDK.Enumerations.HitChance.High)
        {
            if (!_spellQ.IsReady())
            {
                return;
            }
            if (target == null || !target.LSIsValidTarget())
            {
                return;
            }

            _spellQ.CastIfHitchanceEquals(target, hitChance);
        }
Exemplo n.º 24
0
        private static void CastQ(Obj_AI_Base target, HitChance hitChance = HitChance.High)
        {
            if (!_spellQ.IsReady())
            {
                return;
            }
            if (target == null || !target.IsValidTarget())
            {
                return;
            }

            _spellQ.CastIfHitchanceEquals(target, hitChance);
        }
Exemplo n.º 25
0
        static void CastQ(AIHeroClient target)
        {
            if (!Q.IsReady() || target == null || Helper.EnemyHasShield(target) || !target.LSIsValidTarget())
            {
                return;
            }

            var Catched        = IsPulling().Item1;
            var CatchedQtarget = IsPulling().Item2;

            if (!Catched && qTimer == 0)
            {
                if (!E.IsReady() || (E.IsReady() &&
                                     E.Range < Player.LSDistance(target.Position)))
                {
                    var Mode = getBoxItem(Qmenu, "Predict");

                    switch (Mode)
                    {
                        #region L# Predict
                    case 0:
                    {
                        var b = Q.GetPrediction(target);

                        if (b.Hitchance >= HitChance.High &&
                            Player.LSDistance(target.ServerPosition) < Q.Range)
                        {
                            Q.Cast(target);
                        }
                    }
                    break;
                        #endregion

                        #region L# Predict2
                    case 1:
                    {
                        if (Player.LSDistance(target.ServerPosition) < Q.Range)
                        {
                            Q.CastIfHitchanceEquals(target, HitChance.High);
                        }
                    }
                    break;
                        #endregion
                    }
                }
            }
            else if (Catched && Environment.TickCount > qTimer - 200 && CastQ2() && CatchedQtarget.Type == GameObjectType.AIHeroClient && getCheckBoxItem(Qmenu, "C-UseQ2"))
            {
                Q.Cast();
            }
        }
Exemplo n.º 26
0
        private void Harass()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(E.Range, LeagueSharp.Common.TargetSelector.DamageType.Magical);
            float        perc   = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc || target == null)
            {
                return;
            }
            var hitC = HitChance.High;

            if (config.Item("useHigherHit", true).GetValue <bool>())
            {
                hitC = HitChance.VeryHigh;
            }
            if (config.Item("useqH", true).GetValue <bool>() && Q.CanCast(target))
            {
                if (Program.IsSPrediction)
                {
                    Q.SPredictionCast(target, hitC);
                }
                else
                {
                    Q.CastIfHitchanceEquals(target, hitC);
                }
            }
            if (config.Item("useeH", true).GetValue <bool>() && E.CanCast(target))
            {
                if (Program.IsSPrediction)
                {
                    E.SPredictionCast(target, hitC);
                }
                else
                {
                    E.CastIfHitchanceEquals(target, hitC);
                }
            }
        }
Exemplo n.º 27
0
Arquivo: Nami.cs Projeto: riwalry1/AIO
 private static void Combo()
 {
     if (getCheckBoxItem(comboMenu, "nami.q.combo") && Q.IsReady())
     {
         foreach (
             var enemy in
             HeroManager.Enemies.Where(
                 x =>
                 x.LSIsValidTarget(Q.Range) && !x.IsDead && !x.IsZombie &&
                 !x.HasBuffOfType(BuffType.SpellShield) && !x.HasBuffOfType(BuffType.SpellImmunity)))
         {
             Q.CastIfHitchanceEquals(enemy, SpellHitChance(miscMenu, "nami.q.hitchance"));
         }
     }
     if (getCheckBoxItem(comboMenu, "nami.w.combo") && W.IsReady())
     {
         foreach (
             var enemy in HeroManager.Enemies.Where(x => x.LSIsValidTarget(W.Range) && !x.IsDead && !x.IsZombie))
         {
             if (getCheckBoxItem(wsettings, "wwhite." + enemy.NetworkId))
             {
                 W.Cast(enemy);
             }
         }
     }
     if (getCheckBoxItem(comboMenu, "nami.r.combo") && R.IsReady())
     {
         foreach (var enemy in HeroManager.Enemies.Where(x => x.LSIsValidTarget(R.Range)))
         {
             if (Player.CountEnemiesInRange(R.Range) >= getSliderItem(comboMenu, "nami.min.enemy.count"))
             {
                 R.CastIfWillHit(enemy, getSliderItem(comboMenu, "nami.min.enemy.count"));
             }
         }
     }
 }
Exemplo n.º 28
0
        private static void Harass()
        {
            var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
            var perc   = getSliderItem(harassMenu, "minmanaH") / 100f;

            if (player.Mana < player.MaxMana * perc || target == null)
            {
                return;
            }
            var hitC = EloBuddy.SDK.Enumerations.HitChance.High;

            if (getCheckBoxItem(miscMenu, "useHigherHit"))
            {
                hitC = EloBuddy.SDK.Enumerations.HitChance.High;
            }
            if (getCheckBoxItem(harassMenu, "useqH") && Q.CanCast(target))
            {
                Q.CastIfHitchanceEquals(target, hitC, getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(harassMenu, "useeH") && E.CanCast(target))
            {
                E.CastIfHitchanceEquals(target, hitC, getCheckBoxItem(config, "packets"));
            }
        }
Exemplo n.º 29
0
        private static void Combo()
        {
            if (getCheckBoxItem(comboMenu, "useE") && _E.IsReady() &&
                Player.LSDistance(currentTarget) < _E.Range &&
                (!_Q.IsReady() && Environment.TickCount > qTick || _Q.IsReady() && IsFirstQ()))
            {
                Flay(currentTarget);
            }
            else if (getCheckBoxItem(comboMenu, "useQ2") && Player.LSDistance(currentTarget) > _E.Range &&
                     _Q.IsReady() &&
                     Environment.TickCount >= hookTick - 500 && IsSecondQ() &&
                     ObjectManager.Get <AIHeroClient>().FirstOrDefault(unit => unit.HasBuff("ThreshQ")) != null)
            {
                _Q.Cast();
            }
            else if (getCheckBoxItem(comboMenu, "useQ2") &&
                     getCheckBoxItem(comboMenu, "useE") && _Q.IsReady() &&
                     _E.IsReady() &&
                     ObjectManager.Get <Obj_AI_Minion>()
                     .FirstOrDefault(unit => unit.HasBuff("ThreshQ") && unit.LSDistance(currentTarget) <= _E.Range) !=
                     null && IsSecondQ())
            {
                _Q.Cast();
            }

            if (getCheckBoxItem(comboMenu, "useQ1") && _Q.IsReady() && IsFirstQ() &&
                !IsImmune(currentTarget))
            {
                _Q.CastIfHitchanceEquals(currentTarget, GetSelectedHitChance());
            }

            if (getCheckBoxItem(comboMenu, "useW") && _W.IsReady() &&
                ObjectManager.Get <AIHeroClient>().FirstOrDefault(unit => unit.HasBuff("ThreshQ")) != null)
            {
                var nearAlly = GetNearAlly();
                if (nearAlly != null)
                {
                    _W.Cast(nearAlly);
                }
            }
        }
Exemplo n.º 30
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (FpsBalancer.CheckCounter())
            {
                return;
            }
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                Harass();
                break;

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

            case Orbwalking.OrbwalkingMode.LastHit:
                Lasthit();
                break;

            default:
                break;
            }
            if (config.Item("EzAutoQ", true).GetValue <KeyBind>().Active&& Q.IsReady() &&
                config.Item("EzminmanaaQ", true).GetValue <Slider>().Value < player.ManaPercent &&
                orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo && Orbwalking.CanMove(100))
            {
                AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(Q.Range, LeagueSharp.Common.TargetSelector.DamageType.Physical);
                if (target != null && Q.CanCast(target) && target.IsValidTargetLS())
                {
                    Q.CastIfHitchanceEquals(
                        target, CombatHelper.GetHitChance(config.Item("qHit", true).GetValue <Slider>().Value));
                }
            }
        }
Exemplo n.º 31
0
 private void CastQHero(AIHeroClient target)
 {
     if (Program.IsSPrediction)
     {
         var pred = Q.GetSPrediction(target);
         if (pred.CollisionResult.Units.Count < 2)
         {
             Q.Cast(pred.CastPosition);
         }
     }
     else
     {
         var targQ     = Q.GetPrediction(target, true);
         var collision = Q.GetCollision(
             player.Position.To2D(), new List <Vector2>()
         {
             targQ.CastPosition.To2D()
         });
         if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) && collision.Count < 2)
         {
             Q.CastIfHitchanceEquals(target, HitChance.High);
         }
     }
 }
Exemplo n.º 32
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 1)
            {
                Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine;
                bool aoe2 = false;
                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = Core.SkillshotType.SkillshotCircle;
                    aoe2 = true;
                }
                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;
                var predInput2 = new Core.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = Core.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
                {
                    if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= Core.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }

                }
                else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
                {
                    if (poutput2.Hitchance >= Core.HitChance.High)
                        QWER.Cast(poutput2.CastPosition);

                }
                else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 2)
                {
                    if (poutput2.Hitchance >= Core.HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell = QWER;
                    DrawSpellTime = Game.Time;

                }
                DrawSpellPos = poutput2;
            }
            else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 0)
            {
                if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    return;
                }
                else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                    return;
                }
                else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.Medium);
                    return;
                }
            }
            else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 2 )
            {

                if (target is Obj_AI_Hero && target.IsValid)
                {
                    var t = target as Obj_AI_Hero;
                    if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
                    {
                        QWER.SPredictionCast(t, HitChance.VeryHigh);
                        return;
                    }
                    else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
                    {
                        QWER.SPredictionCast(t, HitChance.High);
                        return;
                    }
                    else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2)
                    {
                        QWER.SPredictionCast(t, HitChance.Medium);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
        }
Exemplo n.º 33
0
 private static void CastSpell(Spell QWER, Obj_AI_Base target)
 {
     if(QWER.Slot == SpellSlot.W)
     {
         if (Config.Item("Wpred").GetValue<StringList>().SelectedIndex == 0)
             QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
         else
             QWER.Cast(target);
     }
     if (QWER.Slot == SpellSlot.R)
     {
         if (Config.Item("Rpred").GetValue<StringList>().SelectedIndex == 0)
             QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
         else
             QWER.Cast(target);
     }
     if (QWER.Slot == SpellSlot.E)
     {
         if (Config.Item("Epred").GetValue<StringList>().SelectedIndex == 0)
             QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
         else
             QWER.Cast(target);
     }
 }
Exemplo n.º 34
0
        private static void CastSpell(Spell QWER, Obj_AI_Hero target, int HitChanceNum)
        {
            //HitChance 0 - 2
            // example CastSpell(Q, ts, 2);
            if (HitChanceNum == 0)
                QWER.Cast(target, true);
            else if (HitChanceNum == 1)
                QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh, true);
            else if (HitChanceNum == 2)
            {
                if (QWER.Delay < 0.3)
                    QWER.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                QWER.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                QWER.CastIfWillHit(target, 2, true);
                if (target.Path.Count() < 2)
                    QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh, true);
            }
            else if (HitChanceNum == 3)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                //debug("" + target.Path.Count() + " " + (target.Position == target.ServerPosition) + (waypoints.Last<Vector2>().To3D() == target.ServerPosition));
                if (QWER.Delay < 0.3)
                    QWER.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                QWER.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                QWER.CastIfWillHit(target, 2, true);

                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed)) * 6 - QWER.Width;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || ObjectManager.Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if (target.Path.Count() < 2
                    && (target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) - ObjectManager.Player.Distance(target.Position)) > BackToFront
                    || target.HasBuffOfType(BuffType.Slow) || target.HasBuff("Recall")
                    || (target.Path.Count() == 0 && target.Position == target.ServerPosition)
                    ))
                {
                    if (target.IsFacing(ObjectManager.Player) || target.Path.Count() == 0)
                    {
                        if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed)))
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }
            }
            else if (HitChanceNum == 4 && (int)QWER.GetPrediction(target).Hitchance > 4)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                //debug("" + target.Path.Count() + " " + (target.Position == target.ServerPosition) + (waypoints.Last<Vector2>().To3D() == target.ServerPosition));
                if (QWER.Delay < 0.3)
                    QWER.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                QWER.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                QWER.CastIfWillHit(target, 2, true);

                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed)) * 6 - QWER.Width;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || ObjectManager.Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if (target.Path.Count() < 2
                    && (target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) - ObjectManager.Player.Distance(target.Position)) > BackToFront
                    || target.HasBuffOfType(BuffType.Slow) || target.HasBuff("Recall")
                    || (target.Path.Count() == 0 && target.Position == target.ServerPosition)
                    ))
                {
                    if (target.IsFacing(ObjectManager.Player) || target.Path.Count() == 0)
                    {
                        if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed)))
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }
            }
        }
Exemplo n.º 35
0
        private static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (getBoxItem(predMenu, "PredictionMODE") == 0)
            {
                if (QWER.Slot == SpellSlot.W)
                {
                    if (getBoxItem(predMenu, "Wpred") == 0)
                        QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    else
                        QWER.Cast(target);
                }
                if (QWER.Slot == SpellSlot.R)
                {
                    if (getBoxItem(predMenu, "Rpred") == 0)
                        QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    else
                        QWER.Cast(target);
                }
                if (QWER.Slot == SpellSlot.E)
                {
                    if (getBoxItem(predMenu, "Epred") == 0)
                        QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    else
                        QWER.Cast(target);
                }
            }
            else
            {
                Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = Core.SkillshotType.SkillshotCircle;
                    aoe2 = true;
                }

                var predInput2 = new Core.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };

                var poutput2 = Core.Prediction.GetPrediction(predInput2);

                if (QWER.Slot == SpellSlot.W)
                {
                    if (getBoxItem(predMenu, "Wpred") == 0)
                    {
                        if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                            QWER.Cast(poutput2.CastPosition);
                    }
                    else
                    {
                        if (poutput2.Hitchance >= Core.HitChance.High)
                            QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (QWER.Slot == SpellSlot.R)
                {
                    if (getBoxItem(predMenu, "Rpred") == 0)
                    {
                        if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                            QWER.Cast(poutput2.CastPosition);
                    }
                    else
                    {
                        if (poutput2.Hitchance >= Core.HitChance.High)
                            QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (QWER.Slot == SpellSlot.E)
                {
                    if (getBoxItem(predMenu, "Epred") == 0)
                    {
                        if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                            QWER.Cast(poutput2.CastPosition);
                    }
                    else
                    {
                        if (poutput2.Hitchance >= Core.HitChance.High)
                            QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
        }
Exemplo n.º 36
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (target.Path.Count() > 1)
                return;
            var poutput = QWER.GetPrediction(target);
            if (Game.Time - DrawSpellTime > 0.5)
            {
                DrawSpell = QWER;
                DrawSpellTime = Game.Time;

            }

            DrawSpellPos = poutput;
            if (ColFix  && HitChanceNum == 4)
            {
                if (QWER.Collision && OktwCommon.GetCollision(target, QWER, false, true))
                    return;
            }
            else
            {
                var col = poutput.CollisionObjects.Count(ColObj => ColObj.IsEnemy && ColObj.IsMinion && !ColObj.IsDead);
                if (col > 0)
                {
                    return;
                }
            }

            if ((int)poutput.Hitchance > 4 && target.HasBuffOfType(BuffType.Slow))
            {
                QWER.Cast(poutput.CastPosition);
                return;
            }

            if (target.HasBuff("Recall") || poutput.Hitchance == HitChance.Immobile )
            {
                QWER.Cast(poutput.CastPosition);
                return;
            }

            if (poutput.Hitchance == HitChance.Dashing && QWER.Delay < 0.30f)
            {
                QWER.Cast(poutput.CastPosition);
                return;
            }

            if (HitChanceNum == 4)
            {
                if ((int)poutput.Hitchance < 5)
                    return;

                if (NewWay && (int)poutput.Hitchance < 6)
                    return;

                float fixRange;

                if (RangeFix)
                    fixRange = (target.MoveSpeed * (Player.ServerPosition.Distance(target.ServerPosition) / QWER.Speed + QWER.Delay)) / 2;
                else
                    fixRange = 0;

                if (target.IsWindingUp)
                {

                    if (!tryAA)
                        return;
                    debug("IsWinding: ");
                    if (Player.Distance(target.ServerPosition) < QWER.Range - fixRange)
                    {
                        if (FastMode)
                            QWER.Cast(poutput.CastPosition);
                        else
                            QWER.Cast(target);
                    }

                    return;
                }
                else if (target.Path.Count() == 0 && target.Position == target.ServerPosition )
                {

                    if (IgnoreNoMove)
                        return;
                    debug("NotMove");
                    if (Player.Distance(target.ServerPosition) < QWER.Range - fixRange)
                    {
                        if (FastMode)
                            QWER.Cast(poutput.CastPosition);
                        else
                            QWER.Cast(target);
                    }

                    return;
                }

                var LastWaypiont = target.GetWaypoints().Last().To3D();

                if (target.ServerPosition.Distance(Player.ServerPosition) < LastWaypiont.Distance(Player.ServerPosition) - fixRange)
                {
                    if (FastMode)
                        QWER.Cast(poutput.CastPosition);
                    else
                        QWER.Cast(target);

                    debug("Run" );
                }
                else if (Player.Distance(target.ServerPosition) < QWER.Range - fixRange)
                {
                    float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                    float SiteToSite = (BackToFront * 2) - QWER.Width;

                    if ((target.ServerPosition.Distance(LastWaypiont) > SiteToSite
                        || Math.Abs(Player.Distance(LastWaypiont) - Player.Distance(target.ServerPosition)) > BackToFront)
                        || Player.Distance(target.ServerPosition) < SiteToSite + target.BoundingRadius * 2
                        || Player.Distance(LastWaypiont) < BackToFront)
                    {
                        if (FastMode)
                            QWER.Cast(poutput.CastPosition);
                        else
                            QWER.Cast(target);

                        debug("good 2");
                    }
                    else
                        debug("ignore 2");
                }
                else
                    debug("fixed " + fixRange);
            }
            else if (HitChanceNum == 3)
            {
                if ((int)poutput.Hitchance < 5)
                    return;

                var fixRange = (target.MoveSpeed * (Player.ServerPosition.Distance(target.ServerPosition) / QWER.Speed + QWER.Delay)) / 2;
                if (QWER.Delay < 0.3 && (QWER.Speed > 1500 || QWER.Type == SkillshotType.SkillshotCircle) && (target.IsWindingUp || (int)poutput.Hitchance == 6))
                {
                    if (Player.Distance(target.ServerPosition) < QWER.Range - fixRange)
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    return;
                }

                if (target.Path.Count() == 0 && target.Position == target.ServerPosition && !target.IsWindingUp)
                {
                    if (Player.Distance(target.ServerPosition) < QWER.Range - fixRange)
                    {

                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    return;
                }
                var waypoints = target.GetWaypoints().Last<Vector2>().To3D();

                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                float SiteToSite = (BackToFront * 2) - QWER.Width;

                if ((target.ServerPosition.Distance(waypoints) > SiteToSite
                    || Math.Abs(Player.Distance(waypoints) - Player.Distance(target.Position)) > BackToFront)
                    || Player.Distance(target.Position) < SiteToSite + target.BoundingRadius * 2
                    || Player.Distance(waypoints) < BackToFront
                    )
                {

                    if (waypoints.Distance(Player.Position) <= target.Distance(Player.Position))
                    {
                        if (Player.Distance(target.ServerPosition) < QWER.Range - fixRange)
                        {
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                        }
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }

            }
            else if (HitChanceNum == 0)
                QWER.Cast(target, true);
            else if (HitChanceNum == 1)
            {
                if ((int)poutput.Hitchance > 4)
                    QWER.Cast(poutput.CastPosition);
            }
            else if (HitChanceNum == 2)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                if (waypoints.Last<Vector2>().To3D().Distance(poutput.CastPosition) > QWER.Width && (int)poutput.Hitchance > 4)
                {
                    if (waypoints.Last<Vector2>().To3D().Distance(Player.Position) <= target.Distance(Player.Position) || (target.Path.Count() == 0 && target.Position == target.ServerPosition))
                    {
                        if (Player.Distance(target.ServerPosition) < QWER.Range - (poutput.CastPosition.Distance(target.ServerPosition) + target.BoundingRadius))
                        {
                            QWER.Cast(poutput.CastPosition);
                        }
                    }
                    else if ((int)poutput.Hitchance == 5)
                    {
                        QWER.Cast(poutput.CastPosition);
                    }
                }
            }
        }
Exemplo n.º 37
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (!target.IsVisible || !target.IsHPBarRendered)
            {
                return;
            }
            if (getSliderItem("PredictionMODE") == 0)
            {
                if (getSliderItem("HitChance") == 0)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.VeryHigh)
                        QWER.Cast(pred.CastPosition);
                    return;
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.High)
                        QWER.Cast(pred.CastPosition);
                    return;
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.Medium)
                        QWER.Cast(pred.CastPosition);
                    return;
                }
                return;
            }

            if (getSliderItem("PredictionMODE") == 1)
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2 = true;
                }

                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }

                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                        QWER.Cast(poutput2.CastPosition);

                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell = QWER;
                    DrawSpellTime = Game.Time;

                }
                DrawSpellPos = poutput2;
                return;
            }

            if (getSliderItem("PredictionMODE") == 2)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    if (getSliderItem("HitChance") == 0)
                    {
                        var pred = QWER.GetSPrediction(t);
                        if (pred.HitChance >= LeagueSharp.Common.HitChance.VeryHigh)
                            QWER.Cast(pred.CastPosition);
                        return;
                    }
                    else if (getSliderItem("HitChance") == 1)
                    {
                        var pred = QWER.GetSPrediction(t);
                        if (pred.HitChance >= LeagueSharp.Common.HitChance.High)
                            QWER.Cast(pred.CastPosition);
                        return;
                    }
                    else if (getSliderItem("HitChance") == 2)
                    {
                        var pred = QWER.GetSPrediction(t);
                        if (pred.HitChance >= LeagueSharp.Common.HitChance.Medium)
                            QWER.Cast(pred.CastPosition);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High);
                }
                return;
            }

            if (getSliderItem("PredictionMODE") == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;

                var predInput2 = new SebbyLib.Movement.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }

                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                        QWER.Cast(poutput2.CastPosition);

                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                return;
            }

            if (getSliderItem("PredictionMODE") == 4)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    Cast(QWER.Slot);
                }
                else
                {
                    Cast(QWER.Slot);
                }
            }
        }
Exemplo n.º 38
0
        private static void CastSpell(Spell QWER, Obj_AI_Hero target, int HitChanceNum)
        {
            //HitChance 0 - 2
            // example CastSpell(Q, ts, 2);
            var poutput = QWER.GetPrediction(target);
            var col = poutput.CollisionObjects.Count(ColObj => ColObj.IsEnemy && ColObj.IsMinion && !ColObj.IsDead);
            if (target.IsDead || col > 0 || target.Path.Count() > 1)
                return;

            if ((target.Path.Count() == 0 && target.Position == target.ServerPosition) || target.HasBuff("Recall"))
            {
                QWER.Cast(poutput.CastPosition);
                return;
            }

            if (HitChanceNum == 0)
                QWER.Cast(target, true);
            else if (HitChanceNum == 1)
            {
                if ((int)poutput.Hitchance > 4)
                    QWER.Cast(poutput.CastPosition);
            }
            else if (HitChanceNum == 2)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                if (waypoints.Last<Vector2>().To3D().Distance(poutput.CastPosition) > QWER.Width && (int)poutput.Hitchance == 5)
                {
                    if (waypoints.Last<Vector2>().To3D().Distance(Player.Position) <= target.Distance(Player.Position) || (target.Path.Count() == 0 && target.Position == target.ServerPosition))
                    {
                        if (Player.Distance(target.ServerPosition) < QWER.Range - (poutput.CastPosition.Distance(target.ServerPosition) + target.BoundingRadius))
                        {
                            QWER.Cast(poutput.CastPosition);
                        }
                    }
                    else if ((int)poutput.Hitchance == 5)
                    {
                        QWER.Cast(poutput.CastPosition);
                    }
                }
            }
            else if (HitChanceNum == 3)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed) - QWER.Width) * 6;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if ((target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(Player.Distance(waypoints.Last<Vector2>().To3D()) - Player.Distance(target.Position)) > BackToFront))
                {
                    if (waypoints.Last<Vector2>().To3D().Distance(Player.Position) <= target.Distance(Player.Position))
                    {
                        if (Player.Distance(target.ServerPosition) < QWER.Range - (poutput.CastPosition.Distance(target.ServerPosition)))
                        {
                            QWER.Cast(poutput.CastPosition);
                        }
                    }
                    else
                    {
                        QWER.Cast(poutput.CastPosition);
                    }
                }
            }
            else if (HitChanceNum == 4 && (int)poutput.Hitchance > 4)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed) - QWER.Width) * 6;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));

                if (Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if ((target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(Player.Distance(waypoints.Last<Vector2>().To3D()) - Player.Distance(target.Position)) > BackToFront))
                {
                    if (waypoints.Last<Vector2>().To3D().Distance(Player.Position) <= target.Distance(Player.Position))
                    {
                        if (Player.Distance(target.ServerPosition) < QWER.Range - (poutput.CastPosition.Distance(target.ServerPosition)))
                        {
                            QWER.Cast(poutput.CastPosition);
                        }
                    }
                    else
                    {
                        QWER.Cast(poutput.CastPosition);
                    }
                }
            }
        }
Exemplo n.º 39
0
        private static void CastSpell(Spell QWER, Obj_AI_Hero target, int HitChanceNum)
        {
            //HitChance 0 - 2
            // example CastSpell(Q, ts, 2);
            var poutput = QWER.GetPrediction(target);
            var col = poutput.CollisionObjects.Count(ColObj => ColObj.IsEnemy && ColObj.IsMinion && !ColObj.IsDead);
            if (QWER.Collision && col > 0)
                return;
            if (HitChanceNum == 0)
                QWER.Cast(target, true);
            else if (HitChanceNum == 1)
            {
                if ((int)poutput.Hitchance > 4)
                    QWER.Cast(poutput.CastPosition);
            }
            else if (HitChanceNum == 2)
            {
                if ((target.IsFacing(ObjectManager.Player) && (int)poutput.Hitchance == 5) || (target.Path.Count() == 0 && target.Position == target.ServerPosition))
                {
                    if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed) + (target.BoundingRadius * 2)))
                    {
                        QWER.Cast(poutput.CastPosition);
                    }
                }
                else if ((int)poutput.Hitchance == 5)
                {
                    QWER.Cast(poutput.CastPosition);
                }
            }
            else if (HitChanceNum == 3)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed)) * 6 - QWER.Width;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || ObjectManager.Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if (target.Path.Count() < 2
                    && (target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) - ObjectManager.Player.Distance(target.Position)) > BackToFront
                    || target.HasBuffOfType(BuffType.Slow) || target.HasBuff("Recall")
                    || (target.Path.Count() == 0 && target.Position == target.ServerPosition)
                    ))
                {
                    if (target.IsFacing(ObjectManager.Player) || target.Path.Count() == 0)
                    {
                        if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed) + (target.BoundingRadius * 2)))
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }
            }
            else if (HitChanceNum == 4 && (int)poutput.Hitchance > 4)
            {

                List<Vector2> waypoints = target.GetWaypoints();
                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed)) * 6 - QWER.Width;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || ObjectManager.Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if (target.Path.Count() < 2
                    && (target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) - ObjectManager.Player.Distance(target.Position)) > BackToFront
                    || target.HasBuffOfType(BuffType.Slow) || target.HasBuff("Recall")
                    || (target.Path.Count() == 0 && target.Position == target.ServerPosition)
                    ))
                {
                    // max range fix
                    if (target.IsFacing(ObjectManager.Player) || target.Path.Count() == 0)
                    {
                        if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed) + (target.BoundingRadius * 2)))
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }
            }
        }