Exemplo n.º 1
0
 private void FlashCombo()
 {
     if (R.IsReady() && player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready)
     {
         var points = CombatHelper.PointsAroundTheTarget(player.Position, 425);
         var best   =
             points.Where(
                 p =>
                 !p.IsWall() && p.Distance(player.Position) > 200 && p.Distance(player.Position) < 425 &&
                 p.IsValid() && p.CountEnemiesInRange(R.Range) > 0 &&
                 config.Item("Rminflash", true).GetValue <Slider>().Value <=
                 p.CountEnemiesInRange(R.Range - 150))
             .OrderByDescending(p => p.CountEnemiesInRange(R.Range - 100))
             .FirstOrDefault();
         if (best.CountEnemiesInRange(R.Range - 150) > player.CountEnemiesInRange(R.Range) &&
             CombatHelper.CheckInterrupt(best, R.Range))
         {
             player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), best);
             Utility.DelayAction.Add(50, () => { R.Cast(); });
             justR = true;
             Utility.DelayAction.Add(200, () => justR = false);
             orbwalker.SetAttack(false);
             orbwalker.SetMovement(false);
             return;
         }
     }
     if (!rActive && Orbwalking.CanMove(100))
     {
         if (!justR)
         {
             Orbwalking.MoveTo(Game.CursorPos, 80f);
             Combo();
         }
     }
 }
Exemplo n.º 2
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (FpsBalancer.CheckCounter())
            {
                return;
            }

            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                Clear();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            default:
                break;
            }
            var data = Program.IncDamages.GetAllyData(player.NetworkId);

            if (config.Item("autoECC", true).GetValue <bool>() && data.AnyCC)
            {
                CastAutoE();
            }
            if (config.Item("autoEdmg2", true).GetValue <Slider>().Value / 100f * player.Health < data.DamageTaken &&
                E.IsReady() && !OnTrident)
            {
                CastAutoE();
            }
            if (config.Item("castR", true).GetValue <KeyBind>().Active&& R.IsReady())
            {
                Obj_AI_Hero target = DrawHelper.GetBetterTarget(R.Range, TargetSelector.DamageType.Magical, true);
                if (target != null && R.CanCast(target))
                {
                    CastR(target);
                    Orbwalking.MoveTo(Game.CursorPos);
                }
            }
        }
Exemplo n.º 3
0
        private void WardJump()
        {
            Orbwalking.MoveTo(Game.CursorPos);
            if (!Q.IsReady())
            {
                return;
            }
            var wardSlot = Items.GetWardSlot();
            var pos      = Game.CursorPos;

            if (pos.Distance(player.Position) > 600)
            {
                pos = player.Position.Extend(pos, 600);
            }

            var jumpObj = GetJumpObj(pos);

            if (jumpObj != null)
            {
                Q.CastOnUnit(jumpObj);
            }
            else
            {
                if (wardSlot != null && wardSlot.IsValidSlot() &&
                    (player.Spellbook.CanUseSpell(wardSlot.SpellSlot) == SpellState.Ready || wardSlot.Stacks != 0) &&
                    !justWJ)
                {
                    justWJ = true;
                    Utility.DelayAction.Add(new Random().Next(1000, 1500), () => { justWJ = false; });
                    player.Spellbook.CastSpell(wardSlot.SpellSlot, pos);
                    Utility.DelayAction.Add(
                        150, () =>
                    {
                        var predWard = GetJumpObj(pos);
                        if (predWard != null && Q.IsReady())
                        {
                            Q.CastOnUnit(predWard);
                        }
                    });
                }
            }
        }
Exemplo n.º 4
0
        private static void FlashCombo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(EFlash.Range, TargetSelector.DamageType.Magical);

            if (target != null && E.IsReady() && E.ManaCost < player.Mana &&
                player.Distance(target.Position) < EFlash.Range && player.Distance(target.Position) > 480 &&
                !((getPosToEflash(target.Position)).IsWall()))
            {
                var pred          = EFlash.GetPrediction(target);
                var poly          = CombatHelper.GetPolyFromVector(getPosToEflash(target.Position), pred.UnitPosition, E.Width);
                var enemiesBehind =
                    HeroManager.Enemies.Count(
                        e =>
                        e.NetworkId != target.NetworkId && e.IsValidTarget(E.Range) &&
                        (poly.IsInside(E.GetPrediction(e).UnitPosition) || poly.IsInside(e.Position)) &&
                        e.Position.Distance(player.Position) > player.Distance(pred.UnitPosition));
                if (pred.Hitchance >= HitChance.High)
                {
                    Utility.DelayAction.Add(
                        30, () =>
                    {
                        if (enemiesBehind > 0)
                        {
                            E.Cast(
                                player.ServerPosition.Extend(pred.CastPosition, E.Range),
                                config.Item("packets").GetValue <bool>());
                        }
                        else
                        {
                            E.Cast(
                                player.ServerPosition.Extend(
                                    pred.CastPosition,
                                    player.Distance(pred.CastPosition) + Orbwalking.GetRealAutoAttackRange(target)),
                                config.Item("packets").GetValue <bool>());
                        }
                    });
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), getPosToEflash(target.Position));
                }
            }
            ItemHandler.UseItems(target, config);
            Orbwalking.MoveTo(Game.CursorPos);
        }
Exemplo n.º 5
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (FpsBalancer.CheckCounter())
            {
                return;
            }
            if (forcedPos.IsValid() && !ToCursor)
            {
                player.IssueOrder(GameObjectOrder.MoveTo, cgTarg.Position.Extend(forcedPos, 50));
            }
            if (forcedPos.IsValid() && ToCursor)
            {
                var pos = cgTarg.Position.Extend(forcedPos, 115);
                player.IssueOrder(GameObjectOrder.MoveTo, pos);
                if (player.Distance(pos) < 10)
                {
                    E.CastOnUnit(cgTarg);

                    player.IssueOrder(GameObjectOrder.MoveTo, cgTarg);
                }
                ToCursor  = false;
                forcedPos = Vector3.Zero;
            }
            Orbwalking.Move   = true;
            Orbwalking.Attack = true;
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                TurnOffQ();
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                TurnOffQ();
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                TurnOffQ();
                Clear();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            default:
                break;
            }
            Throw();
            if (config.Item("autoW", true).GetValue <bool>() && W.IsReady() && !player.IsRecalling())
            {
                var targ =
                    HeroManager.Enemies.Where(
                        hero =>
                        W.CanCast(hero) &&
                        (hero.HasBuffOfType(BuffType.Snare) || hero.HasBuffOfType(BuffType.Stun) ||
                         hero.HasBuffOfType(BuffType.Taunt) || hero.HasBuffOfType(BuffType.Suppression)))
                    .OrderBy(hero => hero.Health)
                    .FirstOrDefault();
                if (targ != null)
                {
                    W.Cast(targ);
                }
            }
            if (config.Item("singedFlee", true).GetValue <KeyBind>().Active)
            {
                Orbwalking.MoveTo(Game.CursorPos);
                CastQ();
            }
            if (config.Item("alternateComboKey", true).GetValue <KeyBind>().Active&&
                orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None)
            {
                Orbwalking.Attack = false;
                TurnOffQ();
                Combo();
                Orbwalking.MoveTo(Game.CursorPos, 60);
            }
        }
Exemplo n.º 6
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (FpsBalancer.CheckCounter())
            {
                return;
            }
            orbwalker.SetAttack(true);
            Obj_AI_Hero target   = DrawHelper.GetBetterTarget(1300, TargetSelector.DamageType.Magical, true);
            var         combodmg = 0f;

            if (target != null)
            {
                combodmg = ComboDamage(target);
            }
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo(combodmg);
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                Clear();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            default:
                break;
            }
            if (config.Item("autoQ", true).GetValue <bool>())
            {
                if (Q.IsReady() && savedQ != null)
                {
                    DetonateQ();
                }
            }
            if (savedQ != null && !SimpleQ)
            {
                var mob = Jungle.GetNearest(player.Position);
                if (mob != null && getQdamage(mob) > mob.Health)
                {
                    Q.Cast();
                }
            }
            if (config.Item("insec", true).GetValue <KeyBind>().Active)
            {
                if (target == null)
                {
                    player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    return;
                }
                CastE(target);
                if (savedQ != null)
                {
                    if (savedQ != null && !SimpleQ /*&& target.Distance(qPos) > QExplosionRange*/ &&
                        target.Distance(player) < R.Range - 100 &&
                        target.Position.Distance(savedQ.position) < 550 + QExplosionRange / 2)
                    {
                        HandeR(target, savedQ.position, true);
                    }
                }
                else
                {
                    castInsec(target);
                }

                Orbwalking.MoveTo(Game.CursorPos);
                DetonateQ();
            }
        }