Inheritance: Photon.MonoBehaviour
Example #1
0
 public PeptideViewModel(Hydra.Core.Domain.Peptide peptide, IEventAggregator eventAggregator)
 {
     _peptide = peptide;
     _peptideIon = new PeptideIon(peptide.Sequence, 2);
     _peptideIonFragmentor = new PeptideIonFragmentor();
     _eventAggregator = eventAggregator;
 }
 protected void Shoot(Hydra hand)
 {
     RaycastHit hit;
     if (Physics.Raycast (hand.transform.position, fireDir, out hit)) {
         if(hit.collider.gameObject.tag == "Target"){
             GameObject gh = Instantiate (BulletHole, hit.point, Quaternion.identity) as GameObject;
             gHoles.Add(gh);
         }
     }
 }
Example #3
0
        private void JungleClear()
        {
            var useQ     = Config.Item("JungleClearQ").GetValue <bool>();
            var useW     = Config.Item("JungleClearW").GetValue <bool>();
            var useE     = Config.Item("JungleClearE").GetValue <bool>();
            var useItems = Config.Item("JungleClearItems").GetValue <bool>();
            var jungleClearManaManager = Config.Item("JungleClearManaManager").GetValue <Slider>().Value;
            var minimumEJungleMobs     = Config.Item("MinimumEJungleMobs").GetValue <Slider>().Value;

            var junglemobsq =
                Cache.GetMinions(Player.Position, Q.Range, MinionTeam.Neutral)
                .OrderByDescending(x => x.MaxHealth)
                .FirstOrDefault();

            if (useItems)
            {
                if (Hydra.IsReady() && junglemobsq.IsValidTarget(Hydra.Range))
                {
                    Hydra.Cast();
                }

                if (Tiamat.IsReady() && junglemobsq.IsValidTarget(Tiamat.Range))
                {
                    Tiamat.Cast();
                }
            }

            if (Player.ManaPercent < jungleClearManaManager)
            {
                return;
            }

            var minionselist = Cache.GetMinions(Player.ServerPosition, E.Range, MinionTeam.Neutral);
            var minionsw     = minionselist.OrderByDescending(x => x.MaxHealth).FirstOrDefault();
            var minionse     = E.GetCircularFarmLocation(minionselist);

            if (minionsw == null)
            {
                return;
            }

            if (Config.Item("JungleClearDontEQRange").GetValue <bool>() && (Player.Distance(minionse.Position) > Q.Range))
            {
                if ((minionse.MinionsHit >= minimumEJungleMobs) && useE && E.Instance.IsReady())
                {
                    E.Cast(minionse.Position);
                }
            }
            else if (!Config.Item("JungleClearDontEQRange").GetValue <bool>())
            {
                if ((minionse.MinionsHit >= minimumEJungleMobs) && useE && E.Instance.IsReady())
                {
                    E.Cast(minionse.Position);
                }
            }

            if (junglemobsq.IsValidTarget() && useQ && Q.Instance.IsReady())
            {
                Q.CastOnUnit(junglemobsq);
            }

            if (minionsw.IsValidTarget() && useW && W.Instance.IsReady())
            {
                W.Cast(minionsw.Position);
            }
        }
Example #4
0
        void Waveclear()
        {
            if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing() && !InDash)
            {
                if (!TornadoReady && GetBool("Waveclear.UseQ") && Yasuo.Spellbook.IsAutoAttacking)
                {
                    var minion =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidMinion(Spells[Q].Range) && ((x.IsDashable() && (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill()))).MaxOrDefault(x => x.MaxHealth);
                    if (minion != null)
                    {
                        Spells[Q].Cast(minion.ServerPosition);
                        LastTornadoClearTick = Helper.TickCount;
                    }
                }

                else if (TornadoReady && GetBool("Waveclear.UseQ2"))
                {
                    var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && ((x.IsDashable() && x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) || x.CanKill(SpellSlot.Q)));
                    var pred    =
                        MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(),
                                                              Spells[Q2].Width, Spells[Q2].Range);
                    if (pred.MinionsHit >= GetSliderInt("Waveclear.Qcount"))
                    {
                        Spells[Q2].Cast(pred.Position);
                        LastTornadoClearTick = Helper.TickCount;
                    }
                }
            }

            if (Helper.TickCount - LastTornadoClearTick < 500)
            {
                return;
            }

            if (SpellSlot.E.IsReady() && GetBool("Waveclear.UseE") && (!GetBool("Waveclear.Smart") || isHealthy) && (Helper.TickCount - WCLastE) >= GetSliderInt("Waveclear.Edelay"))
            {
                var           minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && ((GetBool("Waveclear.UseENK") && (!GetBool("Waveclear.Smart") || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (GetBool("Waveclear.ETower") || ShouldDive(x)));
                Obj_AI_Minion minion  = null;
                minion = minions.OrderBy(x => x.ECanKill()).ThenBy(x => GetDashPos(x).MinionsInRange(200)).FirstOrDefault();
                if (minion != null)
                {
                    Spells[E].Cast(minion);
                    WCLastE = Helper.TickCount;
                }
            }

            if (GetBool("Waveclear.UseItems"))
            {
                if (GetBool("Waveclear.UseTIA"))
                {
                    Tiamat.minioncount = GetSliderInt("Waveclear.MinCountHDR");
                    Tiamat.Cast(null, true);
                }
                if (GetBool("Waveclear.UseTitanic"))
                {
                    Titanic.minioncount = GetSliderInt("Waveclear.MinCountHDR");
                    Titanic.Cast(null, true);
                }
                if (GetBool("Waveclear.UseHDR"))
                {
                    Hydra.minioncount = GetSliderInt("Waveclear.MinCountHDR");
                    Hydra.Cast(null, true);
                }
                if (GetBool("Waveclear.UseYMU"))
                {
                    Youmu.minioncount = GetSliderInt("Waveclear.MinCountYOU");
                    Youmu.Cast(null, true);
                }
            }
        }
Example #5
0
        void LH()
        {
            List <Obj_AI_Base> allMinions = MinionManager.GetMinions(Khazix.ServerPosition, Q.Range);

            if (getCheckBoxItem(farm, "UseQFarm") && Q.IsReady())
            {
                foreach (Obj_AI_Base minion in
                         allMinions.Where(
                             minion =>
                             minion.LSIsValidTarget() &&
                             HealthPrediction.GetHealthPrediction(
                                 minion, (int)(Khazix.LSDistance(minion) * 1000 / 1400)) <
                             0.75 * Khazix.GetSpellDamage(minion, SpellSlot.Q)))
                {
                    if (Vector3.Distance(minion.ServerPosition, Khazix.ServerPosition) >
                        Orbwalking.GetRealAutoAttackRange(Khazix) && Khazix.LSDistance(minion) <= Q.Range)
                    {
                        Q.CastOnUnit(minion);
                        return;
                    }
                }
            }
            if (getCheckBoxItem(farm, "UseWFarm") && W.IsReady())
            {
                MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation(
                    MinionManager.GetMinions(Khazix.ServerPosition, W.Range).Where(minion => HealthPrediction.GetHealthPrediction(
                                                                                       minion, (int)(Khazix.LSDistance(minion) * 1000 / 1400)) <
                                                                                   0.75 * Khazix.GetSpellDamage(minion, SpellSlot.W))
                    .Select(minion => minion.ServerPosition.LSTo2D())
                    .ToList(), W.Width, W.Range);
                if (farmLocation.MinionsHit >= 1)
                {
                    if (!EvolvedW)
                    {
                        if (Khazix.LSDistance(farmLocation.Position) <= W.Range)
                        {
                            W.Cast(farmLocation.Position);
                        }
                    }

                    if (EvolvedW)
                    {
                        if (Khazix.LSDistance(farmLocation.Position) <= W.Range)
                        {
                            W.Cast(farmLocation.Position);
                        }
                    }
                }
            }

            if (getCheckBoxItem(farm, "UseEFarm") && E.IsReady())
            {
                MinionManager.FarmLocation farmLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        MinionManager.GetMinions(Khazix.ServerPosition, E.Range).Where(minion => HealthPrediction.GetHealthPrediction(
                                                                                           minion, (int)(Khazix.LSDistance(minion) * 1000 / 1400)) <
                                                                                       0.75 * Khazix.GetSpellDamage(minion, SpellSlot.W))
                        .Select(minion => minion.ServerPosition.LSTo2D())
                        .ToList(), E.Width, E.Range);

                if (farmLocation.MinionsHit >= 1)
                {
                    if (Khazix.LSDistance(farmLocation.Position) <= E.Range)
                    {
                        E.Cast(farmLocation.Position);
                    }
                }
            }


            if (getCheckBoxItem(farm, "UseItemsFarm"))
            {
                MinionManager.FarmLocation farmLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        MinionManager.GetMinions(Khazix.ServerPosition, Hydra.Range)
                        .Select(minion => minion.ServerPosition.LSTo2D())
                        .ToList(), Hydra.Range, Hydra.Range);

                if (Hydra.IsReady() && Khazix.LSDistance(farmLocation.Position) <= Hydra.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3074, Khazix);
                }
                if (Tiamat.IsReady() && Khazix.LSDistance(farmLocation.Position) <= Tiamat.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3077, Khazix);
                }
            }
        }
Example #6
0
        private void Waveclear()
        {
            if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing())
            {
                if (!TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseQ"))
                {
                    var minion =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(
                            x =>
                            x.IsValidMinion(Spells[Q].Range) &&
                            ((x.IsDashable() &&
                              (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) ||
                             x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill()))
                        .MaxOrDefault(x => x.MaxHealth);
                    if (minion != null)
                    {
                        Spells[Q].Cast(minion.ServerPosition);
                    }
                }

                else if (TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseQ2"))
                {
                    var minions =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(
                            x =>
                            x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) &&
                            ((x.IsDashable() &&
                              x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) ||
                             (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) ||
                             x.CanKill(SpellSlot.Q)));
                    var pred =
                        MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(),
                                                              Spells[Q2].Width, Spells[Q2].Range);
                    if (pred.MinionsHit >= YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.Qcount"))
                    {
                        Spells[Q2].Cast(pred.Position);
                    }
                }
            }

            if (SpellSlot.E.IsReady() && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseE") &&
                (!YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.Smart") || isHealthy))
            {
                var minions =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(
                        x =>
                        x.IsDashable() &&
                        ((YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseENK") &&
                          (!YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.Smart") ||
                           x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) &&
                        (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.ETower") ||
                         YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") ||
                         !GetDashPos(x).PointUnderEnemyTurret()));
                Obj_AI_Minion minion = null;
                minion = minions.MaxOrDefault(x => GetDashPos(x).MinionsInRange(200));
                if (minion != null)
                {
                    Spells[E].Cast(minion);
                }
            }

            if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseItems"))
            {
                if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseTIA"))
                {
                    Tiamat.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountHDR");
                    Tiamat.Cast(null, true);
                }
                if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseHDR"))
                {
                    Hydra.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountHDR");
                    Hydra.Cast(null, true);
                }
                if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseYMU"))
                {
                    Youmu.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountYOU");
                    Youmu.Cast(null, true);
                }
            }
        }
Example #7
0
        void KillSteal()
        {
            AIHeroClient target = HeroList
                                  .Where(x => x.LSIsValidTarget() && x.LSDistance(Khazix.Position) < 1375f && !x.IsZombie)
                                  .MinOrDefault(x => x.Health);

            if (target != null && target.IsInRange(600))
            {
                if (getCheckBoxItem(safety, "Safety.autoescape") && !IsHealthy)
                {
                    var ally =
                        HeroList.FirstOrDefault(h => h.HealthPercent > 40 && h.CountEnemiesInRange(400) == 0 && !h.ServerPosition.PointUnderEnemyTurret());
                    if (ally != null && ally.IsValid)
                    {
                        E.Cast(ally.ServerPosition);
                        return;
                    }
                    var objAiturret = EnemyTurretPositions.Where(x => Vector3.Distance(Khazix.ServerPosition, x) <= 900f);
                    if (objAiturret.Any() || Khazix.CountEnemiesInRange(500) >= 1)
                    {
                        var bestposition = Khazix.ServerPosition.LSExtend(NexusPosition, E.Range);
                        E.Cast(bestposition);
                        return;
                    }
                }

                if (getCheckBoxItem(ks, "UseQKs") && Q.IsReady() &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= Q.Range)
                {
                    double QDmg = GetQDamage(target);
                    if (!Jumping && target.Health <= QDmg)
                    {
                        Q.Cast(target);
                        return;
                    }
                }

                if (getCheckBoxItem(ks, "UseEKs") && E.IsReady() && !Jumping &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= E.Range && Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) > Q.Range)
                {
                    double EDmg = Khazix.GetSpellDamage(target, SpellSlot.E);
                    if (!Jumping && target.Health < EDmg)
                    {
                        LeagueSharp.Common.Utility.DelayAction.Add(
                            Game.Ping + getSliderItem(ks, "Edelay"), delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValid && !target.IsDead)
                            {
                                if (getCheckBoxItem(ks, "Ksbypass") || ShouldJump(pred.CastPosition))
                                {
                                    E.Cast(pred.CastPosition);
                                }
                            }
                        });
                    }
                }

                if (W.IsReady() && !EvolvedW && Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= W.Range &&
                    getCheckBoxItem(ks, "UseWKs"))
                {
                    double WDmg = Khazix.GetSpellDamage(target, SpellSlot.W);
                    if (target.Health <= WDmg)
                    {
                        var pred = W.GetPrediction(target);
                        if (pred.Hitchance >= HitChance.Medium)
                        {
                            W.Cast(pred.CastPosition);
                            return;
                        }
                    }
                }

                if (W.IsReady() && EvolvedW &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= W.Range &&
                    getCheckBoxItem(ks, "UseWKs"))
                {
                    double           WDmg = Khazix.GetSpellDamage(target, SpellSlot.W);
                    PredictionOutput pred = WE.GetPrediction(target);
                    if (target.Health <= WDmg && pred.Hitchance >= HitChance.Medium)
                    {
                        CastWE(target, pred.UnitPosition.LSTo2D(), 0, Config.GetHitChance("WHitchance"));
                        return;
                    }

                    if (pred.Hitchance >= HitChance.Collision)
                    {
                        List <Obj_AI_Base> PCollision = pred.CollisionObjects;
                        var x =
                            PCollision
                            .FirstOrDefault(PredCollisionChar => Vector3.Distance(PredCollisionChar.ServerPosition, target.ServerPosition) <= 30);
                        if (x != null)
                        {
                            W.Cast(x.Position);
                            return;
                        }
                    }
                }


                // Mixed's EQ KS
                if (Q.IsReady() && E.IsReady() &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= E.Range + Q.Range &&
                    getCheckBoxItem(ks, "UseEQKs"))
                {
                    double QDmg = GetQDamage(target);
                    double EDmg = Khazix.GetSpellDamage(target, SpellSlot.E);
                    if ((target.Health <= QDmg + EDmg))
                    {
                        LeagueSharp.Common.Utility.DelayAction.Add(getSliderItem(ks, "Edelay"), delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.LSIsValidTarget() && !target.IsZombie && ShouldJump(pred.CastPosition))
                            {
                                if (getCheckBoxItem(ks, "Ksbypass") || ShouldJump(pred.CastPosition))
                                {
                                    E.Cast(pred.CastPosition);
                                }
                            }
                        });
                    }
                }

                // MIXED EW KS
                if (W.IsReady() && E.IsReady() && !EvolvedW &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= W.Range + E.Range &&
                    getCheckBoxItem(ks, "UseEWKs"))
                {
                    double WDmg = Khazix.GetSpellDamage(target, SpellSlot.W);
                    if (target.Health <= WDmg)
                    {
                        LeagueSharp.Common.Utility.DelayAction.Add(getSliderItem(ks, "Edelay"), delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition))
                            {
                                if (getCheckBoxItem(ks, "Ksbypass") || ShouldJump(pred.CastPosition))
                                {
                                    E.Cast(pred.CastPosition);
                                }
                            }
                        });
                    }
                }

                if (Tiamat.IsReady() &&
                    Vector2.Distance(Khazix.ServerPosition.LSTo2D(), target.ServerPosition.LSTo2D()) <= Tiamat.Range &&
                    getCheckBoxItem(ks, "UseTiamatKs"))
                {
                    double Tiamatdmg = Khazix.GetItemDamage(target, LeagueSharp.Common.Damage.DamageItems.Tiamat);
                    if (target.Health <= Tiamatdmg)
                    {
                        Tiamat.Cast();
                        return;
                    }
                }
                if (Hydra.IsReady() &&
                    Vector2.Distance(Khazix.ServerPosition.LSTo2D(), target.ServerPosition.LSTo2D()) <= Hydra.Range &&
                    getCheckBoxItem(ks, "UseTiamatKs"))
                {
                    double hydradmg = Khazix.GetItemDamage(target, LeagueSharp.Common.Damage.DamageItems.Hydra);
                    if (target.Health <= hydradmg)
                    {
                        Hydra.Cast();
                    }
                }
            }
        }
Example #8
0
 private static void Killsteal()
 {
     if (!MiscMenu["kse"].Cast <CheckBox>().CurrentValue || !E.IsReady())
     {
         return;
     }
     try
     {
         foreach (var etarget in EntityManager.Heroes.Enemies.Where(
                      hero => hero.IsValidTarget(E.Range) && !hero.IsDead && !hero.IsZombie)
                  .Where(etarget => Tryndamere.GetSpellDamage(etarget, SpellSlot.E) >= etarget.Health))
         {
             {
                 E.Cast(etarget.ServerPosition);
             }
             if ((!MiscMenu["ksbotrk"].Cast <CheckBox>().CurrentValue || !Botrk.IsReady()) &&
                 !Bilgewater.IsReady() && !Tiamat.IsReady())
             {
                 continue;
             }
             {
                 try
                 {
                     foreach (var itarget in EntityManager.Heroes.Enemies.Where(
                                  hero =>
                                  hero.IsValidTarget(Botrk.Range) && !hero.IsDead &&
                                  !hero.IsZombie)
                              .Where(itarget => Tryndamere.GetItemDamage(itarget, ItemId.Blade_of_the_Ruined_King) >=
                                     itarget.Health))
                     {
                         {
                             Botrk.Cast(itarget);
                         }
                         if ((!MiscMenu["kshydra"].Cast <CheckBox>().CurrentValue ||
                              !Botrk.IsReady()) && !Bilgewater.IsReady() && !Tiamat.IsReady())
                         {
                             continue;
                         }
                         {
                             try
                             {
                                 foreach (var htarget in EntityManager.Heroes.Enemies.Where(
                                              hero =>
                                              hero.IsValidTarget(Hydra.Range) &&
                                              !hero.IsDead && !hero.IsZombie)
                                          .Where(htarget => Tryndamere.GetItemDamage(htarget,
                                                                                     ItemId.Ravenous_Hydra_Melee_Only) >=
                                                 htarget.Health))
                                 {
                                     Hydra.Cast();
                                 }
                             }
                             catch
                             {
                             }
                         }
                     }
                 }
                 catch
                 {
                 }
             }
         }
     }
     catch
     {
     }
 }
    void UpdateLaser(Hydra[] hands)
    {
        Vector3 position1 = Vector3.zero;
        Vector3 position2 = Vector3.zero;
        if (mode == 1) {
            foreach (Hydra hand in hands) {
                if (hand.m_hand == SixenseHands.RIGHT) {
                //	position1 = (hand.m_controller.Position - m_baseOffset) * m_sensitivity;
                    position1 = hand.transform.position;
                } else if (hand.m_hand == SixenseHands.LEFT) {
                //	position2 = (hand.m_controller.Position - m_baseOffset) * m_sensitivity;
                    position2 = hand.transform.position;
                }
            }
        //	position2 = Vector3.Normalize((position2 - position1)) * laserLength;
        } else if (mode == 0) {
            foreach (Hydra hand in hands) {
                if (hand.m_hand == SixenseHands.RIGHT) {
                    position1 = (hand.m_controller.Position - m_baseOffset) * m_sensitivity;
                    position2 = (position1 + (hand.m_controller.Rotation * (Vector3.forward * laserLength)));
                }
            }
        } else if (mode == 2) {
            Vector3 posR = Vector3.zero;
            Vector3 posL = Vector3.zero;
            Quaternion rotR = Quaternion.identity;
            Quaternion rotL = Quaternion.identity;
            foreach (Hydra hand in hands) {
                if (hand.m_hand == SixenseHands.RIGHT) {
                    posR = (hand.m_controller.Position - m_baseOffset) * m_sensitivity;
                    rotR = hand.m_controller.Rotation;
                }
                else if (hand.m_hand == SixenseHands.LEFT) {
                    posL = (hand.m_controller.Position - m_baseOffset) * m_sensitivity;
                    rotL = hand.m_controller.Rotation;
                }
            }
            position1 = Vector3.Lerp(posR, posL, 0.5f);
            //position1 = 0.5f*posR+0.5f*posL;
            Quaternion dir = Quaternion.Lerp(rotR, rotL, 0.5f);
            position2 = (position1+(dir*(Vector3.forward*laserLength)));
        }
        raySource = position1;

        fireDir = Vector3.Normalize (position2 - position1);
        if (useLine) {
            lRenderer.SetPosition (0, position1);
            lRenderer.SetPosition (1, position1 + fireDir * 10);
                Debug.Log("set new Position");
        }
        if(useRifle)UpdateRifle ();
    }
Example #10
0
 private static void SetTimeHydra(DateTime time)
 {
     Hydra.RealTimeClock_Set((uint)time.Year, (uint)time.Month, (uint)time.Day, (uint)time.DayOfWeek, (uint)time.Hour, (uint)time.Minute, (uint)time.Second, (uint)time.Millisecond);
 }
Example #11
0
 private static void InitializeHydra()
 {
     Hydra.InitializeCrystal_32768();
     Thread.Sleep(5000);
 }
Example #12
0
 private static bool CanCastHydra()
 {
     return(Hydra != null && Hydra.IsReady());
 }
Example #13
0
        private static void AfterAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (args.SData.Name == "ItemTitanicHydraCleave")
            {
                // because we want another auto after this
                Orbwalker.ResetAutoAttack();
                return;
            }
            if (!args.IsAutoAttack())
            {
                return;
            }
            Utils.Debug("ondos " + Core.GameTickCount);
            var target = args.Target as AttackableUnit;

            if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None && target != null && target.IsValidTarget())
            {
                if (!Q.IsReady() && !W.IsReady() && CanCastHydra())
                {
                    Hydra.Cast();
                }
                if (Cooldown(Player.Spells[0]) > 1.0f && !W.IsReady() && CanCastTitan())
                {
                    Titan.Cast();
                }
                lastAA = Core.GameTickCount;
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)))
                    {
                        if (QNum >= 1 && W.IsReady())
                        {
                            var target2 = (ComboTarget != null && ComboTarget.IsValidTarget(WRange)) ? ComboTarget :
                                          TargetSelector.GetTarget(WRange, DamageType.Physical, null, true);
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                            {
                                Hydra.Cast();
                                return;
                            }
                            if (R.IsReady() && R.Name != R1)
                            {
                                var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                                if (enemy != null)
                                {
                                    forceR2  = true;
                                    R2Target = enemy;
                                    Core.DelayAction(() => forceR2 = false, 750);
                                }
                            }
                        }
                    }
                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                    {
                        if (QNum >= 1 && W.IsReady())
                        {
                            var target2 = (JCTarget != null && JCTarget.IsValidTarget(WRange)) ? JCTarget : EntityManager.MinionsAndMonsters.GetJungleMonsters(null, WRange, true).FirstOrDefault();
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                            {
                                Hydra.Cast();
                            }
                        }
                    }


                    if (Mode != Orbwalker.ActiveModes.None && target.IsValidTarget(Q.Range) && target.IsValid && !target.IsDead && !target.IsZombie)
                    {
                        if (Q.IsReady())
                        {
                            Player.CastSpell(SpellSlot.Q, target.Position);
                            return;
                        }
                    }
                    if (Cooldown(Player.Spells[0]) > 1.0f && W.IsReady() && Player.Instance.CountEnemiesInRange(WRange) > 0)
                    {
                        Player.CastSpell(SpellSlot.W);
                        return;
                    }
                }
            }
        }
Example #14
0
        // Hydra -> E is faster
        static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            //Utils.Debug(args.SData.Name);
            if (args.SData.Name == "ItemTiamatCleave" && W.IsReady())
            {
                forceW = true;
                if (W.IsReady())
                {
                    W.Cast();
                }
                Core.DelayAction(() => forceW = false, 500);
                return;
            }
            if (args.Slot == SpellSlot.W)
            {
                forceW = false;
                lastW  = Core.GameTickCount;
                if (CanCastHydra())
                {
                    Hydra.Cast();
                    return;
                }

                if (R.IsReady() && R.Name != R1)
                {
                    var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                    if (enemy != null)
                    {
                        Utils.Debug("TRYING TO CAST R2 BIATHC");
                        forceR2  = true;
                        R2Target = enemy;
                        Core.DelayAction(() => forceR2 = false, 750);
                        return;
                    }
                }
                //Utils.Debug(lastW - lastHydra);
                return;
            }
            if (args.Slot == SpellSlot.E)
            {
                if (Config.ForceR && R.Name == R1 && R.IsReady() && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    forceR1 = true;
                    Player.CastSpell(SpellSlot.R);
                    Core.DelayAction(() => forceR1 = false, 500);
                    return;
                }
                if (R.IsReady() && R.Name != R1)
                {
                    var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                    if (enemy != null)
                    {
                        Utils.Debug("TRYING TO CAST R2 BIATHC");
                        forceR2  = true;
                        R2Target = enemy;
                        Core.DelayAction(() => forceR2 = false, 750);
                        return;
                    }
                }
            }
            if (args.Slot == SpellSlot.Q && QNum == 2)
            {
                if (R.IsReady() && R.Name != R1)
                {
                    var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                    if (enemy != null)
                    {
                        Utils.Debug("TRYING TO CAST R2 BIATHC");
                        forceR2  = true;
                        R2Target = enemy;
                        Core.DelayAction(() => forceR2 = false, 750);
                        return;
                    }
                }
            }
            if (args.Slot == SpellSlot.Q && QNum != 2)
            {
                if (Orbwalker.LastTarget != null && Orbwalker.LastTarget.IsValidTarget())
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, Orbwalker.LastTarget);
                    return;
                }
                if (args.Target != null && args.Target.IsValid)
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, args.Target);
                    return;
                }
            }
        }
Example #15
0
            //---------------------------------------------Combo()------------------------------------------------

            public static void Combo()
            {
                if (R.IsInRange(Target) && R.IsReady())
                {
                    PosAndHits = GetBestRPos(Target.ServerPosition.To2D());

                    if (Menu["UseRCombo"].Cast <CheckBox>().CurrentValue&& PosAndHits.First().Value >= Menu["Min Enemies R"].Cast <Slider>().CurrentValue)
                    {
                        if (EntityManager.Heroes.Allies.Where(ally => ally != Player && ally.Distance(Player) <= 700).Count() > 0)
                        {
                            if (Glory.IsReady())
                            {
                                Glory.Cast();
                            }
                            if (Talisma.IsReady())
                            {
                                Talisma.Cast();
                            }
                        }
                        R.Cast(PosAndHits.First().Key.To3D());
                    }
                }

                if (Smite != null)
                {
                    if (Target.IsValidTarget(Smite.Range) && Smite.IsReady())
                    {
                        if (Smite.Name.Contains("gank"))
                        {
                            Smite.Cast(Target);
                        }
                        else if (Smite.Name.Contains("duel") && Player.IsInAutoAttackRange(Target))
                        {
                            Smite.Cast(Target);
                        }
                    }
                }

                if (Menu["UseQCombo"].Cast <CheckBox>().CurrentValue&& QIsReady && QRange)
                {
                    Q.Cast(Target);
                }

                if (Menu["UseECombo"].Cast <CheckBox>().CurrentValue&& EIsReady && ERange)
                {
                    E.Cast();
                }

                if (Menu["UseWCombo"].Cast <CheckBox>().CurrentValue&& WIsReady && WRange)
                {
                    W.Cast();
                }

                if (Randuin.IsReady() && Target.IsValidTarget(500))
                {
                    Randuin.Cast();
                }

                if (Bilgewater.IsReady() && Target.IsValidTarget(550))
                {
                    Bilgewater.Cast(Target);
                }

                if (BOTRK.IsReady() && Target.IsValidTarget(550))
                {
                    BOTRK.Cast(Target);
                }

                if (Tiamat.IsReady() && Target.IsValidTarget(400))
                {
                    Tiamat.Cast();
                }

                if (Hydra.IsReady() && Target.IsValidTarget(400))
                {
                    Hydra.Cast();
                }

                return;
            }
Example #16
0
        public static void Execute()
        {
            if (LastRun > Environment.TickCount)
            {
                return;
            }

            var target =
                EntityManager.Heroes.Enemies.FirstOrDefault(e => !e.IsDead && e.IsInRange(Player.Instance, 1000));

            if (Player.Instance.IsRecalling() || Player.Instance.IsInShopRange() || target == null ||
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }

            if (Settings.Bilgewater && BilgewaterCutlass.IsOwned() && BilgewaterCutlass.IsReady())
            {
                if (Settings.BilgewaterMyHp >= Player.Instance.HealthPercent &&
                    target.HealthPercent <= Settings.BilgewaterTargetHp)
                {
                    BilgewaterCutlass.Cast(target);
                }
            }

            if (Settings.Blade && BladeOfTheRuinedKing.IsOwned() && BladeOfTheRuinedKing.IsReady())
            {
                if (Settings.BladeMyHp >= Player.Instance.HealthPercent &&
                    target.HealthPercent <= Settings.BladeTargetHp)
                {
                    BladeOfTheRuinedKing.Cast(target);
                }
            }

            if (Settings.Tiamat && Tiamat.IsOwned() && Tiamat.IsReady())
            {
                if (Settings.TiamatMyHp >= Player.Instance.HealthPercent &&
                    target.HealthPercent <= Settings.TiamatTargetHp)
                {
                    Tiamat.Cast();
                }
            }

            if (Settings.Hydra && Hydra.IsOwned() && Hydra.IsReady())
            {
                if (Settings.HydraMyHp >= Player.Instance.HealthPercent &&
                    target.HealthPercent <= Settings.HydraTargetHp)
                {
                    Hydra.Cast();
                }
            }

            if (Settings.Titanic && TitanicHydra.IsOwned() && TitanicHydra.IsReady())
            {
                if (Settings.TitanicMyHp >= Player.Instance.HealthPercent &&
                    target.HealthPercent <= Settings.TitanicTargetHp)
                {
                    TitanicHydra.Cast();
                }
            }

            if (Settings.Youmuu && Youmuu.IsOwned() && Youmuu.IsReady())
            {
                if (Settings.YoumuuMyHp >= Player.Instance.HealthPercent &&
                    target.HealthPercent <= Settings.YoumuuTargetHp)
                {
                    Youmuu.Cast();
                }
            }

            LastRun = Environment.TickCount + 200;
        }
Example #17
0
        public static void Execute()
        {
            var target = TargetSelector.GetTarget(1000, DamageType.Mixed);

            if (target == null)
            {
                var manamune = Player.Instance.Spellbook.Spells.FirstOrDefault(s => s.Name.ToLower().Contains("manamune"));

                if (manamune != null && manamune.ToggleState == 2)
                {
                    Manamune.Cast();
                }
            }

            if (Activator.lastUsed > Environment.TickCount)
            {
                return;
            }

            if (target != null && !Player.Instance.IsRecalling() &&
                (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                 Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)))
            {
                if (Settings.Bilgewater && BilgewaterCutlass.IsOwned() && BilgewaterCutlass.IsReady() &&
                    target.IsValidTarget(BilgewaterCutlass.Range))
                {
                    if (target.HealthPercent < Settings.BilgewaterTargetHp)
                    {
                        BilgewaterCutlass.Cast(target);
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                if (Settings.Blade && BladeOfTheRuinedKing.IsOwned() && BladeOfTheRuinedKing.IsReady() &&
                    target.IsValidTarget(BladeOfTheRuinedKing.Range))
                {
                    if (Settings.BladeMyHp > Player.Instance.HealthPercent &&
                        target.HealthPercent < Settings.BladeTargetHp)
                    {
                        BladeOfTheRuinedKing.Cast(target);
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                var minions = EntityManager.MinionsAndMonsters.EnemyMinions.Count(m => m.IsValidTarget(Tiamat.Range));
                if (Settings.Tiamat && Tiamat.IsOwned() && Tiamat.IsReady() && target.IsValidTarget(Tiamat.Range) ||
                    minions > 2)
                {
                    if (target.HealthPercent < Settings.TiamatTargetHp && Misc.AACancel
                        ? EventsManager.CanAACancel
                        : Tiamat.IsReady())
                    {
                        Tiamat.Cast();
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                if (Settings.Hydra && Hydra.IsOwned() && Hydra.IsReady() && target.IsValidTarget(Hydra.Range) ||
                    minions > 2)
                {
                    if (target.HealthPercent < Settings.HydraTargetHp && Misc.AACancel
                        ? EventsManager.CanAACancel
                        : Hydra.IsReady())
                    {
                        Hydra.Cast();
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                if (Settings.Titanic && TitanicHydra.IsOwned() && TitanicHydra.IsReady() &&
                    target.IsValidTarget(TitanicHydra.Range) || minions > 2)
                {
                    if (target.HealthPercent < Settings.TitanicTargetHp && Misc.AACancel
                        ? EventsManager.CanAACancel
                        : TitanicHydra.IsReady())
                    {
                        TitanicHydra.Cast();
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                if (Settings.Youmuu && Youmuu.IsOwned() && Youmuu.IsReady() && target.IsValidTarget(Youmuu.Range))
                {
                    if (target.HealthPercent < Settings.YoumuuTargetHp)
                    {
                        Youmuu.Cast();
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                if (Settings.Hextech && Hextech.IsOwned() && Hextech.IsReady() && target.IsValidTarget(Hextech.Range))
                {
                    if (target.HealthPercent < Settings.HextechTargetHp)
                    {
                        Hextech.Cast(target);
                        Activator.lastUsed = Environment.TickCount + Misc.DelayBetweenOff;
                    }
                }

                if (Settings.Manamune && Manamune.IsOwned() && Manamune.IsReady() && target.IsValidTarget(Manamune.Range))
                {
                    if (target.HealthPercent < Settings.ManamuneTargetHP && Player.Instance.ManaPercent > Settings.ManamuneMana)
                    {
                        var manamune = Player.Instance.Spellbook.Spells.FirstOrDefault(s => s.Name.ToLower().Contains("manamune"));
                        if (manamune != null && manamune.ToggleState == 1)
                        {
                            Manamune.Cast();
                        }
                    }
                }
            }
        }
Example #18
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health)
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>())
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is Obj_AI_Hero)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth * 0.6)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>() && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #19
0
        private void LaneJungClear()
        {
            var minionObj = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (minionObj.Count == 0)
            {
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady() && !Player.HasBuff("JaxEvasion"))
            {
                if (GetValue <bool>("Clear", "Q") && Q.IsReady() && minionObj.Count(i => E.IsInRange(i)) == 0)
                {
                    foreach (var Obj in minionObj)
                    {
                        if (minionObj.Count(i => i.Distance(Obj, true) <= E.RangeSqr) > 1 && E.Cast(PacketCast) && Q.CastOnUnit(Obj, PacketCast))
                        {
                            return;
                        }
                    }
                }
                else if ((minionObj.Count(i => i.MaxHealth >= 1200 && E.IsInRange(i)) > 0 || minionObj.Count(i => E.IsInRange(i)) > 2) && E.Cast(PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "W") && W.IsReady() && GetValue <bool>("Clear", "Q") && Q.IsReady() && Player.Mana >= W.Instance.ManaCost + Q.Instance.ManaCost)
            {
                var Obj = minionObj.Find(i => i.MaxHealth >= 1200 && CanKill(i, Q, Q.GetDamage(i) + GetBonusDmg(i)));
                if (Obj != null && W.Cast(PacketCast) && Q.CastOnUnit(Obj, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady())
            {
                var Obj = minionObj.Find(i => i.MaxHealth >= 1200 && ((Player.HasBuff("JaxEmpowerTwo") && CanKill(i, Q, Q.GetDamage(i) + GetBonusDmg(i))) || CanKill(i, Q)));
                if (Obj == null && (minionObj.Count(i => Player.Distance(i, true) <= Math.Pow(Orbwalk.GetAutoAttackRange(Player, i) + 40, 2)) == 0 || (GetValue <bool>("Clear", "E") && E.IsReady() && Player.HasBuff("JaxEvasion") && minionObj.Count(i => E.IsInRange(i)) == 0)))
                {
                    Obj = minionObj.MinOrDefault(i => i.Health);
                }
                if (Obj != null && Q.CastOnUnit(Obj, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Item"))
            {
                var Item = Hydra.IsReady() ? Hydra : Tiamat;
                if (Item.IsReady() && (minionObj.Count(i => Item.IsInRange(i)) > 2 || minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player, true) <= Math.Pow(Item.Range - 80, 2))) && Item.Cast())
                {
                    return;
                }
            }
            if (GetValue <bool>("SmiteMob", "Smite") && Smite.IsReady())
            {
                var Obj = minionObj.Find(i => i.Team == GameObjectTeam.Neutral && CanSmiteMob(i.Name));
                if (Obj != null && CastSmite(Obj))
                {
                    return;
                }
            }
        }
Example #20
0
 private void Clear()
 {
     SmiteMob();
     if (GetValue <bool>("Clear", "E") && E.IsReady())
     {
         var minionObj = MinionManager.GetMinions(
             E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
         if (minionObj.Any())
         {
             var pos = E.GetCircularFarmLocation(minionObj);
             if (pos.MinionsHit > 1)
             {
                 if (E.Cast(pos.Position, PacketCast))
                 {
                     if (GetValue <bool>("Clear", "Q") && Q.IsReady())
                     {
                         Q.Cast(pos.Position, PacketCast);
                     }
                     return;
                 }
             }
             else
             {
                 var obj = minionObj.FirstOrDefault(i => i.MaxHealth >= 1200);
                 if (obj != null && E.CastIfHitchanceEquals(obj, HitChance.Medium, PacketCast))
                 {
                     return;
                 }
             }
         }
     }
     if (GetValue <bool>("Clear", "Q") && Q.IsReady())
     {
         var minionObj = MinionManager.GetMinions(
             Q2.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
         if (minionObj.Any() &&
             (!GetValue <bool>("Clear", "E") ||
              (!E.IsReady() || (E.IsReady() && E.GetCircularFarmLocation(minionObj).MinionsHit == 1))))
         {
             if (GetValue <bool>("Clear", "E") &&
                 Flag.Where(
                     i =>
                     minionObj.Count(a => a.Distance(i) <= 60) > 1 ||
                     minionObj.Count(a => Q2.WillHit(a, i.ServerPosition)) > 1)
                 .Any(i => Q.Cast(i.ServerPosition, PacketCast)))
             {
                 return;
             }
             var pos = Q.GetLineFarmLocation(minionObj.Where(i => Q.IsInRange(i)).ToList());
             if (pos.MinionsHit > 0 && Q.Cast(pos.Position, PacketCast))
             {
                 return;
             }
         }
     }
     if (GetValue <bool>("Clear", "W") && W.IsReady() &&
         Player.HealthPercent < GetValue <Slider>("Clear", "WHpU").Value&&
         MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly).Any() && W.Cast(PacketCast))
     {
         return;
     }
     if (GetValue <bool>("Clear", "Item") && (Hydra.IsReady() || Tiamat.IsReady()))
     {
         var minionObj = MinionManager.GetMinions(
             (Hydra.IsReady() ? Hydra : Tiamat).Range, MinionTypes.All, MinionTeam.NotAlly);
         if (minionObj.Count > 2 ||
             minionObj.Any(
                 i => i.MaxHealth >= 1200 && i.Distance(Player) < (Hydra.IsReady() ? Hydra : Tiamat).Range - 80))
         {
             if (Tiamat.IsReady())
             {
                 Tiamat.Cast();
             }
             if (Hydra.IsReady())
             {
                 Hydra.Cast();
             }
         }
     }
 }
    void UpdateHand( Hydra hand )
    {
        bool bControllerActive = IsControllerActive( hand.m_controller );

        if ( bControllerActive )
        {

            Vector3 rawPos = ( hand.m_controller.Position - m_baseOffset ) * m_sensitivity;
            Quaternion rawRot = hand.m_controller.Rotation * hand.InitialRotation;

            /*if(firstIter){
                KSx = new kalmanState(processNoise,sensorNoise,rawPos.x,estimatedError,kalmanGain);
                firstIter = false;
            }*/
            hand.transform.localRotation = rawRot;
            hand.transform.localPosition = rawPos;

            if( hand.m_hand == SixenseHands.RIGHT)
            {
                //hand.transform.localPosition = rawPos*-1;
                //hand.transform.Translate(rightHandOffset);
                //hand.transform.RotateAround(transform.position, new Vector3(1,0,0), 270);
                //hand.transform.rotation = Quaternion.Euler(initialRightHandRot);

                //hand.transform.Rotate(initialRightHandRot);
                //hand.transform.localRotation = hand.transform.localRotation * Quaternion.Euler(initialRightHandRot);
                //hand.transform.position = hand.transform.position + rightHandOffset;
                if(useRifle){
                    rifleInstance.transform.position=hand.transform.position;
                    rifleInstance.transform.Translate(new Vector3(0.0f, -0.15f, 0.0f));
                }
                if(hand.m_controller.GetButtonDown(SixenseButtons.TRIGGER)){
                    if(!lukaCalibrated){
                        if(numClicked<ControlPoints){
                            recordPoints();
                            numClicked++;
                        }
                    }else{
                        //Shoot(hand);
                        gcs.fireShot();
                        cameraShoot ();
                        audioS.Play();
                        shootAnim.SetTrigger("Shoot");
                    }
                }
            }
            else if (hand.m_hand == SixenseHands.LEFT) {
                //hand.transform.position = hand.transform.position + leftHandOffset;
            }

        }

        else
        {
            // use the inital position and orientation because the controller is not active
            hand.transform.localPosition = hand.InitialPosition;
            hand.transform.localRotation  = hand.InitialRotation;
        }
    }
Example #22
0
        void Combo()
        {
            float range = 0;

            if (SpellSlot.R.IsReady())
            {
                range = Spells[R].Range;
            }

            else if (Spells[Q2].IsReady())
            {
                range = Spells[Q2].Range;
            }

            else if (Spells[E].IsReady())
            {
                range = Spells[E].Range;
            }

            CurrentTarget = TargetSelector.GetTarget(range, DamageType.Physical);


            if (GetBool("Combo.UseEQ", YasuoMenu.ComboM))
            {
                PerformEQ();
            }

            CastQ(CurrentTarget);

            if (GetBool("Combo.UseE", YasuoMenu.ComboM))
            {
                CastE(CurrentTarget);
            }

            if (GetBool("Combo.UseIgnite", YasuoMenu.ComboM))
            {
                CastIgnite();
            }

            if (GetBool("Items.Enabled", YasuoMenu.ComboM))
            {
                if (GetBool("Items.UseTIA", YasuoMenu.ComboM))
                {
                    Tiamat.Cast(null);
                }
                if (GetBool("Items.UseHDR", YasuoMenu.ComboM))
                {
                    Hydra.Cast(null);
                }
                if (GetBool("Items.UseBRK", YasuoMenu.ComboM) && CurrentTarget != null)
                {
                    Blade.Cast(CurrentTarget);
                }
                if (GetBool("Items.UseBLG", YasuoMenu.ComboM) && CurrentTarget != null)
                {
                    Bilgewater.Cast(CurrentTarget);
                }
                if (GetBool("Items.UseYMU", YasuoMenu.ComboM))
                {
                    Youmu.Cast(null);
                }
            }
        }
Example #23
0
            //---------------------------------------------Combo()------------------------------------------------

            public static void Combo()
            {
                if ((Scimitar.IsReady() || QSS.IsReady()) && Player.HasBuffOfType(BuffType.Charm) || Player.HasBuffOfType(BuffType.Blind) || Player.HasBuffOfType(BuffType.Fear) || Player.HasBuffOfType(BuffType.Polymorph) || Player.HasBuffOfType(BuffType.Silence) || Player.HasBuffOfType(BuffType.Sleep) || Player.HasBuffOfType(BuffType.Snare) || Player.HasBuffOfType(BuffType.Stun) || Player.HasBuffOfType(BuffType.Suppression) || Player.HasBuffOfType(BuffType.Taunt))
                {
                    Scimitar.Cast(); QSS.Cast();
                }

                if (Smite != null)
                {
                    if (Target.IsValidTarget(Smite.Range) && Smite.IsReady())
                    {
                        if (Smite.Name.Contains("gank"))
                        {
                            Smite.Cast(Target);
                        }
                        else if (Smite.Name.Contains("duel") && Player.IsInAutoAttackRange(Target))
                        {
                            Smite.Cast(Target);
                        }
                    }
                }

                if (Menu["UseQCombo"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && Target.IsValidTarget(Player.GetAutoAttackRange() + 300) && !Menu["QAfterAA"].Cast <CheckBox>().CurrentValue)
                {
                    Q.Cast();
                }

                if (Menu["UseWCombo"].Cast <CheckBox>().CurrentValue&& W.IsReady() && Player.IsFacing(Target) && Target.IsValidTarget(Player.GetAutoAttackRange() + 300))
                {
                    W.Cast();
                }

                if (Menu["UseECombo"].Cast <CheckBox>().CurrentValue&& E.IsReady() && Target.IsValidTarget(E.Range) && !Player.HasBuff("GarenE"))
                {
                    if (Menu["JEBQ"].Cast <CheckBox>().CurrentValue&& Q.IsReady())
                    {
                        if (Target.HasBuffOfType(BuffType.Silence))
                        {
                            E.Cast();
                        }
                    }
                    else
                    {
                        E.Cast();
                    }
                }

                if (R.IsReady())
                {
                    if (Menu["UseRCombo"].Cast <CheckBox>().CurrentValue&& Target.IsValidTarget(R.Range) && SpellDamage(Target, SpellSlot.R) > (Target.Health + (Target.HasBuff("garenpassiveenemytarget") ? 0 : Target.MagicShield)) + 20)
                    {
                        if (Player.HasBuff("GarenE"))
                        {
                            E.Cast();
                        }
                        R.Cast(Target);
                    }
                }

                if (Target.IsValidTarget(Player.GetAutoAttackRange() + 300) && GhostBlade.IsReady())
                {
                    GhostBlade.Cast();
                }

                if (Target.IsValidTarget(550) && BOTRK.IsReady())
                {
                    BOTRK.Cast(Target);
                }

                if (Target.IsValidTarget(550) && Bilgewater.IsReady())
                {
                    Bilgewater.Cast(Target);
                }

                if (Target.IsValidTarget(400) && Tiamat.IsReady())
                {
                    Tiamat.Cast();
                }

                if (Target.IsValidTarget(400) && Hydra.IsReady())
                {
                    Hydra.Cast();
                }

                if (Target.IsValidTarget(500) && Randuin.IsReady())
                {
                    Randuin.Cast();
                }

                return;
            }
Example #24
0
        void KillSteal()
        {
            //Avoid interrupting our assasination attempt
            if (jumpManager.MidAssasination)
            {
                return;
            }

            Obj_AI_Hero target = HeroList
                                 .Where(x => x.IsValidTarget() && x.Distance(Khazix.Position) < 1375f && !x.IsZombie)
                                 .MinOrDefault(x => x.Health);

            if (target != null && target.IsInRange(Ignite.Range))
            {
                if (Config.GetBool("UseIgnite") && IgniteSlot != SpellSlot.Unknown &&
                    Khazix.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
                {
                    double igniteDmg = Khazix.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
                    if (igniteDmg > target.Health)
                    {
                        Khazix.Spellbook.CastSpell(IgniteSlot, target);
                        return;
                    }
                }

                if (Config.GetBool("UseQKs") && Q.IsReady() &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= Q.Range)
                {
                    double QDmg = GetQDamage(target);
                    if (!Jumping && target.Health <= QDmg)
                    {
                        Q.Cast(target);
                        return;
                    }
                }

                if (Config.GetBool("UseEKs") && E.IsReady() && !Jumping &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= E.Range && Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) > Q.Range)
                {
                    double EDmg = Khazix.GetSpellDamage(target, SpellSlot.E);
                    if (!Jumping && target.Health < EDmg)
                    {
                        Utility.DelayAction.Add(
                            Game.Ping + Config.GetSlider("EDelay"), delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValid && !target.IsDead)
                            {
                                if (Config.GetBool("Ksbypass") || ShouldJump(pred.CastPosition))
                                {
                                    E.Cast(pred.CastPosition);
                                }
                            }
                        });
                    }
                }

                if (W.IsReady() && !EvolvedW && Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= W.Range &&
                    Config.GetBool("UseWKs"))
                {
                    double WDmg = Khazix.GetSpellDamage(target, SpellSlot.W);
                    if (target.Health <= WDmg)
                    {
                        var pred = W.GetPrediction(target);
                        if (pred.Hitchance >= HitChance.Medium)
                        {
                            W.Cast(pred.CastPosition);
                            return;
                        }
                    }
                }

                if (W.IsReady() && EvolvedW &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= W.Range &&
                    Config.GetBool("UseWKs"))
                {
                    double           WDmg = Khazix.GetSpellDamage(target, SpellSlot.W);
                    PredictionOutput pred = WE.GetPrediction(target);
                    if (target.Health <= WDmg && pred.Hitchance >= HitChance.Medium)
                    {
                        CastWE(target, pred.UnitPosition.To2D(), 0, Config.GetHitChance("WHitchance"));
                        return;
                    }

                    if (pred.Hitchance >= HitChance.Collision)
                    {
                        List <Obj_AI_Base> PCollision = pred.CollisionObjects;
                        var x =
                            PCollision
                            .FirstOrDefault(PredCollisionChar => Vector3.Distance(PredCollisionChar.ServerPosition, target.ServerPosition) <= 30);
                        if (x != null)
                        {
                            W.Cast(x.Position);
                            return;
                        }
                    }
                }


                // Mixed's EQ KS
                if (Q.IsReady() && E.IsReady() &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= E.Range + Q.Range &&
                    Config.GetBool("UseEQKs"))
                {
                    double QDmg = GetQDamage(target);
                    double EDmg = Khazix.GetSpellDamage(target, SpellSlot.E);
                    if ((target.Health <= QDmg + EDmg))
                    {
                        Utility.DelayAction.Add(Config.GetSlider("EDelay"), delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValidTarget() && !target.IsZombie && ShouldJump(pred.CastPosition))
                            {
                                if (Config.GetBool("Ksbypass") || ShouldJump(pred.CastPosition))
                                {
                                    E.Cast(pred.CastPosition);
                                }
                            }
                        });
                    }
                }

                // MIXED EW KS
                if (W.IsReady() && E.IsReady() && !EvolvedW &&
                    Vector3.Distance(Khazix.ServerPosition, target.ServerPosition) <= W.Range + E.Range &&
                    Config.GetBool("UseEWKs"))
                {
                    double WDmg = Khazix.GetSpellDamage(target, SpellSlot.W);
                    if (target.Health <= WDmg)
                    {
                        Utility.DelayAction.Add(Config.GetSlider("EDelay"), delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition))
                            {
                                if (Config.GetBool("Ksbypass") || ShouldJump(pred.CastPosition))
                                {
                                    E.Cast(pred.CastPosition);
                                }
                            }
                        });
                    }
                }

                if (Tiamat.IsReady() &&
                    Vector2.Distance(Khazix.ServerPosition.To2D(), target.ServerPosition.To2D()) <= Tiamat.Range &&
                    Config.GetBool("UseTiamatKs"))
                {
                    double Tiamatdmg = Khazix.GetItemDamage(target, Damage.DamageItems.Tiamat);
                    if (target.Health <= Tiamatdmg)
                    {
                        Tiamat.Cast();
                        return;
                    }
                }
                if (Hydra.IsReady() &&
                    Vector2.Distance(Khazix.ServerPosition.To2D(), target.ServerPosition.To2D()) <= Hydra.Range &&
                    Config.GetBool("UseTiamatKs"))
                {
                    double hydradmg = Khazix.GetItemDamage(target, Damage.DamageItems.Hydra);
                    if (target.Health <= hydradmg)
                    {
                        Hydra.Cast();
                    }
                }
            }
        }
Example #25
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>() && Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>())
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is Obj_AI_Hero)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth * 0.6)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>() && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #26
0
        private static void DoJungleclear()
        {
            try
            {
                var minion =
                    MinionManager.GetMinions(
                        Player.ServerPosition,
                        E.Range,
                        MinionTypes.All,
                        MinionTeam.Neutral,
                        MinionOrderTypes.MaxHealth).OrderByDescending(x => x.MaxHealth).FirstOrDefault();

                if (minion == null)
                {
                    return;
                }

                if (Player.ManaPercent < getSliderItem(jungleclearMenu, "GFUELTalon.jungleclear.Mana"))
                {
                    return;
                }


                if (getCheckBoxItem(jungleclearMenu, "GFUELTalon.jungleclear.E") && E.IsReady())
                {
                    E.CastOnUnit(minion);
                }

                if (getCheckBoxItem(jungleclearMenu, "GFUELTalon.jungleclear.W") && W.IsReady() &&
                    minion.LSIsValidTarget(W.Range))
                {
                    W.Cast(minion);
                }

                if (getCheckBoxItem(jungleclearMenu, "GFUELTalon.jungleclear.Q") && Q.IsReady() &&
                    minion.LSIsValidTarget(Q.Range))
                {
                    Q.Cast();
                }

                var min =
                    MinionManager.GetMinions(
                        Orbwalking.GetRealAutoAttackRange(Player),
                        MinionTypes.All,
                        MinionTeam.NotAlly).Count();

                if (min >= 1)
                {
                    if (Tiamat.IsReady())
                    {
                        Tiamat.Cast();
                    }

                    if (Hydra.IsReady())
                    {
                        Hydra.Cast();
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Example #27
0
        void Waveclear()
        {
            List <Obj_AI_Minion> allMinions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.LSIsValidTarget(W.Range) && !MinionManager.IsWard(x)).ToList();

            if (getCheckBoxItem(farm, "UseQFarm") && Q.IsReady())
            {
                var minion = Orbwalker.LastTarget as Obj_AI_Minion;
                if (minion != null && HealthPrediction.GetHealthPrediction(
                        minion, (int)(Khazix.LSDistance(minion) * 1000 / 1400)) >
                    0.35f * Khazix.GetSpellDamage(minion, SpellSlot.Q) && Khazix.LSDistance(minion) <= Q.Range)
                {
                    Q.Cast(minion);
                }
                else if (minion == null || !minion.IsValid)
                {
                    foreach (var min in allMinions.Where(x => x.LSIsValidTarget(Q.Range)))
                    {
                        if (HealthPrediction.GetHealthPrediction(
                                min, (int)(Khazix.LSDistance(min) * 1000 / 1400)) >
                            3 * Khazix.GetSpellDamage(min, SpellSlot.Q) && Khazix.LSDistance(min) <= Q.Range)
                        {
                            Q.Cast(min);
                            break;
                        }
                    }
                }
            }

            if (getCheckBoxItem(farm, "UseWFarm") && W.IsReady() && Khazix.HealthPercent <= getSliderItem(farm, "Farm.WHealth"))
            {
                var wmins = EvolvedW ? allMinions.Where(x => x.LSIsValidTarget(WE.Range)) : allMinions.Where(x => x.LSIsValidTarget(W.Range));
                MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation(wmins
                                                                                                    .Select(minion => minion.ServerPosition.LSTo2D())
                                                                                                    .ToList(), EvolvedW ? WE.Width : W.Width, EvolvedW ? WE.Range : W.Range);
                var distcheck = EvolvedW ? Khazix.LSDistance(farmLocation.Position) <= WE.Range : Khazix.LSDistance(farmLocation.Position) <= W.Range;
                if (distcheck)
                {
                    W.Cast(farmLocation.Position);
                }
            }

            if (getCheckBoxItem(farm, "UseEFarm") && E.IsReady())
            {
                MinionManager.FarmLocation farmLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        MinionManager.GetMinions(Khazix.ServerPosition, E.Range)
                        .Select(minion => minion.ServerPosition.LSTo2D())
                        .ToList(), E.Width, E.Range);
                if (Khazix.LSDistance(farmLocation.Position) <= E.Range)
                {
                    E.Cast(farmLocation.Position);
                }
            }


            if (getCheckBoxItem(farm, "UseItemsFarm"))
            {
                MinionManager.FarmLocation farmLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        MinionManager.GetMinions(Khazix.ServerPosition, Hydra.Range)
                        .Select(minion => minion.ServerPosition.LSTo2D())
                        .ToList(), Hydra.Range, Hydra.Range);

                if (Hydra.IsReady() && Khazix.LSDistance(farmLocation.Position) <= Hydra.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3074, Khazix);
                }
                if (Tiamat.IsReady() && Khazix.LSDistance(farmLocation.Position) <= Tiamat.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3077, Khazix);
                }
                if (Titanic.IsReady() && Khazix.LSDistance(farmLocation.Position) <= Titanic.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3748, Khazix);
                }
            }
        }
Example #28
0
        private void Clear()
        {
            SmiteMob();
            var minionObj = MinionManager.GetMinions(
                E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any())
            {
                return;
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady())
            {
                var pos = Q.GetCircularFarmLocation(
                    minionObj.Where(i => Q.IsInRange(i, Q.Range + Q.Width / 2)).ToList());
                if (pos.MinionsHit > 1)
                {
                    if (Q.Cast(pos.Position, PacketCast))
                    {
                        return;
                    }
                }
                else
                {
                    var obj = minionObj.FirstOrDefault(i => i.MaxHealth >= 1200);
                    if (obj != null && Q.IsInRange(obj, Q.Range + Q2.Width / 2) &&
                        Q2.CastIfHitchanceEquals(obj, HitChance.Medium, PacketCast))
                    {
                        return;
                    }
                }
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady())
            {
                var pos = E.GetLineFarmLocation(minionObj);
                if (pos.MinionsHit > 0 && E.Cast(pos.Position, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "W") && W.IsReady())
            {
                if (Player.HealthPercent >=
                    (GetValue <bool>("Clear", "WPriority") ? 85 : GetValue <Slider>("Clear", "WHpU").Value))
                {
                    if (!HaveWDmg && W.Cast(PacketCast))
                    {
                        return;
                    }
                }
                else if (HaveWDmg && W.Cast(PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Item"))
            {
                var item = Hydra.IsReady() ? Hydra : Tiamat;
                if (item.IsReady() &&
                    (minionObj.Count(i => item.IsInRange(i)) > 2 ||
                     minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player) < item.Range - 80)))
                {
                    item.Cast();
                }
            }
        }
Example #29
0
        void Combo()
        {
            float range = 0;

            if (SpellSlot.R.IsReady())
            {
                range = Spells[R].Range;
            }

            else if (Spells[Q2].IsReady())
            {
                range = Spells[Q2].Range;
            }

            else if (Spells[E].IsReady())
            {
                range = Spells[E].Range;
            }

            CurrentTarget = TargetSelector.GetTarget(range, TargetSelector.DamageType.Physical);


            CastQ(CurrentTarget);

            if (GetBool("Combo.UseE") && !Helper.DontDash)
            {
                var mode = GetMode();
                if (mode == Modes.Old)
                {
                    CastEOld(CurrentTarget);
                }
                else
                {
                    CastENew(CurrentTarget);
                }
            }

            if (GetBool("Combo.UseIgnite"))
            {
                CastIgnite();
            }

            if (GetBool("Items.Enabled"))
            {
                if (GetBool("Items.UseTIA"))
                {
                    Tiamat.Cast(null);
                }
                if (GetBool("Items.UseHDR"))
                {
                    Hydra.Cast(null);
                }
                if (GetBool("Items.UseTitanic"))
                {
                    Titanic.Cast(null);
                }
                if (GetBool("Items.UseBRK") && CurrentTarget != null)
                {
                    Blade.Cast(CurrentTarget);
                }
                if (GetBool("Items.UseBLG") && CurrentTarget != null)
                {
                    Bilgewater.Cast(CurrentTarget);
                }
                if (GetBool("Items.UseYMU"))
                {
                    Youmu.Cast(null);
                }
            }
        }
Example #30
0
        private void Clear()
        {
            SmiteMob();
            var minionObj = MinionManager.GetMinions(
                Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any())
            {
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady() && !HaveE)
            {
                if (GetValue <bool>("Clear", "Q") && Q.IsReady() && !minionObj.Any(i => E.IsInRange(i)))
                {
                    var obj =
                        minionObj.MaxOrDefault(
                            i =>
                            MinionManager.GetMinions(i.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly)
                            .Count > 1);
                    if (obj != null && E.Cast(PacketCast) && Q.CastOnUnit(obj, PacketCast))
                    {
                        return;
                    }
                }
                else if ((minionObj.Any(i => i.MaxHealth >= 1200 && E.IsInRange(i)) ||
                          minionObj.Count(i => E.IsInRange(i)) > 2) && E.Cast(PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "W"))
            {
                if (W.IsReady() && GetValue <bool>("Clear", "Q") && Q.IsReady() &&
                    Player.Mana >= W.Instance.ManaCost + Q.Instance.ManaCost)
                {
                    var obj =
                        minionObj.FirstOrDefault(
                            i => i.MaxHealth >= 1200 && CanKill(i, GetBonusDmg(i) + Q.GetDamage(i)));
                    if (obj != null && W.Cast(PacketCast) && Q.CastOnUnit(obj, PacketCast))
                    {
                        return;
                    }
                }
                if (W.IsReady() || HaveW)
                {
                    var obj =
                        minionObj.Where(i => Orbwalk.InAutoAttackRange(i))
                        .FirstOrDefault(i => CanKill(i, GetBonusDmg(i)));
                    if (obj != null)
                    {
                        if (!HaveW)
                        {
                            W.Cast(PacketCast);
                        }
                        Orbwalk.Move   = false;
                        Orbwalk.Attack = false;
                        Player.IssueOrder(GameObjectOrder.AttackUnit, obj);
                        Orbwalk.Move   = true;
                        Orbwalk.Attack = true;
                    }
                }
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady())
            {
                var obj =
                    minionObj.FirstOrDefault(
                        i => i.MaxHealth >= 1200 && CanKill(i, Q.GetDamage(i) + (HaveW ? GetBonusDmg(i) : 0)));
                if (obj == null &&
                    (!minionObj.Any(i => Orbwalk.InAutoAttackRange(i, 40)) ||
                     (GetValue <bool>("Clear", "E") && E.IsReady() && HaveE && !minionObj.Any(i => E.IsInRange(i)))))
                {
                    obj = minionObj.MinOrDefault(i => i.Health);
                }
                if (obj != null && Q.CastOnUnit(obj, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Item"))
            {
                var item = Hydra.IsReady() ? Hydra : Tiamat;
                if (item.IsReady() &&
                    (minionObj.Count(i => item.IsInRange(i)) > 2 ||
                     minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player) < item.Range - 80)))
                {
                    item.Cast();
                }
            }
        }
Example #31
0
        void Killsteal()
        {
            if (SpellSlot.Q.IsReady() && GetBool("Killsteal.UseQ"))
            {
                var targ = HeroManager.Enemies.Find(x => x.CanKill(SpellSlot.Q) && x.IsInRange(Qrange));
                if (targ != null)
                {
                    UseQ(targ, GetHitChance("Hitchance.Q"));
                    return;
                }
            }

            if (SpellSlot.E.IsReady() && GetBool("Killsteal.UseE"))
            {
                var targ = HeroManager.Enemies.Find(x => x.CanKill(SpellSlot.E) && x.IsInRange(Spells[E].Range));
                if (targ != null)
                {
                    Spells[E].Cast(targ);
                    return;
                }
            }

            if (SpellSlot.R.IsReady() && GetBool("Killsteal.UseR"))
            {
                var targ = KnockedUp.Find(x => x.CanKill(SpellSlot.R) && x.IsValidEnemy(Spells[R].Range) && !x.isBlackListed());
                if (targ != null)
                {
                    Spells[R].Cast(targ);
                    return;
                }
            }

            if (GetBool("Killsteal.UseIgnite"))
            {
                CastIgnite();
                return;
            }

            if (GetBool("Killsteal.UseItems"))
            {
                if (Tiamat.item.IsReady())
                {
                    var targ =
                        HeroManager.Enemies.Find(
                            x =>
                            x.IsValidEnemy(Tiamat.item.Range) &&
                            x.Health <= Yasuo.GetItemDamage(x, Damage.DamageItems.Tiamat));
                    if (targ != null)
                    {
                        Tiamat.Cast(null);
                    }
                }

                if (Titanic.item.IsReady())
                {
                    var targ =
                        HeroManager.Enemies.Find(
                            x =>
                            x.IsValidEnemy(Titanic.item.Range) &&
                            x.Health <= Yasuo.GetItemDamage(x, Damage.DamageItems.Tiamat));
                    if (targ != null)
                    {
                        Titanic.Cast(null);
                    }
                }
                if (Hydra.item.IsReady())
                {
                    var targ =
                        HeroManager.Enemies.Find(
                            x =>
                            x.IsValidEnemy(Hydra.item.Range) &&
                            x.Health <= Yasuo.GetItemDamage(x, Damage.DamageItems.Tiamat));
                    if (targ != null)
                    {
                        Hydra.Cast(null);
                    }
                }
                if (Blade.item.IsReady())
                {
                    var targ = HeroManager.Enemies.Find(
                        x =>
                        x.IsValidEnemy(Blade.item.Range) &&
                        x.Health <= Yasuo.GetItemDamage(x, Damage.DamageItems.Botrk));
                    if (targ != null)
                    {
                        Blade.Cast(targ);
                    }
                }
                if (Bilgewater.item.IsReady())
                {
                    var targ = HeroManager.Enemies.Find(
                        x =>
                        x.IsValidEnemy(Bilgewater.item.Range) &&
                        x.Health <= Yasuo.GetItemDamage(x, Damage.DamageItems.Bilgewater));
                    if (targ != null)
                    {
                        Bilgewater.Cast(targ);
                    }
                }
            }
        }
Example #32
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(FrostQueen.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    var predInput2 = new Core.PredictionInput
                    {
                        Aoe       = true,
                        Collision = false,
                        Speed     = 1200,
                        Delay     = 0.25f,
                        Range     = FrostQueen.Range,
                        From      = Player.ServerPosition,
                        Radius    = 200,
                        Unit      = t,
                        Type      = Core.SkillshotType.SkillshotCircle
                    };
                    var poutput2 = Core.Prediction.GetPrediction(predInput2);

                    if (poutput2.Hitchance >= Core.HitChance.High)
                    {
                        FrostQueen.Cast(poutput2.CastPosition);
                    }
                }
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>())
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is Obj_AI_Hero)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth * 0.6)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>() && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #33
0
        private static void Clear()
        {
            SmiteMob();
            var minionObj =
                Helper.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
                .Cast <Obj_AI_Base>()
                .ToList();

            if (!minionObj.Any())
            {
                return;
            }
            if (clearQ && Q.IsReady())
            {
                var pos = Q.GetCircularFarmLocation(minionObj.Where(i => Q.IsInRange(i, Q.Range + Q.Width / 2)).ToList());
                if (pos.MinionsHit > 1)
                {
                    Q.Cast(pos.Position);
                    return;
                }
                var obj = minionObj.FirstOrDefault(i => i.MaxHealth >= 1200);
                if (obj != null && Q.IsInRange(obj, Q.Range + Q2.Width / 2) && Q.IsReady())
                {
                    Q.Cast(obj);
                    return;
                }
            }
            if (clearE && E.IsReady())
            {
                var pos = E.GetLineFarmLocation(minionObj);
                if (pos.MinionsHit > 0)
                {
                    E.Cast(pos.Position);
                    return;
                }
            }
            if (clearW && W.IsReady())
            {
                if (myHero.HealthPercent >= (WPriority ? 85 : ClearWHpU))
                {
                    if (!HaveWDmg)
                    {
                        W.Cast();
                        return;
                    }
                }
                else if (HaveWDmg)
                {
                    W.Cast();
                    return;
                }
            }
            if (Item)
            {
                var item = Hydra.IsReady() ? Hydra : Tiamat;
                if (item.IsReady() &&
                    (minionObj.Count(i => item.IsInRange(i)) > 2 ||
                     minionObj.Any(i => i.MaxHealth >= 1200 && i.LSDistance(myHero) < item.Range - 80)))
                {
                    item.Cast();
                }
            }
        }
Example #34
0
        private void Combo()
        {
            var useQ                 = Config.Item("ComboUseQ").GetValue <bool>();
            var useW                 = Config.Item("ComboUseW").GetValue <bool>();
            var useE                 = Config.Item("ComboUseE").GetValue <bool>();
            var useR                 = Config.Item("ComboUseR").GetValue <bool>();
            var dontEUnderTurret     = Config.Item("ComboDontEUnderTurret").GetValue <bool>();
            var comboMinimumREnemies = Config.Item("ComboMinimumREnemies").GetValue <Slider>().Value;

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

            if ((target == null) || !target.IsValidTarget())
            {
                return;
            }

            if (useR && (Player.CountEnemiesInRange(E.Range) >= comboMinimumREnemies) && R.Instance.IsReady())
            {
                R.Cast();
            }

            if (useE && E.Instance.IsReady() && !Q.IsInRange(target))
            {
                if (target.UnderTurret() && dontEUnderTurret)
                {
                    return;
                }
                E.Cast(target.Position);
            }
            if (useQ && Q.Instance.IsReady())
            {
                Q.CastOnUnit(target);
            }
            if ((_isMidAir && target.IsValidTarget(Hydra.Range)) || target.IsValidTarget(Tiamat.Range) ||
                target.IsValidTarget(TitanicHydra.Range))
            {
                if (Hydra.IsReady())
                {
                    Hydra.Cast();
                }
                if (TitanicHydra.IsReady())
                {
                    TitanicHydra.Cast();
                }
                if (Tiamat.IsReady())
                {
                    Tiamat.Cast();
                }
            }
            if (useW && W.Instance.IsReady())
            {
                SebbySpell(W, target);
            }

            if (Youmuu.IsReady() && target.IsValidTarget(Player.AttackRange + 400))
            {
                Youmuu.Cast();
            }
            if (Hydra.IsReady() && target.IsValidTarget(Hydra.Range))
            {
                Hydra.Cast();
            }
            if (TitanicHydra.IsReady() && target.IsValidTarget(TitanicHydra.Range))
            {
                TitanicHydra.Cast();
            }
            if (Tiamat.IsReady() && target.IsValidTarget(Tiamat.Range))
            {
                Tiamat.Cast();
            }
        }