Beispiel #1
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.recalling())
            {
                return;
            }


            edelay = CassioUtils.getSliderItem(CassiopeiaMenu.Combo, "Combo.edelay");

            Killsteal();

            target = TargetSelector.GetTarget(Spells[SpellSlot.Q].Range, DamageType.Magical);
            if (target != null && CassioUtils.getKeyBindItem(CassiopeiaMenu.Harass, "Keys.HarassT") && Player.ManaPercent >= CassioUtils.getSliderItem(CassiopeiaMenu.Harass, "Harass.Mana") && !target.IsInvulnerable && !target.IsZombie)
            {
                Harass(target);
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (target != null && !target.IsInvulnerable && !target.IsZombie)
                {
                    Combo(target);
                }
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                MixedModeLogic(target, true);
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                WaveClear();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                MixedModeLogic(target, false);
            }
        }
Beispiel #2
0
        static void MixedModeLogic(AIHeroClient target, bool isMixed)
        {
            if (isMixed && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Harass, "Harass.InMixed") && Player.ManaPercent > CassioUtils.getSliderItem(CassiopeiaMenu.Harass, "Harass.Mana"))
            {
                if (target != null && !target.IsInvulnerable && !target.IsZombie)
                {
                    Harass(target);
                }
            }

            if (!CassioUtils.getCheckBoxItem(CassiopeiaMenu.Farm, "Farm.Enable") || Player.ManaPercent < CassioUtils.getSliderItem(CassiopeiaMenu.Farm, "Farm.Mana"))
            {
                return;
            }

            var Minions =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    m =>
                    m.LSIsValidTarget() &&
                    (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range));

            if (!Minions.Any())
            {
                return;
            }
            if (SpellSlot.Q.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Farm, "Farm.UseQ"))
            {
                var KillableMinionsQ = Minions.Where(m => m.Health < Player.LSGetSpellDamage(m, SpellSlot.Q));
                if (KillableMinionsQ.Any())
                {
                    Spells[SpellSlot.Q].Cast(KillableMinionsQ.FirstOrDefault().ServerPosition);
                }
            }
            if (SpellSlot.W.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Farm, "Farm.UseW"))
            {
                var KillableMinionsW = Minions.Where(m => m.Health < Player.LSGetSpellDamage(m, SpellSlot.W));
                if (KillableMinionsW.Any())
                {
                    Spells[SpellSlot.W].Cast(KillableMinionsW.FirstOrDefault().ServerPosition);
                }
            }
            if (SpellSlot.E.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Farm, "Farm.UseE"))
            {
                var KillableMinionE = Minions.FirstOrDefault(m => m.Health < Player.LSGetSpellDamage(m, SpellSlot.E));
                if (KillableMinionE != null)
                {
                    if (CassioUtils.getCheckBoxItem(CassiopeiaMenu.Farm, "Farm.useepoison"))
                    {
                        if (KillableMinionE.isPoisoned())
                        {
                            Spells[SpellSlot.E].Cast(KillableMinionE);
                        }
                    }
                    else
                    {
                        Spells[SpellSlot.E].Cast(KillableMinionE);
                    }
                }
            }
        }
Beispiel #3
0
        private static void WaveClear()
        {
            var Minions =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    m =>
                    (m.LSIsValidTarget()) &&
                    (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.R].Range));

            if (SpellSlot.Q.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.UseQ"))
            {
                var qminions =
                    Minions.Where(
                        m =>
                        Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range);
                MinionManager.FarmLocation QLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        qminions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells[SpellSlot.Q].Width,
                        Spells[SpellSlot.Q].Range);
                if (QLocation.MinionsHit >= 1)
                {
                    Spells[SpellSlot.Q].Cast(QLocation.Position);
                }
            }


            if (SpellSlot.W.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.UseW"))
            {
                var wminions = Minions.Where(m =>
                                             Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.W].Range);
                MinionManager.FarmLocation WLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        wminions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells[SpellSlot.W].Width,
                        Spells[SpellSlot.W].Range);
                if (WLocation.MinionsHit >= 1)
                {
                    Spells[SpellSlot.W].Cast(WLocation.Position);
                }
            }

            if (SpellSlot.E.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.UseE"))
            {
                Obj_AI_Minion KillableMinionE = null;
                var           eminions        = Minions.Where(m =>
                                                              Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range);
                if (CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.useekillable"))
                {
                    KillableMinionE = eminions.FirstOrDefault(m => m.Health < Player.LSGetSpellDamage(m, SpellSlot.E));
                }
                else
                {
                    KillableMinionE = eminions.OrderBy(x => x.Health).FirstOrDefault();
                }

                if (KillableMinionE != null)
                {
                    if (CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.useepoison"))
                    {
                        if (KillableMinionE.isPoisoned())
                        {
                            Spells[SpellSlot.E].Cast(KillableMinionE);
                        }
                    }
                    else
                    {
                        Spells[SpellSlot.E].Cast(KillableMinionE);
                    }
                }
            }

            if (SpellSlot.R.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.UseR"))
            {
                MinionManager.FarmLocation RLocation =
                    MinionManager.GetBestLineFarmLocation(
                        Minions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells[SpellSlot.R].Width,
                        Spells[SpellSlot.R].Range);
                if (RLocation.MinionsHit > CassioUtils.getSliderItem(CassiopeiaMenu.Waveclear, "Waveclear.Rcount"))
                {
                    Spells[SpellSlot.R].Cast(RLocation.Position);
                }
            }
        }
Beispiel #4
0
        static void AutoSpells(EventArgs args)
        {
            if (Player.IsDead || Player.recalling())
            {
                return;
            }
            if (SpellSlot.E.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.UseE") && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || CassioUtils.getCheckBoxItem(CassiopeiaMenu.misc, "Misc.autoe")))
            {
                AIHeroClient etarg;
                etarg = target;
                if (etarg == null)
                {
                    etarg = HeroManager.Enemies.FirstOrDefault(h => h.LSIsValidTarget(Spells[SpellSlot.E].Range) && h.isPoisoned() && !h.IsInvulnerable && !h.IsZombie);
                }
                if (etarg != null && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.useepoison") && etarg.isPoisoned())
                {
                    if ((Utils.GameTimeTickCount - laste) > edelay)
                    {
                        Spells[SpellSlot.E].Cast(etarg);
                        laste = Utils.GameTimeTickCount;
                    }
                }
                else if (!CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.useepoison"))
                {
                    if ((Utils.GameTimeTickCount - laste) > edelay)
                    {
                        Spells[SpellSlot.E].Cast(target);
                        laste = Utils.GameTimeTickCount;
                    }
                }
            }



            if (SpellSlot.R.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.UseR") &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var     targets            = HeroManager.Enemies.Where(x => x.LSIsValidTarget(Spells[SpellSlot.R].Range) && !x.IsZombie).OrderBy(x => x.Health);
                Vector3 bestpositionfacing = new Vector3(0, 0, 0);
                Vector3 bestpositionnf     = new Vector3(0, 0, 0);
                int     mosthitfacing      = 0;
                int     mosthitnf          = 0;
                foreach (var targ in targets)
                {
                    var pred = Spells[SpellSlot.R].GetPrediction(targ, true);
                    if (pred.Hitchance >= CassioUtils.RChance())
                    {
                        int enemhitpred    = 0;
                        int enemfacingpred = 0;
                        foreach (var hero in targets)
                        {
                            if (Spells[SpellSlot.R].WillHit(hero, pred.CastPosition, 0, CassioUtils.RChance()))
                            {
                                enemhitpred++;
                                if (hero.IsFacing(Player))
                                {
                                    enemfacingpred++;
                                }
                            }
                        }

                        if (enemfacingpred > mosthitfacing)
                        {
                            mosthitfacing      = enemfacingpred;
                            bestpositionfacing = pred.CastPosition;
                        }

                        if (enemhitpred > mosthitnf)
                        {
                            mosthitnf      = enemhitpred;
                            bestpositionnf = pred.CastPosition;
                        }
                    }
                }

                if (mosthitfacing >= CassioUtils.getSliderItem(CassiopeiaMenu.Combo, "Combo.Rcount"))
                {
                    Spells[SpellSlot.R].Cast(bestpositionfacing);
                    return;
                }
                if (mosthitnf >= CassioUtils.getSliderItem(CassiopeiaMenu.Combo, "Combo.Rcountnf") && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.UseRNF"))
                {
                    Spells[SpellSlot.R].Cast(bestpositionnf);
                    return;
                }

                var easycheck = HeroManager.Enemies.FirstOrDefault(x =>
                                                                   !x.IsInvulnerable && !x.IsZombie && x.LSIsValidTarget(Spells[SpellSlot.R].Range) &&
                                                                   x.LSIsFacing(Player) && x.isImmobile());

                if (easycheck != null)
                {
                    Spells[SpellSlot.R].Cast(easycheck.ServerPosition);
                    return;
                }
            }


            /* © ® ™ Work on patented algorithms in the future! XD © ® ™ */

            /*
             * if (SpellSlot.R.IsReady() && CassioUtils.Active("Combo.UseR") && CassiopeiaMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
             * {
             *  var easycheck =
             *      HeroManager.Enemies.FirstOrDefault(
             *          x =>
             *              !x.IsInvulnerable && !x.IsZombie && x.IsValidTarget(Spells[SpellSlot.R].Range) &&
             *              x.IsFacing(Player) && x.isImmobile() && (Player.HealthPercent <= 20 || x.HealthPercent > 30));
             *
             *  if (easycheck != null)
             *  {
             *      Spells[SpellSlot.R].Cast(easycheck.ServerPosition);
             *      DontMove = true;
             *      Utility.DelayAction.Add(50, () => DontMove = false);
             *      return;
             *  }
             *  var targs = HeroManager.Enemies.Where(h => h.IsValidTarget(Spells[SpellSlot.R].Range));
             *  Dictionary<Vector3, double> Hitatpos = new Dictionary<Vector3, double>();
             *  Dictionary<Vector3, double> Hitatposfacing = new Dictionary<Vector3, double>();
             *  foreach (var t in targs)
             *  {
             *      var pred = Spells[SpellSlot.R].GetPrediction(t, false);
             *      var enemshit = pred.CastPosition.GetEnemiesInRange(Spells[SpellSlot.R].Width).Where(x=> x.Distance(Player) <= Spells[SpellSlot.R].Range);
             *      var counthit = enemshit.Count();
             *      var hitfacing = enemshit.Count(x => x.IsFacing(Player) && !x.IsDashing() && !x.IsZombie && !x.IsInvulnerable);
             *      var anymovingtome = enemshit.Any(x => x.isMovingToMe() || x.IsFacing(Player));
             *
             *      if (pred.Hitchance >= CassioUtils.GetHitChance("Hitchance.R") && anymovingtome)
             *      {
             *           Hitatposfacing.Add(pred.CastPosition, hitfacing);
             *      }
             *      if (CassioUtils.Active("Combo.UseRNF") && pred.Hitchance >= CassioUtils.GetHitChance("Hitchance.R"))
             *      {
             *          Hitatpos.Add(pred.CastPosition, counthit);
             *      }
             *  }
             *  if (Hitatposfacing.Any())
             *  {
             *      var bestpos = Hitatposfacing.Find(pos => pos.Value.Equals(Hitatposfacing.Values.Max())).Key;
             *      if (bestpos.IsValid() && bestpos.CountEnemiesInRange(Spells[SpellSlot.R].Width) >= CassioUtils.GetSlider("Combo.Rcount"))
             *      {
             *          Spells[SpellSlot.R].Cast(bestpos);
             *          DontMove = true;
             *          Utility.DelayAction.Add(50, () => DontMove = false);
             *      }
             *  }
             *  else if (Hitatpos.Any() && CassioUtils.Active("Combo.UseRNF") &&
             *           CassioUtils.GetSlider("Combo.Rcountnf") >= Hitatpos.Values.Max())
             *  {
             *      var bestposnf = Hitatpos.Find(pos => pos.Value.Equals(Hitatpos.Values.Max())).Key;
             *      if (bestposnf.IsValid() && bestposnf.CountEnemiesInRange(Spells[SpellSlot.R].Width) >= CassioUtils.GetSlider("Combo.Rcountnf"))
             *      {
             *          Spells[SpellSlot.R].Cast(bestposnf);
             *          DontMove = true;
             *          Utility.DelayAction.Add(50, () => DontMove = false);
             *      }
             *  }
             *
             * }
             */
        }
Beispiel #5
0
        static void AutoSpells(EventArgs args)
        {
            if (Player.IsDead || Player.recalling())
            {
                return;
            }
            if (SpellSlot.E.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.UseE") && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || CassioUtils.getCheckBoxItem(CassiopeiaMenu.misc, "Misc.autoe")))
            {
                AIHeroClient etarg;
                etarg = target;
                if (etarg == null)
                {
                    etarg = HeroManager.Enemies.FirstOrDefault(h => h.LSIsValidTarget(Spells[SpellSlot.E].Range) && h.isPoisoned() && !h.IsInvulnerable && !h.IsZombie);
                }
                if (etarg != null && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.useepoison") && etarg.isPoisoned())
                {
                    if ((Utils.GameTimeTickCount - laste) > edelay)
                    {
                        Spells[SpellSlot.E].Cast(etarg);
                        laste = Utils.GameTimeTickCount;
                    }
                }
                else if (!CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.useepoison"))
                {
                    if ((Utils.GameTimeTickCount - laste) > edelay)
                    {
                        Spells[SpellSlot.E].Cast(target);
                        laste = Utils.GameTimeTickCount;
                    }
                }
            }



            if (SpellSlot.R.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.UseR") &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var     targets            = HeroManager.Enemies.Where(x => x.LSIsValidTarget(Spells[SpellSlot.R].Range) && !x.IsZombie).OrderBy(x => x.Health);
                Vector3 bestpositionfacing = new Vector3(0, 0, 0);
                Vector3 bestpositionnf     = new Vector3(0, 0, 0);
                int     mosthitfacing      = 0;
                int     mosthitnf          = 0;
                foreach (var targ in targets)
                {
                    var pred = Spells[SpellSlot.R].GetPrediction(targ, true);
                    if (pred.HitChance >= CassioUtils.RChance())
                    {
                        int enemhitpred    = 0;
                        int enemfacingpred = 0;
                        foreach (var hero in targets)
                        {
                            if (Spells[SpellSlot.R].WillHit(hero, pred.CastPosition, 0, CassioUtils.RChance()))
                            {
                                enemhitpred++;
                                if (hero.IsFacing(Player))
                                {
                                    enemfacingpred++;
                                }
                            }
                        }

                        if (enemfacingpred > mosthitfacing)
                        {
                            mosthitfacing      = enemfacingpred;
                            bestpositionfacing = pred.CastPosition;
                        }

                        if (enemhitpred > mosthitnf)
                        {
                            mosthitnf      = enemhitpred;
                            bestpositionnf = pred.CastPosition;
                        }
                    }
                }

                if (mosthitfacing >= CassioUtils.getSliderItem(CassiopeiaMenu.Combo, "Combo.Rcount"))
                {
                    Spells[SpellSlot.R].Cast(bestpositionfacing);
                    return;
                }
                if (mosthitnf >= CassioUtils.getSliderItem(CassiopeiaMenu.Combo, "Combo.Rcountnf") && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.UseRNF"))
                {
                    Spells[SpellSlot.R].Cast(bestpositionnf);
                    return;
                }

                var easycheck = HeroManager.Enemies.FirstOrDefault(x =>
                                                                   !x.IsInvulnerable && !x.IsZombie && x.LSIsValidTarget(Spells[SpellSlot.R].Range) &&
                                                                   x.LSIsFacing(Player) && x.isImmobile());

                if (easycheck != null)
                {
                    Spells[SpellSlot.R].Cast(easycheck.ServerPosition);
                    return;
                }
            }
        }