示例#1
0
        private void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser)
        {
            if (ObjectManager.Player.Distance(gapcloser.Sender.Position) > e.Range)
            {
                return;
            }

            if (zedMenu.GetParamBool("koreanzed.miscmenu.useeantigc") && e.IsReady())
            {
                e.Cast();
                //Console.WriteLine("antig1");
            }

            if (zedMenu.GetParamBool("koreanzed.miscmenu.usewantigc") && w.IsReady() && antiGapCloserList.Count == 0)
            {
                if (shadows.CanCast)
                {
                    actionQueue.EnqueueAction(
                        antiGapCloserList,
                        () => player.Mana > w.ManaCost && player.HealthPercent - 10 < gapcloser.Sender.HealthPercent,
                        () => shadows.Cast(Vector3.Negate(gapcloser.Sender.Position)),
                        () => true);
                    actionQueue.EnqueueAction(
                        antiGapCloserList,
                        () => w.Instance.ToggleState != 0,
                        () => shadows.Switch(),
                        () => !w.IsReady());
                    Game.OnUpdate += Game_OnUpdate;
                    return;
                }
                else if (!shadows.CanCast && shadows.CanSwitch)
                {
                    int champCount =
                        HeroManager.Enemies.Count(enemy => enemy.Distance(shadows.Instance.Position) < 1500F);

                    if ((player.HealthPercent > 80 && champCount <= 3) ||
                        (player.HealthPercent > 40 && champCount <= 2)
                        )
                    {
                        shadows.Switch();
                        //Console.WriteLine("antig2");
                    }
                }
            }
        }
示例#2
0
 private void Game_OnUpdate(EventArgs args)
 {
     if (zedMenu.GetParamKeyBind("koreanzed.miscmenu.flee"))
     {
         EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
         zedShadows.Cast(Game.CursorPos);
         zedShadows.Switch();
     }
 }
示例#3
0
 private void Game_OnUpdate(EventArgs args)
 {
     if (zedMenu.GetParamKeyBind("koreanzed.miscmenu.flee"))
     {
         ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
         //Console.WriteLine("flee 1");
         zedShadows.Cast(Game.CursorPos);
         //Console.WriteLine("flee 2");
         zedShadows.Switch();
         //Console.WriteLine("flee 3");
     }
 }
示例#4
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (q.IsReady() && player.Mana > q.ManaCost)
            {
                foreach (Obj_AI_Hero objAiHero in player.GetEnemiesInRange(q.Range).Where(hero => !hero.IsDead && !hero.IsZombie && q.IsKillable(hero)))
                {
                    PredictionOutput predictionOutput = q.GetPrediction(objAiHero);

                    if ((predictionOutput.Hitchance >= HitChance.High) &&
                        ((!q.GetCollision(player.Position.To2D(), new List <Vector2> {
                        predictionOutput.CastPosition.To2D()
                    }).Any()) ||
                         q.GetDamage(objAiHero) / 2 > objAiHero.Health))
                    {
                        q.Cast(predictionOutput.CastPosition);
                        //Console.WriteLine("ks q");
                    }
                }
            }

            if (e.IsReady() && player.Mana > e.ManaCost)
            {
                if (player.GetEnemiesInRange(e.Range).Any(hero => !hero.IsDead && !hero.IsZombie && e.IsKillable(hero)))
                {
                    e.Cast();
                    //Console.WriteLine("ks e");
                }
            }

            if (zedOrbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo || !zedShadows.CanCast)
            {
                return;
            }

            List <Obj_AI_Hero> heroList = ObjectManager.Player.GetEnemiesInRange(2000F);

            if (heroList.Count() == 1)
            {
                Obj_AI_Hero target = heroList.FirstOrDefault();

                if (target != null && zedShadows.CanCast && player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) &&
                    player.Distance(target) < w.Range + Orbwalking.GetRealAutoAttackRange(target) &&
                    player.GetAutoAttackDamage(target) > target.Health && player.Mana > w.ManaCost)
                {
                    zedShadows.Cast(target.Position);
                    //Console.WriteLine("ks w 1");
                    zedShadows.Switch();
                    //Console.WriteLine("ks w 2");
                }
            }
        }
示例#5
0
        private void Combo()
        {
            if (actionQueue.ExecuteNextAction(comboQueue))
            {
                return;
            }

            AIHeroClient itemsTarget = TargetSelector.GetTarget(player.AttackRange, TargetSelector.DamageType.Physical);

            if (itemsTarget != null)
            {
                zedItems.UseItems(itemsTarget);
            }

            shadows.Combo();

            if (w.UseOnCombo && shadows.CanCast && player.HasBuff("ZedR2"))
            {
                AIHeroClient target = TargetSelector.GetTarget(w.Range + e.Range, TargetSelector.DamageType.Physical);

                if (target != null)
                {
                    actionQueue.EnqueueAction(comboQueue,
                                              () => true,
                                              () => shadows.Cast(w.GetPrediction(target).CastPosition),
                                              () => true);
                    return;
                }
            }

            float maxRange = float.MaxValue;

            if (r.UseOnCombo && r.IsReady() && r.Instance.ToggleState == 0)
            {
                AIHeroClient target = null;

                maxRange = Math.Min(maxRange, r.Range);

                if (zedMenu.GetParamBool("koreanzed.combo.ronselected"))
                {
                    if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.IsValidTarget(maxRange))
                    {
                        target = TargetSelector.SelectedTarget;
                    }
                }
                else
                {
                    List <AIHeroClient> ignoredChamps = zedMenu.GetBlockList(BlockListType.Ultimate);
                    target = TargetSelector.GetTarget(maxRange, r.DamageType, true, ignoredChamps);
                }

                if (target != null)
                {
                    switch (zedMenu.GetCombo())
                    {
                    case ComboType.AllStar:
                        AllStarCombo(target);
                        break;

                    case ComboType.TheLine:
                        TheLineCombo(target);
                        break;
                    }
                    return;
                }
            }
            else if (w.UseOnCombo && shadows.CanCast && (!r.UseOnCombo || (r.UseOnCombo && !r.IsReady())) &&
                     (player.Mana > w.ManaCost + (q.UseOnCombo && q.IsReady() ? q.ManaCost : 0F) + (e.UseOnCombo && e.IsReady() ? e.ManaCost : 0F)))
            {
                maxRange = Math.Min(maxRange, w.Range + e.Range);
                AIHeroClient target = TargetSelector.GetTarget(maxRange, TargetSelector.DamageType.Physical);
                if (target != null)
                {
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => shadows.CanCast,
                        () => shadows.Cast(w.GetPrediction(target).CastPosition),
                        () => !shadows.CanCast);
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => w.Instance.ToggleState != 0,
                        () => shadows.Combo(),
                        () => true);
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => shadows.CanSwitch && target.Distance(shadows.Instance.Position) <= player.AttackRange,
                        () => shadows.Switch(),
                        () => !shadows.CanSwitch || target.Distance(shadows.Instance.Position) > player.AttackRange || !w.IsReady());
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => player.Distance(target) <= Orbwalking.GetRealAutoAttackRange(target),
                        () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target),
                        () => target.IsDead || target.IsZombie || player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) || checkAutoAttack.Status);
                    return;
                }
            }

            if (q.UseOnCombo && q.IsReady() && player.Mana > q.ManaCost)
            {
                maxRange = Math.Min(maxRange, q.Range);
                AIHeroClient target = TargetSelector.GetTarget(maxRange, q.DamageType);

                PredictionOutput predictionOutput = q.GetPrediction(target);

                if (predictionOutput.Hitchance >= HitChance.Medium)
                {
                    q.Cast(predictionOutput.CastPosition);
                }
            }

            if (e.UseOnCombo && e.IsReady() && player.Mana > e.ManaCost)
            {
                maxRange = Math.Min(maxRange, e.Range);
                AIHeroClient target = TargetSelector.GetTarget(maxRange, e.DamageType);
                if (target != null)
                {
                    actionQueue.EnqueueAction(comboQueue,
                                              () => e.IsReady(),
                                              () => e.Cast(),
                                              () => true);
                    return;
                }
            }

            if (w.UseOnCombo && w.IsReady() && shadows.CanSwitch)
            {
                List <Obj_AI_Base> shadowList = shadows.GetShadows();

                foreach (Obj_AI_Base objAiBase in shadowList)
                {
                    AIHeroClient target = TargetSelector.GetTarget(2000F, TargetSelector.DamageType.Physical);

                    if (target != null && player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) + 50F &&
                        objAiBase.Distance(target) < player.Distance(target))
                    {
                        shadows.Switch();
                    }
                }
            }
        }