Example #1
0
 private static void Fuckingw(Obj_AI_Hero hero)
 {
     if (hero == null) return;
     var qmana = _player.Spellbook.GetSpell(SpellSlot.Q).ManaCost;
     var wmana = _player.Spellbook.GetSpell(SpellSlot.W).ManaCost;
     var emana = _player.Spellbook.GetSpell(SpellSlot.E).ManaCost;
     var rmana = _player.Spellbook.GetSpell(SpellSlot.R).ManaCost;
     var diveTower = _config.Item("diveintower").GetValue<bool>();
     if ((hero.UnderTurret() && !diveTower) || !_w.IsReady()) return;
     var usewhE = (100 * (_player.Health / _player.MaxHealth)) > _config.Item("UseWHE").GetValue<Slider>().Value;
     if (usewhE && hero.IsValidTarget(_q.Range + _w.Range) &&
         hero.CountEnemiesInRange(_q.Range + _w.Range) <= _config.Item("EnemyC").GetValue<Slider>().Value &&
         _player.Distance(hero) > Orbwalking.GetRealAutoAttackRange(_player))
     {
         if (hero.Health < (_player.GetAutoAttackDamage(hero, true) * 2))
         {
             _w.Cast(hero.Position);
         }
         else if (hero.Health < _q.GetDamage(hero) && _player.MaxMana > qmana + wmana && _q.IsReady())
         {
             _w.Cast(hero.Position);
         }
         else if (hero.Health < _e.GetDamage(hero) && _player.MaxMana > emana + wmana && _e.IsReady())
         {
             _w.Cast(hero.Position);
         }
         else if (hero.Health < _e.GetDamage(hero) + _q.GetDamage(hero) && _player.MaxMana > qmana + emana + wmana &&
                  _e.IsReady() && _e.IsReady())
         {
             _w.Cast(hero.Position);
         }
         else if (hero.Health < _q.GetDamage(hero) + _r.GetDamage(hero) && _q.IsReady() && _r.IsReady() &&
                  _player.MaxMana > qmana + wmana + rmana)
         {
             _w.Cast(hero.Position);
         }
     }
 }
Example #2
0
        private static void Game_OnUpdate(EventArgs args)
        {
            didhs = menu.Item("harasskey").GetValue<KeyBind>().Active;

            // ulti check
            uo = player.GetSpell(SpellSlot.R).Name != "RivenFengShuiEngine";

            // hydra check
            hashd = Items.HasItem(3077) || Items.HasItem(3074);
            canhd = !didaa && (Items.CanUseItem(3077) || Items.CanUseItem(3074));

            // main target (riven targ)
            rtarg = TargetSelector.GetTarget(900, TargetSelector.DamageType.Physical);
            ctarg = TargetSelector.GetTarget(q.Range + w.Range, TargetSelector.DamageType.Physical);

            btarg = rtarg != null && ctarg != null &&
                    TargetSelector.GetPriority(rtarg) > TargetSelector.GetPriority(ctarg)
                ? rtarg
                : ctarg;

            truerange = player.AttackRange + player.Distance(player.BBox.Minimum) + 1;

            // if no valid target cancel to cursor pos
            if (!qtarg.IsValidTarget(truerange + 100))
                 qtarg = player;

            // can we burst?
            cb = rtarg != null && r.IsReady() && q.IsReady() &&
                ((ComboDamage(rtarg)/1.6) >= rtarg.Health || rtarg.CountEnemiesInRange(w.Range) >= menuslide("multic"));

            // set player skin
            player.SetSkin(player.BaseSkinName, menu.Item("skinset").GetValue<StringList>().SelectedIndex);

            // move behind me
            if (qtarg != player && qtarg.IsFacing(player) && qtarg.Distance(player.ServerPosition) < truerange + 120)
                movepos = player.ServerPosition + (player.ServerPosition - qtarg.ServerPosition).Normalized()*28;

            // move towards target (thanks yol0)
            if (qtarg != player && (!qtarg.IsFacing(player) || qtarg.Distance(player.ServerPosition) > truerange + 120))
                movepos = player.ServerPosition.Extend(qtarg.ServerPosition, 350);

            // move to game cursor pos
            if (qtarg == player)
                movepos = Game.CursorPos;

            // orbwalk movement
            orbwalker.SetAttack(canmv);
            orbwalker.SetMovement(canmv);

            // reqs ->
            SemiQ();
            AuraUpdate();
            CombatCore();
            Windslash();

            if (btarg.IsValidTarget() &&
                menu.Item("combokey").GetValue<KeyBind>().Active)
            {
                ComboTarget(btarg);
            }

            if (rtarg.IsValidTarget() &&
                menu.Item("shycombo").GetValue<KeyBind>().Active)
            {
                if (rtarg.Distance(player.ServerPosition) <= truerange)
                {
                    if ((Items.HasItem(3077) || Items.HasItem(3074)))
                    {
                        if ((Items.CanUseItem(3077) || Items.CanUseItem(3074)))
                        {
                            OrbTo(rtarg);
                        }
                    }
                }

                if (rtarg.IsValidTarget(w.Range))
                {
                    if (w.IsReady())
                        w.Cast();
                }

                TryFlashInitiate(rtarg);
            }

            if (didhs && ctarg.IsValidTarget())
            {
                HarassTarget(ctarg);
            }

            if (player.IsValid &&
                menu.Item("clearkey").GetValue<KeyBind>().Active)
            {
                Clear();
                Wave();
            }

            if (player.IsValid &&
                menu.Item("fleekey").GetValue<KeyBind>().Active)
            {
                Flee();
            }
        }
Example #3
0
        public static void UseItems(Obj_AI_Hero target, Menu config, float comboDmg = 0f, bool cleanseSpell=false)
        {
            if (config.Item("hyd").GetValue<bool>() && player.BaseSkinName != "Renekton")
            {
                castHydra(target);
            }
            if (config.Item("ran").GetValue<bool>() && Items.HasItem(randuins.Id) && Items.CanUseItem(randuins.Id))
            {
                if (target != null && player.Distance(target) < randuins.Range &&
                    player.CountEnemiesInRange(randuins.Range) >= config.Item("ranmin").GetValue<Slider>().Value)
                {
                    Items.UseItem(randuins.Id);
                }
            }
            if (config.Item("odin").GetValue<bool>() && target != null && Items.HasItem(odins.Id) &&
                Items.CanUseItem(odins.Id))
            {
                var odinDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.OdingVeils);
                if (config.Item("odinonlyks").GetValue<bool>())
                {
                    if (odinDmg > target.Health)
                    {
                        odins.Cast(target);
                    }
                }
                else if (player.CountEnemiesInRange(odins.Range) >= config.Item("odinmin").GetValue<Slider>().Value ||
                         (Math.Max(comboDmg, odinDmg) > target.Health && player.HealthPercent<30 && player.Distance(target) < odins.Range &&
                          !CombatHelper.CheckCriticalBuffs(target)))
                {
                    odins.Cast();
                }
            }
            if (target != null && config.Item("bil").GetValue<bool>() && Items.HasItem(bilgewater.Id) &&
                Items.CanUseItem(bilgewater.Id))
            {
                var bilDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Bilgewater);
                if (config.Item("bilonlyks").GetValue<bool>())
                {
                    if (bilDmg > target.Health)
                    {
                        bilgewater.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("bilminr").GetValue<Slider>().Value &&
                          IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, bilDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50))
                {
                    bilgewater.Cast(target);
                }
            }
            if (target != null && config.Item("botr").GetValue<bool>() && Items.HasItem(botrk.Id) &&
                Items.CanUseItem(botrk.Id))
            {
                var botrDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Botrk);
                if (config.Item("botronlyks").GetValue<bool>())
                {
                    if (botrDmg > target.Health)
                    {
                        botrk.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("botrminr").GetValue<Slider>().Value &&
                          (player.Health / player.MaxHealth * 100f) <
                          config.Item("botrmyhealth").GetValue<Slider>().Value &&
                          (target.Health / target.MaxHealth * 100f) <
                          config.Item("botrenemyhealth").GetValue<Slider>().Value) ||
                         (IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, botrDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50))
                {
                    botrk.Cast(target);
                }
            }
            if (target != null && config.Item("hex").GetValue<bool>() && Items.HasItem(hexgun.Id) &&
                Items.CanUseItem(hexgun.Id))
            {
                var hexDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Hexgun);
                if (config.Item("hexonlyks").GetValue<bool>())
                {
                    if (hexDmg > target.Health)
                    {
                        hexgun.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("hexminr").GetValue<Slider>().Value &&
                          IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, hexDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50))
                {
                    hexgun.Cast(target);
                }
            }
            if (config.Item("Muramana").GetValue<bool>() &&
                ((!MuramanaEnabled && config.Item("MuramanaMinmana").GetValue<Slider>().Value < player.ManaPercent) ||
                 (MuramanaEnabled && config.Item("MuramanaMinmana").GetValue<Slider>().Value > player.ManaPercent)))
            {
                if (Muramana.IsOwned() && Muramana.IsReady())
                {
                    Muramana.Cast();
                }
                if (Muramana2.IsOwned() && Muramana2.IsReady())
                {
                    Muramana2.Cast();
                }
            }
            MuramanaTime = System.Environment.TickCount;
            if (config.Item("you").GetValue<bool>() && Items.HasItem(youmuu.Id) && Items.CanUseItem(youmuu.Id) &&
                target != null && player.Distance(target) < player.AttackRange + 50 && target.HealthPercent < 65)
            {
                youmuu.Cast();
            }

            if (Items.HasItem(frost.Id) && Items.CanUseItem(frost.Id) && target != null &&
                config.Item("frost").GetValue<bool>())
            {
                if (player.Distance(target) < frost.Range &&
                    (config.Item("frostmin").GetValue<Slider>().Value <= target.CountEnemiesInRange(225f) &&
                     ((target.Health / target.MaxHealth * 100f) < 40 && config.Item("frostlow").GetValue<bool>() ||
                      !config.Item("frostlow").GetValue<bool>())))
                {
                    frost.Cast(target);
                }
            }
            if (Items.HasItem(solari.Id) && Items.CanUseItem(solari.Id) && config.Item("solari").GetValue<bool>())
            {
                if ((config.Item("solariminally").GetValue<Slider>().Value <= player.CountAlliesInRange(solari.Range) &&
                     config.Item("solariminenemy").GetValue<Slider>().Value <= player.CountEnemiesInRange(solari.Range)) ||
                    ObjectManager.Get<Obj_AI_Hero>()
                        .FirstOrDefault(
                            h => h.IsAlly && !h.IsDead && solari.IsInRange(h) && CombatHelper.CheckCriticalBuffs(h)) !=
                    null)
                {
                    solari.Cast();
                }
            }
            if (Items.HasItem(mountain.Id) && Items.CanUseItem(mountain.Id) && config.Item("mountain").GetValue<bool>())
            {
                if (config.Item("castonme").GetValue<bool>() &&
                    (player.Health / player.MaxHealth * 100f) < config.Item("mountainmin").GetValue<Slider>().Value &&
                    (player.CountEnemiesInRange(700f) > 0 || CombatHelper.CheckCriticalBuffs(player)))
                {
                    mountain.Cast(player);
                    return;
                }
                var targ =
                    ObjectManager.Get<Obj_AI_Hero>()
                        .Where(
                            h =>
                                h.IsAlly && !h.IsMe && !h.IsDead && player.Distance(h) < mountain.Range &&
                                config.Item("mountainpriority" + h.ChampionName).GetValue<Slider>().Value > 0 &&
                                (h.Health / h.MaxHealth * 100f) < config.Item("mountainmin").GetValue<Slider>().Value);
                if (targ != null)
                {
                    var finaltarg =
                        targ.OrderByDescending(
                            t => config.Item("mountainpriority" + t.ChampionName).GetValue<Slider>().Value)
                            .ThenBy(t => t.Health)
                            .FirstOrDefault();
                    if (finaltarg != null &&
                        (finaltarg.CountEnemiesInRange(700f) > 0 || finaltarg.UnderTurret(true) ||
                         CombatHelper.CheckCriticalBuffs(finaltarg)))
                    {
                        mountain.Cast(finaltarg);
                    }
                }
            }
            if (config.Item("QSSEnabled").GetValue<bool>())
            {
                UseCleanse(config, cleanseSpell);
            }
        }
Example #4
0
 public int enemiesInRange(Obj_AI_Hero obj, float range)
 {
     return obj.CountEnemiesInRange(range);
 }
Example #5
0
 private static bool Checkinrange(Obj_AI_Hero i)
 {
     if (i.CountEnemiesInRange(750) >= 1 && i.CountEnemiesInRange(750) < 3)
     {
         return true;
     }
     return false;
 }
Example #6
0
        private void Combo(Obj_AI_Hero target, float cmbDmg, bool canKill, bool bush)
        {
            if (target == null || !target.IsValidTarget())
            {
                return;
            }

            if (config.Item("useItems").GetValue<bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            if (config.Item("usew", true).GetValue<bool>() && W.IsReady() && W.CanCast(target))
            {
                var tarPered = W.GetPrediction(target);
                if (justE && ePos.IsValid() && target.Distance(ePos) < 375)
                {
                    if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position) &&
                        tarPered.Hitchance >= HitChance.High)
                    {
                        W.Cast(target.Position, config.Item("packets").GetValue<bool>());
                    }
                }
                else
                {
                    if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position) &&
                        tarPered.Hitchance >= HitChance.VeryHigh)
                    {
                        W.Cast(tarPered.CastPosition, config.Item("packets").GetValue<bool>());
                    }
                }
            }
            if (config.Item("usee", true).GetValue<bool>() && E.IsReady() &&
                (((canKill && config.Item("useekill", true).GetValue<bool>()) ||
                  (!config.Item("useekill", true).GetValue<bool>() && CheckMana())) ||
                 config.Item("startWithE", true).GetValue<bool>()))
            {
                switch (config.Item("eType", true).GetValue<StringList>().SelectedIndex)
                {
                    case 0:
                        CastE(target);
                        return;
                    case 1:
                        CastE(target, false);
                        return;
                        break;
                }
            }
            if (config.Item("useq", true).GetValue<bool>() && Q.IsReady() && Q.CanCast(target) && target.IsValidTarget() &&
                !bush && !Estun)
            {
                CastQHero(target);
            }
            var ignitedmg = (float) player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            if (config.Item("useIgnite", true).GetValue<bool>() &&
                ((ignitedmg > target.Health && hasIgnite && !player.IsChannelingImportantSpell() && !justQ &&
                  !Q.CanCast(target) && !justR && !R.CanCast(target) && CheckW(target)) || IgniteTarget != null))
            {
                if (IgniteTarget != null)
                {
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), IgniteTarget);
                    return;
                }
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            var castR = false;
            if (target.CountEnemiesInRange(2000) == 1)
            {
                castR = true;
            }
            else if (!config.Item("ult" + target.SkinName, true).GetValue<bool>())
            {
                castR = true;
            }
            if (R.IsReady() && R.CanCast(target) && config.Item("user", true).GetValue<bool>() &&  castR &&
                R.Instance.ManaCost < player.Mana && !target.Buffs.Any(b => CombatHelper.invulnerable.Contains(b.Name)) &&
                !CombatHelper.CheckCriticalBuffs(target))
            {
                if (config.Item("userPred", true).GetValue<bool>())
                {
                    var Whit = wPos.IsValid() && System.Environment.TickCount - wTime > 700 &&
                               Prediction.GetPrediction(target, 0.55f).UnitPosition.Distance(wPos) < W.Width;
                    var targetHP = HealthPrediction.GetHealthPrediction(target, 400);

                    var killWithIgnite = hasIgnite && config.Item("useIgnite", true).GetValue<bool>() &&
                                         R.GetDamage(target) + ignitedmg > targetHP && targetHP > R.GetDamage(target);

                    var killWithW = wPos != null && Whit && R.GetDamage(target) + W.GetDamage(target) > targetHP &&
                                    target.Health > R.GetDamage(target);

                    var killWithIgniteAndW = !killWithW && Whit && hasIgnite &&
                                             config.Item("useIgnite", true).GetValue<bool>() &&
                                             R.GetDamage(target) + W.GetDamage(target) + ignitedmg > targetHP &&
                                             targetHP > R.GetDamage(target) + W.GetDamage(target);

                    if (killWithW || (targetHP < R.GetDamage(target) && !justQ && CheckW(target)))
                    {
                        R.CastOnUnit(target, config.Item("packets").GetValue<bool>());
                    }

                    if ((killWithIgnite || killWithIgniteAndW) && CheckW(target))
                    {
                        R.CastOnUnit(target, config.Item("packets").GetValue<bool>());
                        IgniteTarget = target;
                        Utility.DelayAction.Add(500, () => IgniteTarget = null);
                    }
                }
                else
                {
                    if (target.Health < R.GetDamage(target))
                    {
                        R.CastOnUnit(target, config.Item("packets").GetValue<bool>());
                    }
                }
            }
        }
Example #7
0
 private void CastR(Obj_AI_Hero target)
 {
     if (R.IsReady() && !maoR &&
         player.Mana / player.MaxMana * 100 > config.Item("rmana", true).GetValue<Slider>().Value &&
         config.Item("user", true).GetValue<Slider>().Value <= target.CountEnemiesInRange(R.Range - 50))
     {
         R.Cast(config.Item("packets").GetValue<bool>());
     }
 }
        private static void Game_OnUpdate(EventArgs args)
        {
            didhs = menu.Item("harasskey").GetValue<KeyBind>().Active;

            // ulti check
            uo = player.GetSpell(SpellSlot.R).Name != "RivenFengShuiEngine";

            // hydra check
            hashd = Items.HasItem(3077) || Items.HasItem(3074);
            canhd = !didaa && (Items.CanUseItem(3077) || Items.CanUseItem(3074));

            // main target (riven targ)
            rtarg = TargetSelector.GetTarget(1100, TargetSelector.DamageType.Physical);

            // my radius
            truerange = player.AttackRange + player.Distance(player.BBox.Minimum) + 1;

            // if no valid target cancel to cursor pos
            if (!qtarg.IsValidTarget(truerange + 100))
                 qtarg = player;

            // riven w range
            wrange = uo ? w.Range + 25 : w.Range;

            // can we burst?
            cb = rtarg != null && r.IsReady() && q.IsReady() &&
                ((ComboDamage(rtarg)/1.6) >= rtarg.Health || rtarg.CountEnemiesInRange(w.Range) >= menuslide("multic"));

            // move behind me
            if (qtarg != player && qtarg.IsFacing(player) && qtarg.Distance(player.ServerPosition) < truerange + 120)
                movepos = player.ServerPosition + (player.ServerPosition - qtarg.ServerPosition).Normalized()*28;

            // move towards target (thanks yol0)
            if (qtarg != player && (!qtarg.IsFacing(player) || qtarg.Distance(player.ServerPosition) > truerange + 120))
                movepos = player.ServerPosition.Extend(qtarg.ServerPosition, 350);

            // move to game cursor pos
            if (qtarg == player)
                movepos = Game.CursorPos;

            // orbwalk movement
            orbwalker.SetAttack(canmv);
            orbwalker.SetMovement(canmv);

            // reqs ->
            SemiQ();
            AuraUpdate();
            CombatCore();
            Windslash();

            if (rtarg.IsValidTarget() &&
                menu.Item("combokey").GetValue<KeyBind>().Active)
            {
                ComboTarget(rtarg);
                TryIgnote(rtarg);
            }

            if (rtarg.IsValidTarget() &&
                menu.Item("shycombo").GetValue<KeyBind>().Active)
            {
                if (rtarg.Distance(player.ServerPosition) <= wrange)
                {
                    w.Cast();
                }

                OrbTo(rtarg, 350);
                TryFlashInitiate(rtarg);
                TryIgnote(rtarg);

                if (q.IsReady() && rtarg.Distance(player.ServerPosition) <= q.Range + 30)
                {
                    useinventoryitems(rtarg);
                    CheckR();

                    if (menulist("emode") == 0 || (ComboDamage(rtarg) / 1.7) >= rtarg.Health)
                    {
                        if (Items.CanUseItem(3077) || Items.CanUseItem(3074))
                            return;
                    }

                    if (canq)
                        q.Cast(rtarg.ServerPosition);
                }
            }

            if (didhs && rtarg.IsValidTarget())
            {
                HarassTarget(rtarg);
            }

            if (player.IsValid &&
                menu.Item("clearkey").GetValue<KeyBind>().Active)
            {
                Clear();
                Wave();
            }

            if (player.IsValid &&
                menu.Item("fleekey").GetValue<KeyBind>().Active)
            {
                Flee();
            }
        }