コード例 #1
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (Menu.Item("UseRHarass", true).GetValue <bool>() && R.IsReady())
            {
                Cast_R("Harass");
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseEHarass", true).GetValue <bool>() && E.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Physical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                var target = TargetSelector.GetTarget(Player.AttackRange + new[] { 130, 150, 170, 190, 210 }[W.Level - 1], TargetSelector.DamageType.Magical);

                if (target.IsValidTarget(Player.AttackRange + new[] { 90, 120, 150, 180, 210 }[W.Level - 1]))
                {
                    W.Cast();
                }
            }
        }
コード例 #2
0
ファイル: Urgot.cs プロジェクト: 47110572/LeagueSharp-16
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Physical);

            if (!target.IsValidTarget(Q2.Range))
            {
                return;
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                Cast_W(target);
            }

            if (Menu.Item("UseEHarass", true).GetValue <bool>() && E.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Physical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady())
            {
                if (Player.ServerPosition.Distance(target.ServerPosition) > E.Range || !E.IsReady() || !Menu.Item("ForceE", true).GetValue <bool>())
                {
                    Cast_Q(target);
                }
            }
        }
コード例 #3
0
        private void AutoQ()
        {
            var qDashing = Menu.Item("qImmo", true).GetValue <bool>();
            var qImmo    = Menu.Item("qDash", true).GetValue <bool>();

            if (!Q.IsReady())
            {
                return;
            }

            if (!qDashing && !qImmo)
            {
                return;
            }

            foreach (var target in ObjectManager.Get <AIHeroClient>().Where(x => x.IsValidTarget(Q.Range)))
            {
                if ((Q.GetPrediction(target).Hitchance == HitChance.Immobile || IsStunned(target)) && qImmo && Player.Distance(target.Position) < Q.Range)
                {
                    SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
                    return;
                }

                if (Q.GetPrediction(target).Hitchance == HitChance.Dashing && qDashing && Player.Distance(target.Position) < Q.Range)
                {
                    SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
                }
            }
        }
コード例 #4
0
ファイル: Chogath.cs プロジェクト: 47110572/LeagueSharp-16
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
                if (target.IsValidTarget(Q.Range))
                {
                    var pred = Prediction.GetPrediction(target, 625);

                    if (pred.Hitchance >= HitChance.VeryHigh && target.IsMoving)
                    {
                        Q.Cast(pred.UnitPosition);
                    }
                }
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }
        }
コード例 #5
0
ファイル: Syndra.cs プロジェクト: likai20161010/LeagueSharp
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (Menu.Item("UseQEHarass", true).GetValue <bool>())
            {
                Cast_QE();
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseEHarass", true).GetValue <bool>())
            {
                Cast_E();
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>())
            {
                Cast_W(true);
            }
        }
コード例 #6
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            var qTarget = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Magical);
            var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (Menu.Item("UseEHarass", true).GetValue <bool>() && eTarget != null && E.IsReady() && Player.Distance(eTarget.Position) < E.Range && ShouldE(eTarget))
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && qTarget != null && W.IsReady())
            {
                if (W.GetPrediction(qTarget).Hitchance > HitChance.High && Player.Distance(qTarget.Position) <= W.Width)
                {
                    W.Cast();
                }
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady() && qTarget != null)
            {
                CastQ();
            }
        }
コード例 #7
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                if (ShouldW())
                {
                    SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical,
                                                        HitChance.VeryHigh);
                }
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical,
                                                    HitChance.VeryHigh);
            }

            if (Menu.Item("UseEHarass", true).GetValue <bool>() && E.IsReady() && ESpell.ToggleState == 1 && HasManaForE("Harass") &&
                Utils.TickCount - E.LastCastAttemptT > 500)
            {
                var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

                if (!target.IsValidTarget(E.Range))
                {
                    return;
                }

                E.Cast();
            }
        }
コード例 #8
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            var target = TargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(Player), TargetSelector.DamageType.Physical);

            if (target.IsValidTarget())
            {
                if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady() &&
                    Player.ServerPosition.Distance(target.ServerPosition) < 550)
                {
                    var qMin = Menu.Item("Q_Min_Stack", true).GetValue <Slider>().Value;

                    if (qMin <= QStacks)
                    {
                        Q.Cast();
                    }
                }
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }
        }
コード例 #9
0
ファイル: Cassiopeia.cs プロジェクト: uio25371555/LSharp
        private void UseSpells(bool useQ, bool useW, bool useE, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            //items
            if (source == "Combo")
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (target.IsValidTarget(Q.Range))
                {
                    var dmg = GetComboDamage(target);
                    ItemManager.Target = target;

                    //see if killable
                    if (dmg > target.Health - 50)
                    {
                        ItemManager.KillableTarget = true;
                    }

                    ItemManager.UseTargetted = true;
                }
            }

            if (useR && R.IsReady())
            {
                Cast_R(source);
            }
            if (useE && E.IsReady())
            {
                Cast_E();
            }
            if (useQ && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source));
            }
            if (useW && W.IsReady())
            {
                if (menu.Item("OnlyWIfnotPoison", true).GetValue <bool>())
                {
                    var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);
                    if (target.IsValidTarget(W.Range))
                    {
                        if (!Q.IsReady() && QSuccessfullyCasted(target))
                        {
                            SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical,
                                                                HitChanceManager.GetWHitChance(source));
                        }
                    }
                }
                else
                {
                    SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetWHitChance(source));
                }
            }
        }
コード例 #10
0
        private void UseSpells(bool useQ, bool useW, bool useE, bool useR, bool useQe, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            var   qTarget = TargetSelector.GetTarget(650, TargetSelector.DamageType.Magical);
            float dmg     = 0;

            if (qTarget != null)
            {
                dmg += GetComboDamage(qTarget);
            }

            if (useR)
            {
                Cast_R();
            }

            if (useQe)
            {
                Cast_QE(source);
            }

            if (useQ)
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source));
            }

            if (useE)
            {
                Cast_E(source);
            }

            if (useW)
            {
                Cast_W(true, source);
            }

            //items
            if (source == "Combo")
            {
                var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);
                if (itemTarget != null)
                {
                    ItemManager.Target = itemTarget;

                    //see if killable
                    if (dmg > itemTarget.Health - 50)
                    {
                        ItemManager.KillableTarget = true;
                    }

                    ItemManager.UseTargetted = true;
                }
            }
        }
コード例 #11
0
        private void UseSpells(bool useQ, bool useW, bool useE, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (source == "Combo")
            {
                var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);
                if (itemTarget != null)
                {
                    ItemManager.Target = itemTarget;

                    float dmg = GetComboDamage(itemTarget);

                    //see if killable
                    if (dmg > itemTarget.Health - 50)
                    {
                        ItemManager.KillableTarget = true;
                    }

                    ItemManager.UseTargetted = true;
                }
            }

            //W
            if (useW && W.IsReady())
            {
                if (ShouldW())
                {
                    SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical,
                                                        HitChanceManager.GetWHitChance(source));
                }
            }

            //Q
            if (useQ && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical,
                                                    HitChanceManager.GetQHitChance(source));
            }

            //E
            if (useE && E.IsReady() && ESpell.ToggleState == 1 && HasManaForE(source) &&
                Utils.TickCount - E.LastCastAttemptT > 500)
            {
                var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

                if (!target.IsValidTarget(E.Range))
                {
                    return;
                }

                E.Cast();
            }
        }
コード例 #12
0
ファイル: Lucian.cs プロジェクト: Shades1325/RebornAIO
        private void Cast_W(string source)
        {
            if (!W.IsReady() || !PassiveCheck())
            {
                return;
            }

            SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetWHitChance(source));
        }
コード例 #13
0
ファイル: Urgot.cs プロジェクト: 47110572/LeagueSharp-16
 private void Cast_Q(Obj_AI_Hero target)
 {
     if (target.HasBuff("urgotcorrosivedebuff"))
     {
         Q2.Cast(target);
     }
     else
     {
         SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Physical, HitChance.VeryHigh);
     }
 }
コード例 #14
0
ファイル: Urgot.cs プロジェクト: manolin15/LSharp
 private void Cast_Q(Obj_AI_Hero target, string source)
 {
     if (target.HasBuff("urgotcorrosivedebuff", true))
     {
         Q2.Cast(target);
     }
     else
     {
         SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Physical, HitChanceManager.GetQHitChance(source));
     }
 }
コード例 #15
0
ファイル: Lissandra.cs プロジェクト: Shades1325/RebornAIO
        private void UseSpells(bool useQ, bool useW, bool useE, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            var qTarget = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Magical);
            var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            //E
            if (useE && eTarget != null && E.IsReady() && Player.Distance(eTarget.Position) < E.Range && ShouldE(eTarget))
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetEHitChance(source));
            }

            //R
            if (useR && qTarget != null && R.IsReady() && Player.Distance(qTarget.Position) < R.Range)
            {
                CastR(qTarget);
            }

            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);
                ItemManager.Target = itemTarget;

                //see if killable
                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            //W
            if (useW && qTarget != null && W.IsReady())
            {
                if (W.GetPrediction(qTarget).Hitchance > HitChance.High && Player.Distance(qTarget.Position) <= W.Width)
                {
                    W.Cast();
                }
            }

            //Q
            if (useQ && Q.IsReady() && qTarget != null)
            {
                CastQ(source);
            }
        }
コード例 #16
0
        private void UseSpells(bool useQ, bool useW, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana(source))
            {
                return;
            }

            var itemTarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);
                ItemManager.Target = itemTarget;

                //see if killable
                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (useQ && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
                if (target.IsValidTarget(Q.Range))
                {
                    var pred = Prediction.GetPrediction(target, 625);

                    if (pred.Hitchance >= HitChanceManager.GetQHitChance(source) && target.IsMoving)
                    {
                        Q.Cast(pred.UnitPosition);
                    }
                }
            }
            if (useW && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetWHitChance(source));
            }

            if (useR && R.IsReady())
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(GetRealRRange(x))))
                {
                    var dmg = GetComboDamage(enemy);
                    if (dmg > enemy.Health)
                    {
                        R.Cast(enemy);
                    }
                }
            }
        }
コード例 #17
0
ファイル: Ashe.cs プロジェクト: Shades1325/RebornAIO
        private void UseSpells(bool useQ, bool useW, bool useE, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (target.IsValidTarget(R.Range))
            {
                var dmg = GetComboDamage(target);

                if (useR && dmg > target.Health && Player.ServerPosition.Distance(target.ServerPosition) > menu.Item("R_Min_Range", true).GetValue <Slider>().Value)
                {
                    SpellCastManager.CastBasicSkillShot(R, R.Range, TargetSelector.DamageType.Physical, HitChanceManager.GetRHitChance(source));
                }

                if (Q.IsReady() && Player.ServerPosition.Distance(target.ServerPosition) < 550)
                {
                    var qMin = menu.Item("Q_Min_Stack", true).GetValue <Slider>().Value;

                    if (qMin <= QStacks)
                    {
                        Q.Cast();
                    }
                }
            }

            if (useW && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetWHitChance(source));
            }

            //items
            if (source == "Combo")
            {
                var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);
                if (itemTarget != null)
                {
                    var dmg = GetComboDamage(itemTarget);
                    ItemManager.Target = itemTarget;

                    //see if killable
                    if (dmg > itemTarget.Health - 50)
                    {
                        ItemManager.KillableTarget = true;
                    }

                    ItemManager.UseTargetted = true;
                }
            }
        }
コード例 #18
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            var dmg = GetComboDamage(target);

            if (Menu.Item("UseWHarass", true).GetValue <bool>())
            {
                if (Menu.Item("UseEHarass", true).GetValue <bool>())
                {
                    var pred = E.GetPrediction(target, true);

                    if (pred.Hitchance >= HitChance.VeryHigh && E.IsReady())
                    {
                        E.Cast(target);
                        Cast_W(pred.CastPosition);
                    }
                }

                if (Menu.Item("UseQHarass", true).GetValue <bool>())
                {
                    var pred = Q.GetPrediction(target);
                    if (pred.Hitchance >= HitChance.VeryHigh && pred.CastPosition.Distance(Player.ServerPosition) < Q.Range)
                    {
                        Q.Cast(pred.CastPosition);
                        Cast_W(pred.CastPosition);
                    }
                }
            }
            else
            {
                if (Menu.Item("UseQHarass", true).GetValue <bool>())
                {
                    SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
                }

                if (Menu.Item("UseEHarass", true).GetValue <bool>())
                {
                    SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
                }
            }
        }
コード例 #19
0
ファイル: Chogath.cs プロジェクト: 47110572/LeagueSharp-16
        private void Combo()
        {
            var itemTarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);
                ItemManager.Target = itemTarget;

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (Menu.Item("UseQCombo", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

                if (target.IsValidTarget(Q.Range))
                {
                    var pred = Prediction.GetPrediction(target, 625);

                    if (pred.Hitchance >= HitChance.VeryHigh && target.IsMoving)
                    {
                        Q.Cast(pred.UnitPosition);
                    }
                }
            }

            if (Menu.Item("UseWCombo", true).GetValue <bool>() && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseRCombo", true).GetValue <bool>() && R.IsReady())
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(GetRealRRange(x))))
                {
                    var dmg = GetComboDamage(enemy);
                    if (dmg > enemy.Health)
                    {
                        R.Cast(enemy);
                    }
                }
            }
        }
コード例 #20
0
ファイル: Syndra.cs プロジェクト: likai20161010/LeagueSharp
        private void Combo()
        {
            var   qTarget = TargetSelector.GetTarget(650, TargetSelector.DamageType.Magical);
            float dmg     = 0;

            if (qTarget != null)
            {
                dmg += GetComboDamage(qTarget);
            }

            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                ItemManager.Target = itemTarget;

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (Menu.Item("UseRCombo", true).GetValue <bool>())
            {
                Cast_R();
            }

            if (Menu.Item("UseQECombo", true).GetValue <bool>())
            {
                Cast_QE();
            }

            if (Menu.Item("UseQCombo", true).GetValue <bool>())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseECombo", true).GetValue <bool>())
            {
                Cast_E();
            }

            if (Menu.Item("UseWCombo", true).GetValue <bool>())
            {
                Cast_W(true);
            }
        }
コード例 #21
0
ファイル: Urgot.cs プロジェクト: manolin15/LSharp
        private void UseSpells(bool useQ, bool useW, bool useE, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Physical);

            if (!target.IsValidTarget(Q2.Range))
            {
                return;
            }

            //items
            if (source == "Combo")
            {
                var dmg = GetComboDamage(target);
                ItemManager.Target = target;

                //see if killable
                if (dmg > target.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (useR && R.IsReady())
            {
                Cast_R();
            }
            if (useW && W.IsReady())
            {
                Cast_W(target);
            }
            if (useE && E.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Physical, HitChanceManager.GetEHitChance(source));
            }
            if (useQ && Q.IsReady())
            {
                if (Player.Distance(target) > E.Range || !E.IsReady() || !menu.Item("ForceE", true).GetValue <bool>())
                {
                    Cast_Q(target, source);
                }
            }
        }
コード例 #22
0
 private void Cast_R(string mode)
 {
     if (mode == "Combo" && RStacks <= menu.Item("ComboR_Limit", true).GetValue <Slider>().Value)
     {
         SpellCastManager.CastBasicSkillShot(R, new[] { 1200f, 1500f, 1800f }[R.Level - 1], TargetSelector.DamageType.Magical, HitChanceManager.GetRHitChance(mode));
     }
     else if (mode == "Harass" && RStacks <= menu.Item("HarassR_Limit", true).GetValue <Slider>().Value)
     {
         SpellCastManager.CastBasicSkillShot(R, new[] { 1200f, 1500f, 1800f }[R.Level - 1], TargetSelector.DamageType.Magical, HitChanceManager.GetRHitChance(mode));
     }
     else if (mode == "Farm" && RStacks <= menu.Item("LaneClearR_Limit", true).GetValue <Slider>().Value)
     {
         SpellCastManager.CastBasicFarm(R);
     }
 }
コード例 #23
0
        private void UseSpells(bool useQ, bool useW, bool useE, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            //items
            if (source == "Combo")
            {
                var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);
                if (itemTarget != null)
                {
                    var dmg = GetComboDamage(itemTarget);
                    ItemManager.Target = itemTarget;

                    //see if killable
                    if (dmg > itemTarget.Health - 50)
                    {
                        ItemManager.KillableTarget = true;
                    }

                    ItemManager.UseTargetted = true;
                }
            }

            if (useR && R.IsReady())
            {
                Cast_R(source);
            }
            if (useQ && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source));
            }
            if (useE && E.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Physical, HitChanceManager.GetEHitChance(source));
            }
            if (useW && W.IsReady())
            {
                var target = TargetSelector.GetTarget(Player.AttackRange + new[] { 130, 150, 170, 190, 210 }[W.Level - 1], TargetSelector.DamageType.Magical);
                if (target.IsValidTarget(Player.AttackRange + new[] { 90, 120, 150, 180, 210 }[W.Level - 1]))
                {
                    W.Cast();
                }
            }
        }
コード例 #24
0
ファイル: Corki.cs プロジェクト: uio25371555/LSharp
        private void Cast_R(string mode)
        {
            var range = Player.HasBuff("CorkiMissileBarrageCounterBig") ? 1500 : 1300;

            if (mode == "Combo" && menu.Item("ComboR_Limit", true).GetValue <Slider>().Value < Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
            {
                SpellCastManager.CastBasicSkillShot(R, range, TargetSelector.DamageType.Magical, HitChanceManager.GetRHitChance(mode));
            }
            else if (mode == "Harass" && menu.Item("HarassR_Limit", true).GetValue <Slider>().Value < Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
            {
                SpellCastManager.CastBasicSkillShot(R, range, TargetSelector.DamageType.Magical, HitChanceManager.GetRHitChance(mode));
            }
            else if (mode == "Farm" && menu.Item("LaneClearR_Limit", true).GetValue <Slider>().Value < Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
            {
                SpellCastManager.CastBasicFarm(R);
            }
        }
コード例 #25
0
        private void Combo()
        {
            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                ItemManager.Target = itemTarget;

                var dmg = GetComboDamage(itemTarget);

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (Menu.Item("UseWCombo", true).GetValue <bool>() && W.IsReady())
            {
                if (ShouldW())
                {
                    SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical,
                                                        HitChance.VeryHigh);
                }
            }

            if (Menu.Item("UseQCombo", true).GetValue <bool>() && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical,
                                                    HitChance.VeryHigh);
            }

            if (Menu.Item("UseECombo", true).GetValue <bool>() && E.IsReady() && ESpell.ToggleState == 1 && HasManaForE("Combo") &&
                Utils.TickCount - E.LastCastAttemptT > 500)
            {
                var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

                if (!target.IsValidTarget(E.Range))
                {
                    return;
                }

                E.Cast();
            }
        }
コード例 #26
0
        private void Combo()
        {
            var qTarget = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Magical);
            var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (Menu.Item("UseECombo", true).GetValue <bool>() && eTarget != null &&
                E.IsReady() && Player.Distance(eTarget.Position) < E.Range && ShouldE(eTarget))
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            if (Menu.Item("UseRCombo", true).GetValue <bool>() && qTarget != null &&
                R.IsReady() && Player.Distance(qTarget.Position) < R.Range)
            {
                CastR(qTarget);
            }

            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);

                ItemManager.Target = itemTarget;

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (Menu.Item("UseWCombo", true).GetValue <bool>() && qTarget != null && W.IsReady())
            {
                if (W.GetPrediction(qTarget).Hitchance > HitChance.High && Player.Distance(qTarget.Position) <= W.Width)
                {
                    W.Cast();
                }
            }

            if (Menu.Item("UseQCombo", true).GetValue <bool>() && Q.IsReady() && qTarget != null)
            {
                CastQ();
            }
        }
コード例 #27
0
        private void Cast_R(int Index)
        {
            var range = Player.HasBuff("CorkiMissileBarrageCounterBig") ? 1500 : 1300;

            if (Index == 1 && Menu.Item("ComboR_Limit", true).GetValue <Slider>().Value < Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
            {
                SpellCastManager.CastBasicSkillShot(R, range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }
            else if (Index == 2 && Menu.Item("HarassR_Limit", true).GetValue <Slider>().Value < Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
            {
                SpellCastManager.CastBasicSkillShot(R, range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }
            else if (Index == 3 && Menu.Item("LaneClearR_Limit", true).GetValue <Slider>().Value < Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
            {
                SpellCastManager.CastBasicFarm(R);
            }
        }
コード例 #28
0
ファイル: Corki.cs プロジェクト: uio25371555/LSharp
        private void UseSpells(bool useQ, bool useE, bool useR, string source)
        {
            if (source == "Harass" && !ManaManager.HasMana("Harass"))
            {
                return;
            }

            //items
            if (source == "Combo")
            {
                var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);
                if (itemTarget != null)
                {
                    var dmg = GetComboDamage(itemTarget);
                    ItemManager.Target = itemTarget;

                    //see if killable
                    if (dmg > itemTarget.Health - 50)
                    {
                        ItemManager.KillableTarget = true;
                    }

                    ItemManager.UseTargetted = true;
                }
            }

            var target = TargetSelector.GetTarget(550, TargetSelector.DamageType.Magical);

            if ((target != null && source == "Combo") && menu.Item("Always_Use", true).GetValue <bool>())
            {
                return;
            }

            if (useR && R.IsReady())
            {
                Cast_R(source);
            }
            if (useQ && Q.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source));
            }
            if (useE && E.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(E, E.Range, TargetSelector.DamageType.Physical, HitChance.Low);
            }
        }
コード例 #29
0
        private void Combo()
        {
            var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (target.IsValidTarget(R.Range))
            {
                var dmg = GetComboDamage(target);

                if (Menu.Item("UseRCombo", true).GetValue <bool>() && dmg > target.Health && Player.ServerPosition.Distance(target.ServerPosition) > Menu.Item("R_Min_Range", true).GetValue <Slider>().Value)
                {
                    SpellCastManager.CastBasicSkillShot(R, R.Range, TargetSelector.DamageType.Physical, HitChance.VeryHigh);
                }

                if (Menu.Item("UseQCombo", true).GetValue <bool>() && Q.IsReady() &&
                    Player.ServerPosition.Distance(target.ServerPosition) < 550)
                {
                    var qMin = Menu.Item("Q_Min_Stack", true).GetValue <Slider>().Value;

                    if (qMin <= QStacks)
                    {
                        Q.Cast();
                    }
                }
            }

            if (Menu.Item("UseWCombo", true).GetValue <bool>() && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }

            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);
                ItemManager.Target = itemTarget;

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }
        }
コード例 #30
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                if (target != null)
                {
                    if (target.IsValidTarget(Q.Range))
                    {
                        Q.Cast(target);
                    }
                    else if (target.IsValidTarget(QExtend.Range) && Menu.Item("UseQExtendHarass", true).GetValue <bool>())
                    {
                        var pred       = QExtend.GetPrediction(target, true);
                        var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

                        if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>()))
                        {
                            return;
                        }

                        foreach (var minion in collisions)
                        {
                            var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                            if (poly.IsInside(pred.UnitPosition))
                            {
                                Q.Cast(minion);
                            }
                        }
                    }
                }
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }
        }