Esempio 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();
         }
     }
 }
Esempio n. 2
0
 private static 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.LSDistance(player.Position) > 200 && p.LSDistance(player.Position) < 425 &&
                 p.IsValid() && p.CountEnemiesInRange(R.Range) > 0 &&
                 getSliderItem(comboMenu, "Rminflash") <= 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(getCheckBoxItem(config, "packets")); });
             justR = true;
             Utility.DelayAction.Add(200, () => justR = false);
             PortAIO.OrbwalkerManager.SetAttack(false);
             PortAIO.OrbwalkerManager.SetMovement(false);
             return;
         }
     }
     if (!rActive)
     {
         if (!justR)
         {
             Orbwalker.MoveTo(Game.CursorPos);
             Combo();
         }
     }
 }
Esempio n. 3
0
        private void Rmovement()
        {
            if (rActive && Game.CursorPos.CountEnemiesInRange(300) > 1)
            {
                AIHeroClient target = DrawHelper.GetBetterTarget(
                    E.Range, TargetSelector.DamageType.Physical, true, HeroManager.Enemies.Where(h => h.IsInvulnerable));
                if (target != null && target.CountEnemiesInRange(R.Range) > 1)
                {
                    if (System.Environment.TickCount - UltiCheck > 250 || UltiCheck == 0f)
                    {
                        var enemies =
                            HeroManager.Enemies.Where(e => e.IsValidTarget() && e.Distance(player) < 600)
                            .Select(e => Prediction.GetPrediction(e, 0.35f));
                        switch (config.Item("rType", true).GetValue <StringList>().SelectedIndex)
                        {
                        case 0:
                            point =
                                CombatHelper.PointsAroundTheTarget(player.Position, R.Range)
                                .Where(p => p.CountEnemiesInRange(R.Range + 100) > 0)
                                .OrderByDescending(
                                    p => enemies.Count(e => e.UnitPosition.Distance(p) <= R.Range))
                                .ThenBy(p => p.Distance(Game.CursorPos))
                                .FirstOrDefault();
                            break;

                        case 1:
                            point =
                                CombatHelper.PointsAroundTheTarget(target.Position, R.Range)
                                .Where(p => p.CountEnemiesInRange(R.Range + 100) > 0)
                                .OrderByDescending(
                                    p => enemies.Count(e => e.UnitPosition.Distance(p) <= R.Range))
                                .ThenBy(p => p.Distance(Game.CursorPos))
                                .FirstOrDefault();
                            break;

                        case 2:
                            point = Game.CursorPos;
                            break;
                        }
                    }

                    if (point.IsValid() && player.Distance(point) > 10 &&
                        point.CountEnemiesInRange(R.Range) > player.CountEnemiesInRange(R.Range))
                    {
                        orbwalker.SetMovement(false);
                        EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, point);
                        UltiCheck = System.Environment.TickCount;
                    }
                }
            }
            else
            {
                orbwalker.SetMovement(true);
            }
        }
Esempio n. 4
0
        private Vector3 GetVectorE(AIHeroClient target)
        {
            var pos  = Vector3.Zero;
            var pred = Prediction.GetPrediction(target, 0.28f);

            if (!target.IsMoving)
            {
                return(pos);
            }
            var distW  = E.Width / 2 + target.BoundingRadius;
            var points = CombatHelper.PointsAroundTheTarget(pred.UnitPosition, distW);
            var walls  =
                points.Where(p => p.IsWall() && player.Distance(target) > target.BoundingRadius)
                .OrderBy(p => p.Distance(pred.UnitPosition));
            var wall = walls.FirstOrDefault();

            if (wall.IsValid() && wall.Distance(target.Position) < 350 &&
                walls.Any(w => w.Distance(target.Position) < distW))
            {
                pos = wall.Extend(pred.UnitPosition, (target.BoundingRadius + distW));
            }
            if (config.Item("useeWall", true).GetValue <bool>())
            {
                return(pos);
            }
            if (pred.Hitchance < HitChance.Medium || target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target))
            {
                return(pos);
            }
            if (pred.UnitPosition.Distance(player.Position) > player.Distance(target))
            {
                var dist    = target.BoundingRadius + E.Width;
                var predPos = pred.UnitPosition;
                if (target.Distance(predPos) < dist)
                {
                    predPos = target.Position.Extend(predPos, dist);
                }
                pos = predPos.Extend(target.Position, -dist);
            }
            return(pos);
        }
Esempio n. 5
0
 private static IEnumerable <Vector3> GetBarrelPoints(Vector3 point)
 {
     return
         (CombatHelper.PointsAroundTheTarget(point, BarrelConnectionRange, 20f)
          .Where(p => p.LSDistance(point) > BarrelExplosionRange));
 }
Esempio n. 6
0
        private static void Game_OnDraw(EventArgs args)
        {
            if (getCheckBoxItem(drawMenu, "drawqq"))
            {
                Render.Circle.DrawCircle(player.Position, Q.Range, Color.FromArgb(180, 100, 146, 166));
            }

            if (getCheckBoxItem(drawMenu, "drawee"))
            {
                Render.Circle.DrawCircle(player.Position, E.Range, Color.FromArgb(180, 100, 146, 166));
            }

            if (getCheckBoxItem(drawMenu, "drawW"))
            {
                if (W.IsReady() && player.HealthPercent < 100)
                {
                    var Heal = new[] { 50, 75, 100, 125, 150 }[W.Level - 1] +
                    (player.MaxHealth - player.Health) * 0.15f + player.FlatMagicDamageMod * 0.9f;
                    var mod  = Math.Max(100f, player.Health + Heal) / player.MaxHealth;
                    var xPos = (float)((double)player.HPBarPosition.X + 36 + 103.0 * mod);
                    Drawing.DrawLine(
                        xPos, player.HPBarPosition.Y + 8, xPos, (float)((double)player.HPBarPosition.Y + 17), 2f,
                        Color.Coral);
                }

                var tokens = player.GetBuff("gangplankbilgewatertoken");
                if (player.InFountain() && getCheckBoxItem(drawMenu, "drawQpass") && tokens != null &&
                    tokens.Count > 500)
                {
                    var second = DateTime.Now.Second.ToString();
                    var time   = int.Parse(second[second.Length - 1].ToString());
                    var color  = Color.DeepSkyBlue;
                    if (time >= 3 && time < 6)
                    {
                        color = Color.GreenYellow;
                    }
                    if (time >= 6 && time < 8)
                    {
                        color = Color.Yellow;
                    }
                    if (time >= 8)
                    {
                        color = Color.Orange;
                    }
                    Drawing.DrawText(
                        Drawing.WorldToScreen(Game.CursorPos).X - 150, Drawing.WorldToScreen(Game.CursorPos).Y - 50, color,
                        "Spend your Silver Serpents, landlubber!");
                }
            }
            if (getBoxItem(drawMenu, "drawKillableSL") != 0 && R.IsReady())
            {
                var text = (from enemy in HeroManager.Enemies.Where(e => e.LSIsValidTarget()) where getRDamage(enemy) > enemy.Health select enemy.ChampionName + "(" + Math.Ceiling(enemy.Health / Rwave[R.Level - 1]) + " wave)").ToList();
                if (text.Count > 0)
                {
                    var result = string.Join(", ", text);
                    switch (getBoxItem(drawMenu, "drawKillableSL"))
                    {
                    case 2:
                        drawText(2, result);
                        break;

                    case 1:
                        drawText(1, result);
                        break;

                    default:
                        return;
                    }
                }
            }

            if (Q.IsReady() && getCheckBoxItem(drawMenu, "drawEQ"))
            {
                var points =
                    CombatHelper.PointsAroundTheTarget(player.Position, E.Range - 200)
                    .Where(p => p.LSDistance(player.Position) < E.Range);


                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    var cp        = Game.CursorPos;
                    var cursorPos = barrel.LSDistance(cp) > BarrelConnectionRange
                        ? barrel.Position.LSExtend(cp, BarrelConnectionRange)
                        : cp;

                    var cursorPos2 = cursorPos.LSDistance(cp) > BarrelConnectionRange
                        ? cursorPos.LSExtend(cp, BarrelConnectionRange)
                        : cp;

                    var middle      = GetMiddleBarrel(barrel, points, cursorPos);
                    var threeBarrel = cursorPos.LSDistance(cp) > BarrelExplosionRange && E.Instance.Ammo >= 2 &&
                                      cursorPos2.LSDistance(player.Position) < E.Range && middle.IsValid();
                    if (threeBarrel)
                    {
                        Render.Circle.DrawCircle(
                            middle.LSExtend(cp, BarrelConnectionRange), BarrelExplosionRange, Color.DarkOrange, 6);
                        Render.Circle.DrawCircle(middle, BarrelExplosionRange, Color.DarkOrange, 6);
                        Drawing.DrawLine(
                            Drawing.WorldToScreen(barrel.Position),
                            Drawing.WorldToScreen(middle.LSExtend(barrel.Position, BarrelExplosionRange)), 2,
                            Color.DarkOrange);
                    }
                    else if (E.Instance.Ammo >= 1)
                    {
                        Drawing.DrawLine(
                            Drawing.WorldToScreen(barrel.Position),
                            Drawing.WorldToScreen(cursorPos.LSExtend(barrel.Position, BarrelExplosionRange)), 2,
                            Color.DarkOrange);
                        Render.Circle.DrawCircle(cursorPos, BarrelExplosionRange, Color.DarkOrange, 6);
                    }
                }
            }
            if (getCheckBoxItem(drawMenu, "drawWcd"))
            {
                foreach (var barrelData in savedBarrels)
                {
                    var time =
                        Math.Min(
                            Environment.TickCount - barrelData.time -
                            barrelData.barrel.Health * getEActivationDelay() * 1000f, 0) / 1000f;
                    if (time < 0)
                    {
                        Drawing.DrawText(
                            barrelData.barrel.HPBarPosition.X - time.ToString().Length * 5 + 40,
                            barrelData.barrel.HPBarPosition.Y - 20, Color.DarkOrange,
                            string.Format("{0:0.00}", time).Replace("-", ""));
                    }
                }
            }

            if (getCheckBoxItem(drawMenu, "drawEmini"))
            {
                var barrels =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < E.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe);
                foreach (var b in barrels)
                {
                    var minis = MinionManager.GetMinions(
                        b.Position, BarrelExplosionRange, MinionTypes.All, MinionTeam.NotAlly);
                    foreach (var m in
                             minis.Where(e => Q.GetDamage(e) >= e.Health && e.Health > 3))
                    {
                        Render.Circle.DrawCircle(m.Position, 57, Color.Yellow, 7);
                    }
                }
            }
        }
Esempio n. 7
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            Orbwalker.DisableMovement  = false;
            Orbwalker.DisableAttacking = false;

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Harass();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Clear();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                if (getCheckBoxItem(harassMenu, "useqLHH") && !justE)
                {
                    Lasthit();
                }
            }

            if (getCheckBoxItem(miscMenu, "AutoW"))
            {
                CleanserManager();
            }

            if (getCheckBoxItem(miscMenu, "AutoR") && R.IsReady())
            {
                foreach (
                    var enemy in
                    HeroManager.Enemies.Where(
                        e =>
                        ((e.UnderTurret(true) &&
                          e.MaxHealth / 100 * getSliderItem(miscMenu, "Rhealt") * 0.75f >
                          e.Health - IncDamages.GetEnemyData(e.NetworkId).DamageTaken) ||
                         (!e.UnderTurret(true) &&
                          e.MaxHealth / 100 * getSliderItem(miscMenu, "Rhealt") >
                          e.Health - IncDamages.GetEnemyData(e.NetworkId).DamageTaken)) &&
                        e.HealthPercent > getSliderItem(miscMenu, "RhealtMin") && e.LSIsValidTarget() &&
                        e.LSDistance(player) > 1500))
                {
                    var pred = IncDamages.GetEnemyData(enemy.NetworkId);
                    if (pred != null && pred.DamageTaken < enemy.Health)
                    {
                        var ally =
                            HeroManager.Allies.OrderBy(a => a.Health).FirstOrDefault(a => enemy.LSDistance(a) < 1000);
                        if (ally != null)
                        {
                            var pos = Prediction.GetPrediction(enemy, 0.75f);
                            if (pos.CastPosition.LSDistance(enemy.Position) < 450 && pos.Hitchance >= HitChance.VeryHigh)
                            {
                                if (enemy.IsMoving)
                                {
                                    R.Cast(enemy.Position.LSExtend(pos.CastPosition, 450));
                                }
                                else
                                {
                                    R.Cast(enemy.ServerPosition);
                                }
                            }
                        }
                    }
                }
            }
            if (getKeyBindItem(comboMenu, "EQtoCursor") && E.IsReady() && Q.IsReady())
            {
                Orbwalker.DisableMovement = true;
                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    var cp        = Game.CursorPos;
                    var cursorPos = barrel.LSDistance(cp) > BarrelConnectionRange
                        ? barrel.Position.LSExtend(cp, BarrelConnectionRange)
                        : cp;

                    var points =
                        CombatHelper.PointsAroundTheTarget(player.Position, E.Range - 200)
                        .Where(p => p.LSDistance(player.Position) < E.Range);
                    var middle      = GetMiddleBarrel(barrel, points, cursorPos);
                    var threeBarrel = cursorPos.LSDistance(cp) > BarrelExplosionRange && E.Instance.Ammo >= 2 &&
                                      Game.CursorPos.LSDistance(player.Position) < E.Range && middle.IsValid();
                    var firsDelay = threeBarrel ? 500 : 1;
                    if (cursorPos.IsValid() && cursorPos.LSDistance(player.Position) < E.Range)
                    {
                        E.Cast(threeBarrel ? middle : cursorPos);
                        Utility.DelayAction.Add(firsDelay, () => Q.CastOnUnit(barrel));
                        if (threeBarrel)
                        {
                            if (player.IsMoving)
                            {
                                Player.IssueOrder(GameObjectOrder.Stop, player.Position);
                            }
                            Utility.DelayAction.Add(801, () => E.Cast(middle.LSExtend(cp, BarrelConnectionRange)));
                        }
                        else
                        {
                            Orbwalker.DisableMovement = false;
                            Orbwalker.OrbwalkTo(Game.CursorPos);
                        }
                    }
                    else
                    {
                        Orbwalker.DisableMovement = false;
                        Orbwalker.OrbwalkTo(Game.CursorPos);
                    }
                }
            }
            else if (getKeyBindItem(comboMenu, "EQtoCursor"))
            {
                Orbwalker.DisableMovement = false;
                Orbwalker.OrbwalkTo(Game.CursorPos);
            }
            if (getKeyBindItem(comboMenu, "QbarrelCursor") && Q.IsReady())
            {
                var meleeRangeBarrel =
                    GetBarrels()
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault(
                        o =>
                        o.Health > 1 && o.LSDistance(player) < Orbwalking.GetRealAutoAttackRange(o) &&
                        !KillableBarrel(o, true));
                if (meleeRangeBarrel != null && Orbwalker.CanAutoAttack)
                {
                    Orbwalker.DisableAttacking = true;
                    Player.IssueOrder(GameObjectOrder.AttackUnit, meleeRangeBarrel);
                    return;
                }
                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    Q.CastOnUnit(barrel);
                }
            }

            if (getCheckBoxItem(miscMenu, "AutoQBarrel") && Q.IsReady())
            {
                var barrel =
                    GetBarrels()
                    .FirstOrDefault(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o) &&
                        (o.CountEnemiesInRange(BarrelExplosionRange - 50) > 0 ||
                         HeroManager.Enemies.Count(
                             e =>
                             e.LSIsValidTarget() &&
                             Prediction.GetPrediction(e, 0.1f).UnitPosition.LSDistance(o.Position) <
                             BarrelExplosionRange - 20) > 0));

                if (barrel != null)
                {
                    Q.Cast(barrel);
                }
            }
        }
Esempio n. 8
0
        private void Combo(Obj_AI_Hero target)
        {
            if (target == null)
            {
                return;
            }
            var   cmbDmg = ComboDamage(target);
            float dist   = (float)(Q.Range + player.MoveSpeed * 2.5);

            if (ShacoClone && !GhostDelay && config.Item("useClone", true).GetValue <bool>())
            {
                var Gtarget = TargetSelector.GetTarget(dist, TargetSelector.DamageType.Physical);
                switch (config.Item("ghostTarget", true).GetValue <StringList>().SelectedIndex)
                {
                case 0:
                    Gtarget = TargetSelector.GetTarget(GhostRange, TargetSelector.DamageType.Physical);
                    break;

                case 1:
                    Gtarget =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
                        .OrderBy(i => i.Health)
                        .FirstOrDefault();
                    break;

                case 2:
                    Gtarget =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
                        .OrderBy(i => player.Distance(i))
                        .FirstOrDefault();
                    break;

                default:
                    break;
                }
                var clone = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(m => m.Name == player.Name && !m.IsMe);
                if (clone != null && (System.Environment.TickCount - cloneTime > 16500f || clone.HealthPercent < 10) &&
                    !clone.IsWindingUp)
                {
                    var pos =
                        CombatHelper.PointsAroundTheTarget(clone.Position, 600)
                        .OrderByDescending(p => p.CountEnemiesInRange(250))
                        .ThenBy(p => Environment.Minion.countMinionsInrange(p, 250))
                        .FirstOrDefault();
                    if (pos.IsValid())
                    {
                        R.Cast(pos, config.Item("packets").GetValue <bool>());
                    }
                }
                if (clone != null && Gtarget.IsValid && !clone.IsWindingUp)
                {
                    if (CanCloneAttack(clone) || player.HealthPercent < 25)
                    {
                        R.CastOnUnit(Gtarget, config.Item("packets").GetValue <bool>());
                    }
                    else
                    {
                        var prediction = Prediction.GetPrediction(Gtarget, 2);
                        R.Cast(
                            target.Position.Extend(prediction.UnitPosition, Orbwalking.GetRealAutoAttackRange(Gtarget)),
                            config.Item("packets").GetValue <bool>());
                    }

                    GhostDelay = true;
                    Utility.DelayAction.Add(200, () => GhostDelay = false);
                }
            }
            if ((config.Item("WaitForStealth", true).GetValue <bool>() && ShacoStealth && cmbDmg < target.Health) ||
                !Orbwalking.CanMove(100))
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, cmbDmg);
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() &&
                Game.CursorPos.Distance(target.Position) < 250 && target.Distance(player) < dist &&
                (target.Distance(player) >= config.Item("useqMin", true).GetValue <Slider>().Value ||
                 (cmbDmg > target.Health && player.CountEnemiesInRange(2000) == 1)))
            {
                if (target.Distance(player) < Q.Range)
                {
                    Q.Cast(target.Position, config.Item("packets").GetValue <bool>());
                }
                else
                {
                    if (!CheckWalls(target) || Environment.Map.GetPath(player, target.Position) < dist)
                    {
                        Q.Cast(
                            player.Position.Extend(target.Position, Q.Range), config.Item("packets").GetValue <bool>());
                    }
                }
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && !target.UnderTurret(true) &&
                target.Health > cmbDmg && player.Distance(target) < W.Range)
            {
                HandleW(target);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                E.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && !ShacoClone && target.HealthPercent < 75 &&
                cmbDmg < target.Health && target.HealthPercent > cmbDmg && target.HealthPercent > 25)
            {
                R.Cast(config.Item("packets").GetValue <bool>());
            }
            if (config.Item("useIgnite").GetValue <bool>() &&
                player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Esempio n. 9
0
        private void Combo()
        {
            Obj_AI_Hero target=getTarget();
            Obj_AI_Hero Rtarget = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Magical);
            if (target == null)
            {
                return;
            }
            if (config.Item("selected").GetValue<bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue<bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            var cmbDmg = GetComboDamage(target);
            if (config.Item("useq", true).GetValue<bool>() && Q.IsReady() && Orbwalking.CanMove(100) && target.IsValidTarget() && !justJumped)
            {
                var targQ = Q.GetPrediction(target);
                if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) && targQ.Hitchance >= HitChance.High)
                {
                    Q.Cast(targQ.CastPosition, config.Item("packets").GetValue<bool>());
                    return;
                }
            }
            if (config.Item("usew", true).GetValue<bool>() && W.IsReady() && Orbwalking.CanMove(100) && !justJumped &&
                (cmbDmg + player.GetAutoAttackDamage(target) > target.Health || player.Mana > Q.Instance.ManaCost * 2))
            {
                var tarPered = W.GetPrediction(target);
                if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position))
                {
                    W.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue<bool>());
                    return;
                }
            }
            if (R.IsReady() && !justJumped)
            {
                var dist = player.Distance(Rtarget);
                if (config.Item("user", true).GetValue<bool>() && !justQ && !Q.CanCast(target) && !justW &&
                    !W.CanCast(target) && !CombatHelper.CheckCriticalBuffs(Rtarget) &&
                    config.Item("usermin", true).GetValue<Slider>().Value < dist && 3000 > dist &&
                    Rtarget.Health < R.GetDamage(Rtarget) * 0.7 && target.CountAlliesInRange(600) < 1)
                {
                    R.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue<bool>());
                }
                if (target.CountAlliesInRange(700) > 0)
                {
                    R.CastIfWillHit(
                        target, config.Item("usertf", true).GetValue<Slider>().Value,
                        config.Item("packets").GetValue<bool>());
                }
            }
            bool canKill = cmbDmg > target.Health;
            if (config.Item("usee", true).GetValue<bool>() && E.IsReady() &&
                ((config.Item("useekill", true).GetValue<bool>() && canKill) ||
                 (!config.Item("useekill", true).GetValue<bool>() &&
                  (target.CountEnemiesInRange(1200) <= target.CountAlliesInRange(1200) && player.Health > target.Health &&
                   TargetSelector.GetPriority(target) >= 2f) || canKill)))
            {
                var bestPositons =
                    (from pos in
                        CombatHelper.PointsAroundTheTarget(target.Position, 750)
                            .Where(
                                p =>
                                    !p.IsWall() && p.IsValid() && p.Distance(player.Position) < E.Range &&
                                    p.Distance(target.Position) < 680 && !p.UnderTurret(true))
                        let mob =
                            ObjectManager.Get<Obj_AI_Base>()
                                .Where(
                                    m =>
                                        m.IsEnemy && m.IsValidTarget() && m.Distance(target.Position) < 750 &&
                                        m.SkinName != target.SkinName)
                                .OrderBy(m => m.Distance(pos))
                                .FirstOrDefault()
                        where (mob != null && mob.Distance(pos) > pos.Distance(target.Position) + 80) || (mob == null)
                        select pos).ToList();

                CastE(bestPositons, target);
            }
            var ignitedmg = (float) player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            if (config.Item("useIgnite", true).GetValue<bool>() && ignitedmg > target.Health && hasIgnite &&
                !player.IsChannelingImportantSpell() && !justQ && !Q.CanCast(target) && !justW && !W.CanCast(target) &&
                !justJumped)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Esempio n. 10
0
        private void Game_OnDraw(EventArgs args)
        {
            DrawHelper.DrawCircle(config.Item("drawqq", true).GetValue <Circle>(), Q.Range);
            DrawHelper.DrawCircle(config.Item("drawee", true).GetValue <Circle>(), E.Range);
            Helpers.Jungle.ShowSmiteStatus(
                config.Item("useSmite").GetValue <KeyBind>().Active, config.Item("smiteStatus").GetValue <bool>());
            Utility.HpBarDamageIndicator.Enabled = config.Item("drawcombo", true).GetValue <bool>();
            if (config.Item("drawW", true).GetValue <bool>())
            {
                if (W.IsReady() && player.HealthPercent < 100)
                {
                    float Heal = new int[] { 50, 75, 100, 125, 150 }[W.Level - 1] +
                    (player.MaxHealth - player.Health) * 0.15f + player.FlatMagicDamageMod * 0.9f;
                    float mod  = Math.Max(100f, player.Health + Heal) / player.MaxHealth;
                    float xPos = (float)((double)player.HPBarPosition.X + 36 + 103.0 * mod);
                    Drawing.DrawLine(
                        xPos, player.HPBarPosition.Y + 8, xPos, (float)((double)player.HPBarPosition.Y + 17), 2f,
                        Color.Coral);
                }
            }
            if (config.Item("drawKillableSL", true).GetValue <StringList>().SelectedIndex != 0 && R.IsReady())
            {
                var text = new List <string>();
                foreach (var enemy in HeroManager.Enemies.Where(e => e.IsValidTarget()))
                {
                    if (getRDamage(enemy) > enemy.Health)
                    {
                        text.Add(enemy.ChampionName + "(" + Math.Ceiling(enemy.Health / Rwave[R.Level - 1]) + " wave)");
                    }
                }
                if (text.Count > 0)
                {
                    var result = string.Join(", ", text);
                    switch (config.Item("drawKillableSL", true).GetValue <StringList>().SelectedIndex)
                    {
                    case 2:
                        drawText(2, result);
                        break;

                    case 1:
                        drawText(1, result);
                        break;

                    default:
                        return;
                    }
                }
            }

            if (Q.IsReady() && config.Item("drawEQ", true).GetValue <bool>())
            {
                var points =
                    CombatHelper.PointsAroundTheTarget(player.Position, E.Range - 200, 15, 6)
                    .Where(p => p.Distance(player.Position) < E.Range);


                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.Distance(player) < Q.Range &&
                        o.SkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.Distance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    var cp        = Game.CursorPos;
                    var cursorPos = barrel.Distance(cp) > BarrelConnectionRange
                        ? barrel.Position.Extend(cp, BarrelConnectionRange)
                        : cp;

                    var cursorPos2 = cursorPos.Distance(cp) > BarrelConnectionRange
                        ? cursorPos.Extend(cp, BarrelConnectionRange)
                        : cp;

                    var middle      = GetMiddleBarrel(barrel, points, cursorPos);
                    var threeBarrel = cursorPos.Distance(cp) > BarrelExplosionRange && E.Instance.Ammo >= 2 &&
                                      cursorPos2.Distance(player.Position) < E.Range && middle.IsValid();
                    if (threeBarrel)
                    {
                        Render.Circle.DrawCircle(
                            middle.Extend(cp, BarrelConnectionRange), BarrelExplosionRange, Color.DarkOrange, 6);
                        Render.Circle.DrawCircle(middle, BarrelExplosionRange, Color.DarkOrange, 6);
                        Drawing.DrawLine(
                            Drawing.WorldToScreen(barrel.Position),
                            Drawing.WorldToScreen(middle.Extend(barrel.Position, BarrelExplosionRange)), 2,
                            Color.DarkOrange);
                    }
                    else if (E.Instance.Ammo >= 1)
                    {
                        Drawing.DrawLine(
                            Drawing.WorldToScreen(barrel.Position),
                            Drawing.WorldToScreen(cursorPos.Extend(barrel.Position, BarrelExplosionRange)), 2,
                            Color.DarkOrange);
                        Render.Circle.DrawCircle(cursorPos, BarrelExplosionRange, Color.DarkOrange, 6);
                    }
                }
            }
            if (config.Item("drawWcd", true).GetValue <bool>())
            {
                foreach (var barrelData in savedBarrels)
                {
                    float time =
                        Math.Min(
                            System.Environment.TickCount - barrelData.time -
                            barrelData.barrel.Health * getEActivationDelay() * 1000f, 0) / 1000f;
                    if (time < 0)
                    {
                        Drawing.DrawText(
                            barrelData.barrel.HPBarPosition.X - time.ToString().Length * 5 + 40,
                            barrelData.barrel.HPBarPosition.Y - 20, Color.DarkOrange,
                            string.Format("{0:0.00}", time).Replace("-", ""));
                    }
                }
            }
        }
Esempio n. 11
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            orbwalker.SetAttack(true);
            orbwalker.SetMovement(true);
            Jungle.CastSmite(config.Item("useSmite").GetValue <KeyBind>().Active);
            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:
                Lasthit();
                break;

            default:
                break;
            }
            if (config.Item("AutoR", true).GetValue <bool>() && R.IsReady())
            {
                foreach (var enemy in
                         HeroManager.Enemies.Where(
                             e =>
                             ((e.UnderTurret(true) &&
                               e.HealthPercent < config.Item("Rhealt", true).GetValue <Slider>().Value * 0.75f) ||
                              (!e.UnderTurret(true) &&
                               e.HealthPercent < config.Item("Rhealt", true).GetValue <Slider>().Value)) &&
                             e.HealthPercent > config.Item("RhealtMin", true).GetValue <Slider>().Value&&
                             e.IsValidTarget() && e.Distance(player) > 1500))
                {
                    var pred = Program.IncDamages.GetEnemyData(enemy.NetworkId);
                    if (pred != null && pred.DamageTaken > 50 && pred.DamageTaken < enemy.Health &&
                        enemy.Health - pred.DamageTaken <
                        config.Item("Rhealt", true).GetValue <Slider>().Value / 100f * enemy.MaxHealth)
                    {
                        var ally = HeroManager.Allies.OrderBy(a => a.Health)
                                   .FirstOrDefault(a => enemy.Distance(a) < 700);
                        if (ally != null)
                        {
                            var pos = Prediction.GetPrediction(enemy, 0.75f);
                            if (pos.CastPosition.Distance(enemy.Position) < 450 && pos.Hitchance >= HitChance.VeryHigh)
                            {
                                if (enemy.IsMoving)
                                {
                                    R.Cast(enemy.Position.Extend(pos.CastPosition, 450));
                                }
                                else
                                {
                                    R.Cast(enemy.ServerPosition);
                                }
                            }
                        }
                    }
                }
            }
            if (config.Item("EQtoCursor", true).GetValue <KeyBind>().Active&& E.IsReady() && Q.IsReady())
            {
                orbwalker.SetMovement(false);
                if (player.IsMoving)
                {
                    player.IssueOrder(GameObjectOrder.Stop, player.Position);
                }
                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.Distance(player) < Q.Range &&
                        o.SkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.Distance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    var cp        = Game.CursorPos;
                    var cursorPos = barrel.Distance(cp) > BarrelConnectionRange
                        ? barrel.Position.Extend(cp, BarrelConnectionRange)
                        : cp;

                    var points =
                        CombatHelper.PointsAroundTheTarget(player.Position, E.Range - 200, 15, 6)
                        .Where(p => p.Distance(player.Position) < E.Range);
                    var cursorPos2 = cursorPos.Distance(cp) > BarrelConnectionRange
                        ? cursorPos.Extend(cp, BarrelConnectionRange)
                        : cp;

                    var middle      = GetMiddleBarrel(barrel, points, cursorPos);
                    var threeBarrel = cursorPos.Distance(cp) > BarrelExplosionRange && E.Instance.Ammo >= 2 &&
                                      Game.CursorPos.Distance(player.Position) < E.Range && middle.IsValid();
                    var firsDelay = threeBarrel ? 500 : 1;
                    if (cursorPos.IsValid() && cursorPos.Distance(player.Position) < E.Range)
                    {
                        E.Cast(threeBarrel ? middle : cursorPos);
                        Utility.DelayAction.Add(firsDelay, () => Q.CastOnUnit(barrel));
                        if (threeBarrel)
                        {
                            Utility.DelayAction.Add(801, () => E.Cast(middle.Extend(cp, BarrelConnectionRange)));
                        }
                    }
                }
            }
            if (config.Item("QbarrelCursor", true).GetValue <KeyBind>().Active&& Q.IsReady())
            {
                var meleeRangeBarrel =
                    GetBarrels()
                    .OrderBy(o => o.Distance(Game.CursorPos))
                    .FirstOrDefault(
                        o =>
                        o.Health > 1 && o.Distance(player) < Orbwalking.GetRealAutoAttackRange(o) &&
                        !KillableBarrel(o, true));
                if (meleeRangeBarrel != null && Orbwalking.CanAttack())
                {
                    orbwalker.SetAttack(false);
                    player.IssueOrder(GameObjectOrder.AttackUnit, meleeRangeBarrel);
                    return;
                }
                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.Distance(player) < Q.Range &&
                        o.SkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.Distance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    Q.CastOnUnit(barrel);
                }
            }

            if (config.Item("AutoQBarrel", true).GetValue <bool>() && Q.IsReady())
            {
                var barrel =
                    GetBarrels()
                    .FirstOrDefault(
                        o =>
                        o.IsValid && !o.IsDead && o.Distance(player) < Q.Range &&
                        o.SkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o) &&
                        (o.CountEnemiesInRange(BarrelExplosionRange - 50) > 0 ||
                         HeroManager.Enemies.Count(
                             e =>
                             e.IsValidTarget() &&
                             Prediction.GetPrediction(e, 0.1f).UnitPosition.Distance(o.Position) <
                             BarrelExplosionRange - 20) > 0));

                if (barrel != null)
                {
                    Q.Cast(barrel);
                }
            }
        }