Ejemplo n.º 1
0
 public static void LaneClear()
 {
     try
     {
         Orbwalker.ForcedTarget = null;
         {
             if (Orbwalker.IsAutoAttacking || LastCastQ + 260 > Environment.TickCount)
             {
                 return;
             }
             foreach (
                 var minion in EntityManager.MinionsAndMonsters.EnemyMinions.Where(a => a.IsValidTarget(W.Range)))
             {
                 if (FarmingMenu["QLaneClear"].Cast <CheckBox>().CurrentValue&& Q.IsReady() &&
                     minion.Health <=
                     _Player.CalculateDamageOnUnit(minion, DamageType.Physical, Damage.QDamage()))
                 {
                     Player.CastSpell(SpellSlot.Q, minion.Position);
                     return;
                 }
                 if (FarmingMenu["WLaneClear"].Cast <CheckBox>().CurrentValue&& W.IsReady() &&
                     minion.Health <=
                     _Player.CalculateDamageOnUnit(minion, DamageType.Physical, Damage.WDamage()))
                 {
                     Player.CastSpell(SpellSlot.W);
                     return;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Console.Write(ex);
     }
 }
Ejemplo n.º 2
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var target  = args.Target as Obj_AI_Base;
            var targetC = args.Target as AIHeroClient;

            // Hydra
            if (args.SData.Name.ToLower().Contains("itemtiamatcleave"))
            {
                Orbwalker.ResetAutoAttack();
                if (W.IsReady())
                {
                    var target2 = TargetSelector.GetTarget(W.Range, DamageType.Physical);
                    if (target2 != null || Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
                    {
                        Player.CastSpell(SpellSlot.W);
                    }
                }
                return;
            }

            //W
            if (args.SData.Name.ToLower().Contains(W.Name.ToLower()))
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (_Player.HasBuff("RivenFengShuiEngine") && R.IsReady() &&
                        ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue)
                    {
                        ssfl = true;
                        var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical);
                        if (target2 != null &&
                            (target2.Distance(Player.Instance) < W.Range &&
                             target2.Health >
                             _Player.CalculateDamageOnUnit(target2, DamageType.Physical, Damage.WDamage()) ||
                             target2.Distance(Player.Instance) > W.Range) &&
                            _Player.CalculateDamageOnUnit(target2, DamageType.Physical,
                                                          Damage.RDamage(target2) + Damage.WDamage()) > target2.Health)
                        {
                            R.Cast(target2);
                        }
                    }
                }

                target = (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                          Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                    ? TargetSelector.GetTarget(E.Range + W.Range, DamageType.Physical)
                    : (Obj_AI_Base)Orbwalker.LastTarget;
                if (Q.IsReady() && Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None && target != null)
                {
                    Player.CastSpell(SpellSlot.Q, target.Position);
                    return;
                }
                return;
            }

            //E
            if (args.SData.Name.ToLower().Contains(E.Name.ToLower()))
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (_Player.HasBuff("RivenFengShuiEngine") && R.IsReady() &&
                        ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue)
                    {
                        ssfl = true;
                        var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical);
                        if (target2 != null &&
                            _Player.CalculateDamageOnUnit(target2, DamageType.Physical,
                                                          (Damage.RDamage(target2))) > target2.Health)
                        {
                            R.Cast(target2);
                            return;
                        }
                    }
                    if ((EnableR == true) && R.IsReady() &&
                        !_Player.HasBuff("RivenFengShuiEngine") &&
                        ComboMenu["RCombo"].Cast <CheckBox>().CurrentValue)
                    {
                        ssfl = false;
                        ForceR();
                        Player.CastSpell(SpellSlot.R);
                    }
                    target = TargetSelector.GetTarget(W.Range, DamageType.Physical);
                    if (target != null && _Player.Distance(target) < W.Range)
                    {
                        Player.CastSpell(SpellSlot.W);
                        return;
                    }
                }
            }

            //Q
            if (args.SData.Name.ToLower().Contains(Q.Name.ToLower()))
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (_Player.HasBuff("RivenFengShuiEngine") && R.IsReady() &&
                        ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue)
                    {
                        var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical);
                        if (target2 != null &&
                            (target2.Distance(Player.Instance) < 300 &&
                             target2.Health >
                             _Player.CalculateDamageOnUnit(target2, DamageType.Physical, Damage.QDamage()) ||
                             target2.Distance(Player.Instance) > 300) &&
                            _Player.CalculateDamageOnUnit(target2, DamageType.Physical,
                                                          Damage.RDamage(target2) + Damage.QDamage()) > target2.Health)
                        {
                            R.Cast(target2);
                        }
                    }
                }
                return;
            }

            if (args.SData.IsAutoAttack() && target != null)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    JungleAfterAa(target);
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) && target.IsMinion())
                {
                    LastHitAfterAa(target);
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && target.IsMinion())
                {
                    LaneClearAfterAa(target);
                }
            }
            if (args.SData.IsAutoAttack() && targetC != null)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    ComboAfterAa(targetC);
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                {
                    HarassAfterAa(targetC);
                }
            }
        }
Ejemplo n.º 3
0
        private static void Combo()
        {
            if (Orbwalker.IsAutoAttacking)
            {
                return;
            }
            var target = TargetSelector.GetTarget(E.Range + W.Range + 200, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var useQ    = ComboMenu["QCombo"].Cast <CheckBox>().CurrentValue;
            var useW    = ComboMenu["WCombo"].Cast <CheckBox>().CurrentValue;
            var useE    = ComboMenu["ECombo"].Cast <CheckBox>().CurrentValue;
            var useR    = ComboMenu["RCombo"].Cast <CheckBox>().CurrentValue;
            var useItem = ComboMenu["useTiamat"].Cast <CheckBox>().CurrentValue;

            EnableR = false;
            try
            {
                if (R.IsReady() && _Player.HasBuff("RivenFengShuiEngine") &&
                    ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue)
                {
                    if (EntityManager.Heroes.Enemies.Where(
                            enemy =>
                            enemy.IsValidTarget(R.Range) &&
                            enemy.Health <
                            _Player.CalculateDamageOnUnit(enemy, DamageType.Physical,
                                                          Damage.RDamage(enemy))).Any(enemy => R.Cast(enemy)))
                    {
                        ssfl = true;
                        return;
                    }
                }

                if (ComboMenu["RCombo"].Cast <CheckBox>().CurrentValue&& R.IsReady() && !_Player.HasBuff("RivenFengShuiEngine"))
                {
                    if ((ComboMenu["RCantKill"].Cast <CheckBox>().CurrentValue&&
                         target.Health > Damage.ComboDamage(target, true) &&
                         target.Health <Damage.ComboDamage(target) &&
                                        target.Health> _Player.GetAutoAttackDamage(target, true) * 2) ||
                        (ComboMenu["REnemyCount"].Cast <Slider>().CurrentValue > 0 &&
                         _Player.CountEnemiesInRange(600) >= ComboMenu["REnemyCount"].Cast <Slider>().CurrentValue) || IsRActive)
                    {
                        ssfl    = false;
                        EnableR = true;
                        ForceR();
                    }
                    if (ComboMenu["ForcedR"].Cast <KeyBind>().CurrentValue)
                    {
                        ssfl    = false;
                        EnableR = true;
                        ForceR();
                    }
                }

                if (ComboMenu["ECombo"].Cast <CheckBox>().CurrentValue&& target.Distance(Player.Instance) > W.Range && E.IsReady())
                {
                    if (Item.HasItem(3142) && Item.CanUseItem(3142))
                    {
                        Item.UseItem(3142);
                    }
                    Player.CastSpell(SpellSlot.E, target.Position);
                    return;
                }

                if (ComboMenu["ECombo"].Cast <CheckBox>().CurrentValue&& target.Distance(Player.Instance) < W.Range && E.IsReady())
                {
                    Player.CastSpell(SpellSlot.E, Game.CursorPos);
                    return;
                }

                if (ComboMenu["WCombo"].Cast <CheckBox>().CurrentValue&&
                    target.Distance(Player.Instance) <= W.Range && W.IsReady())
                {
                    Core.DelayAction(ForceItem, 50);
                    Player.CastSpell(SpellSlot.W);
                    return;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }