Esempio n. 1
0
        private static void Game_OnUpdate(EventArgs args)
        {
            _W.Delay = Math.Max(0.4f, 0.6f - (ObjectManager.Player.PercentAttackSpeedMod - 100) / 25 * (0.02f));

            if (ObjectManager.Player.IsDead || Orbwalker.ActiveMode > OrbwalkerMode.Harass)
            {
                return;
            }

            bool HaveQBuff = ObjectManager.Player.HasBuff("JinxQ");

            if (FunnySlayerCommon.OnAction.OnAA || FunnySlayerCommon.OnAction.BeforeAA)
            {
                return;
            }

            if (_W.IsReady() && JinxMenu.Wmenu.useW.Enabled)
            {
                var targets = TargetSelector.GetTargets(1500);

                if (targets != null)
                {
                    AIHeroClient gettarget = targets.Where(i => _W.GetPrediction(i).Hitchance >= HitChance.High).OrderBy(i => i.Health).FirstOrDefault();
                    if (Orbwalker.GetTarget() == null && gettarget != null)
                    {
                        if ((gettarget.DistanceToPlayer() >= JinxMenu.Wmenu.range.Value || !JinxMenu.Wmenu.outrange.Enabled))
                        {
                            var pred = _W.GetPrediction(gettarget);

                            if (pred.CastPosition.IsValid() && pred.Hitchance >= HitChance.High)
                            {
                                if (_W.Cast(pred.CastPosition))
                                {
                                    return;
                                }
                            }
                        }
                    }
                }
            }

            if (_E.IsReady() && JinxMenu.Emenu.useE.Enabled)
            {
                var targets = TargetSelector.GetTargets(900);

                if (targets != null)
                {
                    AIHeroClient gettarget = targets.Where(i => _E.GetPrediction(i).Hitchance >= HitChance.High).OrderBy(i => i.Health).FirstOrDefault();
                    if (Orbwalker.GetTarget() != null && gettarget != null)
                    {
                        var pred = _E.GetPrediction(gettarget);

                        if (pred.CastPosition.IsValid() && pred.Hitchance >= HitChance.High)
                        {
                            if (_E.Cast(pred.CastPosition))
                            {
                                return;
                            }
                        }
                    }
                }
            }

            if (_Q.IsReady() && JinxMenu.Qmenu.useQ.Enabled)
            {
                if (HaveQBuff)
                {
                    if (Orbwalker.GetTarget() != null)
                    {
                        var target = TargetSelector.GetTarget((float)(ObjectManager.Player.GetCurrentAutoAttackRange() - BonusQRange[_Q.Level]));
                        if (target != null)
                        {
                            if (target.NetworkId == Orbwalker.GetTarget().NetworkId)
                            {
                                if (_Q.Cast())
                                {
                                    return;
                                }
                            }
                        }
                    }
                }
                else
                {
                    if (Orbwalker.GetTarget() == null)
                    {
                        var target = TargetSelector.GetTarget((float)(ObjectManager.Player.GetCurrentAutoAttackRange() + BonusQRange[_Q.Level]));
                        if (target != null)
                        {
                            if (_Q.Cast())
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        private void LogicW()
        {
            if (Config.Item("Wdragon", true).GetValue <bool>() && !Orbwalker.GetTarget().IsValidTarget() && !Program.Combo && Player.CountEnemiesInRange(800) == 0)
            {
                if (wCount > 0)
                {
                    Vector3 baronPos;
                    baronPos.X = 5232;
                    baronPos.Y = 10788;
                    baronPos.Z = 0;
                    if (Player.Distance(baronPos) < 5000)
                    {
                        W.Cast(baronPos);
                    }
                }
                if (wCount == 0)
                {
                    Vector3 dragonPos;
                    dragonPos.X = 9919f;
                    dragonPos.Y = 4475f;
                    dragonPos.Z = 0f;
                    if (Player.Distance(dragonPos) < 5000)
                    {
                        W.Cast(dragonPos);
                    }
                    else
                    {
                        wCount++;
                    }
                    return;
                }

                if (wCount == 1)
                {
                    Vector3 redPos;
                    redPos.X = 8022;
                    redPos.Y = 4156;
                    redPos.Z = 0;
                    if (Player.Distance(redPos) < 5000)
                    {
                        W.Cast(redPos);
                    }
                    else
                    {
                        wCount++;
                    }
                    return;
                }
                if (wCount == 2)
                {
                    Vector3 bluePos;
                    bluePos.X = 11396;
                    bluePos.Y = 7076;
                    bluePos.Z = 0;
                    if (Player.Distance(bluePos) < 5000)
                    {
                        W.Cast(bluePos);
                    }
                    else
                    {
                        wCount++;
                    }
                    return;
                }
                if (wCount > 2)
                {
                    wCount = 0;
                }
            }
        }
        public Vector3 CastDash(bool asap = false)
        {
            var DashMode  = menu.GetValue <MenuList <string> >("DashMode").Index;
            var bestpoint = Vector3.Zero;

            if (DashMode == 0)
            {
                bestpoint = Player.Position.Extend(Game.CursorPosRaw, DashSpell.Range);
            }
            else if (DashMode == 1)
            {
                var orbT = Orbwalker.GetTarget();
                if (orbT != null && orbT is AIHeroClient)
                {
                    var start = Player.Position.ToVector2();
                    var end   = orbT.Position.ToVector2();
                    var dir   = (end - start).Normalized();
                    var pDir  = dir.Perpendicular();

                    var rightEndPos = end + pDir * Player.Distance(orbT);
                    var leftEndPos  = end - pDir * Player.Distance(orbT);

                    var rEndPos = new Vector3(rightEndPos.X, rightEndPos.Y, Player.Position.Z);
                    var lEndPos = new Vector3(leftEndPos.X, leftEndPos.Y, Player.Position.Z);

                    if (rEndPos.DistanceToCursor() < lEndPos.DistanceToCursor())
                    {
                        bestpoint = Player.Position.Extend(rEndPos, DashSpell.Range);
                    }
                    else
                    {
                        bestpoint = Player.Position.Extend(lEndPos, DashSpell.Range);
                    }
                }
            }
            else if (DashMode == 2)
            {
                var points = OktwCommon.CirclePoints(15, DashSpell.Range, Player.Position);
                bestpoint = Player.Position.Extend(Game.CursorPosRaw, DashSpell.Range);
                var enemies = bestpoint.CountEnemyHeroesInRange(350);
                foreach (var point in points)
                {
                    var count = point.CountEnemyHeroesInRange(350);
                    if (!InAARange(point))
                    {
                        continue;
                    }
                    if (point.IsUnderAllyTurret())
                    {
                        bestpoint = point;
                        enemies   = count - 1;
                    }
                    else if (count < enemies)
                    {
                        bestpoint = point;
                        enemies   = count;
                    }
                    else if (count == enemies && point.DistanceToCursor() < bestpoint.DistanceToCursor())
                    {
                        bestpoint = point;
                        enemies   = count;
                    }
                }
            }

            if (bestpoint.IsZero)
            {
                return(Vector3.Zero);
            }

            var isGoodPos = IsGoodPosition(bestpoint);

            if (asap && isGoodPos)
            {
                return(bestpoint);
            }
            else if (isGoodPos && InAARange(bestpoint))
            {
                return(bestpoint);
            }

            return(Vector3.Zero);
        }
Esempio n. 4
0
        private void LogicQ()
        {
            if (LaneClear && !FishBoneActive && !Player.Spellbook.IsAutoAttack && Orbwalker.GetTarget() == null && Orbwalker.CanAttack() && Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQout").Enabled&& Player.Mana > RMANA + WMANA + EMANA + QMANA)
            {
                foreach (var minion in Cache.GetMinions(Player.PreviousPosition, bonusRange() + 30).Where(
                             minion => !minion.InAutoAttackRange() && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = HealthPrediction.GetPrediction(minion, 400, 70);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForceTarget = minion;
                        Q.Cast();
                        return;
                    }
                }
            }

            var t = TargetSelector.GetTarget(bonusRange() + 60);

            if (t.IsValidTarget())
            {
                if (!FishBoneActive && (!t.InAutoAttackRange() || t.CountEnemyHeroesInRange(250) > 2) && Orbwalker.GetTarget() == null)
                {
                    var distance = GetRealDistance(t);
                    if (Combo && (Player.Mana > RMANA + WMANA + QMANA || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Harass && !Player.Spellbook.IsAutoAttack && Orbwalker.CanAttack() && Config[Player.CharacterName]["QConfig"].GetValue <MenuBool>("Qharass").Enabled&& !Player.IsUnderEnemyTurret() && Player.Mana > RMANA + WMANA + EMANA + QMANA + QMANA && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Combo && Player.Mana > RMANA + WMANA + QMANA + QMANA && Player.CountEnemyHeroesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Combo && Player.Mana < RMANA + WMANA + QMANA + QMANA)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Combo && Player.CountEnemyHeroesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && LaneClear)
            {
                Q.Cast();
            }
        }
Esempio n. 5
0
            public void useSpells() //TODO
            {
                //var bTarg = TargetSelector.GetTarget(Player.Instance.GetAutoAttackRange(),DamageType.Physical, Player.Instance.ServerPosition.Extend(target,Player.Instance.GetAutoAttackRange()));

                //var bTarg = ARAMTargetSelector.getBestTarget(Player.Instance.GetAutoAttackRange(), true);
                //var bTarg = ARAMTargetSelector.getBestTarget(Player.Instance.GetAutoAttackRange());
                var target = TargetSelector.GetTarget(Player.Instance.GetAutoAttackRange(), DamageType.Physical,
                                                      Player.Instance.Position);

                if (target != null && !target.IsUnderHisturret())
                {
                    if (!Orbwalker.IsAutoAttacking || Orbwalker.GetTarget() != target)
                    {
                        Orbwalker.ForcedTarget = target;
                        Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                    }
                }
                return;

                /*if (lastSpellUse + 277 > ARAMDetFull.now)
                 *  return;
                 * lastSpellUse = ARAMDetFull.now;
                 * foreach (var spell in spells)
                 * {
                 *  if(!spell.IsReady() || spell.ManaCost > hero.Mana || (isTransformChampion() && sBook.GetSpell(spell.Slot).Name != spell.Name))
                 *      continue;
                 *
                 *  var movementSpells = new List<string> { "Dash", "Blink", "Teleport" };
                 *  var supportSpells = new List<string> { "Shield", "Heal", "DamageAmplifier", "SpellShield", "RemoveCrowdControl", };
                 *
                 *  if (Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags.Contains("Transformation"))
                 *  {
                 *      var transformPoints = spells.Count(s => !s.IsReady() || spell.ManaCost > hero.Mana);
                 *      if (transformPoints >= 3)
                 *      {
                 *          Console.WriteLine("Cast transfrom self: " + spell.Slot);
                 *          spell.Cast();
                 *      }
                 *      return;
                 *  }
                 *  if (spell.IsSkillShot())
                 *  {
                 *      if (Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags != null && movementSpells.Contains(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags))
                 *      {
                 *          if (hero.HealthPercent < 25 && hero.CountEnemiesInRange(600)>0)
                 *          {
                 *              Console.WriteLine("Cast esacpe location: " + spell.Slot);
                 *              spell.Cast(hero.Position.Extend(ARAMSimulator.fromNex.Position, 1235).To3D());
                 *              return;
                 *          }
                 *          else
                 *          {
                 *              var bTarg2 = ARAMTargetSelector.getBestTarget(spell.Range, true);
                 *              if (bTarg2 != null && safeGap(hero.Position.Extend(bTarg2.Position, (float) spell.Range)))
                 *              {
                 *                  if (spell.CastIfWillHitReturn(bTarg2, (int) HitChance.High))
                 *                  {
                 *                      Console.WriteLine("Cast attack location gap: " + spell.Slot);
                 *                      spell.Cast(bTarg2.Position); //BUG: Experimental
                 *                      return;
                 *                  }
                 *              }
                 *          }
                 *      }
                 *      else
                 *      {
                 *          var bTarg2 = ARAMTargetSelector.getBestTarget(spell.Range, true);
                 *          if (bTarg2 != null)
                 *          {
                 *              if (spell.CastIfWillHitReturn(bTarg2, (int) HitChance.High))//TODO
                 *              {
                 *                  Console.WriteLine("Cast attack location: " + spell.Slot);
                 *                  spell.Cast(bTarg2); //BUG: Experimental
                 *                  return;
                 *              }
                 *          }
                 *      }
                 *  }
                 *  else
                 *  {
                 *      float range = (spell.Range != 0) ? spell.Range : 500;
                 *      if (Player.Instance.Spellbook.GetSpell(spell.Slot).SData.CastType == (int) CastType.Self || Player.Instance.Spellbook.GetSpell(spell.Slot).SData.CastType == (int)CastType.Activate)
                 *      {
                 *          var bTarg2 = ARAMTargetSelector.getBestTarget(range, true);
                 *          if (bTarg2 != null)
                 *          {
                 *              Console.WriteLine("Cast self: " + spell.Slot);
                 *              spell.Cast(Player.Instance);
                 *              return;
                 *          }
                 *      }
                 *      else if(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.CastType == (int) CastType.AllyChampions && Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags != null && supportSpells.Contains(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags))
                 *      {
                 *          var bTarg2 = ARAMTargetSelector.getBestTargetAlly(range, false);
                 *          if (bTarg2 != null)
                 *          {
                 *              Console.WriteLine("Cast ally: " + spell.Slot);
                 *              spell.Cast(bTarg2);
                 *              return;
                 *          }
                 *      }
                 *      else if (Player.Instance.Spellbook.GetSpell(spell.Slot).SData.CastType == (int) CastType.EnemyChampions)
                 *      {
                 *          var bTarg2 = ARAMTargetSelector.getBestTarget(range, true);
                 *          if (bTarg2 != null)
                 *          {
                 *              if (!(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags != null && movementSpells.Contains(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags)) || safeGap(bTarg2))
                 *              {
                 *                  Console.WriteLine("Cast enemy: " + spell.Slot);
                 *                  spell.Cast(bTarg2);
                 *                  return;
                 *              }
                 *          }
                 *      }
                 *  }
                 * }*/
            }
Esempio n. 6
0
        private void Combo()
        {
            if (R.Instance.Name == "JhinRShot")
            {
                return;
            }

            var orbTarget = Orbwalker.GetTarget();

            var wTarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

            if (Menu.Item("ComboW", true).GetValue <bool>() && W.IsReady() && CheckTarget(wTarget, W.Range))
            {
                if (Menu.Item("ComboWOnly", true).GetValue <bool>())
                {
                    if (HasPassive(wTarget))
                    {
                        W.CastTo(wTarget);
                    }
                }
                else
                {
                    W.CastTo(wTarget);
                }
            }

            if (Menu.Item("ComboQ", true).GetValue <bool>() && Q.IsReady())
            {
                var target  = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Physical);
                var qTarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

                if (CheckTarget(qTarget, Q.Range) && !Orbwalking.CanAttack())
                {
                    Q.CastOnUnit(qTarget, true);
                }
                else if (CheckTarget(target, Q.Range + 300))
                {
                    if (Me.HasBuff("JhinPassiveReload") ||
                        (!Me.HasBuff("JhinPassiveReload") &&
                         Me.CountEnemiesInRange(Orbwalking.GetRealAutoAttackRange(Me)) == 0))
                    {
                        var qPred       = Prediction.GetPrediction(target, 0.25f);
                        var bestQMinion =
                            MinionManager.GetMinions(qPred.CastPosition, 300)
                            .Where(x => x.IsValidTarget(Q.Range))
                            .OrderBy(x => x.Distance(target))
                            .ThenBy(x => x.Health)
                            .FirstOrDefault();

                        if (bestQMinion != null)
                        {
                            Q.CastOnUnit(bestQMinion, true);
                        }
                    }
                }
            }

            var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (Menu.Item("ComboE", true).GetValue <bool>() && E.IsReady() &&
                CheckTarget(eTarget, E.Range) && Utils.TickCount - LastECast > 2500 && !IsAttack)
            {
                if (!eTarget.CanMove())
                {
                    E.CastTo(eTarget);
                }
                else
                {
                    if (E.GetPrediction(eTarget).Hitchance >= HitChance.High)
                    {
                        E.Cast(E.GetPrediction(eTarget).UnitPosition);
                    }
                }
            }
        }
Esempio n. 7
0
        public Vector3 CastDash(bool asap = false)
        {
            int DashMode = Config.Item("DashMode", true).GetValue <StringList>().SelectedIndex;

            Vector3 bestpoint = Vector3.Zero;

            if (DashMode == 0)
            {
                bestpoint = Player.Position.Extend(Game.CursorPos, DashSpell.Range);
            }
            else if (DashMode == 1)
            {
                var orbT = Orbwalker.GetTarget();
                if (orbT != null && orbT is AIHeroClient)
                {
                    Vector2 start = Player.Position.To2D();
                    Vector2 end   = orbT.Position.To2D();
                    var     dir   = (end - start).Normalized();
                    var     pDir  = dir.Perpendicular();

                    var rightEndPos = end + pDir * Player.Distance(orbT);
                    var leftEndPos  = end - pDir * Player.Distance(orbT);

                    var rEndPos = new Vector3(rightEndPos.X, rightEndPos.Y, Player.Position.Z);
                    var lEndPos = new Vector3(leftEndPos.X, leftEndPos.Y, Player.Position.Z);

                    if (Game.CursorPos.Distance(rEndPos) < Game.CursorPos.Distance(lEndPos))
                    {
                        bestpoint = Player.Position.Extend(rEndPos, DashSpell.Range);
                    }
                    else
                    {
                        bestpoint = Player.Position.Extend(lEndPos, DashSpell.Range);
                    }
                }
            }
            else if (DashMode == 2)
            {
                var points = OktwCommon.CirclePoints(15, DashSpell.Range, Player.Position);
                bestpoint = Player.Position.Extend(Game.CursorPos, DashSpell.Range);
                int enemies = bestpoint.CountEnemiesInRange(350);
                foreach (var point in points)
                {
                    int count = point.CountEnemiesInRange(350);
                    if (!InAARange(point))
                    {
                        continue;
                    }
                    if (point.UnderAllyTurret())
                    {
                        bestpoint = point;
                        enemies   = count - 1;
                    }
                    else if (count < enemies)
                    {
                        enemies   = count;
                        bestpoint = point;
                    }
                    else if (count == enemies && Game.CursorPos.Distance(point) < Game.CursorPos.Distance(bestpoint))
                    {
                        enemies   = count;
                        bestpoint = point;
                    }
                }
            }

            if (bestpoint.IsZero)
            {
                return(Vector3.Zero);
            }

            var isGoodPos = IsGoodPosition(bestpoint);

            if (asap && isGoodPos)
            {
                return(bestpoint);
            }
            else if (isGoodPos && InAARange(bestpoint))
            {
                return(bestpoint);
            }
            return(Vector3.Zero);
        }
        private static void Ex(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }

            if (!E.IsReady())
            {
                return;
            }

            var target = Orbwalker.GetTarget() as AIHeroClient;

            if (target != null)
            {
                var dashRange = (Player.PreviousPosition.DistanceToCursor() > Player.GetRealAutoAttackRange(target) ? E.Range : 130);

                var dashPos = Player.PreviousPosition.Extend(Game.CursorPos, E.Range);

                if (Orbwalker.ActiveMode == OrbwalkerMode.Harass && LMenu.ESettings.EHarass.Enabled)
                {
                    if (Passive())
                    {
                        if (AAA)
                        {
                            if (E.Cast(dashPos))
                            {
                                return;
                            }
                        }
                    }
                    else
                    {
                        if (OAA || BAA)
                        {
                            return;
                        }

                        if (E.Cast(dashPos))
                        {
                            return;
                        }
                    }
                }
            }
            var minions = ObjectManager.Get <AIMinionClient>().Where(i => i != null && !i.IsDead && !i.IsAlly && (i.IsMinion() || i.GetJungleType() != JungleType.Unknown));

            if (minions != null || minions.Any())
            {
                if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && LMenu.ESettings.EClear.Enabled)
                {
                    if (Passive())
                    {
                        if (AAA)
                        {
                            if (E.Cast(Game.CursorPos))
                            {
                                return;
                            }
                        }
                    }
                    else
                    {
                        if (OAA || BAA)
                        {
                            return;
                        }

                        if (E.Cast(Game.CursorPos))
                        {
                            return;
                        }
                    }
                }
            }
        }
        private static void Game_OnUpdate(EventArgs args)
        {
            if (Orbwalker.GetTarget() != null)
            {
                if (Passive())
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, Orbwalker.GetTarget());
                }
            }

            if (Orbwalker.ActiveMode != OrbwalkerMode.Combo)
            {
                return;
            }

            if (Player.IsDead)
            {
                return;
            }

            var dashPos = Player.PreviousPosition.Extend(Game.CursorPos, 250);

            if (E.IsReady() && Orbwalker.GetTarget() as AIHeroClient != null && LMenu.ESettings.ECombo.Enabled)
            {
                if (Passive())
                {
                    if (AAA)
                    {
                        if (E.Cast(dashPos))
                        {
                            return;
                        }
                    }
                }
                else
                {
                    if (OAA || BAA)
                    {
                        return;
                    }

                    if (E.Cast(dashPos))
                    {
                        return;
                    }
                }
            }
            else
            {
                if (Q.IsReady() && LMenu.QSettings.QCombo.Enabled && TargetSelector.GetTarget(Q.Range) != null)
                {
                    if (Passive())
                    {
                        if (AAA)
                        {
                            if (Q.Cast(TargetSelector.GetTarget(Q.Range)) == CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                    else
                    {
                        if (BAA)
                        {
                            return;
                        }

                        if (Q.Cast(TargetSelector.GetTarget(Q.Range)) == CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                }
                else
                {
                    if (W.IsReady() && LMenu.WSettings.WCombo.Enabled && TargetSelector.GetTarget(W.Range) != null)
                    {
                        if (Passive())
                        {
                            if (AAA)
                            {
                                if (W.Cast(TargetSelector.GetTarget(W.Range).Position))
                                {
                                    return;
                                }
                            }
                        }
                        else
                        {
                            if (OAA || BAA)
                            {
                                return;
                            }

                            if (W.Cast(TargetSelector.GetTarget(W.Range).Position))
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Esempio n. 10
0
        public static void Execute()
        {
            if (!Q.IsReady() || !Settings.LaneClear.UseQInLaneClear || Player.Instance.HasSheenBuff() ||
                (Player.Instance.ManaPercent < Settings.LaneClear.MinManaQ))
            {
                return;
            }

            var laneMinions = StaticCacheProvider.GetMinions(CachedEntityType.EnemyMinion, x => x.IsValidTargetCached(Q.Range)).ToList();

            if (!laneMinions.Any() || !CanILaneClear())
            {
                return;
            }

            switch (Settings.LaneClear.LaneClearQMode)
            {
            case 0:     //last hit
                foreach (var minion in
                         (from minion in laneMinions
                          where Q.GetPrediction(minion).HitChance >= HitChance.High
                          let health = Prediction.Health.GetPrediction(minion,
                                                                       (int)((minion.DistanceCached(Player.Instance) + Q.CastDelay) / Q.Speed * 1000))
                                       where (health > 30) && (health < Player.Instance.GetSpellDamageCached(minion, SpellSlot.Q))
                                       select minion).Where(minion => !Orbwalker.GetTarget().IdEquals(minion) && !IsPreAttack))
                {
                    if ((Player.Instance.GetAutoAttackDamageCached(minion, true) > minion.Health) &&
                        Player.Instance.IsInAutoAttackRange(minion))
                    {
                        return;
                    }

                    Q.Cast(minion);
                    return;
                }
                break;

            case 1:     // push

                if (Orbwalker.ShouldWait || IsPreAttack || Player.Instance.IsUnderTurret())
                {
                    break;
                }

                var target = (from minion in laneMinions
                              where
                              (Q.GetPrediction(minion).HitChance >= HitChance.High) && !minion.IdEquals(Orbwalker.GetTarget()) &&
                              (minion.Health - Player.Instance.GetSpellDamageCached(minion, SpellSlot.Q) >= 20) &&
                              !((Player.Instance.GetAutoAttackDamageCached(minion, true) > minion.Health) &&
                                Player.Instance.IsInAutoAttackRange(minion))
                              select minion).OrderByDescending(x => x.Health).FirstOrDefault();

                if (target == null)
                {
                    return;
                }

                Q.Cast(target.ServerPosition);

                break;

            default:
                return;
            }
        }
Esempio n. 11
0
        private static void Combo()
        {
            if (ComboOption.UseQ && Q.IsReady() && Orbwalker.GetTarget() != null)
            {
                var target = Orbwalker.GetTarget() as AIHeroClient;
                if (target != null && !target.IsDead && target.InAutoAttackRange())
                {
                    if (Me.HasBuff("asheqcastready"))
                    {
                        Q.Cast();
                    }
                }
            }

            if (ComboOption.UseR && R.IsReady())
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(1200)))
                {
                    if (ComboOption.GetBool("ComboRTeam").Enabled)
                    {
                        if (target.IsValidTarget(600) && Me.CountEnemyHeroesInRange(600) >= 3 &&
                            target.CountAllyHeroesInRange(200) <= 2)
                        {
                            var rPred = R.GetPrediction(target);

                            if (rPred.Hitchance >= HitChance.High)
                            {
                                R.Cast(rPred.CastPosition);
                            }
                        }
                    }

                    if (ComboOption.GetBool("ComboRSolo").Enabled)
                    {
                        if (Me.CountEnemyHeroesInRange(800) == 1 &&
                            !target.InAutoAttackRange() &&
                            target.DistanceToPlayer() <= 700 &&
                            target.Health > Me.GetAutoAttackDamage(target) &&
                            target.Health < Me.GetSpellDamage(target, SpellSlot.R) + Me.GetAutoAttackDamage(target) * 3 &&
                            !target.HasBuffOfType(BuffType.SpellShield))
                        {
                            var rPred = R.GetPrediction(target);

                            if (rPred.Hitchance >= HitChance.High)
                            {
                                R.Cast(rPred.CastPosition);
                            }
                        }

                        if (target.DistanceToPlayer() <= 1000 &&
                            (!target.CanMoveMent() || target.HasBuffOfType(BuffType.Stun) ||
                             R.GetPrediction(target).Hitchance == HitChance.Immobile))
                        {
                            var rPred = R.GetPrediction(target);

                            if (rPred.Hitchance >= HitChance.High)
                            {
                                R.Cast(rPred.CastPosition);
                            }
                        }
                    }
                }
            }

            if (ComboOption.UseW && W.IsReady() && !Me.HasBuff("AsheQAttack"))
            {
                if (ComboOption.GetBool("ComboSaveMana").Enabled&&
                    Me.Mana > (R.IsReady() ? R.Mana : 0) + W.Mana + Q.Mana ||
                    !ComboOption.GetBool("ComboSaveMana").Enabled)
                {
                    var target = MyTargetSelector.GetTarget(W.Range);

                    if (target.IsValidTarget(W.Range))
                    {
                        var wPred = W.GetPrediction(target);

                        if (wPred.Hitchance >= HitChance.High)
                        {
                            W.Cast(wPred.CastPosition);
                        }
                    }
                }
            }

            if (ComboOption.UseE && E.IsReady())
            {
                var target = MyTargetSelector.GetTarget(1000);

                if (target != null)
                {
                    var ePred = E.GetPrediction(target);

                    if (ePred.UnitPosition.IsGrass() || target.PreviousPosition.IsGrass())
                    {
                        E.Cast(ePred.UnitPosition);
                    }
                }
            }
        }
Esempio n. 12
0
        static void Combo()
        {
            if (SharpShooter.Menu.Item("comboUseQ", true).GetValue <Boolean>())
            {
                var Qtarget = Orbwalker.GetTarget();

                if (Q.IsReady() && Qtarget != null && Qtarget.IsEnemy)
                {
                    Q.Cast();
                }
            }

            if (!Orbwalking.CanMove(1))
            {
                return;
            }

            if (SharpShooter.Menu.Item("comboUseW", true).GetValue <Boolean>() && W.IsReady())
            {
                foreach (Obj_AI_Hero Wtarget in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget(W.Range) && !Player.HasBuffOfType(BuffType.SpellShield) && !Player.HasBuffOfType(BuffType.Invulnerability)))
                {
                    var Wpred = W.GetPrediction(Wtarget);

                    if (!Wpred.CastPosition.UnderTurret(true) && Utility.CountEnemiesInRange(Wpred.CastPosition, 1000) <= 2)
                    {
                        foreach (var buff in Wtarget.Buffs)
                        {
                            if (buff.Name == "tristanaecharge" && buff.Count >= 3)
                            {
                                W.Cast(Wtarget);
                                break;
                            }
                        }

                        if (Player.Health + Player.HPRegenRate <= W.GetDamage(Wtarget) + Player.GetAutoAttackDamage(Wtarget, true))
                        {
                            W.Cast(Wtarget);
                        }
                    }
                }
            }

            if (SharpShooter.Menu.Item("comboUseE", true).GetValue <Boolean>())
            {
                var Etarget = Orbwalker.GetTarget();

                if (E.IsReady() && Etarget != null && Etarget.IsEnemy)
                {
                    E.Cast((Obj_AI_Hero)Etarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseR", true).GetValue <Boolean>() && R.IsReady())
            {
                foreach (Obj_AI_Hero Rtarget in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)) && !Player.HasBuffOfType(BuffType.SpellShield) && !Player.HasBuffOfType(BuffType.Invulnerability)))
                {
                    if (Rtarget.Health + Rtarget.HPRegenRate <= R.GetDamage(Rtarget))
                    {
                        R.Cast(Rtarget);
                        break;
                    }
                }
            }
        }
Esempio n. 13
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(1100, TargetSelector.DamageType.Magical);

            if (!Player.HasBuff("pickacard_tracker"))
            {
                if (Utils.TickCount - W.LastCastAttemptT > 300)
                {
                    if (R.IsReady() && (Player.HasBuff("destiny_marker") || Player.HasBuff("gate")))
                    {
                        W.Cast();
                    }
                    else if (t.IsValidTarget() && Program.Combo)
                    {
                        W.Cast();
                    }
                    else if (Orbwalker.GetTarget() != null)
                    {
                        if (Program.Harass && Orbwalker.GetTarget().Type == GameObjectType.AIHeroClient && Config.Item("harassW", true).GetValue <bool>())
                        {
                            W.Cast();
                        }
                        else if (Program.LaneClear && (Orbwalker.GetTarget().Type == GameObjectType.obj_AI_Minion || Orbwalker.GetTarget().Type == GameObjectType.obj_AI_Turret) && Config.Item("farmW", true).GetValue <bool>())
                        {
                            W.Cast();
                        }
                    }
                }
            }
            else
            {
                if (temp == null)
                {
                    temp = wName;
                }
                else if (temp != wName)
                {
                    cardok = true;
                }

                if (cardok)
                {
                    AIHeroClient orbTarget = null;

                    var getTarget = Orbwalker.GetTarget();
                    if (getTarget != null && getTarget.Type == GameObjectType.AIHeroClient)
                    {
                        orbTarget = (AIHeroClient)getTarget;
                    }

                    if (R.IsReady() && (Player.HasBuff("destiny_marker") || Player.HasBuff("gate")))
                    {
                        FindCard = 1;
                        if (wName == "TwistedFate_Base_W_GoldCard.troy")
                        {
                            W.Cast();
                        }
                    }
                    else if (Program.Combo && orbTarget.IsValidTarget() && W.GetDamage(orbTarget) + Player.GetAutoAttackDamage(orbTarget) > orbTarget.Health)
                    {
                        W.Cast();
                        Program.debug("1" + wName);
                    }
                    else if (Player.Mana < RMANA + QMANA + WMANA)
                    {
                        FindCard = 2;
                        if (wName == "TwistedFate_Base_W_BlueCard.troy")
                        {
                            W.Cast();
                        }
                    }
                    else if (Program.Harass && orbTarget.IsValidTarget())
                    {
                        FindCard = 1;
                        if (wName == "TwistedFate_Base_W_BlueCard.troy")
                        {
                            W.Cast();
                        }
                    }
                    else if (Player.ManaPercent > Config.Item("WredFarm", true).GetValue <Slider>().Value&& FarmSpells && Config.Item("farmW", true).GetValue <bool>())
                    {
                        FindCard = 3;
                        if (wName == "TwistedFate_Base_W_RedCard.troy")
                        {
                            W.Cast();
                        }
                    }
                    else if ((Program.LaneClear || Player.Mana < RMANA + QMANA) && Config.Item("farmW", true).GetValue <bool>())
                    {
                        FindCard = 2;
                        if (wName == "TwistedFate_Base_W_BlueCard.troy")
                        {
                            W.Cast();
                        }
                    }
                    else if (Program.Combo)
                    {
                        FindCard = 1;
                        if (wName == "TwistedFate_Base_W_GoldCard.troy")
                        {
                            W.Cast();
                        }
                    }
                }
            }
        }
Esempio n. 14
0
        static void Drawing_OnDraw(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }

            var drawingAA = SharpShooter.Menu.Item("drawingAA", true).GetValue <Circle>();
            var drawingQ  = SharpShooter.Menu.Item("drawingQ", true).GetValue <Circle>();
            var drawingW  = SharpShooter.Menu.Item("drawingW", true).GetValue <Circle>();
            var drawingE  = SharpShooter.Menu.Item("drawingE", true).GetValue <Circle>();
            var drawingR  = SharpShooter.Menu.Item("drawingR", true).GetValue <Circle>();

            if (drawingAA.Active)
            {
                Render.Circle.DrawCircle(Player.Position, Orbwalking.GetRealAutoAttackRange(Player) + 30, drawingAA.Color);
            }

            if (drawingQ.Active && Q.IsReady())
            {
                Render.Circle.DrawCircle(Player.Position, GetQActiveRange + 30, drawingQ.Color);
            }

            if (drawingW.Active && W.IsReady())
            {
                Render.Circle.DrawCircle(Player.Position, W.Range, drawingW.Color);
            }

            if (drawingE.Active && E.IsReady())
            {
                Render.Circle.DrawCircle(Player.Position, E.Range, drawingE.Color);
            }

            if (drawingR.Active && R.IsReady())
            {
                Render.Circle.DrawCircle(Player.Position, R.Range, drawingR.Color);
            }

            if (SharpShooter.Menu.Item("drawingPTimer", true).GetValue <Boolean>())
            {
                foreach (var buff in Player.Buffs)
                {
                    if (buff.Name == "jinxpassivekill")
                    {
                        var targetpos = Drawing.WorldToScreen(Player.Position);
                        Drawing.DrawText(targetpos[0] - 10, targetpos[1], Color.Gold, "" + (buff.EndTime - Game.ClockTime));
                        break;
                    }
                }
            }

            if (SharpShooter.Menu.Item("drawingTarget").GetValue <Boolean>())
            {
                var target = Orbwalker.GetTarget();

                if (target != null)
                {
                    if (QisActive)
                    {
                        Render.Circle.DrawCircle(target.Position, 200, Color.Red);
                    }
                }
            }
        }
Esempio n. 15
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Q.IsReady() && GetValue <bool>("UseQM"))
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero =>
                        hero.IsValidTarget(Q.Range) &&
                        GetQDamage(hero) > hero.Health))
                {
                    if (Config.Item("MURAMANA").GetValue <bool>() &&
                        (Items.HasItem(ItemData.Muramana.Id) || Items.HasItem(ItemData.Muramana2.Id)))
                    {
                        if (!Player.HasBuff("Muramana"))
                        {
                            Items.UseItem(ItemData.Muramana.Id);
                            Items.UseItem(ItemData.Muramana2.Id);
                        }
                    }
                    Q.CastIfHitchanceEquals(hero, HitChance.VeryHigh);
                }
            }


            if (LaneClearActive)
            {
                var useQ = GetValue <bool>("UseQL");

                if (Q.IsReady() && useQ)
                {
                    var vMinions = MinionManager.GetMinions(Player.Position, Q.Range);
                    foreach (var minions in
                             vMinions.Where(
                                 minions =>
                                 minions.Health < GetQDamage(minions) &&
                                 (Orbwalker.GetTarget() == null || minions.ToString() != Orbwalker.GetTarget().ToString()))
                             )
                    {
                        Q.Cast(minions);
                    }
                }
            }

            var harassQ = GetValue <KeyBind>("UseQHT").Active;

            if (ComboActive || HarassActive || (harassQ && !Player.HasBuff("Recall")))
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));

                if (Q.IsReady() && useQ)
                {
                    var t = (Obj_AI_Hero)Orbwalker.GetTarget() ??
                            TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                    if (t != null && (Player.Distance3D(t) > Orbwalking.GetRealAutoAttackRange(t) || (AttackReadiness > 0.2 && AttackReadiness < 0.75)))
                    {
                        CastQ(t, GetValue <Slider>("QHit").Value);
                    }
                }
                else if (W.IsReady() && useW && Player.ManaPercent >= GetValue <Slider>("WlimM").Value)
                {
                    var t = (Obj_AI_Hero)Orbwalker.GetTarget() ??
                            TargetSelector.GetTarget(700, TargetSelector.DamageType.Magical);
                    if (t != null && (Player.Distance3D(t) > Orbwalking.GetRealAutoAttackRange(t) || (AttackReadiness > 0.2 && AttackReadiness < 0.75)))
                    {
                        W.Cast(t);
                    }
                }
            }

            if (WhichTear() != 0)
            {
                var g = new Spell(GetItemSlot(WhichTear()).SpellSlot);
                if (Q.IsReady() && GetValue <KeyBind>("StackT").Active&&
                    Math.Max(g.Instance.CooldownExpires - Game.Time, 0) <= 0)
                {
                    if (Player.HasBuff("Recall"))
                    {
                        return;
                    }
                    Q.Cast(Game.CursorPos);
                }
            }
        }
Esempio n. 16
0
        private static void BlitDoCombo()
        {
            if (QComboHarass.Enabled && Q.IsReady())
            {
                var Target = FunnySlayerCommon.FSTargetSelector.GetFSTarget(Q.Range);
                if (Target != null)
                {
                    var Pred = SebbyLibPorted.Prediction.Prediction.GetPrediction(Q, Target);
                    if (Target.DistanceToPlayer() > QMin.Value && Pred.Hitchance >= SebbyLibPorted.Prediction.HitChance.High)
                    {
                        if (Q.SPredictionCast(Target, EnsoulSharp.SDK.HitChance.High))
                        {
                            return;
                        }
                    }
                }
            }

            if (EComboHarass.Enabled && E.IsReady())
            {
                if (Orbwalker.GetTarget() != null)
                {
                    if (E.Cast())
                    {
                        Orbwalker.ResetAutoAttackTimer();
                        return;
                    }
                }
            }

            if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
            {
                if (WCombo.Enabled && W.IsReady())
                {
                    if (Orbwalker.GetTarget() != null)
                    {
                        if (W.Cast())
                        {
                            return;
                        }
                    }
                }

                if (RCombo.Enabled && R.IsReady())
                {
                    var targets = GameObjects.EnemyHeroes.Where(i => i.IsValidTarget(R.Range));
                    if (RKs.Enabled)
                    {
                        if (targets != null)
                        {
                            foreach (var target in targets.OrderBy(i => i.Health))
                            {
                                if (target.Health < Player.GetSpellDamage(target, SpellSlot.R))
                                {
                                    if (R.Cast())
                                    {
                                        return;
                                    }
                                }
                            }
                        }
                    }

                    if (targets != null)
                    {
                        if (targets.Count() >= RMin.Value)
                        {
                            if (R.Cast())
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Esempio n. 17
0
        private static void Game_OnUpdate1(EventArgs args)
        {
            if (GameObjects.Player.IsDead)
            {
                return;
            }

            //Game.Print(QTimer + QFlyingTime + "  ----  " + Variables.TickCount);

            if (Orbwalker.GetTarget() != null)
            {
                if ((Orbwalker.GetTarget() as AIBaseClient).HasBuff("zoeesleepstun") && Q.IsReady())
                {
                    Orbwalker.AttackEnabled = false;
                }
                else
                {
                    Orbwalker.AttackEnabled = true;
                }
            }

            if (Orbwalker.ActiveMode > OrbwalkerMode.Harass)
            {
                return;
            }

            var EclientPos = Vector3.Zero;

            if (EClient() != null || EStunClient() != null)
            {
                if (EClient() != null)
                {
                    EclientPos = EClient().Position;
                }
                if (EStunClient() != null)
                {
                    EclientPos = EStunClient().Position;
                }

                if (EclientPos.DistanceToPlayer() < Q.Range + MoveRange)
                {
                    if (Q.IsReady())
                    {
                        if (Q2())
                        {
                            if (EclientPos.DistanceToPlayer() > Q.Range && QTimer + QFlyingTime < Variables.TickCount)
                            {
                                if (Q.Cast(EclientPos))
                                {
                                    DelayAction.Add(200, () =>
                                    {
                                        if (R.Cast(EclientPos))
                                        {
                                            return;
                                        }
                                    });
                                }
                            }
                            else
                            {
                                if (QTimer + QFlyingTime < Variables.TickCount)
                                {
                                    if (Q.Cast(EclientPos))
                                    {
                                        return;
                                    }
                                }
                            }
                        }

                        if (!Q2())
                        {
                            var GetCastPos = Vector3.Zero;
                            var QGetPoss   = new EnsoulSharp.SDK.Geometry.Circle(GameObjects.Player.Position, 800f);
                            foreach (var QGetPos in QGetPoss.Points.OrderByDescending(i => i.Distance(EclientPos)))
                            {
                                QCollision = new EnsoulSharp.SDK.Geometry.Rectangle(GameObjects.Player.Position.ToVector2(), QGetPos, Q.Width + 50);
                                var CheckCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QCollision.IsInside(i));
                                if (CheckCollision == false)
                                {
                                    //Check For Collision
                                    {
                                        var QGeometry = new EnsoulSharp.SDK.Geometry.Rectangle(QGetPos.ToVector3(), EclientPos, Q.Width * 2);

                                        if (QGeometry != null)
                                        {
                                            var CheckForCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QGeometry.IsInside(i));
                                            if (CheckForCollision == false)
                                            {
                                                //Add Pos
                                                GetCastPos = QGetPos.ToVector3();
                                                GetBool    = false;
                                                if (Q.Cast(GetCastPos))
                                                {
                                                    break;
                                                }
                                            }
                                            else
                                            {
                                                GetBool = true;
                                                continue;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 18
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (Config.Item("disableBlock", true).GetValue <KeyBind>().Active)
            {
                SebbyLib.Orbwalking.Attack = true;
                SebbyLib.Orbwalking.Move   = true;
                OktwCommon.blockSpells     = false;
                OktwCommon.blockAttack     = false;
                OktwCommon.blockMove       = false;
                return;
            }
            else if (Player.IsChannelingImportantSpell() || Game.Time - RCastTime < 0.3)
            {
                if (Config.Item("forceBlockMove", true).GetValue <bool>())
                {
                    OktwCommon.blockMove   = true;
                    OktwCommon.blockAttack = true;
                    OktwCommon.blockSpells = true;
                }

                SebbyLib.Orbwalking.Attack = false;
                SebbyLib.Orbwalking.Move   = false;

                Program.debug("cast R");
                return;
            }
            else
            {
                SebbyLib.Orbwalking.Attack = true;
                SebbyLib.Orbwalking.Move   = true;
                if (Config.Item("forceBlockMove", true).GetValue <bool>())
                {
                    OktwCommon.blockAttack = false;
                    OktwCommon.blockMove   = false;
                    OktwCommon.blockSpells = false;
                }
                if (R.IsReady() && Config.Item("useR", true).GetValue <KeyBind>().Active)
                {
                    var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                    if (t.IsValidTarget(R.Range))
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                        return;
                    }
                }
            }

            if (Config.Item("newTarget", true).GetValue <bool>())
            {
                var orbT = Orbwalker.GetTarget();

                Obj_AI_Hero t2 = null;

                if (orbT != null && orbT is Obj_AI_Hero)
                {
                    t2 = (Obj_AI_Hero)orbT;
                }

                if (t2.IsValidTarget() && t2.NetworkId == LastAttackId)
                {
                    var ta = HeroManager.Enemies.Where(enemy =>
                                                       enemy.IsValidTarget() && SebbyLib.Orbwalking.InAutoAttackRange(enemy) &&
                                                       (enemy.NetworkId != LastAttackId || enemy.Health < Player.GetAutoAttackDamage(enemy) * 2)).FirstOrDefault();

                    if (ta != null)
                    {
                        Orbwalker.ForceTarget(ta);
                    }
                }
            }

            if (Program.LagFree(1))
            {
                SetMana();
                Jungle();
            }

            if (Program.LagFree(2) && !Player.IsWindingUp && Q.IsReady() && Config.Item("autoQ", true).GetValue <bool>())
            {
                LogicQ();
            }

            if (Program.LagFree(3) && !Player.IsWindingUp && E.IsReady() && Config.Item("autoE", true).GetValue <bool>())
            {
                LogicE();
            }

            if (Program.LagFree(4) && !Player.IsWindingUp && R.IsReady() && Config.Item("autoR", true).GetValue <bool>())
            {
                LogicR();
            }
        }
Esempio n. 19
0
        public static void updateArmaPlay()
        {
            try
            {
                if (!haveSeenMinion)
                {
                    haveSeenMinion = ObjectManager.Get <Obj_AI_Minion>().Any(min => min.IsTargetable && min.IsAlly && min.Health > 50) || ARAMDetFull.gameStart + 44 * 1000 < ARAMDetFull.now;
                }
                if (!haveSeenMinion)
                {
                    return;
                }
                try
                {
                    AutoLevelChamp.LevelUpOff();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }
                if ((Shop.CanShop || player.IsDead))
                {
                    buyItems();
                }
                if (champ != null)
                {
                    champ.alwaysCheck();
                }

                setRambo();
                if (player.IsDead)
                {
                    return;
                }

                var fightLevel = MapControl.fightLevel();
                MapControl.updateReaches();

                var closestEnemy = EntityManager.Heroes.Enemies.Where(ene => !ene.IsDead && ene.IsTargetable && ene.IsHPBarRendered && !ARAMTargetSelector.IsInvulnerable(ene)).OrderBy(ene => player.Position.Distance(ene.Position, true)).FirstOrDefault();
                if (closestEnemy != null && ramboMode)
                {
                    Orbwalker.OrbwalkTo(closestEnemy.Position);
                    return;
                }

                if (fightLevel != 0)
                {
                    Aggresivity.addAgresiveMove(new AgresiveMove(40 * fightLevel, 2000, true, true));
                }

                agrobalance = Aggresivity.getAgroBalance();

                balance  = (ARAMTargetSelector.IsInvulnerable(player) || player.IsZombie) ? 250 : MapControl.balanceAroundPointAdvanced(player.Position.To2D(), 250 - agrobalance * 5) + agrobalance;
                inDanger = balance < 0;

                if (champ != null)
                {
                    try
                    {
                        var enemiesInRange = ObjectManager.Get <AIHeroClient>().Where(h => h.IsEnemy && !h.IsDead && h.IsValid && h.Distance(player) <= farmRange).ToList();
                        if (enemiesInRange.Count(ene => !ene.IsDead && !ene.IsZombie) != 0)
                        {
                            champ.killSteal();
                        }
                        else
                        {
                            champ.farm();
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                    }
                }

                if (!player.IsUnderEnemyturret() || towerAttackedAlly || player.HealthPercent < 25)
                {
                    try
                    {
                        ItemHandler.useItems();
                        sSpells.useSumoners();
                        if (champ != null)
                        {
                            var enemiesInRange = ObjectManager.Get <AIHeroClient>().Where(h => h.IsEnemy && !h.IsDead && h.IsValid && h.Distance(player) <= farmRange).ToList();
                            if (enemiesInRange.Count(ene => !ene.IsDead && !ene.IsZombie) != 0)
                            {
                                champ.useSpells();
                            }
                            else
                            {
                                champ.farm();
                            }
                        }
                        else
                        {
                            MapControl.myControler.useSpells();
                            if (player.MaxMana < 350 || player.ManaPercent > 50)
                            {
                                MapControl.myControler.useSpellsOnMinions();
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                    }
                }
                deepestAlly = EntityManager.Heroes.Allies.OrderBy(al => toNex.Position.Distance(al.Position, true)).FirstOrDefault();

                if (deepestAlly == null)
                {
                    deepestAlly = player;
                }
                var lookRange = player.AttackRange + ((player.IsMelee) ? 260 : 155);

                var easyKill =
                    EntityManager.Heroes.Enemies.FirstOrDefault(ene => ene != null && !ene.IsZombie && !ene.IsDead && ene.Distance(player, true) < lookRange * lookRange && !ARAMTargetSelector.IsInvulnerable(ene) && ene.Health / 1.5 < player.GetAutoAttackDamage(ene) && ene.IsHPBarRendered);

                if (easyKill != null && easyKill.IsValidTarget())
                {
                    //Aggresivity.addAgresiveMove(new AgresiveMove(45, 1500, true));
                    //Orbwalker.OrbwalkTo(easyKill.Position.To2D().Extend(player.Position.To2D(), player.AttackRange * 0.7f).To3D());
                    //if (!Orbwalker.IsAutoAttacking || Orbwalker.GetTarget() != easyKill)
                    //Player.IssueOrder(GameObjectOrder.AttackUnit, easyKill);
                }


                if (balance < 0)
                {
                    Orbwalker.OrbwalkTo(player.Position.To2D().Extend(fromNex.Position.To2D(), 632).To3D());
                }

                if ((!player.IsMelee || fightLevel < 2) && EntityManager.Enemies.Any(h => !h.IsDead) && OrbwalkToRelicIfForHeal())
                {
                    return;
                }

                if (!player.IsUnderEnemyturret())
                {
                    towerAttackedMe   = false;
                    towerAttackedAlly = false;
                }

                if (towerAttackedMe)
                {
                    //Chat.Print("ouch tower!");
                    Orbwalker.OrbwalkTo(player.Position.To2D().Extend(fromNex.Position.To2D(), 650).To3D());
                    return;
                }

                awayTo = eAwayFromTo();
                if (balance < 70 && awayTo.IsValid() && awayTo.X != 0)
                {
                    if (champ != null)
                    {
                        champ.kiteBack(awayTo);
                    }
                    Orbwalker.OrbwalkTo(awayTo.To3D());
                }
                else
                {
                    var closestObj = EntityManager.Turrets.Enemies.Where(obj => obj.IsValidTarget(700) && !obj.IsDead && !obj.IsInvulnerable && obj.IsTargetable).OrderBy(obj => obj.Position.Distance(player.Position, true)).FirstOrDefault();

                    if (closestObj != null && (!(closestObj is Obj_AI_Turret) || Sector.towerContainsAlly(closestObj)))
                    {
                        if (!closestObj.IsInRange(Player.Instance, Player.Instance.GetAutoAttackRange()))
                        {
                            Orbwalker.OrbwalkTo(closestObj.Position.Extend(player.Position, player.AttackRange * 0.6f).To3D());
                        }
                        else
                        if (!Orbwalker.IsAutoAttacking || Orbwalker.GetTarget() != closestObj)
                        {
                            Player.IssueOrder(GameObjectOrder.AttackUnit, closestObj);
                        }
                        return;
                    }

                    if (player.IsMelee)
                    {
                        var safeMeleeEnem = ARAMTargetSelector.getSafeMeleeTarget();
                        if (safeMeleeEnem != null && safeMeleeEnem.IsValidTarget())
                        {
                            Orbwalker.OrbwalkTo(safeMeleeEnem.Position.Extend(safeMeleeEnem.Direction, player.AttackRange * 0.3f).To3D());
                            //if (!Orbwalker.IsAutoAttacking || Orbwalker.GetTarget() != safeMeleeEnem)
                            //Player.IssueOrder(GameObjectOrder.AttackUnit, safeMeleeEnem);
                            return;
                        }
                    }
                    var fightOn = MapControl.fightIsOn();
                    if (fightOn != null && MapControl.balanceAroundPointAdvanced(fightOn.Position.To2D(), 280, 450) > (-130) && fightOn.Distance(player, true) < 2500 * 2500 && (!player.IsMelee || !Sector.inTowerRange(fightOn.Position.To2D())))
                    {
                        Aggresivity.addAgresiveMove(new AgresiveMove(40 * MapControl.fightLevel(), 3000, true, true));
                        Orbwalker.OrbwalkTo(fightOn.Position.Extend(player.Position, player.AttackRange * 0.6f).To3D());
                    }
                    else
                    {
                        if (player.HealthPercent < 69 && OrbwalkToRelicIfForHeal())
                        {
                            return;
                        }

                        if (!inDanger)
                        {
                            Sector orbSector  = null;
                            Sector prevSector = null;
                            foreach (var sector in sectors)
                            {
                                sector.update();
                                int sectorCheck = 1150 - MapControl.fearDistance;
                                if (sector.containsEnemyChamp && sector.enemyChampIn.Distance(player, true) < sectorCheck * sectorCheck)
                                {
                                    orbSector = sector;
                                    break;
                                }
                                if (sector.dangerPolig)
                                {
                                    break;
                                }

                                orbSector = sector;
                                if (sector.containsEnemy && sector.containsAlly)
                                {
                                    break;
                                }
                                prevSector = sector;
                            }
                            if (orbSector == null)
                            {
                                return;
                            }
                            Orbwalker.OrbwalkTo(orbSector.getRandomPointIn().To3D());
                        }
                        else
                        {
                            Orbwalker.OrbwalkTo(player.Position.To2D().Extend(fromNex.Position.To2D(), 333).To3D());
                            Orbwalker.OrbwalkTo(player.Position.To2D().Extend(fromNex.Position.To2D(), 333).To3D());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
Esempio n. 20
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (Config.Item("ignoreCol", true).GetValue <bool>() && SebbyLib.Orbwalking.InAutoAttackRange(t))
                {
                    W.Collision = false;
                }
                else
                {
                    W.Collision = true;
                }

                var qDmg = Q.GetDamage(t);
                var wDmg = OktwCommon.GetKsDamage(t, W);

                if (SebbyLib.Orbwalking.InAutoAttackRange(t))
                {
                    qDmg += (float)AaDamage(t);
                    wDmg += (float)AaDamage(t);
                }

                if (wDmg > t.Health)
                {
                    Program.CastSpell(W, t);
                }
                else if (wDmg + qDmg > t.Health && Q.IsReady() && Player.Mana > RMANA + WMANA + QMANA)
                {
                    Program.CastSpell(W, t);
                }

                var orbT = Orbwalker.GetTarget() as Obj_AI_Hero;
                if (orbT == null)
                {
                    if (Config.Item("wInAaRange", true).GetValue <bool>())
                    {
                        return;
                    }
                }
                else if (orbT.IsValidTarget())
                {
                    t = orbT;
                }


                if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo && Player.Mana > RMANA + WMANA + EMANA + QMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if (Program.Farm && Config.Item("Harass" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && Player.Mana > Player.MaxMana * 0.8 && Player.Mana > RMANA + WMANA + EMANA + QMANA + WMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA + EMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        W.Cast(enemy, true);
                    }
                }
            }
        }
Esempio n. 21
0
        private void LogicE()
        {
            if (Program.Combo && Player.IsWindingUp)
            {
                return;
            }
            var orbT = Orbwalker.GetTarget() as Obj_AI_Hero;

            if (orbT != null && orbT.Health - OktwCommon.GetIncomingDamage(orbT) < Player.GetAutoAttackDamage(orbT) * 2)
            {
                return;
            }

            if (Config.Item("autoE", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    var positionT = Player.ServerPosition - (t.Position - Player.ServerPosition);

                    if (Player.Position.Extend(positionT, 400).CountEnemiesInRange(700) < 2)
                    {
                        var eDmg = E.GetDamage(t);
                        var qDmg = Q.GetDamage(t);
                        if (Config.Item("EQks", true).GetValue <bool>() && qDmg + eDmg + Player.GetAutoAttackDamage(t) > t.Health && Player.Mana > EMANA + QMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q FINISH");
                        }
                        else if ((Program.Harass || Program.Combo) && Config.Item("harrasEQ", true).GetValue <bool>() && Player.Mana > EMANA + QMANA + RMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q Harras");
                        }
                    }

                    if (Player.Mana > RMANA + EMANA)
                    {
                        if (Config.Item("Ehitchance", true).GetValue <bool>())
                        {
                            E.CastIfHitchanceEquals(t, HitChance.Dashing);
                        }
                        if (Player.Health < Player.MaxHealth * 0.3)
                        {
                            if (GetRealDistance(t) < 500)
                            {
                                E.Cast(t, true);
                            }
                            if (Player.CountEnemiesInRange(250) > 0)
                            {
                                E.Cast(t, true);
                            }
                        }
                    }
                }
            }
            if (Config.Item("useE", true).GetValue <KeyBind>().Active)
            {
                var position = Player.ServerPosition - (Game.CursorPos - Player.ServerPosition);
                E.Cast(position, true);
            }
        }
Esempio n. 22
0
        private void LogicQ()
        {
            var laneMinions = MinionManager.GetMinions(1000);

            if (Program.Farm && !FishBoneActive && !Player.IsWindingUp && Orbwalker.GetTarget() == null && Orbwalking.CanAttack() && MainMenu.Item("farmQout", true).GetValue <bool>() && Player.Mana > RMANA + WMANA + EMANA + 10)
            {
                foreach (var minion in Cache.GetMinions(Player.Position, bonusRange() + 30).Where(
                             minion => !Orbwalking.InAutoAttackRange(minion) && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = HealthPrediction.GetHealthPrediction(minion, 400, 70);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForceTarget(minion);
                        Q.Cast();
                        return;
                    }
                }
            }

            var t = TargetSelector.GetTarget(bonusRange() + 60, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (!FishBoneActive && (!Orbwalking.InAutoAttackRange(t) || t.CountEnemiesInRange(250) > 2) && Orbwalker.GetTarget() == null)
                {
                    var distance = GetRealDistance(t);
                    if (Program.Combo && (Player.Mana > RMANA + WMANA + 10 || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Program.Harass && !Player.IsWindingUp && Orbwalking.CanAttack() && MainMenu.Item("Qharras", true).GetValue <bool>() && !ObjectManager.Player.UnderTurret(true) && Player.Mana > RMANA + WMANA + EMANA + 20 && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Program.Combo && Player.Mana > RMANA + WMANA + 20 && Player.CountEnemiesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.Mana < RMANA + WMANA + 20)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.CountEnemiesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Harass && !Program.LaneClear)
            {
                Q.Cast();
            }
            else if (Program.LaneClear)
            {
                var tOrb = Orbwalker.GetTarget();
                if (!FarmSpells || !MainMenu.Item("farmQ", true).GetValue <bool>())
                {
                    if (FishBoneActive)
                    {
                        Q.Cast();
                    }
                }
                else if (!FishBoneActive)
                {
                    if (tOrb != null && tOrb.Type == GameObjectType.obj_AI_Minion)
                    {
                        var minions = MinionManager.GetMinions(tOrb.Position, 300);
                        if (minions.Count > 1)
                        {
                            Q.Cast();
                        }
                    }
                    else if (laneMinions.Count > 2)
                    {
                        Q.Cast();
                    }
                }
                else
                {
                    if (tOrb != null && tOrb.Type == GameObjectType.obj_AI_Minion)
                    {
                        var minions = MinionManager.GetMinions(tOrb.Position, 300);
                        if (minions.Count < 2)
                        {
                            Q.Cast();
                        }
                    }
                }
            }
            else if (Program.Harass)
            {
                if (MainMenu.Item("farmQout", true).GetValue <bool>() && Q.Level >= 3 && !FishBoneActive && Orbwalking.CanAttack())
                {
                    foreach (var x in laneMinions)
                    {
                        if (!Orbwalking.InAutoAttackRange(x) && GetRealDistance(x) < bonusRange() + 150)
                        {
                            var   t2 = Player.AttackCastDelay * 1000f + 20 + 100;
                            var   t3 = t2 + 1000 * Math.Max(0, x.Distance(Player) - Player.BoundingRadius) / Player.BasicAttack.MissileSpeed;
                            float predicted_minion_health = LeagueSharp.Common.HealthPrediction.GetHealthPrediction(x, (int)t3);
                            if (predicted_minion_health > 0)
                            {
                                if (predicted_minion_health - Player.GetAutoAttackDamage(x, true) * 1.1 <= 0 || x.Health < Player.TotalAttackDamage)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                }
            }

            if (MainMenu.Item("QpokeOnMinions", true).GetValue <bool>() && FishBoneActive && Program.Combo && Player.Mana > RMANA + EMANA + WMANA + WMANA)
            {
                var tOrb = Orbwalker.GetTarget();
                if (tOrb != null)
                {
                    var t2 = TargetSelector.GetTarget(bonusRange() + 200, TargetSelector.DamageType.Physical);

                    if (t2 != null)
                    {
                        Obj_AI_Base bestMinion = null;
                        foreach (var minion in laneMinions)
                        {
                            if (!Orbwalker.InAutoAttackRange(minion))
                            {
                                continue;
                            }

                            float delay      = Player.AttackCastDelay + 0.3f;
                            var   t2Pred     = Prediction.GetPrediction(t2, delay).CastPosition;
                            var   minionPred = Prediction.GetPrediction(minion, delay).CastPosition;

                            if (t2Pred.Distance(minionPred) < 250 && t2.Distance(minion) < 250)
                            {
                                if (bestMinion != null)
                                {
                                    if (bestMinion.Distance(t2) > minion.Distance(t2))
                                    {
                                        bestMinion = minion;
                                    }
                                }
                                else
                                {
                                    bestMinion = minion;
                                }
                            }
                        }
                        if (bestMinion != null)
                        {
                            Orbwalker.ForceTarget(bestMinion);
                            return;
                        }
                    }
                }
            }
            Orbwalker.ForceTarget(null);
        }
Esempio n. 23
0
            public void useSpellsOnMinions()
            {
                var bTarg = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.Instance.ServerPosition, Player.Instance.GetAutoAttackRange()).OrderBy(x => x.Distance(Player.Instance)).FirstOrDefault();

                if (bTarg != null && !bTarg.IsUnderHisturret())
                {
                    if (!Orbwalker.IsAutoAttacking || Orbwalker.GetTarget() != bTarg)
                    {
                        //Orbwalker.ForcedTarget = bTarg;
                        Player.IssueOrder(GameObjectOrder.AttackUnit, bTarg);
                    }
                }
                return; //code below is unreachable

                /*if (lastMinionSpellUse + 277 > ARAMDetFull.now)
                 *  return;
                 * lastMinionSpellUse = ARAMDetFull.now;
                 * if (hero.MaxMana > 300 && hero.ManaPercent < 78)
                 *  return;
                 * if (hero.MaxMana >199 && hero.MaxMana < 201 && hero.ManaPercent < 95)
                 *  return;
                 *
                 * foreach(var spell in spells)
                 * {
                 *  if (spell.Slot == SpellSlot.R || spell.IsOnCooldown || !spell.IsReady() || spell.ManaCost > hero.Mana || (isTransformChampion() && sBook.GetSpell(spell.Slot).Name.ToLower() != spell.Name.ToLower()))
                 *      continue;
                 *  //Farm spell
                 *  if (spell.IsSkillShot() && !((Skillshot) spell).HasCollision && spell.GetDamage(hero) > 5)
                 *  {
                 *      var spellSkillshot = (Skillshot)spell;
                 *      var farmMinions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.Instance.ServerPosition, (spellSkillshot.Range != 0) ? spellSkillshot.Range : 300);
                 *      var farmLocation = (spellSkillshot.Type == SkillShotType.Circular) ? spellSkillshot.GetCircularFarmLocation(farmMinions, spellSkillshot.Width()) : spellSkillshot.GetLineFarmLocation(farmMinions, spellSkillshot.Width());
                 *      if (farmLocation.HitNumber > 2)
                 *      {
                 *          spellSkillshot.Cast(farmLocation.CastPosition);
                 *          return;
                 *      }
                 *      //dont waste for single kills
                 *      return;
                 *  }
                 *  //if line
                 *  var minions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.Instance.Position, (spell.Range != 0) ? spell.Range : 500);
                 *  foreach (var minion in minions)
                 *  {
                 *
                 *      if (minion.Health > spell.GetDamage(minion))
                 *          continue;
                 *      var movementSpells = new List<string> { "Dash", "Blink", "Teleport" };
                 *      if (spell.IsSkillShot())
                 *      {
                 *
                 *          if (!movementSpells.Contains(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags) || safeGap(minion))
                 *          {
                 *              Console.WriteLine("Cast farm location: " + spell.Slot);
                 *              spell.Cast(minion.Position);
                 *              return;
                 *          }
                 *      }
                 *      else
                 *      {
                 *
                 *          float range = (spell.Range != 0) ? spell.Range : 500;
                 *          if (Player.Instance.Spellbook.GetSpell(spell.Slot).SData.CastType == (int) CastType.Self)
                 *          {
                 *              var bTarg2 = ARAMTargetSelector.getBestTarget(range, true);
                 *              if (bTarg2 != null)
                 *              {
                 *                  Console.WriteLine("Cast farm self: " + spell.Slot);
                 *                  spell.Cast(Player.Instance);
                 *                  return;
                 *              }
                 *          }
                 *          else if (Player.Instance.Spellbook.GetSpell(spell.Slot).SData.CastType == (int)CastType.EnemyMinions)
                 *          {
                 *              if (minion != null)
                 *              {
                 *                  if (!(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags != null && movementSpells.Contains(Player.Instance.Spellbook.GetSpell(spell.Slot).SData.SpellTags)) || safeGap(minion))
                 *                  {
                 *                      Console.WriteLine("Cast farm target: " + spell.Slot);
                 *                      spell.Cast(minion);
                 *                      return;
                 *                  }
                 *              }
                 *          }
                 *      }
                 *
                 *  }
                 * }*/
            }
Esempio n. 24
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob.Position);
                }
            }

            if (!SebbyLib.Orbwalking.CanMove(50) || (Orbwalker.ShouldWait() && SebbyLib.Orbwalking.CanAttack()))
            {
                return;
            }

            var minions   = Cache.GetMinions(Player.ServerPosition, Q.Range);
            int orbTarget = 0;

            if (Orbwalker.GetTarget() != null)
            {
                orbTarget = Orbwalker.GetTarget().NetworkId;
            }

            if (Config.Item("FQ", true).GetValue <bool>())
            {
                foreach (var minion in minions.Where(minion => minion.IsValidTarget() && orbTarget != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion)))
                {
                    int delay  = (int)((minion.Distance(Player) / Q.Speed + Q.Delay) * 1000);
                    var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, delay);
                    if (hpPred > 0 && hpPred < Q.GetDamage(minion))
                    {
                        if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                }
            }

            if (Config.Item("farmQ", true).GetValue <bool>() && !SebbyLib.Orbwalking.CanAttack() && FarmSpells)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();
                var PT  = Game.Time - GetPassiveTime() > -1.5 || !E.IsReady();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion)))
                {
                    int delay  = (int)((minion.Distance(Player) / Q.Speed + Q.Delay) * 1000);
                    var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, delay);
                    if (hpPred < 20)
                    {
                        continue;
                    }

                    var qDmg = Q.GetDamage(minion);
                    if (hpPred < qDmg && orbTarget != minion.NetworkId)
                    {
                        if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                    else if (PT || LCP)
                    {
                        if (minion.HealthPercent > 80)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Esempio n. 25
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                    return;
                }
            }

            if (!Config.Item("farmQ", true).GetValue <bool>())
            {
                return;
            }

            var minions = Cache.GetMinions(Player.ServerPosition, Q.Range);

            int orbTarget = 0;

            if (Orbwalker.GetTarget() != null)
            {
                orbTarget = Orbwalker.GetTarget().NetworkId;
            }

            foreach (var minion in minions.Where(minion => orbTarget != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                {
                    return;
                }
            }

            if (Config.Item("LC", true).GetValue <bool>() && Program.LaneClear && !SebbyLib.Orbwalking.CanAttack() && FarmSpells)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion) && orbTarget != minion.NetworkId))
                {
                    var hpPred    = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 300);
                    var dmgMinion = minion.GetAutoAttackDamage(minion);
                    var qDmg      = Q.GetDamage(minion);
                    if (hpPred < qDmg)
                    {
                        if (hpPred > dmgMinion)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                    else if (LCP)
                    {
                        if (hpPred > dmgMinion + qDmg)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Esempio n. 26
0
 private void TargetedSpell_Evade(DetectedTargetedSpellArgs data)
 {
     if (Spells[E].IsReady())
     {
         if (Orbwalker.ActiveMode != SCommon.Orbwalking.Orbwalker.Mode.Combo || !m_targetedEvader.DisableInComboMode)
         {
             var pos = Vector2.Zero;
             if (Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Combo && Orbwalker.GetTarget().NetworkId == data.Caster.NetworkId)
             {
                 if (data.Caster.ServerPosition.CountEnemiesInRange(1000) <= 1 || !data.SpellData.IsDangerous)
                 {
                     pos = Orbwalker.GetTarget().Position.To2D();
                 }
                 else if (data.SpellData.IsDangerous)
                 {
                     pos = SCommon.Maths.Geometry.Deviation(ObjectManager.Player.ServerPosition.To2D(), data.Caster.ServerPosition.To2D(), 90);
                 }
                 else
                 {
                     pos = ObjectManager.Player.ServerPosition.Extend(data.Caster.ServerPosition, -400).To2D();
                 }
             }
             else
             {
                 if (data.SpellData.IsDangerous)
                 {
                     pos = ObjectManager.Player.ServerPosition.Extend(data.Caster.ServerPosition, -400).To2D();
                 }
                 else
                 {
                     pos = SCommon.Maths.Geometry.Deviation(ObjectManager.Player.ServerPosition.To2D(), data.Caster.ServerPosition.To2D(), 90);
                 }
             }
             if (pos.IsValid())
             {
                 Spells[E].Cast(pos);
             }
         }
     }
 }
Esempio n. 27
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                CastQ();
            }

            if (E.IsReady() && GetValue <KeyBind>("UseETH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                var t = (Orbwalker.GetTarget() ??
                         TargetSelector.GetTarget(E.Range + E.Range / 2, TargetSelector.DamageType.Physical)) as Obj_AI_Base;

                if (t != null)
                {
                    E.CastIfHitchanceEquals(t, HitChance.High);
                }
            }

            if (ComboActive || HarassActive)
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

                if (Orbwalking.CanMove(100))
                {
                    if (Q.IsReady() && useQ)
                    {
                        CastQ();
                    }

                    if (E.IsReady() && useE)
                    {
                        var vTarget = (Orbwalker.GetTarget() ??
                                       TargetSelector.GetTarget(E.Range + E.Range / 2, TargetSelector.DamageType.Physical)) as Obj_AI_Base;
                        if (vTarget != null)
                        {
                            E.CastIfHitchanceEquals(vTarget, HitChance.High);
                        }
                    }
                }
            }
            if (LaneClearActive)
            {
                bool useQ = GetValue <bool>("UseQL");

                if (Q.IsReady() && useQ)
                {
                    var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range);
                    foreach (
                        Obj_AI_Base minions in
                        vMinions.Where(
                            minions => minions.Health < ObjectManager.Player.GetSpellDamage(minions, SpellSlot.Q) - 20))
                    {
                        Q.Cast(minions);
                    }
                }
            }
        }
Esempio n. 28
0
File: Varus.cs Progetto: koyvn/hay
        private void LogicQ()
        {
            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(1600) && Q.GetDamage(enemy) + GetWDmg(enemy) > enemy.Health))
            {
                if (enemy.IsValidTarget(R.Range))
                {
                    CastQ(enemy);
                }
                return;
            }

            if (Config.Item("maxQ", true).GetValue <bool>() && (Q.Range < 1500) && Player.CountEnemiesInRange(AArange) == 0)
            {
                return;
            }

            var t = Orbwalker.GetTarget() as AIHeroClient;

            if (!t.IsValidTarget())
            {
                t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            }

            if (t.IsValidTarget())
            {
                if (Q.IsCharging)
                {
                    if (Config.Item("fastQ", true).GetValue <bool>())
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }

                    if (GetQEndTime() > 2)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    return;
                }

                if ((OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && CanCast && !E.IsReady()) || !Orbwalking.InAutoAttackRange(t))
                {
                    if ((Program.Combo || (OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && Program.Farm)) && Player.Mana > RMANA + QMANA)
                    {
                        CastQ(t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA && Config.Item("Harass" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        CastQ(t);
                    }
                    else if (!Program.None && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            CastQ(enemy);
                        }
                    }
                }
            }
            else if (FarmSpells && Config.Item("farmQ", true).GetValue <bool>() && Q.Range > 1500 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)))
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > 3 || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Esempio n. 29
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (!Config.Item("disableR", true).GetValue <bool>())
            {
                if (R.IsReady())
                {
                    LogicR();
                }
            }
            //Program.debug(""+OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp"));
            if (IsCastingR || Player.IsChannelingImportantSpell())
            {
                OktwCommon.blockMove   = true;
                OktwCommon.blockAttack = true;
                OktwCommon.blockAttack = true;
                OktwCommon.blockMove   = true;
                Orbwalking.Attack      = false;
                Orbwalking.Move        = false;
                return;
            }
            else
            {
                OktwCommon.blockMove   = false;
                OktwCommon.blockAttack = false;
                OktwCommon.blockAttack = false;
                OktwCommon.blockMove   = false;
                Orbwalking.Attack      = true;
                Orbwalking.Move        = true;
            }


            if (Q.IsCharging && (int)(Game.Time * 10) % 2 == 0 && !None)
            {
                EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            }

            if (Program.LagFree(1))
            {
                SetMana();
                Jungle();
                int[] mana = new int[] { 0, 30, 33, 36, 42, 48, 54, 63, 72, 81, 90, 102, 114, 126, 138, 150, 165, 180, 195 };
                if (!Player.HasBuff("xerathascended2onhit") || Player.Mana + mana[Player.Level] > Player.MaxMana)
                {
                    Orbwalker.ForceTarget(null);
                }
                else if ((Program.Combo || Program.Harass) && Config.Item("force", true).GetValue <bool>() && Orbwalker.GetTarget() == null && Player.CountEnemiesInRange(1500) == 0)
                {
                    var minion = Cache.GetMinions(Player.ServerPosition, Player.AttackRange + Player.BoundingRadius * 2).OrderByDescending(x => x.Health).FirstOrDefault();

                    if (minion != null && OktwCommon.CanHarras())
                    {
                        Orbwalker.ForceTarget(minion);
                    }
                }
            }

            if (E.IsReady() && Config.Item("autoE", true).GetValue <bool>())
            {
                LogicE();
            }
            if (Program.LagFree(2) && W.IsReady() && !ObjectManager.Player.Spellbook.IsAutoAttacking && Config.Item("autoW", true).GetValue <bool>())
            {
                LogicW();
            }
            if (Program.LagFree(4) && Q.IsReady() && !ObjectManager.Player.Spellbook.IsAutoAttacking && Config.Item("autoQ", true).GetValue <bool>())
            {
                LogicQ();
            }
        }
Esempio n. 30
0
        public static void LuomRiuTest()
        {
            float y     = 300;
            var   Qbuff = Player.Buffs.Find(b => b.Name.ToLower() == "dravenspinning");

            if (Program.RiuNo1 != null && Player.Distance(Program.RiuNo1.Position) > 70)
            {
                var target = Orbwalker.GetTarget();
                if (target != null)
                {
                    if (Player.Distance(Game.CursorPos) + 100 >= RiuNo1.Position.Distance(Game.CursorPos) + 100)
                    {
                        if (Player.Distance(RiuNo1.Position) >= 120 && Player.Distance(RiuNo1.Position) + 50 > Player.MoveSpeed * (1250 - (Utils.GameTimeTickCount - RiuNo1.CreationTime)) / 1000)
                        {
                            foreach (var riu in Riu)
                            {
                                if (riu.NetworkId == RiuNo1.NetworkId)
                                {
                                    Riu.Remove(riu);
                                }
                            }
                            Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                            Orbwalker.SetMovement(true);
                            Orbwalker.SetAttack(true);
                        }
                        else
                        {
                            Orbwalker.SetOrbwalkingPoint(RiuNo1.Position);
                            if (Qbuff == null)
                            {
                                if (Player.Distance(RiuNo1.Position) + 100 < Player.MoveSpeed * (0 - Utils.GameTimeTickCount + RiuNo1.CreationTime + 1250) / 1000)
                                {
                                    Orbwalker.SetAttack(true); Orbwalker.SetMovement(true);
                                }
                                else
                                {
                                    Orbwalker.SetAttack(false); Orbwalker.SetMovement(true);
                                }
                            }
                            else
                            {
                                float  a = Player.Distance(Game.CursorPos);
                                float  b = RiuNo1.Position.Distance(Game.CursorPos);
                                float  c = Player.Distance(RiuNo1.Position);
                                float  B = (a * a + c * c - b * b) / (2 * a * c);
                                double d = Math.Acos(B) * (180 / Math.PI);
                                if (d <= 45 && Qbuff != null)
                                {
                                    if (Player.Distance(RiuNo1.Position) + 100 < Player.MoveSpeed * (0 - Utils.GameTimeTickCount + RiuNo1.CreationTime + 1250) / 1000)
                                    {
                                        Orbwalker.SetAttack(true); Orbwalker.SetMovement(true);
                                    }
                                    else
                                    {
                                        Orbwalker.SetAttack(false); Orbwalker.SetMovement(true);
                                    }
                                }
                                else
                                {
                                    Orbwalker.SetAttack(false); Orbwalker.SetMovement(true);
                                }
                            }
                        }
                    }
                    else
                    {
                        foreach (var riu in Riu)
                        {
                            if (riu.NetworkId == RiuNo1.NetworkId)
                            {
                                Riu.Remove(riu);
                            }
                        }
                        Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                        Orbwalker.SetMovement(true);
                        Orbwalker.SetAttack(true);
                    }
                }
            }
            else if (Program.RiuNo1 != null && Player.Distance(Program.RiuNo1.Position) <= 70 && Orbwalking.CanMove(40))
            {
                EloBuddy.Player.IssueOrder(GameObjectOrder.HoldPosition, Player);
                Orbwalker.SetOrbwalkingPoint(Program.RiuNo1.Position);
                Orbwalker.SetMovement(false);
                if (Qbuff == null)
                {
                    Program.Orbwalker.SetAttack(true);
                }
                else if (Qbuff != null && Utils.GameTimeTickCount - RiuNo1.CreationTime < 1000)
                {
                    Orbwalker.SetAttack(true);
                }
                else
                {
                    Orbwalker.SetAttack(false);
                }
            }
            else
            {
                Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Orbwalker.SetMovement(true);
            }
        }