Ejemplo n.º 1
0
        public static void Execute()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                return;
            }

            if (Menu.Harass.E && Spells.E.IsReady())
            {
                var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical, Player.Instance.Position);
                if (target != null &&
                    (!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
                {
                    Utility.Debug(string.Format("Used E on {0} (Harass Mode).", target.Name));
                    Spells.E.Cast(target);
                }
            }

            if (Menu.Harass.Hydra)
            {
                var hydra  = new Item((int)ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int)ItemId.Tiamat_Melee_Only, 250);
                var item   = hydra.IsReady() ? hydra : tiamat;
                var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
                if ((Item.HasItem(hydra.Id, Player.Instance) ||
                     Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
                    target.Distance(Player.Instance) < item.Range - 80)
                {
                    Utility.Debug("Used Hydra/Tiamat (Harass Mode).");
                    item.Cast();
                }
            }
        }
Ejemplo n.º 2
0
        private static void Interrupter_OnInterruptableSpell(Obj_AI_Base sender,
                                                             Interrupter.InterruptableSpellEventArgs e)
        {
            if (!Menu.Misc.InterruptR || !Spells.R.IsReady() || !sender.IsEnemy || sender.HasBuff("xenzhaointimidate"))
            {
                return;
            }

            if (sender.IsValidTarget(Spells.R.Range))
            {
                Utility.Debug(string.Format("Used R on {0} (OnInterruptableSpell).",
                                            ((AIHeroClient)sender).ChampionName));
                Spells.R.Cast(sender.Position);
            }
            else
            {
                var erManaCost = Spells.E.Handle.SData.Mana + Spells.R.Handle.SData.Mana;
                if (Spells.E.IsReady() && sender.IsValidTarget(Spells.E.Range) && Player.Instance.Mana >= erManaCost)
                {
                    Utility.Debug(string.Format("Used E on {0} (OnInterruptableSpell).",
                                                ((AIHeroClient)sender).ChampionName));
                    Spells.E.Cast(sender);
                }
            }
        }
Ejemplo n.º 3
0
        public static void Execute()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }

            if (Menu.Combo.R && Spells.R.IsReady() && !Player.Instance.IsDashing())
            {
                var targets =
                    EntityManager.Heroes.Enemies.Where(enemy => enemy != null && enemy.IsValidTarget(Spells.R.Range))
                    .ToList();
                if ((targets.Count > 1 &&
                     targets.Any(target => target != null && target.Health < Damages.Spell.R.GetDamage(target))) ||
                    targets.Any(target => target != null && target.HealthPercent < Menu.Combo.RHp) ||
                    targets.Count >= Menu.Combo.RCount)
                {
                    Utility.Debug(string.Format("Used R (Combo Mode) [Targets Count: {0}].", targets.Count));
                    Spells.R.Cast();
                }
            }

            if (Menu.Combo.E && Spells.E.IsReady())
            {
                var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical);
                if (target != null &&
                    (!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
                {
                    Utility.Debug(string.Format("Used E on {0} (Combo Mode).", target.Name));
                    Spells.E.Cast(target);
                }
            }

            if (Menu.Combo.Hydra)
            {
                var hydra  = new Item((int)ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int)ItemId.Tiamat_Melee_Only, 250);
                var item   = hydra.IsReady() ? hydra : tiamat;
                var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
                if ((Item.HasItem(hydra.Id, Player.Instance) ||
                     Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
                    target.Distance(Player.Instance) < item.Range - 80)
                {
                    Utility.Debug("Used Hydra/Tiamat (Combo Mode).");
                    item.Cast();
                }
            }
        }
Ejemplo n.º 4
0
        public static void Execute()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) &&
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                return;
            }

            var minionObj =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(minion => !minion.IsAlly && minion.Distance(Player.Instance) < Spells.E.Range);
            var objAiMinions = minionObj as Obj_AI_Minion[] ?? minionObj.ToArray();

            if (!objAiMinions.Any())
            {
                return;
            }

            if (Menu.Clear.E && Spells.E.IsReady())
            {
                var obj = objAiMinions.FirstOrDefault(minion => minion.Health < Damages.Spell.E.GetDamage(minion));
                if (obj == null && !objAiMinions.Any(minion => Player.Instance.IsInAutoAttackRange(minion)))
                {
                    obj = objAiMinions.MinOrDefault(minion => minion.Health);
                }

                if (obj != null)
                {
                    Utility.Debug(string.Format("Used E on {0} (Lane/Jungle Clear Mode).", obj.Name));
                    Spells.E.Cast(obj);
                }
            }

            if (Menu.Clear.Hydra)
            {
                var hydra  = new Item((int)ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int)ItemId.Tiamat_Melee_Only, 250);
                var item   = hydra.IsReady() ? hydra : tiamat;
                if ((Item.HasItem(hydra.Id, Player.Instance) ||
                     Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
                    (objAiMinions.Count(i => item.IsInRange(i)) > 2 ||
                     objAiMinions.Any(i => i.MaxHealth >= 1200 && i.Distance(Player.Instance) < item.Range - 80)))
                {
                    Utility.Debug("Used Hydra/Tiamat (Lane/Jungle Clear Mode).");
                    item.Cast();
                }
            }
        }
Ejemplo n.º 5
0
        private static void Orbwalker_OnAttack(AttackableUnit target, EventArgs args)
        {
            if (!Spells.W.IsReady())
            {
                return;
            }

            var aiHeroClientW = Menu.Combo.W || Menu.Harass.W;

            if (((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                  Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) &&
                 aiHeroClientW && target is AIHeroClient) ||
                (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && Menu.Clear.W &&
                 target is Obj_AI_Minion))
            {
                Utility.Debug("Used W on OnAttack Callback.");
                Spells.W.Cast();
            }
        }
Ejemplo n.º 6
0
        private static void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
        {
            if (!Spells.Q.IsReady())
            {
                return;
            }

            var aiHeroClientQ = Menu.Combo.Q || Menu.Harass.Q;

            if (((!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) &&
                  !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) || !aiHeroClientQ ||
                 !(target is AIHeroClient)) &&
                (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || !Menu.Clear.Q ||
                 !(target is Obj_AI_Minion)))
            {
                return;
            }

            if (Spells.Q.Cast())
            {
                Utility.Debug("Used Q on OnPostAttack Callback.");
                Orbwalker.ResetAutoAttack();
            }
        }