Esempio n. 1
0
 private void InterruptableSpell_OnInterruptableTarget(object sender, InterruptableSpell.InterruptableTargetEventArgs e)
 {
     if (!Enable)
         return;
     if (e.Sender.IsEnemy && e.Sender.InAutoAttackRange())
     {
         if (HasGold)
         {
             Player.IssueOrder(GameObjectOrder.AttackUnit, e.Sender);
         }
     }
 }
Esempio n. 2
0
 private static void InterruptableSpellOnOnInterruptableTarget(object sender, InterruptableSpell.InterruptableTargetEventArgs interruptableTargetEventArgs)
 {
     if (VHRMenu["dz191.vhr.misc"]["dz191.vhr.misc.general"]["interrupt"].GetValue<MenuBool>().Value
         &&spells[SpellSlot.E].IsReady()
         && interruptableTargetEventArgs.Sender.IsValidTarget(spells[SpellSlot.E].Range)
         && interruptableTargetEventArgs.DangerLevel >= DangerLevel.Medium)
     {
            spells[SpellSlot.E].Cast(interruptableTargetEventArgs.Sender);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Interruptables the spell on a target.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="interruptableTargetEventArgs">The <see cref="InterruptableSpell.InterruptableTargetEventArgs"/> instance containing the event data.</param>
        private void InterruptableSpellOnOnInterruptableTarget(object sender, InterruptableSpell.InterruptableTargetEventArgs interruptableTargetEventArgs)
        {
            if (!interruptableTargetEventArgs.Sender.IsValidTarget(E.Range) || !E.IsReady()
                || !Menu["Misc"]["EInterrupt"].GetValue<MenuBool>().Value)
            {
                return;
            }

            E.Cast(interruptableTargetEventArgs.Sender);
        }
Esempio n. 4
0
        private static void InterruptableSpell_OnInterruptableTarget(object sender,
            InterruptableSpell.InterruptableTargetEventArgs interruptableTargetEventArgs)
        {
            var stopChannel = Variable.Config["Misc"]["StopChannel"].GetValue<MenuBool>().Value;
            if (!stopChannel)
            {
                return;
            }

            var unit = interruptableTargetEventArgs.Sender;
            if (!(Variable.Player.Distance(unit) <= Variable.W.Range) || !Variable.W.IsReady())
            {
                return;
            }

            Variable.W.CastOnUnit(unit);
        }
Esempio n. 5
0
        /// <summary>
        /// The interrupter 2 on on interruptable target.
        /// </summary>
        /// <param name="o">
        /// The o.
        /// </param>
        /// <param name="interruptableTargetEventArgs">
        /// The interruptable target event args.
        /// </param>
        private void Interrupter2OnOnInterruptableTarget(
            object o,
            InterruptableSpell.InterruptableTargetEventArgs interruptableTargetEventArgs)
        {
            var sender = interruptableTargetEventArgs.Sender;
            if (!this.Menu["Misc"]["UseEInterrupt"].GetValue<MenuBool>().Value || !this.E.IsReady()
                || !sender.IsValidTarget(this.E.Range))
            {
                return;
            }

            if (interruptableTargetEventArgs.DangerLevel == DangerLevel.Medium
                || interruptableTargetEventArgs.DangerLevel == DangerLevel.High)
            {
                this.E.Cast(sender);
            }
        }
Esempio n. 6
0
 private void InterruptableSpell_OnInterruptableTarget(object sender, InterruptableSpell.InterruptableTargetEventArgs e)
 {
     if (!Enable)
         return;
     if (e.Sender.IsEnemy && e.Sender.IsValidTarget(E.Range) && E.IsReady() && autointerrupt)
     {
         E.BadaoCast(e.Sender);
     }
 }
Esempio n. 7
0
 private static void OnPossibleToInterrupt(object sender, InterruptableSpell.InterruptableTargetEventArgs e)
 {
     if (!_cfg["Misc"]["IntQ"].GetValue<MenuBool>().Value || !_q.IsReady() || !e.Sender.IsValidTarget(_q.Range))
     {
        return;
     }
     if (e.DangerLevel == DangerLevel.High ||
         e.DangerLevel == DangerLevel.Medium && _cfg["Misc"]["IntMed"].GetValue<MenuBool>().Value)
     {
         _q.Cast(e.Sender);
     }
 }
Esempio n. 8
0
 private void InterruptableSpell_OnInterruptableTarget(object sender, InterruptableSpell.InterruptableTargetEventArgs e)
 {
     if (!Enable) return;
     if (e.Sender.IsEnemy && E.IsReady() && autogapinter)
     {
         if (e.Sender.IsValidTarget(E.Range)) E.Cast(e.Sender.Position);
         if (StunAbleOrb.Any())
         {
             var i = StunAbleOrb.First(x => x.Key.NetworkId == e.Sender.NetworkId);
             if (i.Value != null)
                 E.Cast(i.Value.Position.ToVector2());
         }
     }
 }
Esempio n. 9
0
        private static void Interruptable(object sender, InterruptableSpell.InterruptableTargetEventArgs e)
        {
            var enable = Config["misc"]["useW2I"].GetValue<MenuBool>().Value;

            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            if (enable)
            {
                W.CastOnUnit(target);
            }
        }
Esempio n. 10
0
        private static void InterruptableSpellOnInterruptableTarget(
            object sender, 
            InterruptableSpell.InterruptableTargetEventArgs e)
        {
            var unit = e.Sender;

            if (!unit.IsValidTarget() || unit.HealthPercent < Player.HealthPercent || !E.IsReady())
            {
                return;
            }

            var useEInterrupt = Menu["Misc"]["UseEInterrupt"].GetValue<MenuBool>().Value;
            var useFlyingInterrupt = Menu["Misc"]["QEInterrupt"].GetValue<MenuBool>().Value;

            if (useEInterrupt && E.IsInRange(unit))
            {
                E.CastOnUnit(unit);
            }

            if (!useFlyingInterrupt || E.IsInRange(unit) || !Q.IsInRange(unit) || !Q.IsReady()
                || e.DangerLevel != DangerLevel.High || GetComboDamage(unit) < unit.Health)
            {
                return;
            }

            Q.CastOnUnit(unit);
            DelayAction.Add(
                (Q.Delay * 1000) + Game.Ping + (1000 * (Player.Distance(unit) / Q.Speed)),
                () => E.CastOnUnit(unit));
        }
 /// <summary>
 /// Called when an unit casts an interruptable spell.
 /// </summary>
 /// <param name="sender">The sender of the spell.</param>
 /// <param name="args">The event's args.</param>
 private static void Interrupter_OnInterrupt(object sender, InterruptableSpell.InterruptableTargetEventArgs e)
 {
     if (MenuHelper.isMenuEnabled("dz191.vhr.misc.general","interrupt"))
     {
         if (e.DangerLevel == DangerLevel.High && e.Sender.IsValidTarget(_spells[SpellSlot.E].Range) && (sender is Obj_AI_Hero))
         {
             _spells[SpellSlot.E].Cast(e.Sender);
         }
     }
 }