Exemple #1
0
 internal static CastStates CastingBestTarget(
     this Spell spell,
     bool aoe = false,
     CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
 {
     return(spell.Casting(spell.GetTarget(spell.Width / 2), aoe, collisionable));
 }
Exemple #2
0
 internal static CastStates CastingBestTarget(
     this Spell spell,
     bool aoe = false,
     CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
 {
     return spell.Casting(spell.GetTarget(spell.Width / 2), aoe, collisionable);
 }
Exemple #3
0
 public static Prediction.PredictionOutput VPrediction(
     this Spell spell,
     Obj_AI_Base unit,
     bool aoe = false,
     CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
 {
     return
         Prediction.GetPrediction(
             new Prediction.PredictionInput
                 {
                     Unit = unit, Delay = spell.Delay, Radius = spell.Width, Speed = spell.Speed, From = spell.From,
                     Range = spell.Range, Collision = spell.Collision, Type = spell.Type,
                     RangeCheckFrom = spell.RangeCheckFrom, AoE = aoe, CollisionObjects = collisionable
                 });
 }
Exemple #4
0
 public static List<Obj_AI_Base> VCollision(
     this Prediction.PredictionOutput pred,
     CollisionableObjects collisionable = CollisionableObjects.Minions)
 {
     var originalUnit = pred.Input.Unit;
     var col = Prediction.Collisions.GetCollision(
         new List<Vector3> { pred.UnitPosition },
         new Prediction.PredictionInput
             {
                 From = pred.Input.From, RangeCheckFrom = pred.Input.RangeCheckFrom, Delay = pred.Input.Delay,
                 Radius = pred.Input.Radius, Speed = pred.Input.Speed, Range = pred.Input.Range,
                 Type = pred.Input.Type, AoE = pred.Input.AoE, CollisionObjects = collisionable
             });
     col.RemoveAll(i => i.Compare(originalUnit));
     return col;
 }
 /// <summary>
 ///     Returns Spell Prediction
 /// </summary>
 /// <param name="unit">
 ///     Predicted Unit
 /// </param>
 /// <param name="aoe">
 ///     Is Area of effect
 /// </param>
 /// <param name="overrideRange">
 ///     Override Range
 /// </param>
 /// <param name="collisionable">
 ///     Collision-able Flags
 /// </param>
 /// <returns>
 ///     <see cref="PredictionOutput" /> output
 /// </returns>
 public PredictionOutput GetPrediction(
     Obj_AI_Base unit,
     bool aoe            = false,
     float overrideRange = -1,
     CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
 {
     return
         (Movement.GetPrediction(
              new PredictionInput
     {
         Unit = unit, Delay = this.Delay, Radius = this.Width, Speed = this.Speed, From = this.From,
         Range = (overrideRange > 0) ? overrideRange : this.Range, Collision = this.Collision,
         Type = this.Type, RangeCheckFrom = this.RangeCheckFrom, AoE = aoe,
         CollisionObjects = collisionable
     }));
 }
Exemple #6
0
        internal static List <Obj_AI_Base> GetCollision(
            this PredictionOutput pred,
            CollisionableObjects collisionable = CollisionableObjects.Minions)
        {
            var col = Collision.GetCollision(
                new List <Vector3> {
                pred.UnitPosition, pred.Input.Unit.Position
            },
                new PredictionInput
            {
                Delay = pred.Input.Delay, Radius = pred.Input.Radius, Speed = pred.Input.Speed,
                Range = pred.Input.Range, Type = pred.Input.Type, CollisionObjects = collisionable,
                From  = pred.Input.From
            });

            col.RemoveAll(i => i.Compare(pred.Input.Unit));
            return(col);
        }
Exemple #7
0
        public static IEnumerable<Obj_AI_Base> QGetCollisionMinions(Vector3 source, Vector3 targetposition, float width, float range, CollisionableObjects[] collisionObjects)
        {
            PredictionInput input = new PredictionInput {From = source, Radius = width, Range = range};

            if (collisionObjects.Length > 0)
            {
                for (int i = 0; collisionObjects.Length != 0; i ++)
                {
                    input.CollisionObjects[i] = collisionObjects[i];
                }
            }
            else
            {
                input.CollisionObjects[0] = CollisionableObjects.Minions;
            }

            return
                Collision.GetCollision(new List<Vector3> {targetposition}, input).OrderBy(obj => obj.Distance(source)).ToList();
        }
Exemple #8
0
        internal static CastStates Casting(
            this Spell spell,
            Obj_AI_Base unit,
            bool aoe = false,
            CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
        {
            if (!unit.IsValidTarget())
            {
                return(CastStates.InvalidTarget);
            }
            if (!spell.IsReady())
            {
                return(CastStates.NotReady);
            }
            if (spell.CastCondition != null && !spell.CastCondition())
            {
                return(CastStates.FailedCondition);
            }
            var pred = spell.GetPrediction(unit, aoe, -1, collisionable);

            if (pred.CollisionObjects.Count > 0)
            {
                return(CastStates.Collision);
            }
            if (spell.RangeCheckFrom.DistanceSquared(pred.CastPosition) > spell.RangeSqr)
            {
                return(CastStates.OutOfRange);
            }
            if (pred.Hitchance < spell.MinHitChance &&
                (!pred.Input.AoE || pred.Hitchance < HitChance.High || pred.AoeTargetsHitCount < 2))
            {
                return(CastStates.LowHitChance);
            }
            if (!Program.Player.Spellbook.CastSpell(spell.Slot, pred.CastPosition))
            {
                return(CastStates.NotCasted);
            }
            spell.LastCastAttemptT = Variables.TickCount;
            return(CastStates.SuccessfullyCasted);
        }
Exemple #9
0
        /// <summary>
        ///     Returns Spell Prediction
        /// </summary>
        /// <param name="unit">
        ///     Predicted Unit
        /// </param>
        /// <param name="aoe">
        ///     Is Area of effect
        /// </param>
        /// <param name="overrideRange">
        ///     Override Range
        /// </param>
        /// <param name="collisionable">
        ///     Collision-able Flags
        /// </param>
        /// <returns>
        ///     <see cref="PredictionOutput" /> output
        /// </returns>
        public PredictionOutput GetPrediction(
            Obj_AI_Base unit,
            bool aoe            = false,
            float overrideRange = -1,
            CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
        {
            var pred =
                Movement.GetPrediction(
                    new PredictionInput
            {
                Unit             = unit,
                Delay            = this.Delay,
                Radius           = this.Width,
                Speed            = this.Speed,
                From             = this.From,
                Range            = (overrideRange > 0) ? overrideRange : this.Range,
                Collision        = this.Collision,
                Type             = this.Type,
                RangeCheckFrom   = this.RangeCheckFrom,
                AoE              = aoe,
                CollisionObjects = collisionable
            });

            if (IsChargedSpell && charge != null)
            {
                return(new PredictionOutput()
                {
                    CastPosition = charge.GetPrediction(unit).CastPosition, Hitchance = pred.Hitchance, CollisionObjects = pred.CollisionObjects, AoeTargetsHit = pred.AoeTargetsHit, Input = pred.Input, UnitPosition = charge.GetPrediction(unit).UnitPosition, AoeHitCount = pred.AoeHitCount
                });
            }
            else if (skillshot != null && IsSkillshot)
            {
                return(new PredictionOutput()
                {
                    CastPosition = skillshot.GetPrediction(unit).CastPosition, Hitchance = pred.Hitchance, CollisionObjects = pred.CollisionObjects, AoeTargetsHit = pred.AoeTargetsHit, Input = pred.Input, UnitPosition = skillshot.GetPrediction(unit).UnitPosition, AoeHitCount = pred.AoeHitCount
                });
            }

            return(pred);
        }
Exemple #10
0
        internal static List <Obj_AI_Base> GetCollision(
            this Spell spell,
            Obj_AI_Base target,
            List <Vector3> to,
            CollisionableObjects collisionable = CollisionableObjects.Minions)
        {
            var col = Collision.GetCollision(
                to,
                new PredictionInput
            {
                Delay            = spell.Delay,
                Radius           = spell.Width,
                Speed            = spell.Speed,
                From             = spell.From,
                Range            = spell.Range,
                Type             = spell.Type,
                CollisionObjects = collisionable
            });

            col.RemoveAll(i => i.Compare(target));
            return(col);
        }
 /// <summary>
 ///     Returns Spell Prediction
 /// </summary>
 /// <param name="unit">Predicted Unit</param>
 /// <param name="aoe">Is Area-of-effect</param>
 /// <param name="overrideRange">Overriden Range</param>
 /// <param name="collisionable">Collisionable Flags</param>
 /// <returns>
 ///     <see cref="PredictionOutput" />
 /// </returns>
 public PredictionOutput GetPrediction(Obj_AI_Base unit,
                                       bool aoe            = false,
                                       float overrideRange = -1,
                                       CollisionableObjects collisionable = CollisionableObjects.Heroes | CollisionableObjects.Minions)
 {
     return
         (Movement.GetPrediction(
              new PredictionInput
     {
         Unit = unit,
         Delay = Delay,
         Radius = Width,
         Speed = Speed,
         From = From,
         Range = (overrideRange > 0) ? overrideRange : Range,
         Collision = Collision,
         Type = Type,
         RangeCheckFrom = RangeCheckFrom,
         Aoe = aoe,
         CollisionObjects = collisionable
     }));
 }
Exemple #12
0
 internal static LeagueSharp.SDK.Enumerations.CastStates Casting(
     this Spell spell,
     Obj_AI_Base unit,
     bool aoe = false,
     CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
 {
     if (!unit.LSIsValidTarget())
     {
         return CastStates.InvalidTarget;
     }
     if (!spell.IsReady())
     {
         return CastStates.NotReady;
     }
     if (spell.CastCondition != null && !spell.CastCondition())
     {
         return CastStates.FailedCondition;
     }
     var pred = spell.GetPrediction(unit, aoe, -1, collisionable);
     if (pred.CollisionObjects.Count > 0)
     {
         return CastStates.Collision;
     }
     if (spell.RangeCheckFrom.DistanceSquared(pred.CastPosition) > spell.RangeSqr)
     {
         return CastStates.OutOfRange;
     }
     if (pred.Hitchance < spell.MinHitChance
         && (!pred.Input.AoE || pred.Hitchance < HitChance.High || pred.AoeTargetsHitCount < 2))
     {
         return CastStates.LowHitChance;
     }
     if (!Program.Player.Spellbook.CastSpell(spell.Slot, pred.CastPosition))
     {
         return CastStates.NotCasted;
     }
     spell.LastCastAttemptT = Variables.TickCount;
     return CastStates.SuccessfullyCasted;
 }
Exemple #13
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.LSIsRecalling())
            {
                return;
            }

            ping = Game.Ping;

            SelectedTarget = TargetSelector.SelectedTarget;

            #region working stuff

            if (SelectedTarget.LSIsValidTarget())
            {
                if (Player.LSDistance(SelectedTarget) <= R.Range + Q.Range + 100)
                {
                    CollisionableObjects[] collisionCheck = {CollisionableObjects.YasuoWall};
                    RRectangle.Start = Player.Position.LSShorten(SelectedTarget.Position, -250).LSTo2D();
                    RRectangle.End =
                        R.GetPrediction(SelectedTarget, false, 1, collisionCheck)
                            .CastPosition.LSExtend(Player.Position, -330)
                            .LSTo2D();
                    RRectangle.UpdatePolygon();
                }
            }

            if (getCheckBoxItem(harassMenu, "useEWQ"))
            {
                if (!getCheckBoxItem(harassMenu, "useharassQ"))
                {
                    harassMenu["useharassQ"].Cast<CheckBox>().CurrentValue = true;
                }

                if (!getCheckBoxItem(harassMenu, "useharassE"))
                {
                    harassMenu["useharassE"].Cast<CheckBox>().CurrentValue = true;
                }

                if (!getCheckBoxItem(harassMenu, "useharassW"))
                {
                    harassMenu["useharassW"].Cast<CheckBox>().CurrentValue = true;
                }

                if (getSliderItem(harassMenu, "harassmana") != 0)
                {
                    harassMenu["harassmana"].Cast<Slider>().CurrentValue = 0;
                }
            }

            if (!getCheckBoxItem(comboMenu, "useEcombo"))
            {
                if (getCheckBoxItem(comboMenu, "useZhonya"))
                {
                    comboMenu["useZhonya"].Cast<CheckBox>().CurrentValue = false;
                }
            }

            if (getBoxItem(comboMenu, "ComboMode") == 1)
            {
                //Menu.Item("HitChancewR").SetValue<StringList>(new StringList(new[] { "Medium", "High", "Very High" }));
            }

            if (getBoxItem(comboMenu, "ComboMode") == 3)
            {
                //Menu.Item("HitChancewR").SetValue<StringList>(new StringList(new[] { "Medium", "High", "Very High" }));
            }


            if (!getKeyBindItem(customComboMenu, "EFlashCombo") && isEProcessed)
            {
                isEProcessed = false;
            }


            if (getCheckBoxItem(drawingsMenu, "drawRHitChance") && SelectedTarget.LSIsValidTarget())
            {
                var collisionCheck = new CollisionableObjects[1];
                collisionCheck[0] = CollisionableObjects.YasuoWall;
                var test = R.GetPrediction(SelectedTarget, false, -1, collisionCheck).HitChance;
                if (test == EloBuddy.SDK.Enumerations.HitChance.Collision) hitchanceR = "Collision Detected";
                if (test == EloBuddy.SDK.Enumerations.HitChance.Dashing) hitchanceR = "Is Dashing";
                if (test == EloBuddy.SDK.Enumerations.HitChance.Immobile) hitchanceR = "Immobile";
                if (test == EloBuddy.SDK.Enumerations.HitChance.Medium) hitchanceR = "Medium Chance";
                if (test == EloBuddy.SDK.Enumerations.HitChance.High) hitchanceR = "VeryHigh Chance";
                if (test == EloBuddy.SDK.Enumerations.HitChance.Low) hitchanceR = "Low  Chance";
                if (test == EloBuddy.SDK.Enumerations.HitChance.High) hitchanceR = "High Chance";
                if (test == EloBuddy.SDK.Enumerations.HitChance.Impossible) hitchanceR = "Impossible";
            }


            if (R.IsReady())
            {
                doOnce = true;
            }


            if (Player.LastCastedSpellT() >= 1)
            {
                if (doOnce && Player.LastCastedspell().Name == "FizzMarinerDoom")
                {
                    RCooldownTimer = Game.Time;
                    doOnce = false;
                }
            }


            //R cast tick lastRCastTick
            canCastZhonyaOnDash = Game.Time - RCooldownTimer <= 5.0f;

            #endregion

            #region Orbwalker

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Harass();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Lane();
                Jungle();
            }

            #endregion

            #region flee

            if (getKeyBindItem(customComboMenu, "Flee"))
            {
                Flee();
            }

            #endregion

            #region Auto cast R

            if (R.IsReady())
            {
                if (getKeyBindItem(customComboMenu, "manualR"))
                {
                    var t = SelectedTarget;
                    if (!t.LSIsValidTarget())
                    {
                        t = TargetSelector.GetTarget(R.Range, DamageType.Magical);
                        if (!t.LSIsValidTarget())
                        {
                            t = TargetSelector.GetTarget(R.Range, DamageType.Physical);
                            if (!t.LSIsValidTarget())
                            {
                                t = TargetSelector.GetTarget(R.Range, DamageType.True);
                            }
                        }
                    }
                    if (t.LSIsValidTarget())
                    {
                        if (Player.LSDistance(t.Position) <= R.Range)
                        {
                            //if enemy is not facing us, check via movespeed
                            if (!t.LSIsFacing(Player))
                            {
                                if (Player.LSDistance(t.Position) < R.Range - t.MoveSpeed - 165)
                                {
                                    CastRSmart(t);
                                    lastRCastTick = Game.Time;
                                }
                            }
                            else
                            {
                                if (Player.LSDistance(t.Position) <= R.Range)
                                {
                                    CastRSmart(t);
                                    lastRCastTick = Game.Time;
                                }
                            }
                        }
                    }
                }
            }

            #endregion

            #region Custom combo's

            if (getKeyBindItem(customComboMenu, "lateGameZhonyaCombo"))
            {
                lateGameZhonyaCombo();
            }
            if (getKeyBindItem(customComboMenu, "QminionREWCombo"))
            {
                QminionREWCombo();
            }
            if (getKeyBindItem(customComboMenu, "EFlashCombo"))
            {
                EFlashCombo();
            }

            #endregion
        }
Exemple #14
0
 //R usage
 public static void CastRSmart(Obj_AI_Hero target)
 {
     var veryhigh = (Menu.Item("HitChancewR").GetValue<StringList>().SelectedIndex == 2);
     var medium = (Menu.Item("HitChancewR").GetValue<StringList>().SelectedIndex == 0);
     var high = (Menu.Item("HitChancewR").GetValue<StringList>().SelectedIndex == 1);
     var veryhighAuto = (Menu.Item("manualRHitchance").GetValue<StringList>().SelectedIndex == 2);
     var mediumAuto = (Menu.Item("manualRHitchance").GetValue<StringList>().SelectedIndex == 0);
     var highAuto = (Menu.Item("manualRHitchance").GetValue<StringList>().SelectedIndex == 1);
     if (R.IsReady())
     {
         //Check YasuoWall
         CollisionableObjects[] collisionCheck = new CollisionableObjects[1];
         collisionCheck[0] = CollisionableObjects.YasuoWall;
         HitChance hitChance = R.GetPrediction(target, false, -1, collisionCheck).Hitchance;
         SharpDX.Vector3 endPosition = R.GetPrediction(target, false, Player.Distance(target.Position), collisionCheck).CastPosition.Extend(Player.Position, -(600));
         //Tweak hitchance
         if (hitChance == HitChance.OutOfRange || hitChance == HitChance.Low || hitChance == HitChance.Immobile)
         {
             hitChance = HitChance.Medium;
         }
         //Check for spellshields
         if (!target.HasBuff("summonerbarrier") || !target.HasBuff("BlackShield") || !target.HasBuff("SivirShield") || !target.HasBuff("BansheesVeil") || !target.HasBuff("ShroudofDarkness"))
         {
             //in combo & custom combo casts hitchance
             if (medium && hitChance >= HitChance.Medium && !Menu.Item("manualR").GetValue<KeyBind>().Active)
             {
                 R.Cast(endPosition);
             }
             if (high && hitChance >= HitChance.High && !Menu.Item("manualR").GetValue<KeyBind>().Active)
             {
                 R.Cast(endPosition);
             }
             if (veryhigh && hitChance >= HitChance.VeryHigh && !Menu.Item("manualR").GetValue<KeyBind>().Active)
             {
                 R.Cast(endPosition);
             }
             //manual casts hitchance
             if (mediumAuto && hitChance >= HitChance.Medium && Menu.Item("manualR").GetValue<KeyBind>().Active)
             {
                 R.Cast(endPosition);
             }
             if (highAuto && hitChance >= HitChance.High && Menu.Item("manualR").GetValue<KeyBind>().Active)
             {
                 R.Cast(endPosition);
             }
             if (veryhighAuto && hitChance >= HitChance.VeryHigh && Menu.Item("manualR").GetValue<KeyBind>().Active)
             {
                 R.Cast(endPosition);
             }
         }
     }
 }
 public static int GetCollisionCount(Obj_AI_Base from,
     Vector3 toPos,
     float spellWidth,
     CollisionableObjects[] colloObjects)
 {
     var input = new PredictionInput { Radius = spellWidth, Unit = from, };
     input.CollisionObjects = colloObjects;
     return Collision.GetCollision(new List<Vector3> { toPos }, input).Count();
 }
Exemple #16
0
 public PredictionOutput GetPrediction(Obj_AI_Base unit, bool aoe = false, float overrideRange = -1, CollisionableObjects[] collisionable = null)
 {
     return
         Prediction.GetPrediction(
             new PredictionInput
             {
                 Unit = unit,
                 Delay = Delay,
                 Radius = Width,
                 Speed = Speed,
                 From = From,
                 Range = (overrideRange > 0) ? overrideRange : Range,
                 Collision = Collision,
                 Type = Type,
                 RangeCheckFrom = RangeCheckFrom,
                 Aoe = aoe,
                 CollisionObjects =
                     collisionable ?? new[] { CollisionableObjects.Heroes, CollisionableObjects.Minions }
             });
 }
Exemple #17
0
 /// <summary>
 ///     Returns Spell Prediction
 /// </summary>
 /// <param name="unit">
 ///     Predicted Unit
 /// </param>
 /// <param name="aoe">
 ///     Is Area of effect
 /// </param>
 /// <param name="overrideRange">
 ///     Override Range
 /// </param>
 /// <param name="collisionable">
 ///     Collision-able Flags
 /// </param>
 /// <returns>
 ///     <see cref="PredictionOutput" /> output
 /// </returns>
 public PredictionOutput GetPrediction(
     Obj_AI_Base unit,
     bool aoe = false,
     float overrideRange = -1,
     CollisionableObjects collisionable = CollisionableObjects.Minions | CollisionableObjects.YasuoWall)
 {
     return
         Movement.GetPrediction(
             new PredictionInput
             {
                 Unit = unit,
                 Delay = this.Delay,
                 Radius = this.Width,
                 Speed = this.Speed,
                 From = this.From,
                 Range = (overrideRange > 0) ? overrideRange : this.Range,
                 Collision = this.Collision,
                 Type = this.Type,
                 RangeCheckFrom = this.RangeCheckFrom,
                 AoE = aoe,
                 CollisionObjects = collisionable
             });
 }
Exemple #18
0
 //R usage
 public static void CastRSmart(AIHeroClient target)
 {
     var veryhigh = getBoxItem(comboMenu, "HitChancewR") == 2;
     var medium = getBoxItem(comboMenu, "HitChancewR") == 0;
     var high = getBoxItem(comboMenu, "HitChancewR") == 1;
     var veryhighAuto = getBoxItem(customComboMenu, "manualRHitchance") == 2;
     var mediumAuto = getBoxItem(customComboMenu, "manualRHitchance") == 0;
     var highAuto = getBoxItem(customComboMenu, "manualRHitchance") == 1;
     if (R.IsReady())
     {
         //Check YasuoWall
         var collisionCheck = new CollisionableObjects[1];
         collisionCheck[0] = CollisionableObjects.YasuoWall;
         var hitChance = R.GetPrediction(target, false, -1, collisionCheck).HitChance;
         var endPosition =
             R.GetPrediction(target, false, Player.LSDistance(target.Position), collisionCheck)
                 .CastPosition.LSExtend(Player.Position, -600);
         //Tweak hitchance
         if (hitChance == EloBuddy.SDK.Enumerations.HitChance.Unknown || hitChance == EloBuddy.SDK.Enumerations.HitChance.Low || hitChance == EloBuddy.SDK.Enumerations.HitChance.Immobile)
         {
             hitChance = EloBuddy.SDK.Enumerations.HitChance.Medium;
         }
         //Check for spellshields
         if (!target.HasBuff("summonerbarrier") || !target.HasBuff("BlackShield") ||
             !target.HasBuff("SivirShield") || !target.HasBuff("BansheesVeil") ||
             !target.HasBuff("ShroudofDarkness"))
         {
             //in combo & custom combo casts hitchance
             if (medium && hitChance >= EloBuddy.SDK.Enumerations.HitChance.Medium && !getKeyBindItem(customComboMenu, "manualR"))
             {
                 R.Cast(endPosition);
             }
             if (high && hitChance >= EloBuddy.SDK.Enumerations.HitChance.High && !getKeyBindItem(customComboMenu, "manualR"))
             {
                 R.Cast(endPosition);
             }
             if (veryhigh && hitChance >= EloBuddy.SDK.Enumerations.HitChance.High && !getKeyBindItem(customComboMenu, "manualR"))
             {
                 R.Cast(endPosition);
             }
             //manual casts hitchance
             if (mediumAuto && hitChance >= EloBuddy.SDK.Enumerations.HitChance.Medium && getKeyBindItem(customComboMenu, "manualR"))
             {
                 R.Cast(endPosition);
             }
             if (highAuto && hitChance >= EloBuddy.SDK.Enumerations.HitChance.High && getKeyBindItem(customComboMenu, "manualR"))
             {
                 R.Cast(endPosition);
             }
             if (veryhighAuto && hitChance >= EloBuddy.SDK.Enumerations.HitChance.High && getKeyBindItem(customComboMenu, "manualR"))
             {
                 R.Cast(endPosition);
             }
         }
     }
 }
Exemple #19
0
 public static bool IsCollidingWith(Obj_AI_Base from,
     Vector3 toPos,
     float spellWidth,
     CollisionableObjects[] colloObjects)
 {
     var input = new PredictionInput
     {
         Radius = spellWidth,
         Unit = from,
         CollisionObjects = colloObjects
     };
     return Collision.GetCollision(new List<Vector3> {toPos}, input).Any();
 }
Exemple #20
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.IsRecalling())
            {
                return;
            }
            ping = Game.Ping;
            SelectedTarget = TargetSelector.SelectedTarget;
            #region working stuff
            if (SelectedTarget.IsValidTarget())
            {
                if (Player.Distance(SelectedTarget) <= R.Range + Q.Range + 100)
                {
                    CollisionableObjects[] collisionCheck = { CollisionableObjects.YasuoWall };
                    RRectangle.Start = Player.Position.Shorten(SelectedTarget.Position, -250).To2D();
                    RRectangle.End = R.GetPrediction(SelectedTarget, false, 1, collisionCheck).CastPosition.Extend(Player.Position, -330).To2D();
                    RRectangle.UpdatePolygon();
                }
            }
            if (!Menu.Item("useEcombo").IsActive())
            {
                Menu.Item("UseEOnlyAfterAA").ShowItem = false;
            }
            else Menu.Item("UseEOnlyAfterAA").ShowItem = true;
            if (Menu.Item("useEWQ").GetValue<bool>())
            {
                if (!Menu.Item("useharassQ").GetValue<bool>())
                {
                    Menu.Item("useharassQ").SetValue<bool>(true);
                }
                Menu.Item("useharassQ").ShowItem = false;
                if (!Menu.Item("useharassE").GetValue<bool>())
                {
                    Menu.Item("useharassE").SetValue<bool>(true);
                }
                Menu.Item("useharassE").ShowItem = false;
                if (!Menu.Item("useharassW").GetValue<bool>())
                {
                    Menu.Item("useharassW").SetValue<bool>(true);
                }
                Menu.Item("useharassW").ShowItem = false;
                if (Menu.Item("harassmana").ShowItem)
                {
                    lastSliderValue = Menu.Item("harassmana").GetValue<Slider>().Value;
                    Menu.Item("harassmana").ShowItem = false;
                }
                if (Menu.Item("harassmana").GetValue<Slider>().Value != 0)
                {
                    Menu.Item("harassmana").SetValue<Slider>(new Slider(0));
                }
                if (Menu.Item("texttt").ShowItem)
                {
                    Menu.Item("texttt").ShowItem = false;
                }
                if (Menu.Item("harassEMode").ShowItem)
                {
                    Menu.Item("harassEMode").ShowItem = false;
                }
            }
            if (!Menu.Item("texttt").ShowItem)
            {
                if (!Menu.Item("useEWQ").GetValue<bool>())
                {
                    Menu.Item("harassmana").ShowItem = true;
                    Menu.Item("texttt").ShowItem = true;
                    Menu.Item("harassEMode").ShowItem = true;
                    Menu.Item("useharassQ").ShowItem = true;
                    Menu.Item("useharassE").ShowItem = true;
                    Menu.Item("useharassW").ShowItem = true;
                    Menu.Item("harassmana").SetValue<Slider>(new Slider(lastSliderValue));
                }
            }
            if (!Menu.Item("useEcombo").GetValue<bool>())
            {
                if (Menu.Item("useZhonya").GetValue<bool>())
                {
                    Menu.Item("useZhonya").SetValue(false);
                }
            }
            if (Menu.Item("ComboMode").GetValue<StringList>().SelectedIndex == 1)
            {
                Menu.Item("HitChancewR").SetValue<StringList>(new StringList(new[] { "Medium", "High", "Very High" }));
            }
            if (Menu.Item("ComboMode").GetValue<StringList>().SelectedIndex == 3)
            {
                Menu.Item("HitChancewR").SetValue<StringList>(new StringList(new[] { "Medium", "High", "Very High" }));
            }
            if (!Menu.Item("EFlashCombo").GetValue<KeyBind>().Active && isEProcessed)
            {
                isEProcessed = false;
            }
            if (Menu.Item("drawRHitChance").GetValue<bool>() && SelectedTarget.IsValidTarget())
            {
                CollisionableObjects[] collisionCheck = new CollisionableObjects[1];
                collisionCheck[0] = CollisionableObjects.YasuoWall;
                HitChance test = R.GetPrediction(SelectedTarget, false, -1, collisionCheck).Hitchance;
                if (test == HitChance.Collision) hitchanceR = "Collision Detected";
                if (test == HitChance.Dashing) hitchanceR = "Is Dashing";
                if (test == HitChance.Immobile) hitchanceR = "Immobile";
                if (test == HitChance.Medium) hitchanceR = "Medium Chance";
                if (test == HitChance.VeryHigh) hitchanceR = "VeryHigh Chance";
                if (test == HitChance.Low) hitchanceR = "Low  Chance";
                if (test == HitChance.High) hitchanceR = "High Chance";
                if (test == HitChance.Impossible) hitchanceR = "Impossible";
            }
            //Anti AFK
            if (Menu.Item("antiAfk").GetValue<bool>())
            {
                if (Environment.TickCount - lastMovementTick > 140000)
                {
                    Orbwalking.Orbwalk(null, Game.CursorPos.Randomize(-200,200));
                    lastMovementTick = Environment.TickCount;
                }
            }
            if(R.IsReady())
            {
                doOnce = true;
            }
            if (Player.LastCastedSpellT() >= 1)
            {
                if (doOnce && Player.LastCastedspell().Name == "FizzMarinerDoom")
                {
                    RCooldownTimer = Game.Time;
                    doOnce = false;
                }
            }
            //R cast tick lastRCastTick
            if (Game.Time - RCooldownTimer <= 5.0f)
            {
               canCastZhonyaOnDash = true;
            }
            else
            {
               canCastZhonyaOnDash = false;
            }
            #endregion

            #region Orbwalker
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                Harass();
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                Combo();
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                Lane();
                Jungle();
            }
            #endregion

            #region flee
            if (Menu.Item("Flee").GetValue<KeyBind>().Active)
            {
                Flee();
            }
            #endregion

            #region Auto cast R
            if (R.IsReady()) 
            {
                if (Menu.Item("manualR").GetValue<KeyBind>().Active)
                {
                    var t = SelectedTarget;
                    if (!t.IsValidTarget())
                    {
                        t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
                        if (!t.IsValidTarget())
                        {
                            t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                            if (!t.IsValidTarget())
                            {
                                t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.True);
                            }
                        }
                    }
                    if (t.IsValidTarget())
                    {
                        if (Player.Distance(t.Position) <= R.Range)
                        {
                            //if enemy is not facing us, check via movespeed
                            if (!Utility.IsFacing(t, Player))
                            {
                                if (Player.Distance(t.Position) < (R.Range - t.MoveSpeed)-(165))
                                {
                                    CastRSmart(t);
                                    lastRCastTick = Game.Time;
                                }
                            }
                            else
                            {
                                if (Player.Distance(t.Position) <= R.Range)
                                {
                                    CastRSmart(t);
                                    lastRCastTick = Game.Time;
                                }
                            }
                        }
                    }
                }
            }
            #endregion

            #region Custom combo's
            if (Menu.Item("lateGameZhonyaCombo").GetValue<KeyBind>().Active)
            {
                lateGameZhonyaCombo();
            }
            if (Menu.Item("QminionREWCombo").GetValue<KeyBind>().Active)
            {
                QminionREWCombo();
            }
            if (Menu.Item("EFlashCombo").GetValue<KeyBind>().Active)
            {
                EFlashCombo();
            }
            #endregion 
        }
			public static PredictionOutput GetPrediction(Obj_AI_Base unit,
				float delay,
				float radius,
				float speed,
				CollisionableObjects[] collisionable) {
				return
					GetPrediction(
						new PredictionInput
						{
							Unit = unit,
							Delay = delay,
							Radius = radius,
							Speed = speed,
							CollisionObjects = collisionable
						});
			}
Exemple #22
0
 internal static List<Obj_AI_Base> GetCollision(
     this PredictionOutput pred,
     CollisionableObjects collisionable = CollisionableObjects.Minions)
 {
     var col = Collision.GetCollision(
         new List<Vector3> { pred.UnitPosition, pred.Input.Unit.Position },
         new PredictionInput
             {
                 Delay = pred.Input.Delay, Radius = pred.Input.Radius, Speed = pred.Input.Speed,
                 Range = pred.Input.Range, Type = pred.Input.Type, CollisionObjects = collisionable,
                 From = pred.Input.From
             });
     col.RemoveAll(i => i.Compare(pred.Input.Unit));
     return col;
 }