Example #1
0
        internal static bool CanR(Obj_AI_Hero unit)
        {
            if (Me.HealthPercent <= 35 && unit.Distance(Me.ServerPosition) <= Me.AttackRange + 65)
            {
                return true;
            }

            if (unit.IsZombie || TargetSelector.IsInvulnerable(unit, TargetSelector.DamageType.Physical))
            {
                return false;
            }

            if (unit.CountAlliesInRange(400) >= 2 &&
                Me.GetAutoAttackDamage(unit, true) * 6 >= unit.Health)
            {
                return false;
            }

            if (Orbwalking.InAutoAttackRange(unit) &&
                Me.GetAutoAttackDamage(unit, true) * 3 >= unit.Health)
            {
                return false;
            }

            if (Buckshot.IsReady() && unit.Distance(Me.ServerPosition) <= Buckshot.Range &&
                Buckshot.GetDamage(unit) >= unit.Health)
            {
                return false;
            }

            if (Quickdraw.IsReady() && unit.Distance(Me.ServerPosition) <= Quickdraw.Range + 25 &&
                Me.GetAutoAttackDamage(unit, true) * 3 >= unit.Health)
            {
                return false;
            }

            return true;
        }
Example #2
0
 public static float GetRealDmg(Spell QWER, Obj_AI_Hero target)
 {
     if (Orbwalking.InAutoAttackRange(target) || target.CountAlliesInRange(300) > 0)
         return QWER.GetDamage(target) + (float)ObjectManager.Player.GetAutoAttackDamage(target) * 2;
     else
         return QWER.GetDamage(target);
 }
Example #3
0
 private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.CanCast(sender))
     {
         if (Player.CountAlliesInRange(E.Range + 50) < sender.CountAlliesInRange(E.Range + 50))
         {
             E.Cast(sender);
         }
         else
         {
             E.CastToReverse(sender);
         }
     }
     if (Q.CanCast(sender) && SpellQ.GetState()== QState.ThreshQ)
     {
         Q.Cast(sender);
     }
 }
Example #4
0
        internal static void GravesOnUpdate(EventArgs args)
        {
            Target = TargetSelector.GetTarget(Chargeshot.Range, TargetSelector.DamageType.Physical);

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                GravesCombo();

            if (MainMenu.Item("autosmoke").GetValue<bool>() && Smokescreen.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(Smokescreen.Range)))
                {
                    if (!Me.IsWindingUp && Utils.GameTimeTickCount - LE > 1100)
                        Smokescreen.CastIfHitchanceEquals(hero, HitChance.Immobile);
                }
            }

            if (MainMenu.Item("fleekey").GetValue<KeyBind>().Active)
            {
                if (Utils.GameTimeTickCount - LM >= 100)
                {
                    Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    LM = Utils.GameTimeTickCount;
                }

                if (Smokescreen.IsReady() && Target.IsValidTarget(Smokescreen.Range))
                    Smokescreen.CastIfHitchanceEquals(Target, HitChance.Medium);

                else if (Quickdraw.IsReady())
                {
                    if (Utils.GameTimeTickCount - LE > 500)
                        Quickdraw.Cast(Game.CursorPos);
                }
            }

            if (MainMenu.Item("allin").GetValue<KeyBind>().Active)
            {
                if (!Me.Spellbook.IsCastingSpell)
                     Orbwalking.Orbwalk(Target, Game.CursorPos);

                if (Target.IsValidTarget(Chargeshot.Range))
                {
                    var rpred = Prediction.GetPrediction(Target, 0.25f).UnitPosition;
                    if (rpred.Distance(Me.ServerPosition) <= Quickdraw.Range + 200)
                    {
                        if (Chargeshot.IsReady() && Quickdraw.IsReady() && Buckshot.IsReady())
                        {
                            Chargeshot.CastIfHitchanceEquals(Target, HitChance.High);
                        }
                    }
                }
            }

            if (Target.IsValidTarget() && Chargeshot.IsReady())
            {
                if (MainMenu.Item("shootr").GetValue<KeyBind>().Active)
                    Chargeshot.CastIfHitchanceEquals(Target, HitChance.VeryHigh);

                if (MainMenu.Item("usercombo").GetValue<bool>())
                {
                    if (Proj1(Target.ServerPosition, Chargeshot.Width, Chargeshot.Range) >=
                        MainMenu.Item("rmulti").GetValue<Slider>().Value)
                    {
                        if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                        {
                            if (Target.CountAlliesInRange(750) >= 2)
                                Chargeshot.CastIfHitchanceEquals(Target, HitChance.High);
                        }
                    }
                }
            }

            if (Chargeshot.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(Chargeshot.Range)))
                {
                    if (CanR(hero) && GetRDamage(hero) >= hero.Health && MainMenu.Item("secure").GetValue<bool>())
                    {
                        Chargeshot.CastIfHitchanceEquals(hero, HitChance.High);
                    }
                }
            }
        }
Example #5
0
        static void GravesOnUpdate(EventArgs args)
        {
            var user = mainMenu.Item("usercombo").GetValue<bool>();
            rtarget = TargetSelector.GetTarget(Chargeshot.Range, TargetSelector.DamageType.Physical);

            if (rtarget.IsValidTarget() && Chargeshot.IsReady())
            {
                if (Kappa(rtarget.ServerPosition, Chargeshot.Width, Chargeshot.Range) >=
                    mainMenu.Item("rmulti").GetValue<Slider>().Value)
                {
                    if (mainMenu.Item("combokey").GetValue<KeyBind>().Active)
                    {
                        if (rtarget.CountAlliesInRange(700) >= 2)
                            Chargeshot.CastIfHitchanceEquals(rtarget, HitChance.Medium);
                    }
                }
            }

            if (mainMenu.Item("combokey").GetValue<KeyBind>().Active)
                GravesCombo();

            if (mainMenu.Item("fleekey").GetValue<KeyBind>().Active)
            {
                if (!Me.IsImmovable)
                    Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

                if (Smokescreen.IsReady() && rtarget.IsValidTarget(Smokescreen.Range))
                    Smokescreen.CastIfHitchanceEquals(rtarget, HitChance.Medium);

                else if (Quickdraw.IsReady())
                {
                    if (Utils.GameTimeTickCount - LastE > 500)
                        Quickdraw.Cast(Game.CursorPos);
                }
            }

            if (GetRDamage(rtarget) >= rtarget.Health && user)
            {
                if (rtarget.Distance(Me.ServerPosition) <= Me.AttackRange &&
                    Me.GetAutoAttackDamage(rtarget, true) * 3 >= rtarget.Health)
                    return;

                Chargeshot.CastIfHitchanceEquals(rtarget, HitChance.High);
            }
        }