Ejemplo n.º 1
0
        private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            var targ = target as AIBaseClient;

            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);
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
            Heal();
            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 == 4)
                        {
                            spells[Spells.E].CastIfHitchanceEquals(target, HitChance.Immobile);
                        }
                    }
                }
            }

            if (IsActive("Beta.Cast.Q1") && IsListActive("Combo.Prio").SelectedIndex == 2)
            {
                if (Ferocity != 4)
                {
                    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;
        }