예제 #1
0
        private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            var targ = target as Obj_AI_Base;

            if (!unit.IsMe || targ == null)
            {
                return;
            }

            Orbwalker.SetOrbwalkingPoint(Vector3.Zero);
            var mode = Orbwalker.ActiveMode;

            if (mode.Equals(Orbwalking.OrbwalkingMode.None) || mode.Equals(Orbwalking.OrbwalkingMode.LastHit) || mode.Equals(Orbwalking.OrbwalkingMode.LaneClear))
            {
                return;
            }

            if (spells[Spells.Q].IsReady() && spells[Spells.Q].Cast())
            {
                return;
            }

            if (IsActive("Combo.Use.items"))
            {
                ActiveModes.CastItems(targ);
            }
        }
예제 #2
0
        private static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            var targ = args.Target as AIHeroClient;

            if (!args.Unit.IsMe || targ == null)
            {
                return;
            }

            if (!spells[Spells.Q].IsReady() || !spells[Spells.Q].IsReady() || !Orbwalker.ActiveMode.Equals(Orbwalking.OrbwalkingMode.Combo))
            {
                return;
            }

            if (targ.Distance(Player) <= Orbwalking.GetRealAutoAttackRange(Player) - 10)
            {
                if (IsActive("Combo.Use.items"))
                {
                    ActiveModes.CastItems(targ);
                }
                spells[Spells.Q].Cast();
            }
        }
예제 #3
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }

            switch (Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                ActiveModes.Combo();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                ActiveModes.Laneclear();
                ActiveModes.Jungleclear();
                break;

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

            SwitchCombo();
            KillstealHandler();

            // E on Immobile targets
            if (IsActive("Misc.Root") && spells[Spells.E].IsReady())
            {
                if (!RengarR)
                {
                    var target = HeroManager.Enemies.FirstOrDefault(h => h.IsValidTarget(spells[Spells.E].Range));
                    if (target != null)
                    {
                        if (Ferocity == 5)
                        {
                            spells[Spells.E].CastIfHitchanceEquals(target, HitChance.Immobile);
                        }
                    }
                }
            }

            if (IsActive("Beta.Cast.Q1") && IsListActive("Combo.Prio").SelectedIndex == 2)
            {
                if (Ferocity != 5)
                {
                    return;
                }

                var searchrange = MenuInit.Menu.Item("Beta.searchrange").GetValue <Slider>().Value;
                var target      = HeroManager.Enemies.FirstOrDefault(h => h.IsValidTarget(searchrange, false));
                if (!target.IsValidTarget())
                {
                    return;
                }

                // Check if Rengar is in ultimate
                if (RengarR)
                {
                    // Check if the player distance <= than the set search range
                    if (Player.Distance(target) <= MenuInit.Menu.Item("Beta.searchrange.Q").GetValue <Slider>().Value)
                    {
                        // Cast Q with the set delay
                        Utility.DelayAction.Add(
                            MenuInit.Menu.Item("Beta.Cast.Q1.Delay").GetValue <Slider>().Value,
                            () => spells[Spells.Q].Cast());
                    }
                }
            }

            spells[Spells.R].Range = 1000 + spells[Spells.R].Level * 1000;
        }