Example #1
0
 private void Fight(string mode)
 {
     if (GetValue <bool>(mode, "Q") && Q.CastOnBestTarget(0, PacketCast).IsCasted())
     {
         return;
     }
     if (mode != "Combo")
     {
         return;
     }
     if (GetValue <bool>(mode, "R") && R.IsReady())
     {
         var target = R.GetTarget(0, HeroManager.Enemies.Where(i => !GetValue <bool>("Lock", i.ChampionName)));
         if (target != null)
         {
             if (GetValue <bool>(mode, "RSmite") && CurrentSmiteType == SmiteType.Red)
             {
                 CastSmite(target, false);
             }
             if ((!GetValue <bool>(mode, "RSmite") || CurrentSmiteType != SmiteType.Red) &&
                 R.CastOnUnit(target, PacketCast))
             {
                 return;
             }
         }
     }
     if (GetValue <bool>(mode, "W") && W.IsReady() &&
         HeroManager.Allies.Any(
             i => !i.IsMe && i.IsValidTarget(W.Range, false) && Orbwalking.IsAutoAttack(i.LastCastedSpellName())))
     {
         W.Cast(PacketCast);
     }
 }
Example #2
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                if (Args.Target is Obj_LampBulb)
                {
                    return;
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = Args.Target as AIHeroClient;

                    if (target != null)
                    {
                        if (Menu.GetBool("ComboE") && E.IsReady())
                        {
                            Cast_E(target, false);
                        }
                        else if (Menu.GetBool("ComboQ") && Q.IsReady())
                        {
                            Q.Cast(target, true);
                        }
                        else if (Menu.GetBool("ComboW") && W.IsReady())
                        {
                            W.Cast(target.Position, true);
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (ManaManager.HasEnoughMana(Menu.GetSlider("JungleClearMana")) && ManaManager.SpellFarm)
                    {
                        var mobs = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                            MinionOrderTypes.MaxHealth);

                        if (mobs.Any())
                        {
                            var mob = mobs.FirstOrDefault();

                            if (Menu.GetBool("JungleClearE") && E.IsReady())
                            {
                                var ex = Me.Position.Extend(Game.CursorPos, 150);

                                E.Cast(ex, true);
                            }
                            else if (Menu.GetBool("JungleClearQ") && Q.IsReady())
                            {
                                Q.Cast(mob, true);
                            }
                            else if (Menu.GetBool("JungleClearW") && W.IsReady())
                            {
                                W.Cast(mob, true);
                            }
                        }
                    }
                }
            }
        }
Example #3
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe ||
                !Orbwalking.IsAutoAttack(args.SData.Name) ||
                !CheckGuardians() ||
                Menu.Item("Combo.W.Mana").GetValue <Slider>().Value > ObjectManager.Player.ManaPercent)
            {
                return;
            }

            var heroes = HeroManager.Enemies.Where(x => x.IsValidTarget(Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)));

            foreach (var target in heroes as AIHeroClient[] ?? heroes.ToArray())
            {
                if (Menu.Item("Combo.W.Pred").GetValue <bool>())
                {
                    wSpell.Spell.Cast(target.Position);
                }
                else
                {
                    var wPred = wSpell.Spell.GetPrediction(target);

                    if (wPred.Hitchance > HitChance.Medium)
                    {
                        wSpell.Spell.Cast(wPred.CastPosition);
                    }
                }
            }
        }
Example #4
0
        private bool CanE(AIHeroClient e, GameObjectProcessSpellCastEventArgs Args)
        {
            if (Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                switch (e.ChampionName)
                {
                case "TwistedFate":
                    if (Args.SData.Name == "GoldCardLock" || Args.SData.Name == "RedCardLock" || Args.SData.Name == "BlueCardLock")
                    {
                        return(true);
                    }
                    break;

                case "Leona":
                    if (Args.SData.Name == "LeonaQ")
                    {
                        return(true);
                    }
                    break;

                default:
                    return(false);
                }
            }
            else
            {
                return(!Args.SData.Name.ToLower().Contains("summoner"));
            }

            return(false);
        }
Example #5
0
 private static void Obj_AI_Base_OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && Orbwalking.IsAutoAttack(args.SData.Name) && (args.Target is Obj_AI_Base))
     {
         ExecuteAALogic(sender, (Obj_AI_Base)args.Target);
     }
 }
Example #6
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (Args.SData.Name.Contains("GravesChargeShot"))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Burst &&
                    TargetSelector.GetSelectedTarget() != null && E.IsReady())
                {
                    var target = TargetSelector.GetSelectedTarget();
                    var pos    = Me.Position.Extend(target.Position, E.Range);
                    E.Cast(pos);
                }
            }

            if (Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = Args.Target as AIHeroClient;

                    if (target != null && !target.IsDead && !target.IsZombie)
                    {
                        if (Menu.GetBool("ComboEAA") && E.IsReady())
                        {
                            ELogic(target);
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    var target = Args.Target as Obj_AI_Minion;

                    if (target != null && !target.IsDead)
                    {
                        if (ManaManager.HasEnoughMana(Menu.GetSlider("JungleClearMana")) && ManaManager.SpellFarm)
                        {
                            if (Menu.GetBool("JungleClearE") && E.IsReady())
                            {
                                var mobs =
                                    MinionManager.GetMinions(Me.Position, W.Range, MinionTypes.All, MinionTeam.Neutral,
                                                             MinionOrderTypes.MaxHealth).Where(x => !x.Name.ToLower().Contains("mini"));

                                if (mobs.FirstOrDefault() != null)
                                {
                                    if (!Me.Spellbook.IsCastingSpell)
                                    {
                                        ELogic(mobs.FirstOrDefault());
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Example #7
0
        /// <summary>
        /// Called when an unit has executed the windup time for a skill.
        /// </summary>
        /// <param name="sender">The unit.</param>
        /// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs"/> instance containing the event data.</param>
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            try
            {
                if (sender.IsMe &&
                    Orbwalking.IsAutoAttack(args.SData.Name) &&
                    (args.Target is Obj_AI_Base))
                {
                    foreach (var skill in Variables.skills)
                    {
                        if (skill.GetSkillMode() == SkillMode.OnAfterAA)
                        {
                            if ((Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
                                 Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed))
                            {
                                skill.Execute(args.Target as Obj_AI_Base);
                            }

                            if (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                            {
                                skill.ExecuteFarm(args.Target as Obj_AI_Base);
                            }
                        }
                    }
                }
            }catch (Exception e)
            {
                LogHelper.AddToLog(new LogItem("OnSpellCast", e, LogSeverity.Error));
            }
        }
Example #8
0
        private static void LaneClear(GameObjectProcessSpellCastEventArgs Args)
        {
            if (Args.SData == null || !Orbwalking.IsAutoAttack(Args.SData.Name) || Args.Target == null ||
                Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear || !Args.Target.IsEnemy ||
                !ManaManager.HasEnoughMana(Menu.GetSlider("LaneClearMana")) || !ManaManager.SpellFarm)
            {
                return;
            }

            if (Menu.GetBool("LaneClearW") && W.IsReady())
            {
                if (Args.Target.Type == GameObjectType.obj_AI_Turret || Args.Target.Type == GameObjectType.obj_Turret ||
                    Args.Target.Type == GameObjectType.obj_LampBulb)
                {
                    if (!Args.Target.IsDead)
                    {
                        W.Cast();
                    }
                }
                else
                {
                    var minion = (Obj_AI_Minion)Args.Target;

                    if (minion != null && minion.Health <= DamageCalculate.GetWDamage(minion))
                    {
                        W.Cast();
                        Orbwalker.ForceTarget(minion);
                    }
                }
            }
        }
Example #9
0
 /// <summary>
 ///     Called on do-cast.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 public static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && Orbwalking.IsAutoAttack(args.SData.Name) &&
         Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         Logics.Weaving(sender, args);
     }
 }
Example #10
0
        private static void OnDoCastRange(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            if (args.SData.Name.ToLower().Contains("shockblast") && !Ismelee())
            {
                if (getKeyBindItem(MenuConfig.Config, "manualeq"))
                {
                    var pos = Player.Position.LSExtend(Game.CursorPos, Player.BoundingRadius + 150);
                    E.Cast(pos);
                }
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && getCheckBoxItem(MenuConfig.combo, "useecr"))
                {
                    var target = TargetSelector.GetTarget(1470, DamageType.Physical);
                    if (target == null)
                    {
                        return;
                    }
                    var castposition = Player.Position.LSExtend(target.Position, Player.BoundingRadius + 150);
                    E.Cast(castposition);
                }
            }
            if (!Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (!sender.IsMe)
            {
                return;
            }
            if (!args.SData.IsAutoAttack())
            {
                return;
            }
            if (args.Target.Type != GameObjectType.AIHeroClient)
            {
                return;
            }
            if (Ismelee())
            {
                return;
            }
            thisunit = (AIHeroClient)args.Target;
            if (W.IsReady())
            {
                if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && getCheckBoxItem(MenuConfig.combo, "usewcr")) ||
                    (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) && getCheckBoxItem(MenuConfig.harass, "usewhr")))
                {
                    W.Cast();
                    Orbwalker.ForcedTarget = (((AIHeroClient)args.Target));

                    // Orbwalking.ResetAutoAttackTimer();
                }
            }
        }
Example #11
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = Args.Target as AIHeroClient;

                    if (target != null)
                    {
                        if (Menu.Item("ComboR", true).GetValue <bool>() && R.IsReady() &&
                            R.Instance.Ammo >= Menu.Item("ComboRLimit", true).GetValue <Slider>().Value)
                        {
                            R.CastTo(target);
                        }
                        else if (Menu.Item("ComboQ", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.CastTo(target, true);
                        }
                        else if (Menu.Item("ComboE", true).GetValue <bool>() && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (Me.ManaPercent < Menu.Item("JungleClearMana", true).GetValue <Slider>().Value)
                    {
                        return;
                    }

                    var mobs = MinionManager.GetMinions(R.Range, MinionTypes.All, MinionTeam.Neutral,
                                                        MinionOrderTypes.MaxHealth);

                    if (mobs.Any())
                    {
                        var mob = mobs.FirstOrDefault();

                        if (Menu.Item("JungleClearR", true).GetValue <bool>() && R.IsReady() &&
                            R.Instance.Ammo >= Menu.Item("JungleClearRLimit", true).GetValue <Slider>().Value)
                        {
                            R.Cast(mob, true);
                        }
                        else if (Menu.Item("JungleClearQ", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.Cast(mob, true);
                        }
                        else if (Menu.Item("JungleClearE", true).GetValue <bool>() && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
Example #12
0
        public static bool IsAutoAttack(string name)
        {
            if (CurrentOrbwalker == 1)
            {
                return(Orbwalking.IsAutoAttack(name));
            }

            return(xSaliceWalker.IsAutoAttack(name));
        }
Example #13
0
        private void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = Args.Target as Obj_AI_Hero;

                    if (target != null)
                    {
                        if (Menu.Item("ComboE", true).GetValue <bool>() && E.IsReady())
                        {
                            Cast_E(target);
                        }
                        else if (Menu.Item("ComboQ", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.Cast(target, true);
                        }
                        else if (Menu.Item("ComboW", true).GetValue <bool>() && W.IsReady())
                        {
                            W.Cast(target.Position, true);
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (Me.ManaPercent < Menu.Item("JungleClearMana", true).GetValue <Slider>().Value)
                    {
                        return;
                    }

                    var mobs = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                        MinionOrderTypes.MaxHealth);

                    if (mobs.Any())
                    {
                        var mob = mobs.FirstOrDefault();

                        if (Menu.Item("JungleClearE", true).GetValue <bool>() && E.IsReady())
                        {
                            var ex = Me.Position.Extend(Game.CursorPos, 150);

                            E.Cast(ex, true);
                        }
                        else if (Menu.Item("JungleClearQ", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.Cast(mob, true);
                        }
                        else if (Menu.Item("JungleClearW", true).GetValue <bool>() && W.IsReady())
                        {
                            W.Cast(mob, true);
                        }
                    }
                }
            }
        }
Example #14
0
        protected override void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(args.SData.Name))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = args.Target as AIHeroClient;

                    if (target != null)
                    {
                        if (Menu.Item("UseECombo", true).GetValue <bool>() && E.IsReady())
                        {
                            Cast_E(target);
                        }
                        else if (Menu.Item("UseQCombo", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.Cast(target, true);
                        }
                        else if (Menu.Item("UseWCombo", true).GetValue <bool>() && W.IsReady())
                        {
                            W.Cast(target.Position, true);
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (!ManaManager.HasMana("JungleClear"))
                    {
                        return;
                    }

                    var mobs = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                        MinionOrderTypes.MaxHealth);

                    if (mobs.Any())
                    {
                        var mob = mobs.FirstOrDefault();

                        if (Menu.Item("UseEJungle", true).GetValue <bool>() && E.IsReady())
                        {
                            var ex = Player.Position.Extend(Game.CursorPos, 150);

                            E.Cast(ex, true);
                        }
                        else if (Menu.Item("UseQJungle", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.Cast(mob, true);
                        }
                        else if (Menu.Item("UseWJungle", true).GetValue <bool>() && W.IsReady())
                        {
                            W.Cast(mob, true);
                        }
                    }
                }
            }
        }
Example #15
0
 /// <summary>
 /// Called when a cast gets executed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 public static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe &&
         args.Target.IsValid <Obj_AI_Minion>() &&
         Orbwalking.IsAutoAttack(args.SData.Name))
     {
         Logics.ExecuteFarm(sender, args);
     }
 }
Example #16
0
        private static void ObjAIBase_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe || !Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (args.Target == null || !args.Target.IsValid)
            {
                return;
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
                Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                if (Orbwalker.GetTarget() == null)
                {
                    return;
                }

                if (allowQAfterAA && !(args.Target is Obj_AI_Turret || args.Target is Obj_Barracks || args.Target is Obj_BarracksDampener || args.Target is Obj_Building) && spells[Spells.Q].IsReady())
                {
                    LeagueSharp.Common.Utility.DelayAction.Add(50, () =>
                    {
                        spells[Spells.Q].Cast();
                        Orbwalking.ResetAutoAttackTimer();
                    });
                    return;
                }
                if (allowItemsAfterAA && IsActive("FastTrundle.Items.Titanic") && Items.HasItem(3748) && Items.CanUseItem(3748)) // Titanic
                {
                    LeagueSharp.Common.Utility.DelayAction.Add(50, () =>
                    {
                        Items.UseItem(3748);
                        Orbwalking.ResetAutoAttackTimer();
                    });
                    return;
                }
                if (allowItemsAfterAA && IsActive("FastTrundle.Items.Hydra") && Items.HasItem(3077) && Items.CanUseItem(3077))
                {
                    LeagueSharp.Common.Utility.DelayAction.Add(50, () =>
                    {
                        Items.UseItem(3077);
                        Orbwalking.ResetAutoAttackTimer();
                    });
                    return;
                }
                if (allowItemsAfterAA && IsActive("FastTrundle.Items.Hydra") && Items.HasItem(3074) && Items.CanUseItem(3074))
                {
                    LeagueSharp.Common.Utility.DelayAction.Add(50, () =>
                    {
                        Items.UseItem(3074);
                        Orbwalking.ResetAutoAttackTimer();
                    });
                    return;
                }
            }
        }
Example #17
0
        static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (TSDetector == null)
            {
                return;
            }

            if (!(sender is Obj_AI_Hero))
            {
                return;
            }

            if (ObjectManager.Player.Distance(sender.Position) > 2500)
            {
                return;
            }

            if (!(args.Target is Obj_AI_Hero))
            {
                return;
            }

            if (args.SData.Name.ToLower().Contains("summoner") || args.SData.Name.ToLower().Contains("recall"))
            {
                return;
            }

            if (Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }

            var _sender = sender as Obj_AI_Hero;

            if (args.Target == null)
            {
                Console.WriteLine("NonTarget Spell : " + _sender.GetSpellSlot(args.SData.Name).ToString());
            }

            if (!IsFind(args))
            {
                return;
            }

            var target    = args.Target as Obj_AI_Hero;
            var spelldata = TargetedSpellDatabase.TargetedSpellDB.FirstOrDefault(x => x.SpellName == args.SData.Name.ToLower());

            ActiveTargeted.Add(new TargetSpell
            {
                Sender        = _sender,
                Target        = target,
                Spell         = spelldata,
                StartTick     = Environment.TickCount,
                StartPosition = args.Start
            });
        }
Example #18
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (!sender.IsMe || !Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                return;
            }

            switch (Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (Menu.Item("ComboQ", true).GetValue <bool>())
                {
                    var target = (AIHeroClient)Args.Target;

                    if (target != null && !target.IsDead && !target.IsZombie)
                    {
                        if (Me.HasBuff("asheqcastready"))
                        {
                            Q.Cast();
                            Orbwalking.ResetAutoAttackTimer();
                        }
                    }
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (Menu.Item("JungleClearQ", true).GetValue <bool>() &&
                    Me.ManaPercent >= Menu.Item("JungleClearMana", true).GetValue <Slider>().Value&&
                    Args.Target is Obj_AI_Minion)
                {
                    var Mobs = MinionManager.GetMinions(Me.Position, Orbwalking.GetRealAutoAttackRange(Me),
                                                        MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

                    foreach (var mob in Mobs)
                    {
                        if (mob == null)
                        {
                            continue;
                        }

                        if (!mob.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Me)) ||
                            !(mob.Health > Me.GetAutoAttackDamage(mob) * 2))
                        {
                            continue;
                        }

                        if (Me.HasBuff("asheqcastready"))
                        {
                            Q.Cast();
                            Orbwalking.ResetAutoAttackTimer();
                        }
                    }
                }
                break;
            }
        }
Example #19
0
        private static void LaneClear(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
            {
                return;
            }
            if (!Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (!sender.IsMe)
            {
                return;
            }
            if (!args.SData.IsAutoAttack())
            {
                return;
            }
            if (Ismelee())
            {
                return;
            }
            var obj = (Obj_AI_Base)args.Target;

            if (!GetBool("usewlr", typeof(bool)))
            {
                return;
            }
            if (GetValue("minmana") > Player.ManaPercent)
            {
                return;
            }

            if (W.IsReady() && obj.Health > Player.GetAutoAttackDamage(obj) + 30)
            {
                W.Cast();
                Orbwalker.ForceTarget((Obj_AI_Base)args.Target);
                Orbwalking.ResetAutoAttackTimer();
            }
            var minions =
                MinionManager.GetMinions(Player.Position, 300);

            foreach (var min in minions.Where(
                         x => x.NetworkId != ((Obj_AI_Base)args.Target).NetworkId && x.Health < Player.GetAutoAttackDamage(x) + 15))
            {
                if (obj.Health < Player.GetAutoAttackDamage(obj))
                {
                    if (W.IsReady())
                    {
                        W.Cast();
                        Orbwalker.ForceTarget(min);
                        Orbwalking.ResetAutoAttackTimer();
                    }
                }
            }
        }
Example #20
0
        private void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (!sender.IsMe || !Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                return;
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                if (Menu.Item("ComboQ", true).GetValue <bool>() && Menu.Item("ComboAQA", true).GetValue <bool>())
                {
                    var target = Args.Target as Obj_AI_Hero;

                    if (target != null && !target.IsDead && !target.IsZombie && Q.IsReady())
                    {
                        var AfterQPosition = Me.ServerPosition + (Game.CursorPos - Me.ServerPosition).Normalized() * 250;
                        var Distance       = target.ServerPosition.Distance(AfterQPosition);

                        if (Menu.Item("ComboQTurret", true).GetValue <bool>() && AfterQPosition.UnderTurret(true))
                        {
                            return;
                        }

                        if (Menu.Item("ComboQCheck", true).GetValue <bool>() &&
                            AfterQPosition.CountEnemiesInRange(300) >= 3)
                        {
                            return;
                        }

                        if (Distance <= 650 && Distance >= 300)
                        {
                            Q.Cast(Game.CursorPos);
                        }
                    }
                }
            }
            else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                if (Args.Target is Obj_AI_Turret)
                {
                    if (Menu.Item("LaneClearQ", true).GetValue <bool>() &&
                        Me.ManaPercent >= Menu.Item("LaneClearMana", true).GetValue <Slider>().Value&&
                        Menu.Item("LaneClearQTurret", true).GetValue <bool>() &&
                        Me.CountEnemiesInRange(900) == 0 && Q.IsReady())
                    {
                        Q.Cast(Game.CursorPos);
                    }
                }
                else if (Args.Target is Obj_AI_Minion)
                {
                    LaneClearQ(Args);
                    JungleClearQ(Args);
                }
            }
        }
Example #21
0
        private static void LaneClear(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                return;
            }
            if (!Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (!sender.IsMe)
            {
                return;
            }
            if (!args.SData.IsAutoAttack())
            {
                return;
            }
            if (Ismelee())
            {
                return;
            }
            var obj = (Obj_AI_Base)args.Target;

            if (!getCheckBoxItem(MenuConfig.laneclear, "usewlr"))
            {
                return;
            }
            if (getSliderItem(MenuConfig.laneclear, "minmana") > Player.ManaPercent)
            {
                return;
            }

            if (W.IsReady() && obj.Health > Player.GetAutoAttackDamage(obj) + 30)
            {
                W.Cast();
                Orbwalker.ForcedTarget = (((Obj_AI_Base)args.Target));
            }
            var minions =
                MinionManager.GetMinions(Player.Position, 300);

            foreach (var min in minions.Where(
                         x => x.NetworkId != ((Obj_AI_Base)args.Target).NetworkId && x.Health < Player.GetAutoAttackDamage(x) + 15))
            {
                if (obj.Health < Player.GetAutoAttackDamage(obj))
                {
                    if (W.IsReady())
                    {
                        W.Cast();
                        Orbwalker.ForcedTarget = (min);
                    }
                }
            }
        }
Example #22
0
 /// <summary>
 /// Called on do-cast.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 public static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe &&
         Orbwalking.IsAutoAttack(args.SData.Name) &&
         !((Obj_AI_Hero)args.Target).IsInvulnerable &&
         !Bools.IsSpellShielded((Obj_AI_Hero)args.Target) &&
         Variables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None)
     {
         Logics.ExecuteModes(sender, args);
     }
 }
Example #23
0
 private static void MissileClient_OnCreate(GameObject sender, EventArgs args)
 {
     if (Menu.Item("debug").GetValue <bool>())
     {
         var missile = sender as MissileClient;
         if (missile != null && missile.SpellCaster.IsMe && Orbwalking.IsAutoAttack(missile.SData.Name) && JustAttacked)
         {
             Console.WriteLine("OnMissileHit (client) - Delay: " + (Environment.TickCount - LastAttack) + "ms");
         }
     }
 }
Example #24
0
 /// <summary>
 /// Called when a cast gets executed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 public static void Obj_AI_Base_OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe &&
         Orbwalking.IsAutoAttack(args.SData.Name) &&
         Variables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None)
     {
         if (args.Target.IsValid <Obj_AI_Hero>())
         {
             Logics.ExecuteModes(sender, args);
         }
     }
 }
Example #25
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = Args.Target as AIHeroClient;

                    if (target != null)
                    {
                        if (Menu.GetBool("ComboR") && R.IsReady() && R.Instance.Ammo >= Menu.GetSlider("ComboRLimit"))
                        {
                            SpellManager.PredCast(R, target, true);
                        }
                        else if (Menu.GetBool("ComboQ") && Q.IsReady())
                        {
                            SpellManager.PredCast(Q, target, true);
                        }
                        else if (Menu.GetBool("ComboE") && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (ManaManager.HasEnoughMana(Menu.GetSlider("JungleClearMana")) && ManaManager.SpellFarm)
                    {
                        var mobs = MinionManager.GetMinions(R.Range, MinionTypes.All, MinionTeam.Neutral,
                                                            MinionOrderTypes.MaxHealth);

                        if (mobs.Any())
                        {
                            var mob = mobs.FirstOrDefault();

                            if (Menu.GetBool("JungleClearR") && R.IsReady() && R.Instance.Ammo >= Menu.GetSlider("JungleClearRLimit"))
                            {
                                R.Cast(mob, true);
                            }
                            else if (Menu.GetBool("JungleClearQ") && Q.IsReady())
                            {
                                Q.Cast(mob, true);
                            }
                            else if (Menu.GetBool("JungleClearE") && E.IsReady())
                            {
                                E.Cast();
                            }
                        }
                    }
                }
            }
        }
Example #26
0
        private void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                {
                    var target = Args.Target as Obj_AI_Hero;

                    if (target != null)
                    {
                        if (!target.IsDead && !target.IsZombie)
                        {
                            if (Menu.Item("ComboQ", true).GetValue <bool>() && Q.IsReady())
                            {
                                if (Menu.Item("ComboMana", true).GetValue <bool>())
                                {
                                    if (Me.Mana > Q.ManaCost + E.ManaCost)
                                    {
                                        Q.CastTo(target);
                                    }
                                }
                                else
                                {
                                    Q.CastTo(target);
                                }
                            }
                        }
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (Me.ManaPercent < Menu.Item("JungleClearMana", true).GetValue <Slider>().Value)
                    {
                        return;
                    }

                    var mobs = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                        MinionOrderTypes.MaxHealth);

                    if (mobs.Any())
                    {
                        var mob = mobs.FirstOrDefault();

                        if (Menu.Item("JungleClearQ", true).GetValue <bool>() && Q.IsReady())
                        {
                            Q.Cast(mob, true);
                        }
                    }
                }
            }
        }
Example #27
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender.IsMe && Orbwalking.IsAutoAttack(Args.SData.Name))
            {
                var t = (Obj_AI_Base)Args.Target;

                if (t != null && !t.IsDead && !t.IsZombie)
                {
                    if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                    {
                        if (t is AIHeroClient)
                        {
                            var target = (AIHeroClient)Args.Target;

                            if (Menu.GetBool("ComboQ") && Q.IsReady() && t.IsValidTarget(Q.Range))
                            {
                                SpellManager.PredCast(Q, target);
                            }

                            if (Menu.GetBool("ComboW") && W.IsReady() && t.IsValidTarget(W.Range))
                            {
                                SpellManager.PredCast(W, target, true);
                            }
                        }
                    }

                    if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
                    {
                        if (ManaManager.HasEnoughMana(Menu.GetSlider("HarassMana")))
                        {
                            if (t is AIHeroClient)
                            {
                                var target = (AIHeroClient)Args.Target;

                                if (Menu.GetBool("Harasstarget" + target.ChampionName.ToLower()))
                                {
                                    if (Menu.GetBool("HarassQ") && Q.IsReady() && t.IsValidTarget(Q.Range))
                                    {
                                        SpellManager.PredCast(Q, target);
                                    }

                                    if (Menu.GetBool("HarassW") && W.IsReady() && t.IsValidTarget(W.Range))
                                    {
                                        SpellManager.PredCast(W, target, true);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Example #28
0
 private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && Orbwalking.IsAutoAttack(args.SData.Name) &&
         sender.Type == GameObjectType.AIHeroClient)
     {
         if (Config.Item("combo.q").GetValue <bool>() && Spells[Q].IsReady() && !args.Target.IsDead &&
             ((AIHeroClient)args.Target).IsValidTarget(ObjectManager.Player.AttackRange) &&
             Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
         {
             QCast(((AIHeroClient)args.Target));
         }
     }
 }
Example #29
0
 public static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && Orbwalking.IsAutoAttack(args.SData.Name) && args.Target is Obj_AI_Hero &&
         args.Target.IsValid)
     {
         if (Program.Q.IsReady() && Program.Config.Item("q.combo").GetValue <bool>() &&
             ObjectManager.Player.Distance(args.Target.Position) < Program.Q.Range &&
             Program.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
         {
             AdvancedQ(Program.Q, (Obj_AI_Hero)args.Target, 3);
         }
     }
 }
Example #30
0
 public static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && Orbwalking.IsAutoAttack(args.SData.Name) && args.Target is AIHeroClient &&
         args.Target.IsValid)
     {
         if (Program.Q.IsReady() && getCheckBoxItem(Language.comboMenu, "q.combo") &&
             ObjectManager.Player.Distance(args.Target.Position) < Program.Q.Range &&
             Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
         {
             AdvancedQ(Program.Q, (AIHeroClient)args.Target, 3);
         }
     }
 }