private static void TryFlashInitiate(Obj_AI_Hero target)
        {
            // use r at appropriate distance
            // on spell cast takes over

            if (menulist("multib") == 2)
                return;

            if (!menu.Item("shycombo").GetValue<KeyBind>().Active ||
                !target.IsValid<Obj_AI_Hero>() || uo || !menubool("user"))
                return;

            if (riventarget() == null || !canburst(true) || uo)
                return;

            if (!flash.IsReady())
                return;

            if (e.IsReady() && target.Distance(player.ServerPosition) <= e.Range + 50 + 300)
            {
                if (target.Distance(player.ServerPosition) > e.Range + truerange)
                {
                    e.Cast(target.ServerPosition);
                    r.Cast();
                }
            }

            if (!e.IsReady() && target.Distance(player.ServerPosition) <= 50 + 300)
            {
                if (target.Distance(player.ServerPosition) > truerange + 35)
                {
                    r.Cast();
                }
            }
        }
Example #2
0
        static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
                return;

            if (_menu.Item("interruptq").GetValue<bool>() && _q.IsReady())
            {
                if (sender.Distance(Me.ServerPosition, true) <= _q.RangeSqr)
                    _q.SPredictionCast(sender, HitChance.High);
            }

            if (_menu.Item("interruptr").GetValue<bool>() && _r.IsReady())
            {
                if (sender.Distance(Me.ServerPosition, true) <= _r.RangeSqr)
                    _r.Cast();
            }

            if (_menu.Item("interrupte").GetValue<bool>() && _e.IsReady())
            {
                if (sender.Distance(Me.ServerPosition, true) <= _e.RangeSqr)
                    _e.CastOnUnit(Me);
            }
        }
Example #3
0
        private static void SomeDash(Obj_AI_Hero target)
        {
            if (!menu.Item("shycombo").GetValue<KeyBind>().Active ||
                !target.IsValid<Obj_AI_Hero>() || uo)
                return;

            if (riventarget() == null || uo || !r.IsReady())
                return;

            if (flash.IsReady() && canburst(true) && menulist("multib") != 2)
            {
                if (e.IsReady() && target.Distance(player.ServerPosition) <= e.Range + 50 + 300)
                {
                    if (target.Distance(player.ServerPosition) > e.Range + truerange)
                    {
                        e.Cast(target.ServerPosition);
                        r.Cast();
                    }
                }

                if (!e.IsReady() && target.Distance(player.ServerPosition) <= 50 + 300)
                {
                    if (target.Distance(player.ServerPosition) > truerange + 35)
                    {
                        r.Cast();
                    }
                }
            }

            else
            {
                if (e.IsReady() && target.Distance(player.ServerPosition) <= e.Range + w.Range)
                {
                    e.Cast(target.ServerPosition);
                    r.Cast();
                }
            }
        }
Example #4
0
        private void Custom(bool conserve, Obj_AI_Hero selected)
        {
            if (R.IsReady())
            {
                Obj_AI_Hero target;
                if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo && conserve && R.Instance.ManaCost > (40 * config.Item("UseRComboValue").GetValue<Slider>().Value)) return;
                if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Custom && config.Item("UseRConserve").GetValue<bool>() && R.Instance.ManaCost > 40) return;
                var EnemyList = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsDead && !x.IsZombie && !x.IsInvulnerable && !myUtility.ImmuneToMagic(x) && !myUtility.ImmuneToPhysical(x));
                if (selected != null && selected.IsValid<Obj_AI_Hero>()) target = selected;
                else
                {
                    target = TargetSelector.GetSelectedTarget() != null && TargetSelector.GetSelectedTarget().IsValidTarget() ?
                        TargetSelector.GetSelectedTarget() :
                        EnemyList.Where(x => !x.InFountain() && Vector3.Distance(Player.ServerPosition, x.ServerPosition) <= RRange).OrderByDescending(z => myRePriority.ResortDB(z.ChampionName)).ThenBy(i => i.Health).FirstOrDefault();
                }
                if (target == null) return;
                PredictionOutput pred = R.GetPrediction(target);
                Vector3 pos;
                if (Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= RRange)
                {

                    var test1 = Prediction.GetPrediction(target, 1.2f).CastPosition;
                    float movement = target.MoveSpeed * 100 / 1000;
                    if (target.Distance(test1) > movement)
                    {
                        if (myUtility.IsFacing(target, Player.ServerPosition))
                        {
                            pos = target.ServerPosition.Extend(Player.ServerPosition.Extend(test1, target.MoveSpeed), 100);
                            R.Cast(pos);
                        }
                        if (!myUtility.IsFacing(target, Player.ServerPosition))
                        {
                            pos = target.ServerPosition.Extend(Player.ServerPosition.Extend(test1, target.MoveSpeed), -100);
                            R.Cast(pos);
                        }
                    }
                    else
                    {
                        if (pred.Hitchance >= KHitChance)
                        {
                            pos = myUtility.RandomPos(1, 10, 10, pred.CastPosition);
                            R.Cast(pos);
                        }
                    }
                }
            }
        }
Example #5
0
        private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
                return;
            if (MainMenu._MainMenu.Item("InterQ").GetValue<bool>() && _Q.IsReady() && sender.ServerPosition.Distance(Player.ServerPosition) < 850 && !_Q.IsCharging)
            {
                _Q.Cast(sender.ServerPosition, true);
                QSpell = true;
                SpellTime = TickCount(1000);
            }

            if (MainMenu._MainMenu.Item("InterR").GetValue<bool>() && _R.IsReady() && sender.ServerPosition.Distance(Player.ServerPosition) < 875 && SpellTime < Environment.TickCount && !Player.IsRecalling())
            {
                _R.Cast(true);
                RTime = TickCount(1000);
            }
        }
Example #6
0
        private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            try
            {
                if (sender.IsEnemy && sender.IsValid<Obj_AI_Hero>())
                {
                    if (_MainMenu.Item("Poppy_inter_E").GetValue<bool>() && _E.IsReady() && Player.Distance(sender) < 525)
                    {
                        _E.Cast(sender, true);
                    }
                    if (_MainMenu.Item("Poppy_inter_R").GetValue<bool>() && _R.IsReady() && Player.Distance(sender) < 1200)
                    {
                        if (_R.IsCharging)
                        {
                            _R.Cast(sender, true);
                        }
                        else
                        {
                            _R.StartCharging();
                        }
                    }
                }
            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    Game.PrintChat(ChampName + " in FreshBooster isn't Load. Error Code 09");
                    ErrorTime = TickCount(10000);
                }
            }

        }
Example #7
0
        public static InterruptableTargetEventArgs GetInterruptableTargetData(Obj_AI_Hero target)
        {
            if (target.IsValid<Obj_AI_Hero>())
            {
                if (CastingInterruptableSpell.ContainsKey(target.NetworkId))
                {
                    // Return the args with spell end time
                    return new InterruptableTargetEventArgs(
                        CastingInterruptableSpell[target.NetworkId].DangerLevel, target.Spellbook.CastEndTime, CastingInterruptableSpell[target.NetworkId].MovementInterrupts);
                }
            }

            return null;
        }
Example #8
0
        private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            try
            {
                if (Player.IsDead)
                    return;
                if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
                    return;

                if (_MainMenu.Item("Blitzcrank_InterQ").GetValue<bool>() && _Q.IsReady())
                {
                    if (sender.Distance(Player.ServerPosition, true) <= _Q.RangeSqr)
                        _Q.Cast(sender);
                }
                if (_MainMenu.Item("Blitzcrank_InterR").GetValue<bool>() && _R.IsReady())
                {
                    if (sender.Distance(Player.ServerPosition, true) <= _R.RangeSqr)
                        _R.Cast();
                }
                if (_MainMenu.Item("Blitzcrank_InterR").GetValue<bool>() && _E.IsReady())
                {
                    if (sender.Distance(Player.ServerPosition, true) <= _E.RangeSqr)
                        _E.CastOnUnit(Player);
                }
            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    Game.PrintChat(ChampName + " in FreshBooster isn't Load. Error Code 09");
                    ErrorTime = TickCount(10000);
                }
            }

        }
Example #9
0
        private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            try
            {
                if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
                    return;
                if (_MainMenu.Item("Thresh_InterE").GetValue<bool>() && _E.IsReady())
                {
                    if (sender.IsEnemy && sender.Distance(Player) < 480)
                    {
                        _E.Cast(sender.ServerPosition, true);
                    }
                }
                if (_MainMenu.Item("Thresh_InterQ").GetValue<bool>() && _Q.IsReady())
                {
                    if (sender.IsEnemy && sender.Distance(Player) < 1100 && Player.Spellbook.GetSpell(SpellSlot.Q).Name == "ThreshQ")
                    {
                        _Q.CastIfHitchanceEquals(sender, Hitchance("Thresh_CUseQ_Hit"), true);
                    }
                }
            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    Game.PrintChat(ChampName + " in FreshBooster isn't Load. Error Code 09");
                    ErrorTime = TickCount(10000);
                }
            }

        }
Example #10
0
        private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            try
            {
                if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
                    return;
                if (_MainMenu.Item("Janna_InterQ").GetValue<bool>() && _Q.IsReady() && sender.ServerPosition.Distance(Player.ServerPosition) < 850 && !_Q.IsCharging)
                {
                    _Q.Cast(sender.ServerPosition, true);
                    QSpell = true;
                    SpellTime = TickCount(1000);
                }

                if (_MainMenu.Item("Janna_InterR").GetValue<bool>() && _R.IsReady() && sender.ServerPosition.Distance(Player.ServerPosition) < 875 && SpellTime < Environment.TickCount && !Player.IsRecalling())
                {
                    _R.Cast(true);
                    RTime = TickCount(2000);
                }
            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    Game.PrintChat(ChampName + " in FreshBooster isn't Load. Error Code 09");
                    ErrorTime = TickCount(10000);
                }
            }

        }
Example #11
0
        private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
                return;

            if (MainMenu._MainMenu.Item("InterQ").GetValue<bool>() && _Q.IsReady())
            {
                if (sender.Distance(Player.ServerPosition, true) <= _Q.RangeSqr)
                    _Q.Cast(sender);
            }
            if (MainMenu._MainMenu.Item("InterR").GetValue<bool>() && _R.IsReady())
            {
                if (sender.Distance(Player.ServerPosition, true) <= _R.RangeSqr)
                    _R.Cast();
            }
            if (MainMenu._MainMenu.Item("InterR").GetValue<bool>() && _E.IsReady())
            {
                if (sender.Distance(Player.ServerPosition, true) <= _E.RangeSqr)
                    _E.CastOnUnit(Player);
            }
        }
Example #12
0
 private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (!sender.IsEnemy || !sender.IsValid<Obj_AI_Hero>())
         return;
     if (MainMenu._MainMenu.Item("InterE").GetValue<bool>() && _E.IsReady())
     {
         if (sender.IsEnemy && sender.Distance(Player) < 480)
         {
             _E.Cast(sender.ServerPosition, true);
         }
     }
     if (MainMenu._MainMenu.Item("InterQ").GetValue<bool>() && _Q.IsReady())
     {
         if (sender.IsEnemy && sender.Distance(Player) < 1100 && Player.Spellbook.GetSpell(SpellSlot.Q).Name == "ThreshQ")
         {
             _Q.CastIfHitchanceEquals(sender, Hitchance("CUseQ_Hit"), true);
         }
     }
 }
Example #13
0
 private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (sender.IsEnemy && sender.IsValid<Obj_AI_Hero>())
     {
         if (MainMenu._MainMenu.Item("inter_E").GetValue<bool>() && _E.IsReady() && Player.Distance(sender) < 525)
         {
             _E.Cast(sender, true);
         }
         if (MainMenu._MainMenu.Item("inter_R").GetValue<bool>() && _R.IsReady() && Player.Distance(sender) < 1200)
         {
             if (_R.IsCharging)
             {
                 _R.Cast(sender, true);
             }
             else
             {
                 _R.StartCharging();
             }
         }
     }
 }