Пример #1
0
 private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, bool simulated = false, string mode = "combo")
 {
     try
     {
         if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase))
         {
             return(false);
         }
         var pred = CPrediction.Circle(R, target, HitChance.High, false);
         if (pred.TotalHits > 0 &&
             UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true)))
         {
             if (!simulated)
             {
                 R.Cast(pred.CastPosition);
                 var aaTarget =
                     TargetSelector.GetTargets(Player.AttackRange + Player.BoundingRadius * 3f)
                     .FirstOrDefault(Orbwalking.InAutoAttackRange);
                 if (aaTarget != null)
                 {
                     Player.IssueOrder(GameObjectOrder.AttackUnit, aaTarget);
                 }
             }
             return(true);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(false);
 }
Пример #2
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var w = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var r = UltimateManager.Combo() && R.IsReady();

            var qCasted = false;

            if (e)
            {
                var target = TargetSelector.GetTarget((MaxERange + E.Width) * 1.1f, E.DamageType);
                if (target != null)
                {
                    ELogic(target, GameObjects.EnemyHeroes.ToList(), E.GetHitChance("combo"));
                }
            }
            if (q)
            {
                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                if (target != null)
                {
                    qCasted = Q.CastOnUnit(target);
                }
            }
            if (w)
            {
                var target = TargetSelector.GetTarget(W);
                if (target != null)
                {
                    WLogic(target, W.GetHitChance("combo"));
                }
            }
            if (r)
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null && (HasQBuff() || (qCasted || !q || !Q.IsReady()) || R.IsKillable(target)) &&
                    !RLogic(target, Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value, q, e))
                {
                    if (Menu.Item(Menu.Name + ".ultimate.combo.duel").GetValue <bool>())
                    {
                        RLogicDuel(q, e);
                    }
                }
            }
            var rTarget = TargetSelector.GetTarget(R);

            if (rTarget != null && CalcComboDamage(rTarget, q, e, r) > rTarget.Health)
            {
                ItemManager.UseComboItems(rTarget);
                SummonerManager.UseComboSummoners(rTarget);
            }
        }
Пример #3
0
        private void SetupMenu()
        {
            try
            {
                SFXMenu = new Menu(Global.Name, "sfx", true);

                Menu = SFXMenu.AddSubMenu(new Menu(Player.ChampionName, "." + Player.ChampionName));

                DrawingManager.AddToMenu(
                    Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Drawing"), Menu.Name + ".drawing")), this);

                TargetSelector.AddToMenu(
                    SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_TargetSelector"), SFXMenu.Name + ".ts")));

                Orbwalker =
                    new Orbwalking.Orbwalker(
                        SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_Orbwalker"), SFXMenu.Name + ".orb")));
                KillstealManager.AddToMenu(
                    SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MK"), SFXMenu.Name + ".killsteal")));
                ItemManager.AddToMenu(
                    SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MI"), SFXMenu.Name + ".items")), ItemFlags);
                SummonerManager.AddToMenu(
                    SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MS"), SFXMenu.Name + ".summoners")));

                LanguageMenu.AddToMenu(
                    SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_Settings"), SFXMenu.Name + ".settings")));

                InfoMenu.AddToMenu(SFXMenu.AddSubMenu(new Menu(Global.Lang.Get("F_Info"), SFXMenu.Name + ".info")));

                DebugMenu.AddToMenu(SFXMenu, Spells);

                TickMenu.AddToMenu(SFXMenu);

                SFXMenu.AddToMainMenu();

                try
                {
                    AddToMenu();
                }
                catch (Exception ex)
                {
                    Global.Logger.AddItem(new LogItem(ex));
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Пример #4
0
        protected override void Harass()
        {
            if (!ManaManager.Check("harass"))
            {
                return;
            }

            if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>())
            {
                var target = TargetSelector.GetTarget((MaxERange + E.Width) * 1.1f, E.DamageType);
                if (target != null)
                {
                    ELogic(target, GameObjects.EnemyHeroes.ToList(), E.GetHitChance("harass"));
                }
            }
            if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                if (target != null)
                {
                    Q.CastOnUnit(target);
                }
            }
        }
Пример #5
0
 private void OnOrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     try
     {
         if (HasQBuff())
         {
             if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
             {
                 if ((_rObject == null || !_rObject.IsValid) && R.IsReady() && UltimateManager.Combo() &&
                     R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) &&
                     GameObjects.EnemyHeroes.Any(Orbwalking.InAutoAttackRange) &&
                     (RLogicDuel(true, Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true) ||
                      GameObjects.EnemyHeroes.Where(e => e.IsValidTarget(R.Range + R.Width))
                      .Any(
                          e =>
                          RLogic(
                              e, Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value,
                              Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                              Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true))))
                 {
                     args.Process = false;
                     return;
                 }
             }
             if (!(args.Target is Obj_AI_Hero))
             {
                 var targets = TargetSelector.GetTargets(Player.AttackRange + Player.BoundingRadius * 3f);
                 if (targets != null && targets.Any())
                 {
                     var hero = targets.FirstOrDefault(Orbwalking.InAutoAttackRange);
                     if (hero != null)
                     {
                         Orbwalker.ForceTarget(hero);
                         args.Process = false;
                     }
                     else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
                     {
                         if (
                             targets.Any(
                                 t =>
                                 t.Distance(Player) <
                                 (Player.BoundingRadius + t.BoundingRadius + Player.AttackRange) *
                                 (IsSpellUpgraded(Q) ? 1.4f : 1.2f)))
                         {
                             args.Process = false;
                         }
                     }
                 }
             }
         }
         else
         {
             if ((args.Target is Obj_AI_Hero) &&
                 (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
                  Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed) &&
                 (Q.IsReady() && Player.Mana >= Q.Instance.ManaCost ||
                  E.IsReady() && Player.Mana >= E.Instance.ManaCost))
             {
                 args.Process = false;
             }
         }
         if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit ||
             Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
         {
             var minion = args.Target as Obj_AI_Minion;
             if (minion != null &&
                 HealthPrediction.LaneClearHealthPrediction(
                     minion, (int)(Player.AttackDelay * 1000), Game.Ping / 2) <
                 Player.GetAutoAttackDamage(minion))
             {
                 _lastBeforeFarmTarget = minion;
             }
             if (_lastQKillableTarget != null && _lastQKillableTarget.NetworkId == args.Target.NetworkId)
             {
                 args.Process = false;
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Пример #6
0
        private void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                if (Menu.Item(Menu.Name + ".ultimate.follow").GetValue <bool>())
                {
                    RFollowLogic();
                }
                if (UltimateManager.Assisted() && R.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }
                    var target = TargetSelector.GetTarget(R);
                    if (target != null &&
                        !RLogic(
                            target, Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.assisted.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                        }
                    }
                }

                if (UltimateManager.Auto() && R.IsReady())
                {
                    var target = TargetSelector.GetTarget(R);
                    if (target != null &&
                        !RLogic(
                            target, Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), false, "auto"))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.auto.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                        }
                    }
                }

                if (HeroListManager.Enabled("w-stunned") && W.IsReady())
                {
                    var target =
                        GameObjects.EnemyHeroes.FirstOrDefault(
                            t => t.IsValidTarget(W.Range) && HeroListManager.Check("w-stunned", t) && Utils.IsStunned(t));
                    if (target != null)
                    {
                        Casting.SkillShot(target, W, W.GetHitChance("combo"));
                    }
                }

                if (HeroListManager.Enabled("w-slowed") && W.IsReady())
                {
                    var target =
                        GameObjects.EnemyHeroes.FirstOrDefault(
                            t =>
                            t.IsValidTarget(W.Range) && HeroListManager.Check("w-slowed", t) &&
                            t.Buffs.Any(b => b.Type == BuffType.Slow && b.EndTime - Game.Time > 0.5f));
                    if (target != null)
                    {
                        Casting.SkillShot(target, W, W.GetHitChance("combo"));
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit ||
                    Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (Menu.Item(Menu.Name + ".lasthit.q-unkillable").GetValue <bool>() && Q.IsReady() &&
                        ManaManager.Check("lasthit"))
                    {
                        var canAttack = Game.Time >= _lastAutoAttack + Player.AttackDelay;
                        var minions   =
                            MinionManager.GetMinions(Q.Range)
                            .Where(
                                m =>
                                (!canAttack || !Orbwalking.InAutoAttackRange(m)) && m.HealthPercent <= 50 &&
                                (_lastAfterFarmTarget == null || _lastAfterFarmTarget.NetworkId != m.NetworkId) &&
                                (_lastBeforeFarmTarget == null || _lastBeforeFarmTarget.NetworkId != m.NetworkId))
                            .ToList();
                        if (minions.Any())
                        {
                            foreach (var minion in minions)
                            {
                                var health = HealthPrediction.GetHealthPrediction(
                                    minion, (int)(Q.ArrivalTime(minion) * 1000));
                                if (health > 0 && Math.Abs(health - minion.Health) > 10 &&
                                    Q.GetDamage(minion) * 0.85f > health)
                                {
                                    if (Q.CastOnUnit(minion))
                                    {
                                        _lastQKillableTarget = minion;
                                    }
                                    break;
                                }
                            }
                        }
                    }
                }

                Orbwalking.PreventStuttering(HasQBuff());
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Пример #7
0
 public static void TargetSkill(Spell spell)
 {
     TargetSkill(TargetSelector.GetTarget(spell), spell);
 }
Пример #8
0
 public static void SkillShot(Spell spell, HitChance hitChance, bool boundingRadius = true, bool maxRange = true)
 {
     SkillShot(TargetSelector.GetTarget(spell), spell, hitChance);
 }