示例#1
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);
         }
     }
 }
示例#2
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);
            }
        }
示例#3
0
        public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High)
        {
            if (!s.IsSkillshot)
                return;

            PredictionOutput p = s.GetPrediction(t);

            if (s.Collision)
            {
                for (int i = 0; i < p.CollisionObjects.Count; i++)
                    if (!p.CollisionObjects[i].IsDead && (p.CollisionObjects[i].IsEnemy || p.CollisionObjects[i].IsMinion))
                        return;
            }

            if ((t.HasBuffOfType(BuffType.Slow) && p.Hitchance >= HitChance.High) || p.Hitchance == HitChance.Immobile)
                s.Cast(p.CastPosition);
            else if (t.IsRecalling())
                s.Cast(t.ServerPosition);
            else
            {
                if (s.IsReady())
                {
                    s.SPredictionCast(t, hc);
                }
            }
        }
示例#4
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);
            }
        }
示例#5
0
文件: Galio.cs 项目: yashine59fr/Port
        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);
                }
            }
        }
示例#6
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);
                }
            }
        }
示例#7
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (getSliderItem("PredictionMODE") == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

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

                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);

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

                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);
                    }
                }
            }
            else 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);

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

                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;
            }
            else if (getSliderItem("PredictionMODE") == 0)
            {
                if (getSliderItem("HitChance") == 0)
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.VeryHigh);
                    return;
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High);
                    return;
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.Medium);
                    return;
                }
            }
            else if (getSliderItem("PredictionMODE") == 2)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    if (getSliderItem("HitChance") == 0)
                    {
                        QWER.SPredictionCast(t, LeagueSharp.Common.HitChance.VeryHigh);
                        return;
                    }
                    else if (getSliderItem("HitChance") == 1)
                    {
                        QWER.SPredictionCast(t, LeagueSharp.Common.HitChance.High);
                        return;
                    }
                    else if (getSliderItem("HitChance") == 2)
                    {
                        QWER.SPredictionCast(t, LeagueSharp.Common.HitChance.Medium);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High);
                }
            }
        }
示例#8
0
 public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High)
 {
     s.SPredictionCast(t, hc);
 }
示例#9
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            int       predIndex = 0;
            HitChance hitchance = HitChance.Low;

            if (QWER.Slot == SpellSlot.Q)
            {
                predIndex = Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.W)
            {
                predIndex = Config.Item("Wpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.E)
            {
                predIndex = Config.Item("Epred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.R)
            {
                predIndex = Config.Item("Rpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }


            if (predIndex == 4)
            {
                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    Core.PredictionAio.CCast(QWER, target, hitchance);
                }
                else if (QWER.Type == SkillshotType.SkillshotLine)
                {
                    Core.PredictionAio.LCast(QWER, target, hitchance);
                }
                else
                {
                    QWER.Cast(target);
                }
            }

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

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

                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);

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

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

                if ((int)hitchance == 6)
                {
                    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 ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
            else if (predIndex == 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);

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

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

                if ((int)hitchance == 6)
                {
                    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 ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell     = QWER;
                    DrawSpellTime = Game.Time;
                }
                DrawSpellPos = poutput2;
            }
            else if (predIndex == 0)
            {
                QWER.CastIfHitchanceEquals(target, hitchance);
            }
            else if (predIndex == 2)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    QWER.SPredictionCast(t, hitchance);
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
        }
示例#10
0
        public static void CastSpell(LeagueSharp.Common.Spell QWER, AIHeroClient target)
        {
            //   Chat.Print("CastSpell");
            if (getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 2)
            {
                //       Chat.Print("SDK");
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == LeagueSharp.Common.SkillshotType.SkillshotCircle)
                {
                    //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                    //aoe2 = true;
                }

                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      = ThreshWarden.Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

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

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

                if (getBoxItem(ThreshWarden.PredictConfig, "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 (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
            else
            if (ThreshWarden.getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 1)
            {
                //      Chat.Print("OKTW");
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == LeagueSharp.Common.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      = ThreshWarden.Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

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

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

                if (getBoxItem(ThreshWarden.PredictConfig, "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 (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
            else
            if (ThreshWarden.getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 0)
            {
                //      Chat.Print("Common");
                if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 0)
                {
                    QWER.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.High);
                    return;
                }
                else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 1)
                {
                    QWER.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.High);
                    return;
                }
                else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 2)
                {
                    QWER.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.Medium);
                    return;
                }
            }

            else if (getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 3)
            {
                //  Chat.Print("Prediction");
                if (target is AIHeroClient && target.IsValid)
                {
                    //      var t = target as AIHeroClient;
                    if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 0)
                    {
                        QWER.SPredictionCast(target, EloBuddy.SDK.Enumerations.HitChance.High);
                        return;
                    }
                    else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 1)
                    {
                        QWER.SPredictionCast(target, EloBuddy.SDK.Enumerations.HitChance.High);
                        return;
                    }
                    else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 2)
                    {
                        QWER.SPredictionCast(target, EloBuddy.SDK.Enumerations.HitChance.Medium);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, EloBuddy.SDK.Enumerations.HitChance.High);
                }
            }
        }
示例#11
0
        private void Harass()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(Q.Range, LeagueSharp.Common.TargetSelector.DamageType.Physical);
            float        perc   = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            if (target == null)
            {
                return;
            }
            if (config.Item("useqH", true).GetValue <bool>() && Q.IsReady())
            {
                var miniPred =
                    MinionManager.GetMinions(
                        Orbwalking.GetRealAutoAttackRange(player), MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(
                        minion =>
                        minion.Health > 5 &&
                        HealthPrediction.GetHealthPrediction(
                            minion,
                            (int)(player.AttackCastDelay * 1000) - 100 + Game.Ping / 2 +
                            1000 * (int)player.Distance(minion) / (int)Orbwalking.GetMyProjectileSpeed()) < 0);
                var priortarg = orbwalker.GetTarget();
                var canHArass = priortarg != null && !(priortarg is AIHeroClient);
                if (canHArass || (!canHArass && miniPred == null))
                {
                    if (Program.IsSPrediction)
                    {
                        Q.SPredictionCast(target, HitChance.High);
                    }
                    else
                    {
                        var targQ = Q.GetPrediction(target);
                        if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) &&
                            targQ.Hitchance >= HitChance.High)
                        {
                            Q.Cast(targQ.CastPosition);
                        }
                    }
                }
            }
            if (config.Item("usewH", true).GetValue <bool>() && W.IsReady())
            {
                if (Program.IsSPrediction)
                {
                    W.SPredictionCast(target, HitChance.High);
                }
                else
                {
                    var tarPered = W.GetPrediction(target);
                    if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position) &&
                        tarPered.Hitchance >= HitChance.High)
                    {
                        W.Cast(tarPered.CastPosition);
                    }
                }
            }
        }
示例#12
0
        private void Combo()
        {
            AIHeroClient target = getTarget();

            if (target == null)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (config.Item("usee", true).GetValue <bool>() && player.HasBuff("KennenLightningRush") &&
                player.Health > target.Health && !target.UnderTurret(true) && target.Distance(Game.CursorPos) < 250f)
            {
                orbwalker.SetMovement(false);
                EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, target);
            }
            bool hasIgnite   = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  combodamage = ComboDamage(target);
            var  ignitedmg   = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !Q.CanCast(target) && !W.IsReady())
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }

            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && Orbwalking.CanMove(100) &&
                !target.IsDashing())
            {
                if (Program.IsSPrediction)
                {
                    Q.SPredictionCast(target, HitChance.High);
                }
                else
                {
                    Q.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady())
            {
                if (player.HasBuff("KennenShurikenStorm"))
                {
                    if (HeroManager.Enemies.Count(e => e.Distance(player) < R.Range && MarkOfStorm(e) > 0) ==
                        player.CountEnemiesInRange(R.Range))
                    {
                        W.Cast();
                    }
                }
                else if (W.Range > player.Distance(target) && MarkOfStorm(target) > 0)
                {
                    W.Cast();
                }
            }
            if (config.Item("usee", true).GetValue <bool>() && !target.UnderTurret(true) && E.IsReady() &&
                (player.Distance(target) < 80 ||
                 (!player.HasBuff("KennenLightningRush") && !Q.CanCast(target) &&
                  config.Item("useemin", true).GetValue <Slider>().Value < player.Health / player.MaxHealth * 100 &&
                  MarkOfStorm(target) > 0 &&
                  CombatHelper.IsPossibleToReachHim(target, 1f, new float[5] {
                2f, 2f, 2f, 2f, 2f
            }[Q.Level - 1]))))
            {
                E.Cast();
            }

            if (R.IsReady() && !player.HasBuffOfType(BuffType.Snare) &&
                (config.Item("user", true).GetValue <Slider>().Value <=
                 player.CountEnemiesInRange(config.Item("userrange", true).GetValue <Slider>().Value) ||
                 (config.Item("usertarget", true).GetValue <bool>() &&
                  player.CountEnemiesInRange(config.Item("userrange", true).GetValue <Slider>().Value) == 1 &&
                  combodamage + player.GetAutoAttackDamage(target) * 3 > target.Health && !Q.CanCast(target) &&
                  player.Distance(target) < config.Item("userrange", true).GetValue <Slider>().Value)) ||
                (config.Item("userLow", true).GetValue <Slider>().Value <=
                 HeroManager.Enemies.Count(
                     e =>
                     e.IsValidTargetLS(config.Item("userrange", true).GetValue <Slider>().Value) &&
                     e.HealthPercent < 75)))
            {
                R.Cast();
            }
        }
示例#13
0
        public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High)
        {
            if (!s.IsSkillshot)
                return;

            s.SPredictionCast(t, hc);
        }
示例#14
0
        /// <summary>
        /// Quick and Easy Spellcasts params for Lux
        /// </summary>
        /// <param name="target"></param> Which unit should we cast spells on
        /// <param name="range"></param> Range check for targets
        /// <param name="spellslot"></param> Which spellslot 
        /// <param name="collision"></param> Collision Check for Q usage
        /// <param name="count"></param>  Only use said ability if it can hit X amount of enemies
        /// <param name="objectcheck"></param> Objectcheck for E usage
        public static void SpellCast(Obj_AI_Hero target, float range, Spell spellslot, bool collision, byte count, bool objectcheck, HitChance Hitchance)
        {
            //Sprediction SpellCast
            if (spellslot.IsReady() && target.IsValidTarget(range))
            {
                spellslot.SPredictionCast(target, Hitchance, 0, count);
            }

            if (collision)
            {
                Q.SetSkillshot(0.25f, 150f, 1200f, false, SkillshotType.SkillshotLine);
            }
            //Collision check using Common.Prediction
            var qcollision = Q.GetCollision(player.Position.To2D(), new List<Vector2> { target.Position.To2D() });
            var minioncol = qcollision.Where(x => (x is Obj_AI_Hero) && x.IsEnemy).Count();

            //Sprediction - Collision Cast
            if (spellslot.IsReady() && target.IsValidTarget(range) && collision && minioncol <= 1)
            {
                spellslot.SPredictionCast(target, Hitchance, 0, count);
            }

            //Insert E cast information
            if (Lux_E == null && spellslot.IsReady() && objectcheck && target.IsValidTarget(E.Range))
            {
                spellslot.SPredictionCast(target, Hitchance, 0, count);
            }
        }
示例#15
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (getSliderItem("PredictionMODE") == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

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

                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);
                }
            }

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

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

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

                var predInput2 = new 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 = Prediction.Prediction.GetPrediction(predInput2);

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

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= HitChance.High)
                        QWER.Cast(poutput2.CastPosition);
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell = QWER;
                    DrawSpellTime = Game.Time;
                }
                DrawSpellPos = poutput2;
            }

            if (getSliderItem("PredictionMODE") == 0)
            {
                if (getSliderItem("HitChance") == 0)
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.VeryHigh);
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High);
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.Medium);
                }
            }

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