Exemple #1
0
        private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (!Q.IsReady() || !Config.Item("autoQ", true).GetValue<bool>() || !(args.Target is Obj_AI_Hero))
                return;
            var t = (Obj_AI_Hero)args.Target;

            if (FishBoneActive && t.IsValidTarget())
            {
                var realDistance = GetRealDistance(t);
                if (Program.Combo && realDistance < GetRealPowPowRange(t) && (Player.Mana < RMANA + 20 || Player.GetAutoAttackDamage(t) * 3 < t.Health))
                    Q.Cast();
                else if (Program.Farm && Config.Item("Qharras", true).GetValue<bool>() && (realDistance > bonusRange() || realDistance < GetRealPowPowRange(t) || Player.Mana < RMANA + EMANA + WMANA + WMANA))
                    Q.Cast();
            }

            if (Program.LaneClear && !FishBoneActive && Config.Item("farmQ", true).GetValue<bool>() && Player.ManaPercent > Config.Item("Mana", true).GetValue<Slider>().Value && Player.Mana > RMANA + EMANA + WMANA + 30)
            {

                var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, bonusRange());
                foreach (var minion in allMinionsQ.Where(
                    minion => args.Target.NetworkId != minion.NetworkId && minion.Distance(args.Target.Position) < 200 && (5 - Q.Level) * Player.GetAutoAttackDamage(minion) < args.Target.Health && (5 - Q.Level) * Player.GetAutoAttackDamage(minion) < minion.Health))
                {
                    Q.Cast();
                }
            }
        }
Exemple #2
0
 private static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (Config.Item("bAuto").GetValue<bool>() && Human() && Q.IsReady() &&
         Player.Distance(args.Target.Position) >= Player.AttackRange)
     {
         args.Process = false;
     }
 }
Exemple #3
0
        private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (AIOmode == 2)
                return;

            if (Combo && Config.Item("comboDisableMode", true).GetValue<bool>())
            {
                var t = (Obj_AI_Hero)args.Target;
                if( 4 * Player.GetAutoAttackDamage(t) < t.Health - OktwCommon.GetIncomingDamage(t) && !t.HasBuff("luxilluminatingfraulein") && !Player.HasBuff("sheen"))
                    args.Process = false;
            }

            if (!Player.IsMelee && OktwCommon.CollisionYasuo(Player.ServerPosition, args.Target.Position) &&  Config.Item("collAA", true).GetValue<bool>())
            {
                args.Process = false;
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && Config.Item("supportMode",true).GetValue<bool>())
            {
                if (args.Target.Type == GameObjectType.obj_AI_Minion) args.Process = false;
            }
        }
Exemple #4
0
 private static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && !HasPassive && spells[Spells.Q].IsReady()
         && !(IsListActive("Combo.Prio").SelectedIndex == 0
              || IsListActive("Combo.Prio").SelectedIndex == 1 && Ferocity == 5))
     {
         var x = Prediction.GetPrediction(args.Target as Obj_AI_Base, Player.AttackCastDelay + 0.04f);
         if (Player.Position.To2D().Distance(x.UnitPosition.To2D())
             >= Player.BoundingRadius + Player.AttackRange + args.Target.BoundingRadius)
         {
             args.Process = false;
             spells[Spells.Q].Cast();
         }
     }
 }
Exemple #5
0
        private static void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (!FishBoneActive)
                return;

            if (Q.IsReady() && args.Target is Obj_AI_Hero && Config.Item("Qchange").GetValue<StringList>().SelectedIndex == 1)
            {
                var t = (Obj_AI_Hero)args.Target;
                if ( t.IsValidTarget())
                {
                    FishBoneToMiniGun(t);
                }
            }

            if (!Combo && args.Target is Obj_AI_Minion)
            {
                var t = (Obj_AI_Minion)args.Target;
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Player.ManaPercent > Config.Item("QmanaLC").GetValue<Slider>().Value && CountMinionsInRange(250, t.Position) >= Config.Item("Qlaneclear").GetValue<Slider>().Value)
                {

                }
                else if (GetRealDistance(t) < GetRealPowPowRange(t))
                {
                    args.Process = false;
                    if (Q.IsReady())
                        Q.Cast();
                }
            }
        }
Exemple #6
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if(Program.Combo && W.IsReady() && FindCard == 1 && W.Instance.Name != "PickACard" &&  Config.Item("WblockAA", true).GetValue<bool>())
     {
         args.Process = false;
     }
 }
Exemple #7
0
        private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (!Variables.AssassinateKey.GetValue<KeyBind>().Active)
                return;

            if (args.Unit.IsMe)
            {
                if (ItemData.Youmuus_Ghostblade.GetItem().IsReady())
                    ItemData.Youmuus_Ghostblade.GetItem().Cast();
            }
        }
Exemple #8
0
        private void Combo()
        {
            if (Menu.GetBool("ComboR") && R.IsReady())
            {
                foreach (var target in HeroManager.Enemies.Where(x => x.Check(1200)))
                {
                    if (target.IsValidTarget(600) && Me.CountEnemiesInRange(600) >= 3 && target.CountAlliesInRange(200) <= 2)
                    {
                        SpellManager.PredCast(R, target);
                    }

                    if (Me.CountEnemiesInRange(800) == 1 &&
                        target.DistanceToPlayer() > Orbwalking.GetRealAutoAttackRange(Me) &&
                        target.DistanceToPlayer() <= 700 &&
                        target.Health > Me.GetAutoAttackDamage(target) &&
                        target.Health < R.GetDamage(target) + Me.GetAutoAttackDamage(target) * 3 &&
                        !target.HasBuffOfType(BuffType.SpellShield))
                    {
                        SpellManager.PredCast(R, target);
                    }

                    if (target.DistanceToPlayer() <= 1000 &&
                        (!target.CanMove || target.HasBuffOfType(BuffType.Stun) ||
                         R.GetPrediction(target).Hitchance == HitChance.Immobile))
                    {
                        SpellManager.PredCast(R, target);
                    }
                }
            }

            if (Menu.GetBool("ComboW") && W.IsReady() && !Me.HasBuff("AsheQAttack"))
            {
                if ((Menu.GetBool("ComboSaveMana") &&
                     Me.Mana > (R.IsReady() ? R.Instance.SData.Mana : 0) + W.Instance.SData.Mana + Q.Instance.SData.Mana) ||
                    !Menu.GetBool("ComboSaveMana"))
                {
                    var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

                    if (target.Check(W.Range))
                    {
                        SpellManager.PredCast(W, target);
                    }
                }
            }

            if (Menu.GetBool("ComboE") && E.IsReady())
            {
                var target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);

                if (target.Check(1000))
                {
                    var EPred = E.GetPrediction(target);

                    if ((NavMesh.GetCollisionFlags(EPred.CastPosition) == CollisionFlags.Grass ||
                         NavMesh.IsWallOfGrass(target.ServerPosition, 20)) && !target.IsVisible)
                    {
                        E.Cast(EPred.CastPosition);
                    }
                }
            }
        }
Exemple #9
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     //Program.debug("" + OktwCommon.GetBuffCount(Player, "dravenspinningattack"));
     if (Q.IsReady())
     {
         var buffCount = OktwCommon.GetBuffCount(Player, "dravenspinningattack");
         if (Config.Item("autoQ", true).GetValue<bool>() && args.Target.IsValid<Obj_AI_Hero>()  )
         {
             if (buffCount + axeList.Count == 0)
                 Q.Cast();
             else if (Player.Mana > RMANA + QMANA && buffCount == 0)
                 Q.Cast();
         }
         if (Program.Farm && Config.Item("farmQ", true).GetValue<bool>() )
         {
             if (buffCount + axeList.Count == 0 && Player.Mana > RMANA + EMANA + WMANA)
                 Q.Cast();
             else if (Player.ManaPercent > 70 && buffCount == 0)
                 Q.Cast();
         }
     }
 }
Exemple #10
0
        private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (E.IsReady() && args.Target is Obj_AI_Hero )
            {
                var t = (Obj_AI_Hero)args.Target;

                if (t.IsValidTarget())
                {
                    if (E.GetDamage(t) > t.Health)
                    {
                        E.Cast(t);
                        if(!Player.HasBuff("itemstatikshankcharge"))
                            args.Process = false;
                    }
                    else if (R.IsReady() && E.GetDamage(t) + R.GetDamage(t) > t.Health && Player.Mana > RMANA + EMANA)
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                            args.Process = false;
                    }
                    else if (Program.Combo && Player.Mana > RMANA + EMANA && Config.Item("useEon" + t.ChampionName).GetValue<bool>())
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                            args.Process = false;
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + WMANA + RMANA && Config.Item("harras" + t.ChampionName).GetValue<bool>())
                    {
                        E.Cast(t);
                        if (!Player.HasBuff("itemstatikshankcharge"))
                            args.Process = false;
                    }
                }
            }

            if (Config.Item("focusE", true).GetValue<bool>())
            {
                foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(900) && target.HasBuff("tristanaechargesound")))
                {
                    if (Orbwalking.InAutoAttackRange(target))
                        Orbwalker.ForceTarget(target);
                }
            }
        }
Exemple #11
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (E.IsReady() && Sheen() && args.Target.IsValid<Obj_AI_Hero>())
     {
         if(Program.Combo && Config.Item("autoE", true).GetValue<bool>() && Player.Mana > EMANA + RMANA)
             E.Cast(args.Target.Position);
         if (Program.Farm && Config.Item("harassE", true).GetValue<bool>() && Player.Mana > EMANA + RMANA + QMANA)
             E.Cast(args.Target.Position);
         if (!Q.IsReady() && !R.IsReady() && args.Target.Health < Player.FlatPhysicalDamageMod * 2)
             E.Cast();
     }
 }
Exemple #12
0
        private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (Variables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
                return;

            if (args.Unit.IsMe && Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                if (ItemData.Youmuus_Ghostblade.GetItem().IsReady())
                    ItemData.Youmuus_Ghostblade.GetItem().Cast();
            }
        }
Exemple #13
0
        private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (FarmId != args.Target.NetworkId)
                FarmId = args.Target.NetworkId;
            if (W.IsReady() && Config.Item("Waa", true).GetValue<bool>() && args.Target.IsValid<Obj_AI_Hero>() && Player.Mana > WMANA + QMANA * 4)
                W.Cast();

            if (Config.Item("mura", true).GetValue<bool>())
            {
                int Mur = Items.HasItem(Muramana) ? 3042 : 3043;
                if (!Player.HasBuff("Muramana") && args.Target.IsEnemy && args.Target.IsValid<Obj_AI_Hero>() && Items.HasItem(Mur) && Items.CanUseItem(Mur) && Player.Mana > RMANA + EMANA + QMANA + WMANA)
                    Items.UseItem(Mur);
                else if (Player.HasBuff("Muramana") && Items.HasItem(Mur) && Items.CanUseItem(Mur))
                    Items.UseItem(Mur);
            }
        }
Exemple #14
0
        private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (Config.Item("visibleR", true).GetValue<bool>() && Player.HasBuff("vaynetumblefade") && Player.CountEnemiesInRange(800) > 1)
                args.Process = false;

            if (args.Target.Type != GameObjectType.obj_AI_Hero)
                return;

            var t = args.Target as Obj_AI_Hero;

            if (GetWStacks(t) < 2 && args.Target.Health > 5 * Player.GetAutoAttackDamage(t))
            {
                foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(800) && GetWStacks(target) == 2))
                {
                    if (Orbwalking.InAutoAttackRange(target) && args.Target.Health > 3 * Player.GetAutoAttackDamage(target))
                    {
                        args.Process = false;
                        Orbwalker.ForceTarget(target);
                    }
                }
            }
        }
Exemple #15
0
        static void JungleClear()
        {
            var JungleMinions = MinionManager.GetMinions(Player.ServerPosition, W.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

            if (JungleMinions.Count >= 1)
            {
                foreach (var Mob in JungleMinions)
                {
                    if (Human())
                    {
                        if (Option_Item("Jungle R") && R.IsReady())
                        {
                            if (!Q.IsReady() && !W.IsReady())
                            {
                                if ((_spideQcd == 0 && _spideWcd <= 1.8f) || _humaQcd >= 1.2f)
                                {
                                    R.Cast(true);
                                }
                            }
                        }

                        if (Player.ManaPercent >= Option.Item("JMana").GetValue <Slider>().Value)
                        {
                            if (Option_Item("Human Jungle W") && W.IsReady())
                            {
                                MinionManager.FarmLocation Mobs = W.GetCircularFarmLocation(JungleMinions);
                                if (JungleMinions.Count == 4)
                                {
                                    if (Mobs.MinionsHit >= 3)
                                    {
                                        W.Cast(Mobs.Position, true);
                                    }
                                }
                                if (JungleMinions.Count == 3)
                                {
                                    if (Mobs.MinionsHit >= 2)
                                    {
                                        W.Cast(Mobs.Position, true);
                                    }
                                }
                                ;
                                if (JungleMinions.Count <= 2)
                                {
                                    W.Cast(Mob.Position, true);
                                }

                                if (JungleMinions.Count == 0)
                                {
                                    return;
                                }
                            }

                            if (Option_Item("Human Jungle Q") && Q.IsReady())
                            {
                                Q.CastOnUnit(Mob, true);
                            }
                        }
                    }

                    if (Spider())
                    {
                        if (Option_Item("Jungle R") && R.IsReady())
                        {
                            if (!Q2.IsReady() && !W2.IsReady() && !Player.HasBuff("EliseSpiderW") && Player.ManaPercent >= Option.Item("JMana").GetValue <Slider>().Value)
                            {
                                if ((_humaQcd == 0 && _humaWcd <= 1.5f) && (_spideQcd >= 1.4f || _spideWcd >= 1.8f) && (JungleMinions.Count == 1 && Mob.Health >= Q.GetDamage(Mob) || Mob.Health >= W.GetDamage(Mob)))
                                {
                                    R.Cast(true);
                                }
                            }
                        }

                        if (Option_Item("Spider Jungle Q") && Q.IsReady())
                        {
                            Q.CastOnUnit(Mob, true);
                        }

                        if (Option_Item("Spider Jugnle W") && W2.IsReady())
                        {
                            var JungleMinion = MinionManager.GetMinions(Player.ServerPosition, 150, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                            if (!Orbwalking.CanAttack() && Orbwalking.CanMove(10))
                            {
                                if (JungleMinion != null)
                                {
                                    W2.Cast(true);
                                }
                            }
                        }
                    }
                }
            }

            if (JungleMinions == null)
            {
                return;
            }
        }
Exemple #16
0
 /// <summary>
 ///     The before attack fake click.
 ///     Currently used for the second style of fake clicks
 /// </summary>
 /// <param name="args">
 ///     The args.
 /// </param>
 private static void BeforeAttackFake(Orbwalking.BeforeAttackEventArgs args)
 {
     if (root.Item("Click Mode").GetValue<StringList>().SelectedIndex == 1)
     {
         ShowClick(RandomizePosition(args.Target.Position), ClickType.Attack);
         attacking = true;
     }
 }
Exemple #17
0
        private static void OnGameUpdate(EventArgs args)
        {
            try
            {
                if (Player.IsDead)
                {
                    return;
                }
                //킬스틸 타겟
                var KTarget = ObjectManager.Get <Obj_AI_Hero>().OrderByDescending(x => x.Health).FirstOrDefault(x => x.IsEnemy && x.Distance(Player) < 375);
                if (KTarget != null && _MainMenu.Item("LeeSin_KUse_R").GetValue <bool>() && KTarget.Health < _R.GetDamage(KTarget) && _R.IsReady())
                {
                    _R.Cast(KTarget, true);
                }
                if (InsecTime < Environment.TickCount)
                {
                    InsecType = "Wait";                                    // 인섹킥 초기화
                }
                if (Ward_Time < Environment.TickCount)
                {
                    WW = true;                                      // 와드방호 초기화
                }
                if (_MainMenu.Item("LeeSin_AutoKick").GetValue <Slider>().Value != 0 && _R.Level > 0 && _R.IsReady() && !_MainMenu.Item("LeeSin_InsecKick").GetValue <KeyBind>().Active)
                {
                    AutoKick();                                         // 오토 킥
                }
                if (_MainMenu.Item("CKey").GetValue <KeyBind>().Active) // Combo
                {
                    var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.Physical);
                    var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical);
                    if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && _MainMenu.Item("LeeSin_CUse_Q").GetValue <bool>() && QTime < Environment.TickCount)
                    {
                        var HC = HitChance.Medium;
                        switch (_MainMenu.Item("LeeSin_CUseQ_Hit").GetValue <Slider>().Value)
                        {
                        case 1:
                            HC = HitChance.OutOfRange;
                            break;

                        case 2:
                            HC = HitChance.Impossible;
                            break;

                        case 3:
                            HC = HitChance.Low;
                            break;

                        case 4:
                            HC = HitChance.Medium;
                            break;

                        case 5:
                            HC = HitChance.High;
                            break;

                        case 6:
                            HC = HitChance.VeryHigh;
                            break;
                        }
                        _Q.CastIfHitchanceEquals(QTarget, HC, true);
                        QTime = TickCount(2000);
                    }
                    if (ETarget != null && _E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && ETime < Environment.TickCount && _MainMenu.Item("LeeSin_CUse_E").GetValue <bool>())
                    {
                        _E.Cast(true);
                        ETime = TickCount(1000);
                    }
                    if (!_Q.IsReady() && !_E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && WTime < Environment.TickCount && _MainMenu.Item("LeeSin_CUse_W").GetValue <bool>())
                    {
                        _W.Cast(Player, true);
                        WTime = TickCount(1000);
                    }
                }
                if (_MainMenu.Item("HKey").GetValue <KeyBind>().Active) // Hafass
                {
                    var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.Physical);
                    var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical);
                    if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && _MainMenu.Item("LeeSin_HUse_Q").GetValue <bool>() && QTime < Environment.TickCount)
                    {
                        var HC = HitChance.Medium;
                        _Q.CastIfHitchanceEquals(QTarget, HC, true);
                        QTime = TickCount(2000);
                    }
                    if (ETarget != null && _E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && ETime < Environment.TickCount && _MainMenu.Item("LeeSin_HUse_E").GetValue <bool>())
                    {
                        _E.Cast(true);
                        ETime = TickCount(1000);
                    }
                    if (!_Q.IsReady() && !_E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && WTime < Environment.TickCount && _MainMenu.Item("LeeSin_HUse_W").GetValue <bool>())
                    {
                        _W.Cast(Player, true);
                        WTime = TickCount(1000);
                    }
                }
                if (_MainMenu.Item("LKey").GetValue <KeyBind>().Active) // LaneClear
                {
                    var MinionTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health);
                    foreach (var minion in MinionTarget)
                    {
                        if (_Q.IsReady() && _MainMenu.Item("LeeSin_LUse_Q").GetValue <bool>() && minion != null && Environment.TickCount > QTime)
                        {
                            _Q.CastIfHitchanceEquals(minion, HitChance.Medium, true);
                            QTime = TickCount(1000);
                        }
                        if (_E.IsReady() && _MainMenu.Item("LeeSin_LUse_E").GetValue <bool>() && minion != null && Environment.TickCount > ETime &&
                            !Orbwalking.CanAttack() && Orbwalking.CanMove(10))
                        {
                            _E.Cast(true);
                            ETime = TickCount(1000);
                        }
                        if (_W.IsReady() && _MainMenu.Item("LeeSin_LUse_W").GetValue <bool>() && minion != null && Environment.TickCount > WTime &&
                            !Orbwalking.CanAttack() && Orbwalking.CanMove(10))
                        {
                            _W.Cast(Player, true);
                            WTime = TickCount(1000);
                        }
                    }
                }
                if (_MainMenu.Item("JKey").GetValue <KeyBind>().Active) // JungleClear
                {
                    var JungleTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                    foreach (var minion in JungleTarget)
                    {
                        if (_Q.IsReady() && _MainMenu.Item("LeeSin_JUse_Q").GetValue <bool>() && minion != null && Environment.TickCount > QTime)
                        {
                            _Q.CastIfHitchanceEquals(minion, HitChance.Medium, true);
                            QTime = TickCount(1500);
                        }
                        if (_E.IsReady() && _MainMenu.Item("LeeSin_JUse_E").GetValue <bool>() && minion != null && Environment.TickCount > ETime &&
                            !Orbwalking.CanAttack() && Orbwalking.CanMove(10))
                        {
                            _E.Cast(true);
                            ETime = TickCount(1500);
                        }
                        if (_W.IsReady() && _MainMenu.Item("LeeSin_JUse_W").GetValue <bool>() && minion != null && Environment.TickCount > WTime &&
                            !Orbwalking.CanAttack() && Orbwalking.CanMove(10))
                        {
                            _W.Cast(Player, true);
                            WTime = TickCount(1500);
                        }
                    }
                }
                if (_MainMenu.Item("LeeSin_InsecKick").GetValue <KeyBind>().Active)    // 인섹킥
                {
                    var GetTarget = TargetSelector.GetSelectedTarget();
                    if (GetTarget == null || GetTarget.IsDead)
                    {
                        return;
                    }
                    if (_Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && _Q.GetPrediction(GetTarget).Hitchance >= HitChance.Low)
                    {
                        _Q.CastOnUnit(GetTarget, true);
                    }
                    var Turrets = ObjectManager.Get <Obj_Turret>()
                                  .OrderBy(obj => obj.Position.Distance(Player.Position))
                                  .FirstOrDefault(obj => obj.IsAlly && obj.Health > 1);
                    var AllyChampion = ObjectManager.Get <Obj_AI_Hero>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && !obj.IsDead && obj.Distance(Player.Position) < 2000);
                    if (Turrets == null && AllyChampion == null)
                    {
                        return;
                    }
                    if (AllyChampion != null)
                    {
                        InsecST = AllyChampion.Position;
                    }
                    else
                    {
                        InsecST = Turrets.Position;
                    }
                    InsecED  = GetTarget.Position;
                    InsecPOS = InsecST.Extend(InsecED, +InsecED.Distance(InsecST) + 230);
                    MovingPlayer(InsecPOS);
                    if (!_R.IsReady())
                    {
                        return;
                    }

                    if (_MainMenu.Item("LeeSin_KickAndFlash").GetValue <bool>() && InsecPOS.Distance(Player.Position) < 425 &&
                        GetTarget.Distance(Player.Position) < 375 && InsecType == "Wait" && _R.Level > 0 && _R.IsReady() &&
                        InsecType != "WF" && InsecType != "WF1" && Player.GetSpellSlot("SummonerFlash").IsReady())
                    {
                        InsecTime = TickCount(2000);
                        InsecText = "Flash";
                        InsecType = "RF";
                        _R.Cast(GetTarget, true);
                        return;
                    }
                    if (InsecPOS.Distance(Player.Position) < 575 && _R.Level > 0 && _R.IsReady() && InsecType != "RF")
                    {
                        InsecText = "Ward";
                        if (InsecType == "Wait" && InsecType != "WF" && InsecType != "WF1" && _W.IsReady())
                        {
                            if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo")
                            {
                                return;
                            }
                            InsecTime = TickCount(2000);
                            InsecType = "WF";
                            var Ward = Items.GetWardSlot();
                            Player.Spellbook.CastSpell(Ward.SpellSlot, InsecPOS);
                        }
                        if (InsecType == "WF" && _W.IsReady())
                        {
                            if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo")
                            {
                                return;
                            }
                            var WardObj = ObjectManager.Get <Obj_AI_Base>()  // 커서근처 와드 유무
                                          .OrderBy(obj => obj.Distance(InsecPOS))
                                          .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe &&
                                                          obj.Distance(InsecPOS) <= 110 && obj.Name.ToLower().Contains("ward"));
                            if (WardObj != null)
                            {
                                InsecType = "WF1";
                                _W.Cast(WardObj, true);
                            }
                        }
                        if (InsecType == "WF1")
                        {
                            if (GetTarget.Distance(Player.Position) < 375)
                            {
                                _R.Cast(GetTarget, true);
                            }
                            else
                            {
                                Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                            }
                        }
                        return;
                    }

                    // 플 425, 와드 575
                }
                if (_MainMenu.Item("LeeSin_Ward_W").GetValue <KeyBind>().Active)   // 와드 방호
                {
                    //와드방호는 WW로 정의
                    var Cursor = Game.CursorPos;
                    var Ward   = Items.GetWardSlot();
                    Player.IssueOrder(GameObjectOrder.MoveTo, Cursor);
                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo")
                    {
                        return;
                    }
                    if (Player.Distance(Cursor) > 700)
                    {
                        Cursor = Game.CursorPos.Extend(Player.Position, +Player.Distance(Game.CursorPos) - 700);
                    }
                    //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2);
                    //Drawing.DrawText(200, 200, Color.White, "WW is: " + WW.ToString());
                    if (_W.IsReady())
                    {
                        var Object  = ObjectManager.Get <Obj_AI_Hero>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) < 110); // 커서근처 챔프유무
                        var Minion  = MinionManager.GetMinions(Cursor, 110, MinionTypes.All, MinionTeam.Ally);                                        // 아군 미니언 유무
                        var WardObj = ObjectManager.Get <Obj_AI_Base>()                                                                               // 커서근처 와드 유무
                                      .OrderBy(obj => obj.Distance(Cursor))
                                      .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe &&
                                                      obj.Distance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward"));
                        if (WardObj != null)
                        {
                            _W.Cast(WardObj, true);
                            Ward_Time = TickCount(2000);
                            WW        = true;
                            return;
                        }
                        if (Object != null)
                        {
                            _W.Cast(Object, true);
                            Ward_Time = TickCount(2000);
                            WW        = true;
                            return;
                        }
                        if (Minion != null)
                        {
                            foreach (var minion in Minion)
                            {
                                if (minion != null)
                                {
                                    _W.Cast(minion, true);
                                    Ward_Time = TickCount(2000);
                                    WW        = true;
                                    return;
                                }
                            }
                        }
                        if (Player.Distance(Cursor) > 575)
                        {
                            Cursor = Game.CursorPos.Extend(Player.Position, +Player.Distance(Game.CursorPos) - 575);
                        }
                        //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2);
                        if (WW && Ward != null && Ward_Time < Environment.TickCount)
                        {
                            Player.Spellbook.CastSpell(Ward.SpellSlot, Cursor);
                            WW        = false;
                            Ward_Time = TickCount(2000);
                        }
                        WardObj = ObjectManager.Get <Obj_AI_Base>()  // 커서근처 와드 유무
                                  .OrderBy(obj => obj.Distance(Cursor))
                                  .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe &&
                                                  obj.Distance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward"));
                        if (WardObj != null)
                        {
                            _W.Cast(WardObj, true);
                            Ward_Time = TickCount(2000);
                            WW        = true;
                            return;
                        }
                    }
                }
            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    //Game.PrintChat(ChampName + " in FreshBooster isn't Load. Error Code 06");
                    ErrorTime = TickCount(10000);
                }
            }
        }
Exemple #18
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range + 200, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            var useq       = GetBool("useq", typeof(bool));
            var user       = GetBool("user", typeof(bool));
            var usee       = GetBool("usee", typeof(bool));
            var userturret = GetBool("usert", typeof(bool));
            var ignite     = GetBool("useignite", typeof(bool));

            if (Player.IsWindingUp)
            {
                return;
            }

            SetIgniteSlot(Player.GetSpellSlot("summonerdot"));

            if (ignite)
            {
                if (target.IsValidTarget(Q.Range) &&
                    (target.Health < IgniteDamage(target) + Q.GetDamage(target)))
                {
                    Player.Spellbook.CastSpell(GetIgniteSlot(), target);
                }
            }

            if (Q.IsReady() && useq && target.IsValidTarget(Q.Range))
            {
                if (Player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) && !W.IsReady())
                {
                    Q.Cast(target);
                }
                else if (Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Q.Cast(target);
                }
            }

            if (E.IsReady() && usee && target.Distance(Player) < 500 && eCanCast())
            {
                if (Player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) && !W.IsReady())
                {
                    E.Cast(target.Position);
                }
                else if (Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Utility.DelayAction.Add(200, () => E.Cast(target.Position));
                }
            }

            var rCount           = GetValue("rcount");
            var extendedposition = Player.Position.Extend(target.Position, 500);

            if (ForcePulseCount() < rCount && user && R.IsReady() && Player.IsFacing(target))
            {
                if (target.UnderTurret(true) && userturret)
                {
                    return;
                }
                if (target.HealthPercent - 15 > Player.HealthPercent)
                {
                    return;
                }
                if (Q.IsReady() || (E.IsReady() && (eCanCast() || GetPassiveBuff == 5)) || W.IsReady())
                {
                    if (Player.Mana >= Player.Spellbook.GetSpell(SpellSlot.R).ManaCost + Q.ManaCost)
                    {
                        if (Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                        {
                            R.Cast(extendedposition);
                        }
                    }
                }
            }
        }
Exemple #19
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            UltimateBuffStacks = GetUltimateBuffStacks();
            W.Range            = 110 + 20 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level;
            R.Range            = 900 + 300 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level;

            if (R.IsReady() && GetValue <bool>("UseRM"))
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero => hero.IsValidTarget(R.Range) && R.GetDamage(hero) > hero.Health))
                {
                    R.Cast(hero, false, true);
                }
            }

            if ((!ComboActive && !HarassActive) ||
                (!Orbwalking.CanMove(100) &&
                 !(ObjectManager.Player.BaseAbilityDamage + ObjectManager.Player.FlatMagicDamageMod > 100)))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseR" + (ComboActive ? "C" : "H"));
            var rLim = GetValue <Slider>("Rlim" + (ComboActive ? "C" : "H")).Value;

            if (useW && W.IsReady())
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(hero => hero.IsValidTarget(Orbwalking.GetRealAutoAttackRange(hero) + W.Range)))
                {
                    W.CastOnUnit(ObjectManager.Player);
                }
            }

            if (useQ && Q.IsReady())
            {
                var t = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Magical);
                if (t != null)
                {
                    if (Q.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useE && E.IsReady())
            {
                var t = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Magical);
                if (t != null)
                {
                    if (E.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useR && R.IsReady() && UltimateBuffStacks < rLim)
            {
                var t = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Magical);
                if (t != null)
                {
                    R.Cast(t, false, true);
                }
            }
        }
Exemple #20
0
        private static async Task Action(CancellationToken cancellationToken)
        {
            if (_globalTarget == null || !_globalTarget.IsValid || !_globalTarget.IsAlive)
            {
                _globalTarget = TargetSelector.ClosestToMouse(Members.MyHero);
                return;
            }
            if (_targetEffect == null || !_targetEffect.IsValid)
            {
                _targetEffect = new ParticleEffect("materials/ensage_ui/particles/target.vpcf", Members.MyHero);
                _targetEffect.SetControlPoint(2, Members.MyHero.Position);
                _targetEffect.SetControlPoint(5, new Vector3(0, 155, 255));
                _targetEffect.SetControlPoint(6, new Vector3(255));
                _targetEffect.SetControlPoint(7, _globalTarget.Position);
            }
            var     target = _globalTarget;
            Ability ult;
            var     notInInvis = !Members.MyHero.IsInvisible() &&
                                 !Members.MyHero.HasModifiers(new[]
                                                              { "modifier_item_invisibility_edge_windwalk", "modifier_item_silver_edge_windwalk" }) &&
                                 !ComboSleeper.Sleeping("invisAction");

            if (notInInvis || !MenuManager.IsInvisEnable)
            {
                if (Members.MyHero.FindItem("item_blink", true) != null)
                {
                    await UseBlink(target, cancellationToken);
                }
                else if (MenuManager.IsInvisEnable && (Members.MyHero.FindItem("item_invis_sword", true) != null ||
                                                       Members.MyHero.FindItem("item_silver_edge", true) != null))
                {
                    await UseInvis(target, cancellationToken);
                }
                //await UseAbility(new Ability(), Target, cancellationToken);

                var inventory =
                    Members.MyHero.Inventory.Items.Where(
                        x =>
                        /*x.CanBeCasted() &&*/
                        !(x.TargetTeamType == TargetTeamType.Enemy || x.TargetTeamType == TargetTeamType.All ||
                          x.TargetTeamType == TargetTeamType.Custom) ||
                        x.CanHit(target) || x.IsAbilityBehavior(AbilityBehavior.UnitTarget))
                    .Where(x => x.CanBeCasted());
                var enumerable = inventory as Item[] ?? inventory.ToArray();

                var linkerBreakers =
                    enumerable.Where(
                        x =>
                        Helper.IsItemEnable(x, false) && target.IsLinkensProtected() && !ComboSleeper.Sleeping(x));

                foreach (var item in linkerBreakers)
                {
                    await UseItem(item, target, cancellationToken);
                }
                var itemInCombo =
                    enumerable.Where(
                        x => Helper.IsItemEnable(x) && !target.IsLinkensProtected() && !ComboSleeper.Sleeping(x));
                foreach (var item in itemInCombo)
                {
                    await UseItem(item, target, cancellationToken);
                }

                ult = Members.MyHero.FindSpell(Members.AbilityList[2]);
                if (ult.CanBeCasted() && !target.IsLinkensProtected())
                {
                    if (true)//(ult.CanHit(target))
                    {
                        ult.UseAbility(target);

                        await Task.Delay(350, cancellationToken);
                    }
                }
            }
            ult = Members.MyHero.FindSpell(Members.AbilityList[2]);
            if (!ult.CanBeCasted() || !notInInvis)
            {
                if (OrbEnable && (!target.IsStunned() || !OrbInStun))
                {
                    try
                    {
                        Orbwalking.Orbwalk(target, followTarget: OrbFollow);
                    }
                    catch
                    {
                        // ignored
                    }
                }
                else if (Utils.SleepCheck("attack_rate"))
                {
                    if (!Members.MyHero.IsAttacking())
                    {
                        Members.MyHero.Attack(target);
                        Utils.Sleep(125, "attack_rate");
                    }
                }
            }
        }
Exemple #21
0
        public override void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Unit.IsMe && HeroManager.Enemies.Exists(p => p.NetworkId == args.Target.NetworkId) && ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && combo.Item("CUSEE").GetValue<bool>()) || (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && harass.Item("HUSEE").GetValue<bool>())))
            {
                if (Spells[E].IsReady())
                    Spells[E].Cast();

                ObjectManager.Player.IssueOrder(GameObjectOrder.AutoAttack, args.Target);
            }
        }
 /// <summary>
 /// Called when the module is executed.
 /// </summary>
 public void OnExecute()
 {
     TargetSelector.SetTarget(HeroManager.Enemies.FirstOrDefault(
                                  m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 200) && m.Has2WStacks()));
 }
Exemple #23
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Target.IsValid<Obj_AI_Minion>() && !Player.HasBuff("xerathascended2onhit") && Program.Combo)
     {
         args.Process = false;
     }
 }
Exemple #24
0
        public static void OnTick(EventArgs args)
        {
            if (IsEn("AutoE"))
            {
                foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsEnemy))
                {
                    if (hero.IsValid && !hero.IsDead && hero.IsVisible && Player.Distance(hero) < 715f &&
                        Player.Distance(hero) > 0f && Menu.Item(hero.BaseSkinName).GetValue <bool>())
                    {
                        PredictionOutput pred = E.GetPrediction(hero);
                        int pushDist          = Menu.Item("PushDistance").GetValue <Slider>().Value;
                        for (int i = 0; i < pushDist; i += (int)hero.BoundingRadius)
                        {
                            Vector2 location = V2E(Player.Position, pred.UnitPosition, i);
                            Vector3 loc3     =
                                pred.UnitPosition.To2D()
                                .Extend(ObjectManager.Player.ServerPosition.To2D(), -i)
                                .To3D();
                            if (IsWall(loc3))
                            {
                                E.Cast(hero);
                                break;
                            }
                        }
                    }
                }
            }

            if (!IsMode("Combo") || !IsEn("UseE") || !E.IsReady() || !Orbwalking.CanMove(100))
            {
                return;
            }
            if (!IsEn("AdvE"))
            {
                foreach (
                    Obj_AI_Hero hero in
                    from hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(hero => hero.IsValidTarget(550f) && Menu.Item(hero.BaseSkinName).GetValue <bool>())
                    let prediction = E.GetPrediction(hero)
                                     where NavMesh.GetCollisionFlags(
                        prediction.UnitPosition.To2D()
                        .Extend(ObjectManager.Player.ServerPosition.To2D(),
                                -Menu.Item("PushDistance").GetValue <Slider>().Value)
                        .To3D())
                                     .HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(
                        prediction.UnitPosition.To2D()
                        .Extend(ObjectManager.Player.ServerPosition.To2D(),
                                -(Menu.Item("PushDistance").GetValue <Slider>().Value / 2))
                        .To3D())
                                     .HasFlag(CollisionFlags.Wall)
                                     select hero)
                {
                    CastE(hero);
                }
            }
            else
            {
                foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsEnemy))
                {
                    if (hero.IsValid && !hero.IsDead && hero.IsVisible && Player.Distance(hero) < 715f &&
                        Player.Distance(hero) > 0f && Menu.Item(hero.BaseSkinName).GetValue <bool>())
                    {
                        PredictionOutput pred = E.GetPrediction(hero);

                        int pushDist = Menu.Item("PushDistance").GetValue <Slider>().Value;
                        for (int i = 0; i < pushDist; i += (int)hero.BoundingRadius)
                        {
                            Vector2 location = V2E(Player.Position, pred.CastPosition, i);
                            Vector3 loc2     = new Vector3(location.X, Player.Position.Y, location.Y);
                            Vector3 loc3     =
                                pred.UnitPosition.To2D()
                                .Extend(ObjectManager.Player.ServerPosition.To2D(), -i)
                                .To3D();
                            if (IsWall(loc3))
                            {
                                E.Cast(hero);
                                break;
                            }
                        }
                    }
                }
            }
        }
Exemple #25
0
 private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     CClass.Orbwalking_BeforeAttack(args);
 }
        private static void OnCastTumble(Obj_AI_Base target, Vector3 position)
        {
            var afterTumblePosition = ObjectManager.Player.ServerPosition.Extend(position, 300f);
            var distanceToTarget    = afterTumblePosition.LSDistance(target.ServerPosition, true);

            if ((distanceToTarget < Math.Pow(ObjectManager.Player.AttackRange + 65, 2) && distanceToTarget > 110 * 110) ||
                getCheckBoxItem(MenuGenerator.miscMenu, "dz191.vhr.misc.tumble.qspam"))
            {
                switch (getBoxItem(MenuGenerator.miscMenu, "dz191.vhr.misc.condemn.qlogic"))
                {
                case 0:
                    /**
                     * var smartQPosition = TumblePositioning.GetSmartQPosition();
                     * var smartQCheck =  smartQPosition != Vector3.Zero;
                     * var QPosition = smartQCheck ? smartQPosition : Game.CursorPos;
                     * var QPosition2 = Provider.GetQPosition() != Vector3.Zero ? Provider.GetQPosition() : QPosition;
                     *
                     *
                     * DefaultQCast
                     *
                     * if (!QPosition2.UnderTurret(true) || (QPosition2.UnderTurret(true) && ObjectManager.Player.UnderTurret(true)))
                     * {
                     *   CastQ(QPosition2);
                     * }
                     * */

                    if (Variables.MeleeEnemiesTowardsMe.Any() &&
                        !Variables.MeleeEnemiesTowardsMe.All(m => m.HealthPercent <= 15))
                    {
                        var Closest =
                            Variables.MeleeEnemiesTowardsMe.OrderBy(m => m.LSDistance(ObjectManager.Player)).First();
                        var whereToQ = Closest.ServerPosition.LSExtend(
                            ObjectManager.Player.ServerPosition, Closest.LSDistance(ObjectManager.Player) + 300f);

                        if (whereToQ.IsSafe())
                        {
                            CastQ(whereToQ);
                        }
                    }
                    else
                    {
                        DefaultQCast(position, target);
                    }

                    break;

                case 1:
                    //To mouse
                    DefaultQCast(position, target);
                    break;

                case 2:
                    //Away from melee enemies
                    if (Variables.MeleeEnemiesTowardsMe.Any() &&
                        !Variables.MeleeEnemiesTowardsMe.All(m => m.HealthPercent <= 15))
                    {
                        var Closest =
                            Variables.MeleeEnemiesTowardsMe.OrderBy(m => m.LSDistance(ObjectManager.Player)).First();
                        var whereToQ = Closest.ServerPosition.LSExtend(
                            ObjectManager.Player.ServerPosition, Closest.LSDistance(ObjectManager.Player) + 300f);

                        if (whereToQ.IsSafe())
                        {
                            CastQ(whereToQ);
                        }
                    }
                    else
                    {
                        DefaultQCast(position, target);
                    }
                    break;

                case 3:
                    //Credits to Kurisu's Graves!
                    var range = Orbwalking.GetRealAutoAttackRange(target);
                    var path  = LeagueSharp.Common.Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(),
                                                                                     LeagueSharp.Common.Prediction.GetPrediction(target, 0.25f).UnitPosition.To2D(), 300f, range);

                    if (path.Count() > 0)
                    {
                        var TumblePosition = path.MinOrDefault(x => x.LSDistance(Game.CursorPos)).To3D();
                        if (!TumblePosition.IsSafe(true))
                        {
                            CastQ(TumblePosition);
                        }
                    }
                    else
                    {
                        DefaultQCast(position, target);
                    }
                    break;
                }
            }
        }
Exemple #27
0
 public virtual void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     //
 }
Exemple #28
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                if (target != null)
                                {
                                    _q.Cast(target, false, true);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                if (target != null)
                                {
                                    _e.Cast();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTargetNoCollision(_r);
                                if (target != null)
                                {
                                    _r.Cast(target);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                    if (target != null)
                                    {
                                        _q.Cast(target, false, true);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseR)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_r.IsReadyPerfectly())
                                {
                                    if (_r.Instance.Ammo >
                                        MenuProvider.Champion.Harass.GetSliderValue("Keep R Stacks").Value)
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_r);
                                        if (target != null)
                                        {
                                            _r.Cast(target);
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var farmLocation = _q.GetCircularFarmLocation(MinionManager.GetMinions(_q.Range));
                                    if (farmLocation.MinionsHit >= 4)
                                    {
                                        _q.Cast(farmLocation.Position);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(_q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(x => x.IsValidTarget(_q.Range));
                                    if (target != null)
                                    {
                                        _q.Cast(target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseR)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_r.IsReadyPerfectly())
                                {
                                    if (_r.Instance.Ammo >
                                        MenuProvider.Champion.Jungleclear.GetSliderValue("Keep R Stacks").Value)
                                    {
                                        var target =
                                            MinionManager.GetMinions(_r.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                     MinionOrderTypes.MaxHealth)
                                            .FirstOrDefault(x => x.IsValidTarget(_r.Range));
                                        if (target != null)
                                        {
                                            _r.Cast(target);
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }
            }
        }
Exemple #29
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
 }
Exemple #30
0
        private void Combo()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(
                E.Range, LeagueSharp.Common.TargetSelector.DamageType.Physical, true, HeroManager.Enemies.Where(h => h.IsInvulnerable));

            if (target == null)
            {
                return;
            }
            bool canKill = ComboDamage(target) + ItemHandler.GetItemsDamage(target) +
                           player.GetAutoAttackDamage(target) * 2 > target.Health;
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) && !E.CanCast(target) && !justQ && !justE &&
                (target.Distance(player) > 500 || player.HealthPercent < 25))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (rActive)
            {
                return;
            }
            if (canKill)
            {
                orbwalker.SetAttack(true);
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) &&
                target.Health < player.GetAutoAttackDamage(target) + Q.GetDamage(target))
            {
                Q.Cast();
                EloBuddy.Player.IssueOrder(GameObjectOrder.AutoAttack, target);
            }
            if (config.Item("usew", true).GetValue <bool>() && !Q.IsReady() && !qActive && !player.UnderTurret(true) &&
                W.IsReady() && !canKill &&
                ((!Q.IsReady() && !E.IsReady() && !justE && target.HealthPercent > 20 &&
                  config.Item("wHealth", true).GetValue <Slider>().Value > player.HealthPercent &&
                  Orbwalking.GetRealAutoAttackRange(target) > player.Distance(target) &&
                  CombatHelper.IsFacing(target, player.Position, 45)) ||
                 (config.Item("wOnFocus", true).GetValue <bool>() &&
                  Program.IncDamages.GetAllyData(player.NetworkId).DamageCount >= 3)))
            {
                W.Cast();
            }
            if (R.IsReady() && config.Item("userone", true).GetValue <bool>() && canKill && !eActive && !Q.IsReady() &&
                player.Distance(target) < R.Range && player.HealthPercent < 55 && player.HealthPercent > 10)
            {
                R.Cast();
            }
            if (R.IsReady() && config.Item("Rmin", true).GetValue <Slider>().Value <= player.CountEnemiesInRange(R.Range))
            {
                R.Cast();
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) && Orbwalking.CanMove(100) &&
                (config.Item("eMinRange", true).GetValue <Slider>().Value < player.Distance(target) ||
                 player.HealthPercent < 20 || (player.CountEnemiesInRange(800) == 1 && target.HealthPercent < 20)))
            {
                E.CastOnUnit(target);
            }
        }
Exemple #31
0
        private void Farm()
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }

            List <Obj_AI_Base> allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);
            List <Obj_AI_Base> allMinionsR = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, R.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);
            List <Obj_AI_Base> allMinionsE = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, E.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);

            var useQ = menu.Item("UseQFarm", true).GetValue <bool>();
            var useE = menu.Item("UseEFarm", true).GetValue <bool>();
            var useR = menu.Item("UseRFarm", true).GetValue <bool>();

            int hit = 0;

            if (useQ && Q.IsReady() && ShouldQ())
            {
                MinionManager.FarmLocation qPos = Q.GetLineFarmLocation(allMinionsQ);
                if (qPos.MinionsHit >= 3)
                {
                    Q.Cast(qPos.Position);
                }
            }

            if (useR & R.IsReady() && !_rFirstCreated)
            {
                MinionManager.FarmLocation rPos = R.GetCircularFarmLocation(allMinionsR);
                if (Player.Distance(rPos.Position) < R.Range)
                {
                    R.Cast(rPos.Position);
                }
            }

            if (!ShouldQ() && _qMissle != null)
            {
                if (useQ && Q.IsReady())
                {
                    hit += allMinionsQ.Count(enemy => enemy.Distance(_qMissle.Position) < 110);
                }

                if (hit >= 2 && Q.IsReady())
                {
                    Q.Cast();
                }
            }

            if (_rFirstCreated)
            {
                hit += allMinionsR.Count(enemy => enemy.Distance(_rObj.Position) < 400);

                if (hit < 2 && R.IsReady())
                {
                    R.Cast();
                }
            }

            if (useE && allMinionsE.Count > 0 && E.IsReady())
            {
                E.Cast(allMinionsE[0]);
            }
        }
Exemple #32
0
        private void LogicE()
        {
            foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && !Orbwalking.InAutoAttackRange(enemy) && E.GetDamage(enemy) > enemy.Health))
            {
                Program.CastSpell(E, enemy);
                return;
            }

            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (Program.Combo)
                {
                    if (Player.Mana > RMANA + EMANA)
                    {
                        if (!Orbwalking.InAutoAttackRange(t))
                        {
                            Program.CastSpell(E, t);
                        }
                        if (Player.Health < Player.MaxHealth * 0.5)
                        {
                            Program.CastSpell(E, t);
                        }
                    }

                    if (Player.Mana > RMANA + EMANA + QMANA)
                    {
                        E.CastIfWillHit(t, 2, true);
                    }
                }
                if (Program.Farm && Config.Item("autoE2", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + QMANA)
                {
                    E.CastIfWillHit(t, 2, true);
                }
            }
            foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(E.Range)))
            {
                if (target.IsValidTarget(300) && target.IsMelee)
                {
                    Program.CastSpell(E, t);
                }
            }
        }
Exemple #33
0
        public static void Game_OnUpdate(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame)
            {
                return;
            }

            me = ObjectManager.LocalHero;
            if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Clinkz)
            {
                return;
            }

            if (strafe == null)
            {
                strafe = me.Spellbook.SpellQ;
            }

            if (arrows == null)
            {
                arrows = me.Spellbook.SpellW;
            }

            if (dpAbility == null)
            {
                dpAbility = me.Spellbook.SpellR;
            }

            if (bkb == null)
            {
                bkb = me.FindItem("item_black_king_bar");
            }

            if (hex == null)
            {
                hex = me.FindItem("item_sheepstick");
            }

            if (orchid == null)
            {
                orchid = me.FindItem("item_orchid");
            }

            if (bloodthorn == null)
            {
                bloodthorn = me.FindItem("item_bloodthorn");
            }

            if (medallion == null)
            {
                medallion = me.FindItem("item_medallion_of_courage");
            }

            if (bladeMail == null)
            {
                bladeMail = me.FindItem("item_blade_mail");
            }

            if (solar == null)
            {
                solar = me.FindItem("item_solar_crest");
            }

            if (powerTreads == null)
            {
                powerTreads = me.FindItem("item_power_treads") as PowerTreads;
            }

            dragonLance = me.HasModifier("modifier_item_dragon_lance");

            attackRange = dragonLance ? 760 : 630;


            if (!itemTogglerSet)
            {
                itemToggler    = Menu.Item("Items").GetValue <AbilityToggler>();
                itemTogglerSet = true;
            }

            if (!menuSkillSet)
            {
                skillToggler = Menu.Item("Skills").GetValue <AbilityToggler>();
                menuSkillSet = true;
            }

            ultBool = dpAbility != null && skillToggler.IsEnabled("clinkz_death_pact");

            const int DPrange = 0x190;

            if (powerTreads != null)
            {
                lastAttribute = powerTreads.ActiveAttribute;
            }


            var creepR =
                ObjectManager.GetEntities <Unit>()
                .Where(
                    creep =>
                    (creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Lane ||
                     creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Neutral) &&
                    creep.IsAlive && creep.IsVisible && creep.IsSpawned &&
                    creep.Team != me.Team && creep.Position.Distance2D(me.Position) <= DPrange &&
                    me.Spellbook.SpellR.CanBeCasted()).ToList();

            var enemies = ObjectManager.GetEntities <Hero>().Where(x => x.IsAlive && x.Team != me.Team && !x.IsIllusion).ToList();


            if (autoKillz && Menu.Item("enable").GetValue <bool>())
            {
                target = me.ClosestToMouseTarget(1001);

                //orbwalk
                if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
                {
                    target = null;
                }
                var canCancel = Orbwalking.CanCancelAnimation();
                if (canCancel)
                {
                    if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                    {
                        target = me.ClosestToMouseTarget();
                    }
                    else if (target == null || !Orbwalking.AttackOnCooldown(target) && target.HasModifiers(new[]
                    {
                        "modifier_dazzle_shallow_grave", "modifier_item_blade_mail_reflect",
                    }, false))
                    {
                        var bestAa = me.BestAATarget();
                        if (bestAa != null)
                        {
                            target = me.BestAATarget();
                        }
                    }
                }

                if (target != null && target.IsAlive && !target.IsInvul() && !target.IsIllusion)
                {
                    if (me.CanAttack() && me.CanCast() && !me.IsChanneling())
                    {
                        TargetDistance = me.Position.Distance2D(target);

                        if (Menu.Item("orbwalk").GetValue <bool>())
                        {
                            if (!Utils.SleepCheck("attacking"))
                            {
                                if (lastAttribute != Attribute.Agility && Utils.SleepCheck("powerTreadsSwitch"))
                                {
                                    SwitchTo(Attribute.Agility);
                                    Utils.Sleep(400, "powerTreadsSwitch");
                                }
                            }
                            Orbwalking.Orbwalk(target, Game.Ping, attackmodifiers: true);
                            Utils.Sleep(400, "attacking");
                        }
                        else if (!Menu.Item("orbwalk").GetValue <bool>())
                        {
                            if (arrows != null && arrows.IsValid && arrows.CanBeCasted() && !Utils.SleepCheck("attacking"))
                            {
                                arrows.UseAbility(target);
                            }
                            Utils.Sleep(200, "attacking");
                        }

                        if (creepR.Count > 0 && !me.Modifiers.ToList().Exists(x => x.Name == "modifier_clinkz_death_pact") && skillToggler.IsEnabled(dpAbility.Name))
                        {
                            var creepmax = creepR.MaxOrDefault(x => x.Health);
                            if (lastAttribute != Attribute.Intelligence && Utils.SleepCheck("powerTreadsSwitch"))
                            {
                                SwitchTo(Attribute.Intelligence);
                                Utils.Sleep(400, "powerTreadsSwitch");
                            }
                            dpAbility.UseAbility(creepmax);
                        }

                        if (strafe != null && strafe.IsValid && strafe.CanBeCasted() && me.CanCast() && me.Distance2D(target) <= attackRange + 90 && Utils.SleepCheck("strafe") && skillToggler.IsEnabled(strafe.Name))
                        {
                            if (lastAttribute != Attribute.Intelligence && Utils.SleepCheck("powerTreadsSwitch"))
                            {
                                SwitchTo(Attribute.Intelligence);
                                Utils.Sleep(400, "powerTreadsSwitch");
                            }
                            strafe.UseAbility();
                            Utils.Sleep(100 + Game.Ping, "strafe");
                        }

                        if (bladeMail != null && bladeMail.IsValid && Utils.SleepCheck("blademail") && itemToggler.IsEnabled(bladeMail.Name) && me.Distance2D(target) <= attackRange + 90)
                        {
                            bladeMail.UseAbility();
                            Utils.Sleep(50 + Game.Ping, "blademail");
                        }

                        if (medallion != null && medallion.IsValid && medallion.CanBeCasted() && Utils.SleepCheck("medallion") && itemToggler.IsEnabled(medallion.Name) && me.Distance2D(target) <= attackRange + 90)
                        {
                            medallion.UseAbility(target);
                            Utils.Sleep(50 + Game.Ping, "medallion");
                        }

                        if (solar != null && solar.IsValid && solar.CanBeCasted() && Utils.SleepCheck("solar") && itemToggler.IsEnabled(solar.Name))
                        {
                            solar.UseAbility(target);
                            Utils.Sleep(50 + Game.Ping, "solar");
                        }


                        if (bkb != null && bkb.IsValid && bkb.CanBeCasted() && Utils.SleepCheck("bkb") && itemToggler.IsEnabled(bkb.Name) && (enemies.Count(x => x.Distance2D(me) <= 650) >= (Menu.Item("bkblogic").GetValue <Slider>().Value)))
                        {
                            bkb.UseAbility();
                            Utils.Sleep(150 + Game.Ping, "bkb");
                        }

                        if (hex != null && hex.IsValid && hex.CanBeCasted() && Utils.SleepCheck("hex") && itemToggler.IsEnabled(hex.Name))
                        {
                            hex.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "hex");
                            return;
                        }

                        if (orchid != null && orchid.IsValid && orchid.CanBeCasted() && Utils.SleepCheck("orchid") && itemToggler.IsEnabled(orchid.Name))
                        {
                            orchid.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "orchid");
                            return;
                        }

                        if (bloodthorn != null && bloodthorn.IsValid && bloodthorn.CanBeCasted() && Utils.SleepCheck("bloodthorn") && itemToggler.IsEnabled(bloodthorn.Name))
                        {
                            bloodthorn.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "orchid");
                            return;
                        }

                        if (!me.IsAttacking() && me.Distance2D(target) >= attackRange && Utils.SleepCheck("follow"))
                        {
                            me.Move(Game.MousePosition);
                            Utils.Sleep(150 + Game.Ping, "follow");
                        }
                    }
                }
                else
                {
                    me.Move(Game.MousePosition);
                }
            }
        }//gameOnUpdate Close.
Exemple #34
0
        private void LogicR()
        {
            if (Config.Item("useR", true).GetValue <KeyBind>().Active)
            {
                var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget())
                {
                    R.CastIfWillHit(t, 2, true);
                    R.Cast(t, true, true);
                }
            }
            if (Config.Item("autoR", true).GetValue <bool>())
            {
                foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target) && target.CountAlliesInRange(500) == 0))
                {
                    float  predictedHealth = target.Health - (float)OktwCommon.GetIncomingDamage(target);
                    double Rdmg            = CalculateR(target);

                    if (Rdmg * 2 > predictedHealth && Config.Item("Rdmg", true).GetValue <StringList>().SelectedIndex == 1)
                    {
                        Rdmg = Rdmg + getRdmg(target);
                    }

                    var qDmg = Q.GetDamage(target);
                    var eDmg = E.GetDamage(target);
                    if (Rdmg > predictedHealth && !Orbwalking.InAutoAttackRange(target))
                    {
                        castR(target);
                        Program.debug("R normal");
                    }
                    else if (Program.Combo && Config.Item("comboR", true).GetValue <bool>() && Orbwalking.InAutoAttackRange(target) && Rdmg * 2 + Player.GetAutoAttackDamage(target) > predictedHealth)
                    {
                        castR(target);
                        Program.debug("R normal");
                    }
                    else if (Config.Item("Rcc", true).GetValue <bool>() && Rdmg * 2 > predictedHealth && !OktwCommon.CanMove(target) && target.IsValidTarget(E.Range))
                    {
                        R.Cast(target);
                        Program.debug("R normal");
                    }
                    else if (Program.Combo && Config.Item("Raoe", true).GetValue <bool>())
                    {
                        R.CastIfWillHit(target, 3, true);
                    }
                    else if (target.IsValidTarget(E.Range) && Rdmg * 2 + qDmg + eDmg > predictedHealth && Config.Item("Raoe", true).GetValue <bool>())
                    {
                        R.CastIfWillHit(target, 2, true);
                    }
                }
            }
        }
Exemple #35
0
        private static void Game_OnUpdate(EventArgs args)
        {
            var soldierandtargetminion = new List <SoldierAndTargetMinion>();
            var minions = GameObjects.EnemyMinions.Where(x => x.LSIsValidTarget()).ToList();

            minions.AddRange(GameObjects.Jungle.Where(x => x.LSIsValidTarget()));
            var minionspredictedposition = new List <MinionPredictedPosition>();

            foreach (var x in minions)
            {
                minionspredictedposition
                .Add(new MinionPredictedPosition
                         (x, LeagueSharp.Common.Prediction.GetPrediction(x, Player.AttackCastDelay + Game.Ping / 1000).UnitPosition));
            }
            var championpredictedposition = new List <ChampionPredictedPosition>();

            foreach (var x in HeroManager.Enemies.Where(x => x.LSIsValidTarget()))
            {
                championpredictedposition
                .Add(new ChampionPredictedPosition
                         (x, LeagueSharp.Common.Prediction.GetPrediction(x, Player.AttackCastDelay + Game.Ping / 1000).UnitPosition));
            }
            enemies = new List <AIHeroClient>();
            foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget() && !x.IsZombie))
            {
                if (soldier.Any(x => x.Position.LSDistance(hero.Position) <= 300 + hero.BoundingRadius && Player.LSDistance(x.Position) <= 900))
                {
                    enemies.Add(hero);
                }
            }
            soldierattackminions = new List <Obj_AI_Minion>();
            foreach (var minion in minions)
            {
                var Soldiers = soldier.Where
                                   (x => x.Position.LSDistance(minion.Position) <= 300 + minion.BoundingRadius && Player.LSDistance(x.Position) <= 900)
                               .ToList();
                if (Soldiers.Any())
                {
                    soldierattackminions.Add(minion);
                    soldierandtargetminion.Add(new SoldierAndTargetMinion(minion, Soldiers));
                }
            }
            autoattackminions = new List <Obj_AI_Minion>();
            foreach (var minion in minions.Where(x => x.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(x))))
            {
                if (!soldierattackminions.Any(x => x.NetworkId == minion.NetworkId))
                {
                    autoattackminions.Add(minion);
                }
            }
            splashautoattackchampions = new List <SplashAutoAttackChampion>();
            foreach (var mainminion in soldierandtargetminion)
            {
                var mainminionpredictedposition =
                    LeagueSharp.Common.Prediction.GetPrediction(mainminion.Minion, Player.AttackCastDelay + Game.Ping / 1000).UnitPosition;
                List <AIHeroClient> splashchampions = new List <AIHeroClient>();
                foreach (var hero in championpredictedposition)
                {
                    foreach (var mainminionsoldier in mainminion.Soldier)
                    {
                        if (LeagueSharp.Common.Geometry.LSDistance(hero.Position.LSTo2D(), mainminionsoldier.Position.LSTo2D(),
                                                                   mainminionsoldier.Position.LSTo2D().LSExtend(mainminionpredictedposition.LSTo2D(), 450), false)
                            <= hero.Hero.BoundingRadius + 50)
                        {
                            splashchampions.Add(hero.Hero);
                        }
                    }
                }
                if (splashchampions.Any())
                {
                    splashautoattackchampions.Add(new SplashAutoAttackChampion(mainminion.Minion, splashchampions));
                }
            }
            splashautoattackminions = new List <SplashAutoAttackMinion>();
            foreach (var mainminion in soldierandtargetminion)
            {
                var mainminionpredictedposition =
                    LeagueSharp.Common.Prediction.GetPrediction(mainminion.Minion, Player.AttackCastDelay + Game.Ping / 1000).UnitPosition;
                List <Obj_AI_Minion> splashminions = new List <Obj_AI_Minion>();
                foreach (var minion in minionspredictedposition)
                {
                    foreach (var mainminionsoldier in mainminion.Soldier)
                    {
                        if (LeagueSharp.Common.Geometry.LSDistance(minion.Position.LSTo2D(), mainminionsoldier.Position.LSTo2D(),
                                                                   mainminionsoldier.Position.LSTo2D().LSExtend(mainminionpredictedposition.LSTo2D(), 450), false)
                            <= minion.Minion.BoundingRadius + 50)
                        {
                            splashminions.Add(minion.Minion);
                            break;
                        }
                    }
                }
                splashautoattackminions.Add(new SplashAutoAttackMinion(mainminion.Minion, splashminions));
            }
        }
Exemple #36
0
        public override void OnTick(EventArgs args)
        {
            if (!Menu.Item("use" + Name).GetValue <bool>() || !ignote.IsReady())
            {
                return;
            }

            foreach (var tar in Activator.Heroes)
            {
                if (!tar.Player.IsValidTarget(600))
                {
                    continue;
                }

                if (tar.Player.IsZombie || tar.Player.HasBuff("summonerdot", true))
                {
                    continue;
                }

                if (!Parent.Item(Parent.Name + "allon" + tar.Player.NetworkId).GetValue <bool>())
                {
                    continue;
                }

                // ignite damagerino
                var ignotedmg = (float)Player.GetSummonerSpellDamage(tar.Player, Damage.SummonerSpell.Ignite);

                // killsteal ignite
                if (Menu.Item("mode" + Name).GetValue <StringList>().SelectedIndex == 0)
                {
                    if (tar.Player.Health <= ignotedmg)
                    {
                        UseSpellOn(tar.Player);
                    }
                }

                // combo ignite
                if (Menu.Item("mode" + Name).GetValue <StringList>().SelectedIndex != 1)
                {
                    continue;
                }

                var totaldmg = 0d;

                switch (Player.ChampionName)
                {
                case "Ahri":
                    if (!tar.Player.HasBuffOfType(BuffType.Charm) &&
                        Menu.Item("ii" + Player.ChampionName).GetValue <bool>() &&
                        Player.GetSpell(SpellSlot.E).State != SpellState.NotLearned)
                    {
                        return;
                    }
                    break;

                case "Cassiopeia":
                    if (!tar.Player.HasBuffOfType(BuffType.Poison) &&
                        Menu.Item("ii" + Player.ChampionName).GetValue <bool>() &&
                        Player.GetSpell(SpellSlot.E).State != SpellState.NotLearned)
                    {
                        return;
                    }

                    totaldmg += Player.GetSpell(SpellSlot.E).State == SpellState.Ready
                            ? Player.GetSpellDamage(tar.Player, SpellSlot.E) * 3
                            : 0;

                    break;

                case "Diana":
                    if (!tar.Player.HasBuff("dianamoonlight", true) &&
                        Menu.Item("ii" + Player.ChampionName).GetValue <bool>() &&
                        Player.GetSpell(SpellSlot.Q).State != SpellState.NotLearned)
                    {
                        return;
                    }

                    totaldmg += Player.GetSpell(SpellSlot.E).State == SpellState.Ready
                            ? Player.GetSpellDamage(tar.Player, SpellSlot.R)
                            : 0;

                    break;
                }

                // aa dmg
                totaldmg += Orbwalking.InAutoAttackRange(tar.Player)
                    ? Player.GetAutoAttackDamage(tar.Player, true) * 2
                    : 0;

                // combo damge
                totaldmg +=
                    spelldata.damagelib.Sum(
                        entry =>
                        Player.GetSpell(entry.Value).State == SpellState.Ready
                                ? entry.Key(Player, tar.Player, Player.GetSpell(entry.Value).Level - 1)
                                : 0);

                if (totaldmg + ignotedmg >= tar.Player.Health && !(totaldmg / 2.5 >= tar.Player.Health))
                {
                    if (tar.Player.UnderTurret(true) && !Menu.Item("ignotet").GetValue <bool>())
                    {
                        return;
                    }

                    if (tar.Player.Level <= 5)
                    {
                        if (tar.Player.InventoryItems.Any(
                                item => item.Id == (ItemId)2003 || item.Id == (ItemId)2010))
                        {
                            return;
                        }
                    }

                    UseSpellOn(tar.Player, true);
                }
            }
        }
Exemple #37
0
        /// <summary>
        ///     The on last hit callback.
        /// </summary>
        internal override void OnLastHit()
        {
            if (MyMenu.RootMenu.Item("lasthit.mode").GetValue <StringList>().SelectedIndex == 0)
            {
                var minion =
                    MinionManager.GetMinions(this.MaxRange + this.Width)
                    .Where(obj => this.SpellObject.IsKillable(obj) && obj.Distance(ObjectManager.Player) > Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) && obj.Distance(ObjectManager.Player) < this.SpellObject.ChargedMaxRange).MinOrDefault(obj => obj.Health);

                if (minion != null)
                {
                    if (!this.SpellObject.IsCharging)
                    {
                        this.SpellObject.StartCharging();
                    }

                    if (this.SpellObject.IsCharging)
                    {
                        this.SpellObject.Cast(minion);
                    }
                }
            }
            else
            {
                var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, this.Range);
                if (allMinions != null)
                {
                    foreach (var minion in allMinions.Where(minion => this.SpellObject.IsKillable(minion) && minion.IsValidTarget(this.MaxRange)))
                    {
                        var killcount = 0;

                        foreach (var colminion in allMinions)
                        {
                            if (this.SpellObject.IsKillable(colminion))
                            {
                                killcount++;
                            }
                            else
                            {
                                break;
                            }
                        }

                        if (killcount >= MyMenu.RootMenu.Item("lasthit.count.clear").GetValue <Slider>().Value)
                        {
                            this.SpellObject.Cast(minion);
                        }
                    }
                }
            }
        }
Exemple #38
0
        private void Combo()
        {
            AIHeroClient target = DrawHelper.GetBetterTarget(E.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                if (maoR)
                {
                    if (!turnOff)
                    {
                        turnOff = true;
                        LeagueSharp.Common.Utility.DelayAction.Add(2600, () => turnOffUlt());
                    }
                }
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            var manaperc = player.Mana / player.MaxMana * 100;

            if (player.HasBuff("MaokaiSapMagicMelee") &&
                player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) + 75)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && !player.Spellbook.IsAutoAttacking &&
                ((config.Item("useqroot", true).GetValue <bool>() &&
                  (!target.HasBuffOfType(BuffType.Snare) && !target.HasBuffOfType(BuffType.Stun) &&
                   !target.HasBuffOfType(BuffType.Suppression))) || !config.Item("useqroot", true).GetValue <bool>()) &&
                !W.CanCast(target))
            {
                Q.Cast(target);
            }
            if (config.Item("usew", true).GetValue <bool>())
            {
                if (config.Item("blocke", true).GetValue <bool>() && player.Distance(target) < W.Range && W.IsReady() &&
                    E.CanCast(target))
                {
                    E.Cast(target);
                    CastR(target);
                    LeagueSharp.Common.Utility.DelayAction.Add(100, () => W.Cast(target));
                }
                else if (W.CanCast(target))
                {
                    CastR(target);
                    W.Cast(target);
                }
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                if (!config.Item("blocke", true).GetValue <bool>() ||
                    config.Item("blocke", true).GetValue <bool>() && !W.IsReady())
                {
                    E.Cast(target);
                }
            }

            if (R.IsReady())
            {
                bool enoughEnemies = config.Item("user", true).GetValue <Slider>().Value <=
                                     player.CountEnemiesInRange(R.Range - 50);
                AIHeroClient targetR = DrawHelper.GetBetterTarget(R.Range, TargetSelector.DamageType.Magical);

                if (maoR && targetR != null &&
                    ((config.Item("rks", true).GetValue <bool>() &&
                      (Damage.GetSpellDamage(player, targetR, SpellSlot.R) +
                       player.CalcDamage(target, Damage.DamageType.Magical, maoRStack)) > targetR.Health) ||
                     manaperc < config.Item("rmana", true).GetValue <Slider>().Value ||
                     (!enoughEnemies && player.Distance(targetR) > R.Range - 50)))
                {
                    R.Cast();
                }

                if (targetR != null && !maoR && manaperc > config.Item("rmana", true).GetValue <Slider>().Value&&
                    (enoughEnemies || R.IsInRange(targetR)))
                {
                    R.Cast();
                }
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemple #39
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     // cancle R
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
     {
         return;
     }
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         //if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         //    return;
         //if (!HeroManager.Enemies.Any(x => x.BadaoIsValidTarget() &&
         //BadaoChecker.BadaoInTheCone(x.Position.To2D(),
         //BadaoMissFortuneVariables.CenterPolar, BadaoMissFortuneVariables.CenterEnd, 36)))
         //{
         //    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
         //}
         //else
         return;
     }
     // Q logic
     if (BadaoMissFortuneHelper.UseQ2Combo() && Orbwalking.CanMove(80))
     {
         // Q2 logic
         var targetQ = TargetSelector.GetTarget(BadaoMainVariables.Q.Range + 600, TargetSelector.DamageType.Physical);
         if (targetQ.BadaoIsValidTarget())
         {
             if (BadaoMissFortuneVariables.TapTarget.BadaoIsValidTarget() &&
                 targetQ.NetworkId == BadaoMissFortuneVariables.TapTarget.NetworkId)
             {
                 foreach (Obj_AI_Hero hero in HeroManager.Enemies.Where(x => x.NetworkId != targetQ.NetworkId &&
                                                                        x.BadaoIsValidTarget(BadaoMainVariables.Q.Range)))
                 {
                     var Qpred    = BadaoMainVariables.Q.GetPrediction(hero);
                     var PredHero = Prediction.GetPrediction(hero, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                         1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredHero.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredHero.UnitPosition.To2D()) + 500);
                     if (BadaoMissFortuneHelper.Q1Damage(hero) >= hero.Health &&
                         BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredHero.UnitPosition.To2D(), endpos, 40))
                     {
                         if (BadaoMainVariables.Q.Cast(hero) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range))
                 {
                     var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                     var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                             1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                     if (BadaoMissFortuneHelper.Q1Damage(minion) >= minion.Health &&
                         BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos, 40))
                     {
                         if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Hero hero in HeroManager.Enemies.Where(x => x.NetworkId != targetQ.NetworkId &&
                                                                        x.BadaoIsValidTarget(BadaoMainVariables.Q.Range)))
                 {
                     var Qpred    = BadaoMainVariables.Q.GetPrediction(hero);
                     var PredHero = Prediction.GetPrediction(hero, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                         1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredHero.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredHero.UnitPosition.To2D()) + 500);
                     if (BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredHero.UnitPosition.To2D(), endpos, 40))
                     {
                         if (BadaoMainVariables.Q.Cast(hero) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range))
                 {
                     var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                     var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                             1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                     if (BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos, 40))
                     {
                         if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
             }
             else if (!BadaoMissFortuneVariables.TapTarget.IsValidTarget() ||
                      targetQ.NetworkId != BadaoMissFortuneVariables.TapTarget.NetworkId)
             {
                 //40
                 foreach (Obj_AI_Hero hero in HeroManager.Enemies.Where(x => x.NetworkId != targetQ.NetworkId &&
                                                                        x.BadaoIsValidTarget(BadaoMainVariables.Q.Range)))
                 {
                     var Qpred    = BadaoMainVariables.Q.GetPrediction(hero);
                     var PredHero = Prediction.GetPrediction(hero, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                         1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredHero.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredHero.UnitPosition.To2D()) + 500);
                     if (BadaoMissFortuneHelper.Q1Damage(hero) >= hero.Health &&
                         BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredHero.UnitPosition.To2D(), endpos, 40) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 600).Any(x =>
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredHero.UnitPosition.To2D(), endpos, 40)))
                     {
                         if (BadaoMainVariables.Q.Cast(hero) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range))
                 {
                     var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                     var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                             1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                     if (BadaoMissFortuneHelper.Q1Damage(minion) >= minion.Health &&
                         BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos, 40) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 500).Any(x =>
                                                                                         x.NetworkId != minion.NetworkId &&
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredMinion.UnitPosition.To2D(), endpos, 40)))
                     {
                         if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Hero hero in HeroManager.Enemies.Where(x => x.NetworkId != targetQ.NetworkId &&
                                                                        x.BadaoIsValidTarget(BadaoMainVariables.Q.Range)))
                 {
                     var Qpred    = BadaoMainVariables.Q.GetPrediction(hero);
                     var PredHero = Prediction.GetPrediction(hero, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                         1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredHero.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredHero.UnitPosition.To2D()) + 500);
                     if (BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredHero.UnitPosition.To2D(), endpos, 40) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 600).Any(x =>
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredHero.UnitPosition.To2D(), endpos, 40)))
                     {
                         if (BadaoMainVariables.Q.Cast(hero) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range))
                 {
                     var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                     var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                             1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                     if (BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos, 40) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 500).Any(x =>
                                                                                         x.NetworkId != minion.NetworkId &&
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredMinion.UnitPosition.To2D(), endpos, 40)))
                     {
                         if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 //20
                 foreach (Obj_AI_Hero hero in HeroManager.Enemies.Where(x => x.NetworkId != targetQ.NetworkId &&
                                                                        x.BadaoIsValidTarget(BadaoMainVariables.Q.Range)))
                 {
                     var Qpred    = BadaoMainVariables.Q.GetPrediction(hero);
                     var PredHero = Prediction.GetPrediction(hero, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                         1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredHero.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredHero.UnitPosition.To2D()) + 500);
                     if (BadaoMissFortuneHelper.Q1Damage(hero) >= hero.Health &&
                         BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredHero.UnitPosition.To2D(), endpos, 20) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 600).Any(x =>
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredHero.UnitPosition.To2D(), endpos, 20)))
                     {
                         if (BadaoMainVariables.Q.Cast(hero) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range))
                 {
                     var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                     var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                             1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                     if (BadaoMissFortuneHelper.Q1Damage(minion) >= minion.Health &&
                         BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos, 20) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 500).Any(x =>
                                                                                         x.NetworkId != minion.NetworkId &&
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredMinion.UnitPosition.To2D(), endpos, 20)))
                     {
                         if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Hero hero in HeroManager.Enemies.Where(x => x.NetworkId != targetQ.NetworkId &&
                                                                        x.BadaoIsValidTarget(BadaoMainVariables.Q.Range)))
                 {
                     var Qpred    = BadaoMainVariables.Q.GetPrediction(hero);
                     var PredHero = Prediction.GetPrediction(hero, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                         1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredHero.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredHero.UnitPosition.To2D()) + 500);
                     if (BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredHero.UnitPosition.To2D(), endpos, 20) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 600).Any(x =>
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredHero.UnitPosition.To2D(), endpos, 20)))
                     {
                         if (BadaoMainVariables.Q.Cast(hero) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
                 foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range))
                 {
                     var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                     var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                             1400 + Game.Ping / 1000));
                     var PredTargetQ = Prediction.GetPrediction(targetQ, 0.25f +
                                                                ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()) / 1400 + Game.Ping / 1000);
                     Vector2 endpos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                      ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                     if (BadaoChecker.BadaoInTheCone(PredTargetQ.UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos, 20) &&
                         !MinionManager.GetMinions(BadaoMainVariables.Q.Range + 500).Any(x =>
                                                                                         x.NetworkId != minion.NetworkId &&
                                                                                         BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x, 0.25f +
                                                                                                                                              ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                            1400 + Game.Ping / 1000)).UnitPosition.To2D(),
                                                                                                                     PredMinion.UnitPosition.To2D(), endpos, 20)))
                     {
                         if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                         {
                             goto abc;
                         }
                     }
                 }
             }
         }
         abc :;
     }
     // Q1 logic
     if (BadaoMissFortuneHelper.UseQ1Combo() && Orbwalking.CanMove(80))
     {
         var targetQ1 = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Physical);
         if (targetQ1.BadaoIsValidTarget())
         {
             if (BadaoMainVariables.Q.Cast(targetQ1) == Spell.CastStates.SuccessfullyCasted)
             {
                 goto abc;
             }
         }
         abc :;
     }
     // E logic
     if (BadaoMissFortuneHelper.UseECombo() && Orbwalking.CanMove(80))
     {
         var targetE = TargetSelector.GetTarget(BadaoMainVariables.E.Range + 200, TargetSelector.DamageType.Physical);
         if (targetE.BadaoIsValidTarget())
         {
             var PredTargetE = Prediction.GetPrediction(targetE, 0.25f);
             if (PredTargetE.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) <= BadaoMainVariables.E.Range)
             {
                 if (BadaoMainVariables.E.Cast(PredTargetE.UnitPosition) == true)
                 {
                     goto xyz;
                 }
             }
         }
         xyz :;
     }
     // R logic
     if (BadaoMainVariables.R.IsReady() && Orbwalking.CanMove(80) && BadaoMissFortuneVariables.ComboRifhit.GetValue <bool>())
     {
         foreach (Obj_AI_Hero hero in HeroManager.Enemies)
         {
             List <Obj_AI_Hero> a = new List <Obj_AI_Hero>();
             if (hero.BadaoIsValidTarget())
             {
                 var     PredTarget  = Prediction.GetPrediction(hero as Obj_AI_Base, 0.25f + Game.Ping / 1000f);
                 Vector2 x1          = new Vector2();
                 Vector2 x2          = new Vector2();
                 Vector2 CenterPolar = new Vector2();
                 Vector2 CenterEnd   = new Vector2();
                 BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), hero as Obj_AI_Base,
                                                    out CenterPolar, out CenterEnd, out x1, out x2);
                 foreach (Obj_AI_Hero hero2 in HeroManager.Enemies)
                 {
                     if (hero2.BadaoIsValidTarget() && BadaoChecker.BadaoInTheCone(hero2.Position.To2D(), CenterPolar, CenterEnd, 36))
                     {
                         a.Add(hero2);
                     }
                 }
                 if (a.Count() >= BadaoMissFortuneVariables.ComboRifwillhit.GetValue <Slider>().Value)
                 {
                     BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
                     BadaoMissFortuneVariables.TargetRChanneling = hero as Obj_AI_Hero;
                     BadaoMissFortuneVariables.CenterPolar       = CenterPolar;
                     BadaoMissFortuneVariables.CenterEnd         = CenterEnd;
                 }
             }
         }
     }
 }
Exemple #40
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (false)
            {
                return;
            }
            if (forcedPos.IsValid() && !ToCursor)
            {
                EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, cgTarg.Position.Extend(forcedPos, 50));
            }
            if (forcedPos.IsValid() && ToCursor)
            {
                var pos = cgTarg.Position.Extend(forcedPos, 115);
                EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, pos);
                if (player.Distance(pos) < 10)
                {
                    E.CastOnUnit(cgTarg);

                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, cgTarg);
                }
                ToCursor  = false;
                forcedPos = Vector3.Zero;
            }
            Orbwalking.Move   = true;
            Orbwalking.Attack = true;
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                TurnOffQ();
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                TurnOffQ();
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                TurnOffQ();
                Clear();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            default:
                break;
            }
            Throw();
            if (config.Item("autoW", true).GetValue <bool>() && W.IsReady() && !player.IsRecalling())
            {
                var targ =
                    HeroManager.Enemies.Where(
                        hero =>
                        W.CanCast(hero) &&
                        (hero.HasBuffOfType(BuffType.Snare) || hero.HasBuffOfType(BuffType.Stun) ||
                         hero.HasBuffOfType(BuffType.Taunt) || hero.HasBuffOfType(BuffType.Suppression)))
                    .OrderBy(hero => hero.Health)
                    .FirstOrDefault();
                if (targ != null)
                {
                    W.Cast(targ);
                }
            }
            if (config.Item("singedFlee", true).GetValue <KeyBind>().Active)
            {
                Orbwalking.MoveTo(Game.CursorPos);
                CastQ();
            }
            if (config.Item("alternateComboKey", true).GetValue <KeyBind>().Active&&
                orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None)
            {
                Orbwalking.Attack = false;
                TurnOffQ();
                Combo();
                Orbwalking.MoveTo(Game.CursorPos, 60);
            }
        }
Exemple #41
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (isDodging)
     {
         args.Process = false; //Block orbwalking
     }
 }
Exemple #42
0
        private void Combo()
        {
            AIHeroClient target = DrawHelper.GetBetterTarget(W.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            if (config.Item("RunFOTT", true).GetValue <bool>() &&
                (!config.Item("RunFOTTHP", true).GetValue <bool>() ||
                 (config.Item("RunFOTTHP", true).GetValue <bool>() && player.Health > target.Health)))
            {
                Vector3 pos;
                if (target.IsMoving)
                {
                    var rand = new Random();
                    if (ChaseFix)
                    {
                        pos = target.Position.Extend(
                            Prediction.GetPrediction(target, 0.6f).UnitPosition, rand.Next(480, 550));
                    }
                    else
                    {
                        var positions = CombatHelper.PointsAroundTheTargetOuterRing(target.ServerPosition, 130, 16);
                        pos = positions[rand.Next(positions.Count)];
                    }
                    if (player.Distance(pos) < 90)
                    {
                        if (!ChaseFix)
                        {
                            ChaseFix = true;
                        }
                        else
                        {
                            ChaseFix = false;
                        }
                    }
                }
                else
                {
                    pos = Vector3.Zero;
                }
                if (Orbwalking.CanMove(100))
                {
                    if (player.Distance(pos) > 40 && pos.IsValid())
                    {
                        Orbwalking.Move   = false;
                        Orbwalking.Attack = false;
                        EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, pos);
                    }
                }
            }
            var qTarget =
                HeroManager.Enemies.FirstOrDefault(
                    enemy =>
                    enemy.IsValidTarget() && enemy.Distance(player) < 200 &&
                    CombatHelper.IsFacing(enemy, player.Position, 90f) &&
                    !CombatHelper.IsFacing(player, enemy.Position, 90f) && player.IsMoving && enemy.IsMoving);

            if (config.Item("useq", true).GetValue <bool>() &&
                (qTarget != null || target.HasBuff("poisontrailtarget") || player.Distance(target) <= 500))
            {
                CastQ();
            }
            if (config.Item("usew", true).GetValue <bool>() && !config.Item("WwithE", true).GetValue <bool>() &&
                W.IsReady() && W.CanCast(target))
            {
                var tarPered = W.GetPrediction(target);
                if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position) &&
                    tarPered.Hitchance >= HitChance.VeryHigh)
                {
                    W.Cast(tarPered.CastPosition);
                }
            }
            if (R.IsReady() && config.Item("user", true).GetValue <bool>() &&
                (((config.Item("rUnderHealt", true).GetValue <Slider>().Value > player.HealthPercent &&
                   0 < player.CountEnemiesInRange(750)) ||
                  config.Item("rMinEnemy", true).GetValue <Slider>().Value <= player.CountEnemiesInRange(750)) &&
                 (!config.Item("rkeepManaE", true).GetValue <bool>() ||
                  (config.Item("rkeepManaE", true).GetValue <bool>() &&
                   player.Mana - R.Instance.SData.Mana > E.Instance.SData.Mana))))
            {
                R.Cast();
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() && ignitedmg > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            var blockOrb = false;
            var throwPos = target.Position.Extend(player.Position, 500);

            if (config.Item("usee", true).GetValue <bool>() && E.IsReady() &&
                ((throwPos.CountAlliesInRange(700) > target.CountAlliesInRange(700) &&
                  HeroManager.Allies.FirstOrDefault(a => a.Distance(throwPos) < 700 && a.HealthPercent < 25) == null) ||
                 W.GetDamage(target) > target.Health || !target.HasBuff("poisontrailtarget") ||
                 config.Item("WwithE", true).GetValue <bool>()))
            {
                var pos = Prediction.GetPrediction(target, W.Delay / 2)
                          .UnitPosition.Extend(player.Position, 515 + player.Distance(target.Position));
                if (config.Item("WwithE", true).GetValue <bool>() && E.CanCast(target) && W.IsReady() &&
                    player.Mana > E.Instance.SData.Mana + W.Instance.SData.Mana + 15 && !pos.IsWall() &&
                    target.Health > E.GetDamage(target) + Q.GetDamage(target))
                {
                    W.Cast(pos);
                    return;
                }
                if (E.CanCast(target))
                {
                    E.CastOnUnit(target);
                }
                else if (target.Distance(player) < E.Range + 100)
                {
                    blockOrb = true;
                }
            }
            if (blockOrb)
            {
                Orbwalking.Attack = false;
            }
        }
Exemple #43
0
 private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (W.IsReady() && args.Target.Type == GameObjectType.obj_AI_Hero && !WFIRST && Player.HealthPercent < 95)
     {
         W.Cast();
     }
 }
Exemple #44
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.GetBoolValue("Attack Minion For Chasing"))
                        {
                            if (MenuProvider.Orbwalker.GetTarget() == null)
                            {
                                if (
                                    !HeroManager.Enemies.Any(
                                        x => x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)))
                                {
                                    var minion =
                                        MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(null) + 65,
                                                                 MinionTypes.All, MinionTeam.NotAlly)
                                        .Where(x => x.IsValidTarget())
                                        .OrderBy(x => x.Distance(ObjectManager.Player))
                                        .FirstOrDefault();
                                    if (minion != null)
                                    {
                                        Orbwalking.Orbwalk(minion, Game.CursorPos, 0f);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.Spellbook.IsAutoAttacking)
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_q);
                                        if (target != null)
                                        {
                                            if (ObjectManager.Player.Mana - _qManaCost[_q.Level] >= 40)
                                            {
                                                _q.Cast(target);
                                            }
                                            else
                                            {
                                                var killableTarget =
                                                    HeroManager.Enemies.FirstOrDefault(
                                                        x =>
                                                        !Orbwalking.InAutoAttackRange(x) &&
                                                        x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                                   TargetSelector.DamageType.Physical, _q.Range) &&
                                                        _q.GetPrediction(x).Hitchance >= _q.MinHitChance);
                                                if (killableTarget != null)
                                                {
                                                    _q.Cast(killableTarget);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                foreach (var enemy in HeroManager.Enemies.Where(x =>
                                                                                HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                                                                x.IsKillableAndValidTarget(_e.GetDamage(x) - 30,
                                                                                                           TargetSelector.DamageType.Physical, _e.Range)))
                                {
                                    _e.Cast();
                                }
                            }
                        }


                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.Spellbook.IsAutoAttacking)
                                    {
                                        if (_q.IsReadyPerfectly())
                                        {
                                            var target = TargetSelector.GetTargetNoCollision(_q);
                                            if (target != null)
                                            {
                                                _q.Cast(target);
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Lane
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.Spellbook.IsAutoAttacking)
                                    {
                                        if (
                                            ObjectManager.Player.IsManaPercentOkay(
                                                MenuProvider.Champion.Laneclear.IfMana))
                                        {
                                            foreach (
                                                var killableMinion in
                                                MinionManager.GetMinions(_q.Range)
                                                .Where(
                                                    x =>
                                                    _q.GetPrediction(x).Hitchance >= _q.MinHitChance &&
                                                    x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                               TargetSelector.DamageType.Physical, _q.Range)))
                                            {
                                                var killableNumber = 0;

                                                var collisionMinions =
                                                    Collision.GetCollision(
                                                        new List <Vector3>
                                                    {
                                                        ObjectManager.Player.ServerPosition.Extend(
                                                            killableMinion.ServerPosition, _q.Range)
                                                    },
                                                        new PredictionInput
                                                    {
                                                        Unit              = ObjectManager.Player,
                                                        Delay             = _q.Delay,
                                                        Speed             = _q.Speed,
                                                        Radius            = _q.Width,
                                                        Range             = _q.Range,
                                                        CollisionObjects  = new[] { CollisionableObjects.Minions },
                                                        UseBoundingRadius = false
                                                    }
                                                        ).OrderBy(x => x.Distance(ObjectManager.Player));

                                                foreach (Obj_AI_Minion collisionMinion in collisionMinions)
                                                {
                                                    if (
                                                        collisionMinion.IsKillableAndValidTarget(
                                                            ObjectManager.Player.GetSpellDamage(collisionMinion,
                                                                                                SpellSlot.Q), TargetSelector.DamageType.Physical,
                                                            _q.Range))
                                                    {
                                                        killableNumber++;
                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }

                                                if (killableNumber >=
                                                    MenuProvider.Champion.Laneclear.GetSliderValue(
                                                        "Cast Q if Killable Minion Number >=").Value)
                                                {
                                                    if (!ObjectManager.Player.Spellbook.IsAutoAttacking)
                                                    {
                                                        _q.Cast(killableMinion.ServerPosition);
                                                        break;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range)
                                        .Count(
                                            x =>
                                            HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                            x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical)) >=
                                        MenuProvider.Champion.Laneclear.GetSliderValue(
                                            "Cast E if Killable Minion Number >=").Value)
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }

                        //Jugnle
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    var qTarget =
                                        MinionManager.GetMinions(_q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsValidTarget(_q.Range) &&
                                            _q.GetPrediction(x).Hitchance >= HitChance.High);

                                    if (qTarget != null)
                                    {
                                        _q.Cast(qTarget);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .Any(
                                            x =>
                                            HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                            x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical)))
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }

                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Use Killsteal (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            HeroManager.Enemies.Any(
                                x =>
                                HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                x.IsKillableAndValidTarget(_e.GetDamage(x) - 30, TargetSelector.DamageType.Physical,
                                                           _e.Range)))
                        {
                            _e.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Use Mobsteal (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.Neutral,
                                                     MinionOrderTypes.MaxHealth)
                            .Any(
                                x =>
                                HealthPrediction.GetHealthPrediction(x, 500) > 0 &&
                                x.IsKillableAndValidTarget(_e.GetDamage(x), TargetSelector.DamageType.Physical)))
                        {
                            _e.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto Steal Siege minion & Super minion (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            MinionManager.GetMinions(_e.Range)
                            .Any(
                                x =>
                                HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                x.IsKillableAndValidTarget(_e.GetDamage(x), TargetSelector.DamageType.Physical) &&
                                (x.CharData.BaseSkinName.ToLower().Contains("siege") ||
                                 x.CharData.BaseSkinName.ToLower().Contains("super"))))
                        {
                            _e.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto Balista Combo (With R)"))
                {
                    if (_r.IsReadyPerfectly())
                    {
                        var myBlitzcrank =
                            HeroManager.Allies.FirstOrDefault(
                                x => !x.IsDead && x.HasBuff("kalistacoopstrikeally") && x.ChampionName == "Blitzcrank");
                        if (myBlitzcrank != null)
                        {
                            var grabTarget =
                                HeroManager.Enemies.FirstOrDefault(x => !x.IsDead && x.HasBuff("rocketgrab2"));
                            if (grabTarget != null)
                            {
                                if (ObjectManager.Player.Distance(grabTarget) > myBlitzcrank.Distance(grabTarget))
                                {
                                    _r.Cast();
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto E Harass (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            !(MenuProvider.Champion.Misc.GetBoolValue("^ Don't do this in ComboMode") &&
                              MenuProvider.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo))
                        {
                            if (ObjectManager.Player.Mana - _e.ManaCost >= _e.ManaCost)
                            {
                                if (HeroManager.Enemies.Any(x => x.IsValidTarget(_e.Range) && _e.GetDamage(x) > 10))
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.NotAlly)
                                        .Any(
                                            x =>
                                            HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                            x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical, _e.Range)))
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto W on Dragon or Baron (With W)"))
                {
                    if (ObjectManager.Player.IsManaPercentOkay(50))
                    {
                        if (!ObjectManager.Player.IsRecalling())
                        {
                            if (ObjectManager.Player.Position.CountEnemiesInRange(1500f) <= 0)
                            {
                                if (MenuProvider.Orbwalker.GetTarget() == null)
                                {
                                    if (_w.IsReadyPerfectly())
                                    {
                                        if (ObjectManager.Player.Distance(_baronLocation) <= _w.Range)
                                        {
                                            _w.Cast(_baronLocation);
                                        }
                                    }

                                    if (_w.IsReadyPerfectly())
                                    {
                                        if (ObjectManager.Player.Distance(_dragonLocation) <= _w.Range)
                                        {
                                            _w.Cast(_dragonLocation);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetKeyBindValue("Cast W on Dragon").Active)
                {
                    if (_w.IsReadyPerfectly())
                    {
                        if (ObjectManager.Player.Distance(_dragonLocation) <= _w.Range)
                        {
                            _w.Cast(_dragonLocation);
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetKeyBindValue("Cast W on Baron").Active)
                {
                    if (_w.IsReadyPerfectly())
                    {
                        if (ObjectManager.Player.Distance(_baronLocation) <= _w.Range)
                        {
                            _w.Cast(_baronLocation);
                        }
                    }
                }
            }
        }
Exemple #45
0
 private static void OrbwalkingOnBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Target.Type == GameObjectType.obj_AI_Hero)
     {
         args.Process = AttacksEnabled;
     }
     else
         args.Process = true;
 }
Exemple #46
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (!Orbwalking.CanMove(100))
            {
                return;
            }

            //Update Q range depending on level; 600 + 5 × ( Tristana's level - 1)/* dont waste your Q for only 1 or 2 hits. */
            //Update E and R range depending on level; 630 + 9 × ( Tristana's level - 1)
            Q.Range = 600 + 5 * (ObjectManager.Player.Level - 1);
            E.Range = 630 + 9 * (ObjectManager.Player.Level - 1);
            R.Range = 630 + 9 * (ObjectManager.Player.Level - 1);

            if (GetValue <KeyBind>("UseETH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                var eTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Physical);
                if (E.IsReady() && eTarget.IsValidTarget())
                {
                    E.CastOnUnit(eTarget);
                }
            }

            if (ComboActive || HarassActive)
            {
                var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

                if (useE)
                {
                    var eTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Physical);
                    if (E.IsReady() && eTarget.IsValidTarget())
                    {
                        E.CastOnUnit(eTarget);
                    }
                }

                if (Dfg.IsReady())
                {
                    var eTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Magical);
                    Dfg.Cast(eTarget);
                }
            }

            //Killsteal
            if (!ComboActive || !GetValue <bool>("UseRM") || !R.IsReady())
            {
                return;
            }
            foreach (
                var hero in
                ObjectManager.Get <Obj_AI_Hero>()
                .Where(
                    hero =>
                    hero.IsValidTarget(R.Range) &&
                    ObjectManager.Player.GetSpellDamage(hero, SpellSlot.R) - 50 > hero.Health))
            {
                R.CastOnUnit(hero);
            }
        }
Exemple #47
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (Config.Item("Muramana").GetValue<bool>())
     {
         int Mur = Items.HasItem(Muramana) ? 3042 : 3043;
         if (Items.HasItem(Mur) && args.Target.IsEnemy && args.Target.IsValid<Obj_AI_Hero>() && Items.CanUseItem(Mur) && Player.Mana > Player.MaxMana * 0.3)
         {
             if (!ObjectManager.Player.HasBuff("Muramana"))
                 Items.UseItem(Mur);
         }
         else if (ObjectManager.Player.HasBuff("Muramana") && Items.HasItem(Mur) && Items.CanUseItem(Mur))
             Items.UseItem(Mur);
     }
 }
Exemple #48
0
        private static void Farm(bool laneClear)
        {
            if (!Config.Item("EnabledFarm").GetValue <bool>())
            {
                return;
            }

            if (Player.ManaPercent < Config.Item("Lane.Mana").GetValue <Slider>().Value)
            {
                return;
            }
            if (!Orbwalking.CanMove(40))
            {
                return;
            }

            var rangedMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + Q.Width + 30, MinionTypes.Ranged);
            var allMinionsQ    = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + Q.Width + 30);
            var rangedMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width + 30, MinionTypes.Ranged);
            var allMinionsW    = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width + 30);

            var useQi = Config.Item("UseQFarm").GetValue <StringList>().SelectedIndex;
            var useWi = Config.Item("UseWFarm").GetValue <StringList>().SelectedIndex;
            var useQ  = (laneClear && (useQi == 1 || useQi == 2)) || (!laneClear && (useQi == 0 || useQi == 2));
            var useW  = (laneClear && (useWi == 1 || useWi == 2)) || (!laneClear && (useWi == 0 || useWi == 2));

            if (useQ && Q.IsReady())
            {
                if (laneClear)
                {
                    var fl1 = Q.GetCircularFarmLocation(rangedMinionsQ, Q.Width);
                    var fl2 = Q.GetCircularFarmLocation(allMinionsQ, Q.Width);

                    if (fl1.MinionsHit >= 3)
                    {
                        Q.Cast(fl1.Position);
                    }

                    else if (fl2.MinionsHit >= 2 || allMinionsQ.Count == 1)
                    {
                        Q.Cast(fl2.Position);
                    }
                }
                else
                {
                    foreach (
                        var minion in
                        allMinionsQ.Where(
                            minion =>
                            !Orbwalking.InAutoAttackRange(minion) && minion.Health < 0.75 * Q.GetDamage(minion)))
                    {
                        Q.Cast(minion);
                    }
                }
            }

            if (useW && W.IsReady() && allMinionsW.Count > 3)
            {
                if (laneClear)
                {
                    if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1)
                    {
                        //WObject
                        var gObjectPos = GetGrabableObjectPos(false);

                        if (gObjectPos.To2D().IsValid() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 150)
                        {
                            W.Cast(gObjectPos);
                        }
                    }
                    else if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1)
                    {
                        var fl1 = Q.GetCircularFarmLocation(rangedMinionsW, W.Width);
                        var fl2 = Q.GetCircularFarmLocation(allMinionsW, W.Width);

                        if (fl1.MinionsHit >= 3 && W.IsInRange(fl1.Position.To3D()))
                        {
                            W.Cast(fl1.Position);
                        }

                        else if (fl2.MinionsHit >= 1 && W.IsInRange(fl2.Position.To3D()) && fl1.MinionsHit <= 2)
                        {
                            W.Cast(fl2.Position);
                        }
                    }
                }
            }
        }
Exemple #49
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     attackNow = false;
 }
Exemple #50
0
        private static void ExecuteJungleMode()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                return;
            }

            var mobs = MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                Orbwalking.GetRealAutoAttackRange(null) + 65, MinionTypes.All, MinionTeam.Neutral,
                                                MinionOrderTypes.MaxHealth);

            if (mobs.Count <= 0)
            {
                return;
            }

            var mob = mobs[0];

            if (Modes.ModeJungle.MenuLocal["Jungle.Item"].Cast <ComboBox>().CurrentValue == 1)
            {
                foreach (var item in from item in ItemDb
                         where
                         item.Value.ItemType == EnumItemType.AoE &&
                         item.Value.TargetingType == EnumItemTargettingType.EnemyObjects
                         let iMinions =
                             MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                      Orbwalking.GetRealAutoAttackRange(null) + 65, MinionTypes.All, MinionTeam.Neutral,
                                                      MinionOrderTypes.MaxHealth)
                             where
                             item.Value.Item.IsReady() &&
                             (iMinions.Count() >= 2 || CommonManaManager.GetMobType(iMinions[0]) == CommonManaManager.MobTypes.Blue ||
                              CommonManaManager.GetMobType(iMinions[0]) == CommonManaManager.MobTypes.Red ||
                              CommonManaManager.GetMobType(iMinions[0]) == CommonManaManager.MobTypes.Baron ||
                              CommonManaManager.GetMobType(iMinions[0]) == CommonManaManager.MobTypes.Dragon)
                             select item)
                {
                    item.Value.Item.Cast();
                }
            }


            if (Youmuu.IsReady() && mob.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 65))
            {
                var youmuuBaron = Modes.ModeJungle.MenuLocal["Jungle.Youmuu.BaronDragon"].Cast <ComboBox>().CurrentValue;
                var youmuuRed   = Modes.ModeJungle.MenuLocal["Jungle.Youmuu.BlueRed"].Cast <ComboBox>().CurrentValue;

                if (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Dragon && (youmuuBaron == 1 || youmuuBaron == 3))
                {
                    Youmuu.Cast();
                }

                if (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Baron && (youmuuBaron == 2 || youmuuBaron == 3))
                {
                    Youmuu.Cast();
                }

                if (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Red && (youmuuRed == 1 || youmuuRed == 3))
                {
                    Youmuu.Cast();
                }

                if (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Blue && (youmuuRed == 2 || youmuuRed == 3))
                {
                    Youmuu.Cast();
                }

                //if ((CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Dragon && (youmuuBaron == 1 || youmuuBaron == 3))
                //    ||
                //    (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Baron && (youmuuBaron == 2 || youmuuBaron == 3))
                //    || (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Red && (youmuuRed == 1 || youmuuBaron == 3))
                //    ||
                //    (CommonManaManager.GetMobType(mob) == CommonManaManager.MobTypes.Blue && (youmuuRed == 2 || youmuuBaron == 3)))
                //{
                //    Youmuu.Cast();
                //}
            }
        }
Exemple #51
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (E.IsReady() && args.Target.IsValid<Obj_AI_Hero>() && Config.Item("autoE", true).GetValue<bool>())
         E.Cast();
 }
Exemple #52
0
        private static void OnDraw(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Config.DrawQ && Spells._q.IsReadyPerfectly())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Spells._q.Range, System.Drawing.Color.CornflowerBlue);
                }

                if (Config.DrawR && Spells._r.IsReadyPerfectly())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Spells._r.Range, System.Drawing.Color.PaleGreen);
                }

                if (Config.DrawRotate)
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) + Config.RotateRange, System.Drawing.Color.BlueViolet);
                }

                if (Config.DrawLock)
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) + Config.RotateLock, System.Drawing.Color.LightSteelBlue);
                }

                #region Timers

                if (HasACard != "empty")
                {
                    if (HasGold)
                    {
                        var buffG        = ObjectManager.Player.GetBuff("goldcardpreattack");
                        var timeLastG    = (buffG.EndTime - Game.Time);
                        var timeLastGInt = (int)Math.Round(timeLastG, MidpointRounding.ToEven);

                        drawText("Gold Ready: " + timeLastGInt + " s", ObjectManager.Player.Position, System.Drawing.Color.LightGreen, -75);
                    }
                    else if (HasBlue)
                    {
                        var buffB        = ObjectManager.Player.GetBuff("bluecardpreattack");
                        var timeLastB    = (buffB.EndTime - Game.Time);
                        var timeLastBInt = (int)Math.Round(timeLastB, MidpointRounding.ToEven);

                        drawText("Blue Ready: " + timeLastBInt + " s", ObjectManager.Player.Position, System.Drawing.Color.LightGreen, -75);
                    }
                    else
                    {
                        var buffR        = ObjectManager.Player.GetBuff("redcardpreattack");
                        var timeLastR    = (buffR.EndTime - Game.Time);
                        var timeLastRInt = (int)Math.Round(timeLastR, MidpointRounding.ToEven);

                        drawText("Red Ready: " + timeLastRInt + " s", ObjectManager.Player.Position, System.Drawing.Color.LightGreen, -75);
                    }
                }

                if (UltEnabled)
                {
                    var buffUlt        = ObjectManager.Player.GetBuff("destiny_marker");
                    var timeLastUlt    = (buffUlt.EndTime - Game.Time);
                    var timeLastUltInt = (int)Math.Round(timeLastUlt, MidpointRounding.ToEven);
                    drawText(timeLastUltInt + " s to TP!", ObjectManager.Player.Position, System.Drawing.Color.LightGoldenrodYellow, -45);
                }

                #endregion

                if (Spells._r.IsReadyPerfectly())
                {
                    var target = TargetSelector.GetTarget(Spells._r.Range, Spells._q.DamageType);

                    if (target.IsValidTarget())
                    {
                        var comboDMG = Spells._q.GetDamage(target) + Spells._w.GetDamage(target) + ObjectManager.Player.GetAutoAttackDamage(target) * 3;

                        if (comboDMG > target.Health)
                        {
                            drawText("You should check: " + target.ChampionName, ObjectManager.Player.Position, System.Drawing.Color.LightGoldenrodYellow, 20);
                        }
                    }
                }
            }
        }
Exemple #53
0
        private static void OrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Target is Obj_AI_Hero && args.Target.IsValidTarget())
            {
                if (Ferocity <= 4 && Orbwalking.InAutoAttackRange(args.Target))
                {
                    spells[Spells.Q].Cast();
                }

                if (Ferocity == 5 && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo
                    && Orbwalking.InAutoAttackRange(args.Target))
                {
                    spells[Spells.Q].Cast();
                }

                if (Ferocity == 5 && HasPassive && spells[Spells.Q].IsReady()
                    && IsListActive("Combo.Prio").SelectedIndex == 2)
                {
                    //Console.WriteLine("Before jump");
                    spells[Spells.Q].Cast();
                }
            }
        }
Exemple #54
0
        private static void OnUpdate(EventArgs args)
        {
            if (((Menu.Item("ComboMovement").GetValue <bool>() && Menu.Item("ComboKey").GetValue <KeyBind>().Active) ||
                 (Menu.Item("MixedMovement").GetValue <bool>() && Menu.Item("MixedKey").GetValue <KeyBind>().Active) ||
                 (Menu.Item("LaneClearMovement").GetValue <bool>() && Menu.Item("LaneClearKey").GetValue <KeyBind>().Active) ||
                 (Menu.Item("LastHitMovement").GetValue <bool>() && Menu.Item("LastHitKey").GetValue <KeyBind>().Active)) && !Orbwalking.Move)
            {
                Orbwalking.Move = true;
            }
            else
            {
                if (Orbwalking.Move)
                {
                    Orbwalking.Move = false;
                }
            }

            if (GetWhenOnRange)
            {
                if (LastTarget == null || !LastTarget.IsValid || !(LastTarget is Obj_AI_Base) || LastTarget.IsDead)
                {
                    GetWhenOnRange = false;
                }
                else
                {
                    if (Orbwalking.InAutoAttackRange((AttackableUnit)LastTarget))
                    {
                        GetWhenOnRange  = false;
                        AttackOnRange   = true;
                        LastAttackOrder = Environment.TickCount;
                    }
                }
            }

            if (AttackOrder && Environment.TickCount - LastAttackOrder >= 100 + Game.Ping * 1.5)
            {
                AttackOrder = false;
            }

            if (BufferAttack && (Environment.TickCount - BufferAttackTimer >= 1000 || (BufferTarget == null || BufferTarget.IsDead)))
            {
                BufferAttack = false;
            }

            if (Player.Spellbook.IsCastingSpell && !Player.Spellbook.IsAutoAttacking && (!AttackOrder || JustAttacked))
            {
                AttackOrder   = false;
                JustAttacked  = false;
                AttackOnRange = false;
            }

            if (LastTarget == null || !LastTarget.IsValid || LastTarget.IsDead)
            {
                if (AttackOrder || JustAttacked)
                {
                    AttackOrder   = false;
                    JustAttacked  = false;
                    AttackOnRange = false;
                }
            }

            if (CanMove())
            {
                if (JustAttacked)
                {
                    JustAttacked  = false;
                    IssueOrder    = false;
                    AttackOnRange = false;
                    if (Menu.Item("debug").GetValue <bool>())
                    {
                        Console.WriteLine("OnCastDone - Delay: " + (Environment.TickCount - LastAttack) + "ms");
                    }
                }
                else
                {
                    JustAttacked = false;
                    AttackOrder  = false;
                }
                if (!Player.Spellbook.IsChanneling)
                {
                    if (BufferMovement)
                    {
                        Player.IssueOrder(GameObjectOrder.MoveTo, BufferPosition, true);
                    }
                    BufferMovement = false;
                }

                if (MissileLaunched)
                {
                    MissileLaunched = false;
                }
            }
            else
            {
                if (Menu.Item("BlockOrder").GetValue <bool>())
                {
                    ShouldBlock = true;
                }
                else
                {
                    ShouldBlock = false;
                }
            }

            if (Orbwalking.CanAttack())
            {
                if (Orbwalking.Attack && BufferAttack && BufferTarget != null && BufferTarget.IsValid && Orbwalking.InAutoAttackRange((AttackableUnit)BufferTarget))
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, BufferTarget, true);
                }
                BufferAttack = false;
            }
        }
Exemple #55
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (W.IsReady() && Config.Item("autoW", true).GetValue<bool>() && Range && args.Target is Obj_AI_Hero)
     {
         if(Program.Combo)
             W.Cast();
         else if (args.Target.Position.Distance(Player.Position)< 500)
             W.Cast();
     }
 }
Exemple #56
0
        private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args)
        {
            if (sender == null || !sender.IsValid || !sender.IsMe)
            {
                return;
            }

            if (args.Order == GameObjectOrder.AttackTo || args.Order == GameObjectOrder.AttackUnit ||
                args.Order == GameObjectOrder.AutoAttack || args.IsAttackMove)
            {
                if (Menu.Item("BufferAttack").GetValue <bool>() && !Orbwalking.CanAttack() && CanMove() && Orbwalking.Attack)
                {
                    if (args.Target != null && args.Target.IsValid && args.Target is GameObject)
                    {
                        BufferAttack      = true;
                        BufferTarget      = args.Target;
                        BufferAttackTimer = Environment.TickCount;
                    }

                    if (args.IsAttackMove)
                    {
                        if (Menu.Item("BufferMovement").GetValue <bool>() && args.Order == GameObjectOrder.MoveTo)
                        {
                            BufferMovement = true;
                            BufferPosition = args.TargetPosition;
                        }
                    }
                    args.Process = false;
                    return;
                }


                if ((AttackOrder || JustAttacked) && ShouldBlock)
                {
                    args.Process = false;
                    return;
                }

                AttackOnRange = false;

                if (Orbwalking.Move)
                {
                    if (args.Target != null && args.Target.IsValid && args.Target is GameObject && Orbwalking.InAutoAttackRange((AttackableUnit)args.Target))
                    {
                        LastAttackOrder = Environment.TickCount;
                        AttackOrder     = true;
                        LastTarget      = args.Target;
                        AttackOnRange   = true;
                        return;
                    }
                    else
                    {
                        args.Process = false;
                        return;
                    }
                }
                else
                {
                    if (args.Target != null && args.Target.IsValid && args.Target is GameObject)
                    {
                        if (Orbwalking.InAutoAttackRange((AttackableUnit)args.Target))
                        {
                            LastAttackOrder = Environment.TickCount;
                            AttackOrder     = true;
                            LastTarget      = args.Target;
                            AttackOnRange   = true;
                            return;
                        }
                        else
                        {
                            LastTarget     = args.Target;
                            GetWhenOnRange = true;
                        }
                    }
                }
            }



            if (args.Order == GameObjectOrder.MoveTo && ((AttackOrder && Environment.TickCount - LastAttackOrder > 0) || JustAttacked) &&
                !Player.CharData.BaseSkinName.Contains("Kalista") && ShouldBlock)
            {
                args.Process = false;
                if (Menu.Item("BufferMovement").GetValue <bool>())
                {
                    BufferMovement = true;
                    BufferPosition = args.TargetPosition;
                }
                return;
            }

            if (!IssueOrder && args.Order == GameObjectOrder.MoveTo && Menu.Item("debug").GetValue <bool>() && args.Process)
            {
                Console.WriteLine("Movement - Delay: " + (Environment.TickCount - LastAttack) + "ms");
            }
            IssueOrder = true;
        }
Exemple #57
0
 private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Unit.IsMe)
     {
         switch (MenuProvider.Orbwalker.ActiveMode)
         {
             case Orbwalking.OrbwalkingMode.Combo:
                 var Item = ActiveItemList.FirstOrDefault(x => Menu.Item("Offensive.Use" + x.ID).GetValue<bool>() && x.When.Contains(When.BeforeAttack) && Items.CanUseItem((int)x.ID) && args.Target.IsValidTarget(x.Range) && ObjectManager.Player.ManaPercent <= x.MinMyHP && args.Target.ManaPercent <= x.MinTargetHP);
                 if (Item != null)
                     Items.UseItem((int)Item.ID, Item.isTargeted ? args.Target as Obj_AI_Base : null);
                 break;
         }
     }
 }
Exemple #58
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.getBoolValue("Attack Minion For Chasing"))
                        {
                            if (MenuProvider.Orbwalker.GetTarget() == null)
                            {
                                if (!HeroManager.Enemies.Any(x => x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)))
                                {
                                    var Minion = MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(null) + 65, MinionTypes.All, MinionTeam.NotAlly).OrderBy(x => x.Distance(ObjectManager.Player)).FirstOrDefault();
                                    if (Minion != null)
                                    {
                                        Orbwalking.Orbwalk(Minion, Game.CursorPos, 0f);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.IsWindingUp)
                                    {
                                        var Target = TargetSelector.GetTargetNoCollision(Q);
                                        if (Target != null)
                                        {
                                            if (ObjectManager.Player.Mana - KalistaQManaCost[Q.Level] > 40)
                                            {
                                                Q.Cast(Target);
                                            }
                                            else
                                            {
                                                var killableTarget = HeroManager.Enemies.FirstOrDefault(x => !Orbwalking.InAutoAttackRange(x) && x.isKillableAndValidTarget(Q.GetDamage(x), TargetSelector.DamageType.Physical, Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                                                if (killableTarget != null)
                                                {
                                                    Q.Cast(killableTarget);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                if (HeroManager.Enemies.Any(x => HealthPrediction.GetHealthPrediction(x, 250) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical, E.Range)))
                                {
                                    E.Cast();
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.IsWindingUp)
                                    {
                                        if (Q.isReadyPerfectly())
                                        {
                                            Q.CastOnBestTarget();
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Lane
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.IsWindingUp)
                                    {
                                        if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                        {
                                            foreach (var KillableMinion in MinionManager.GetMinions(Q.Range).Where(x => Q.GetPrediction(x).Hitchance >= Q.MinHitChance && x.isKillableAndValidTarget(Q.GetDamage(x), TargetSelector.DamageType.Physical, Q.Range)))
                                            {
                                                int killableNumber = 0;

                                                var CollisionMinions =
                                                    LeagueSharp.Common.Collision.GetCollision(new List <Vector3> {
                                                        ObjectManager.Player.ServerPosition.Extend(KillableMinion.ServerPosition, Q.Range)
                                                    },
                                                                                              new PredictionInput
                                                    {
                                                        Unit              = ObjectManager.Player,
                                                        Delay             = Q.Delay,
                                                        Speed             = Q.Speed,
                                                        Radius            = Q.Width,
                                                        Range             = Q.Range,
                                                        CollisionObjects  = new CollisionableObjects[] { CollisionableObjects.Minions },
                                                        UseBoundingRadius = false
                                                    }
                                                                                              ).OrderBy(x => x.Distance(ObjectManager.Player));

                                                foreach (Obj_AI_Minion CollisionMinion in CollisionMinions)
                                                {
                                                    if (CollisionMinion.isKillableAndValidTarget(Damage.GetSpellDamage(ObjectManager.Player, CollisionMinion, SpellSlot.Q), TargetSelector.DamageType.Physical, Q.Range))
                                                    {
                                                        killableNumber++;
                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }

                                                if (killableNumber >= MenuProvider.Champion.Laneclear.getSliderValue("Cast Q if Killable Minion Number >=").Value)
                                                {
                                                    if (!ObjectManager.Player.IsWindingUp)
                                                    {
                                                        Q.Cast(KillableMinion.ServerPosition);
                                                        break;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                {
                                    if (MinionManager.GetMinions(E.Range).Count(x => HealthPrediction.GetHealthPrediction(x, 250) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical)) >= MenuProvider.Champion.Laneclear.getSliderValue("Cast E if Killable Minion Number >=").Value)
                                    {
                                        E.Cast();
                                    }
                                }
                            }
                        }

                        //Jugnle
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    var QTarget = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= HitChance.High);

                                    if (QTarget != null)
                                    {
                                        Q.Cast(QTarget);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    if (MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).Any(x => HealthPrediction.GetHealthPrediction(x, 250) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical)))
                                    {
                                        E.Cast();
                                    }
                                }
                            }
                        }

                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Use Killsteal (With E)"))
                {
                    if (E.isReadyPerfectly())
                    {
                        if (HeroManager.Enemies.Any(x => HealthPrediction.GetHealthPrediction(x, 250) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical, E.Range)))
                        {
                            E.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Use Mobsteal (With E)"))
                {
                    if (E.isReadyPerfectly())
                    {
                        if (MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).Any(x => HealthPrediction.GetHealthPrediction(x, 500) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical)))
                        {
                            E.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Auto Steal Siege minion & Super minion (With E)"))
                {
                    if (E.isReadyPerfectly())
                    {
                        if (MinionManager.GetMinions(E.Range).Any(x => HealthPrediction.GetHealthPrediction(x, 250) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical) && (x.CharData.BaseSkinName.ToLower().Contains("siege") || x.CharData.BaseSkinName.ToLower().Contains("super"))))
                        {
                            E.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Auto Balista Combo (With R)"))
                {
                    if (R.isReadyPerfectly())
                    {
                        var MyBlitzcrank = HeroManager.Allies.FirstOrDefault(x => !x.IsDead && x.HasBuff("kalistacoopstrikeally") && x.ChampionName == "Blitzcrank");
                        if (MyBlitzcrank != null)
                        {
                            var GrabTarget = HeroManager.Enemies.FirstOrDefault(x => !x.IsDead && x.HasBuff("rocketgrab2"));
                            if (GrabTarget != null)
                            {
                                if (ObjectManager.Player.Distance(GrabTarget) > MyBlitzcrank.Distance(GrabTarget))
                                {
                                    R.Cast();
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Auto E Harass (With E)"))
                {
                    if (E.isReadyPerfectly())
                    {
                        if (!(MenuProvider.Champion.Misc.getBoolValue("^ Don't do this in ComboMode") && MenuProvider.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo))
                        {
                            if (ObjectManager.Player.Mana - E.ManaCost >= E.ManaCost)
                            {
                                if (HeroManager.Enemies.Any(x => x.IsValidTarget(E.Range) && E.GetDamage(x) > 10))
                                {
                                    if (MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly).Any(x => HealthPrediction.GetHealthPrediction(x, 250) > 0 && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical, E.Range)))
                                    {
                                        E.Cast();
                                    }
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Auto W on Dragon or Baron (With W)"))
                {
                    if (ObjectManager.Player.isManaPercentOkay(50))
                    {
                        if (!ObjectManager.Player.IsRecalling())
                        {
                            if (ObjectManager.Player.Position.CountEnemiesInRange(1500f) <= 0)
                            {
                                if (MenuProvider.Orbwalker.GetTarget() == null)
                                {
                                    if (W.isReadyPerfectly())
                                    {
                                        if (ObjectManager.Player.Distance(BaronLocation) <= W.Range)
                                        {
                                            W.Cast(BaronLocation);
                                        }
                                    }

                                    if (W.isReadyPerfectly())
                                    {
                                        if (ObjectManager.Player.Distance(DragonLocation) <= W.Range)
                                        {
                                            W.Cast(DragonLocation);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getKeyBindValue("Cast W on Dragon").Active)
                {
                    if (W.isReadyPerfectly())
                    {
                        if (ObjectManager.Player.Distance(DragonLocation) <= W.Range)
                        {
                            W.Cast(DragonLocation);
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getKeyBindValue("Cast W on Baron").Active)
                {
                    if (W.isReadyPerfectly())
                    {
                        if (ObjectManager.Player.Distance(BaronLocation) <= W.Range)
                        {
                            W.Cast(BaronLocation);
                        }
                    }
                }
            }
        }
Exemple #59
0
        private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (Config.Item("TsAa").GetValue<StringList>().SelectedIndex != 0 || !Config.Item("extraFocus").GetValue<bool>() || !Program.Combo)
            {
                DrawInfo = null;
                return;
            }

            if (args.Target is Obj_AI_Hero )
            {
                var newTarget = (Obj_AI_Hero)args.Target;
                var forceFocusEnemy = newTarget;
               // if (newTarget.Health / Player.GetAutoAttackDamage(newTarget) > FocusTarget.Health / Player.GetAutoAttackDamage(FocusTarget))
                {

                }
               // else
                {
                    var aaRange = Player.AttackRange + Player.BoundingRadius + Config.Item("extraRang").GetValue<Slider>().Value;

                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(aaRange)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) + 1 < forceFocusEnemy.Health / Player.GetAutoAttackDamage(forceFocusEnemy))
                        {
                            forceFocusEnemy = enemy;
                        }
                    }
                }
                if(forceFocusEnemy.NetworkId != newTarget.NetworkId && Game.Time - LatFocusTime < Config.Item("extraTime").GetValue<Slider>().Value /1000)
                {
                    args.Process = false;
                    Program.debug("Focus: " + forceFocusEnemy.ChampionName);
                    DrawInfo = forceFocusEnemy;
                    return;
                }
            }
            DrawInfo = null;
        }
Exemple #60
0
 private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (Config.Item("辅助模式").GetValue<bool>()
         && GetAdc(Config.Item("辅助模式距离").GetValue<Slider>().Value) != null
         && (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || Orbwalker.ActiveMode== Orbwalking.OrbwalkingMode.LastHit || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear))
     {
         args.Process = false;
     }
 }