Esempio n. 1
0
        private static void Fight()
        {
            var target = E.GetTarget();

            if (target == null)
            {
                return;
            }
            if (GetValue <bool>("Combo", "E") && E.IsReady() && CanCastE(target) && E.Cast(PacketCast))
            {
                return;
            }
            if (Orbwalk.InAutoAttackRange(target, 100) &&
                (!GetValue <bool>("Combo", "E") || E.Level == 0 || !CanCastE(target)))
            {
                if (GetValue <bool>("Combo", "Q") && Q.Cast(PacketCast))
                {
                    return;
                }
                if (GetValue <bool>("Combo", "R") && R.IsReady() &&
                    (!GetValue <bool>("Combo", "Q") || Q.Level == 0 || (CurStance == Stance.Tiger && _aaCount > 1)) &&
                    R.Cast(PacketCast))
                {
                    return;
                }
                if (GetValue <bool>("Combo", "W") && W.IsReady() &&
                    Player.HealthPercent < GetValue <Slider>("Combo", "WHpU").Value&&
                    ((CurStance == Stance.Tiger && _aaCount > 1) ||
                     (CurStance == Stance.Phoenix && (_aaCount > 2 || _phoenixActive)) || (Q.Level == 0 && R.Level == 0)))
                {
                    W.Cast(PacketCast);
                }
            }
        }
Esempio n. 2
0
        private void Clear()
        {
            SmiteMob();
            var minionObj = MinionManager.GetMinions(
                600, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any() || HaveQ)
            {
                return;
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady() && !HaveW &&
                (minionObj.Count(i => Q.IsInRange(i)) > 2 || minionObj.Any(i => i.MaxHealth >= 1200 && Q.IsInRange(i)) ||
                 !minionObj.Any(i => Orbwalk.InAutoAttackRange(i, 40))) && Q.Cast(PacketCast))
            {
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady() &&
                Player.HealthPercent >= GetValue <Slider>("Clear", "EHpA").Value&&
                (!GetValue <bool>("Clear", "EW") || HaveW))
            {
                var obj = minionObj.FirstOrDefault(i => E.IsInRange(i) && i.Team == GameObjectTeam.Neutral);
                if (obj != null && E.CastOnUnit(obj, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "W") && W.IsReady() &&
                (minionObj.Count(i => Orbwalk.InAutoAttackRange(i)) > 2 ||
                 minionObj.Any(i => i.MaxHealth >= 1200 && Orbwalk.InAutoAttackRange(i))))
            {
                W.Cast(PacketCast);
            }
        }
Esempio n. 3
0
        private static void LastHit()
        {
            if (!GetValue <bool>("LastHit", "W") || (!W.IsReady() && !HaveW))
            {
                return;
            }
            var obj =
                GetMinions(W.Range + 100, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
                .Where(i => Orbwalk.InAutoAttackRange(i))
                .FirstOrDefault(i => CanKill(i, GetBonusDmg(i)));

            if (obj == null)
            {
                return;
            }
            if (!HaveW)
            {
                W.Cast(PacketCast);
            }
            Orbwalk.Move   = false;
            Orbwalk.Attack = false;
            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, obj);
            Orbwalk.Move   = true;
            Orbwalk.Attack = true;
        }
Esempio n. 4
0
        private static void Clear()
        {
            SmiteMob();
            var minionObj = GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any())
            {
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady())
            {
                var obj = minionObj.FirstOrDefault(i => E.IsKillable(i));
                if (obj == null && !minionObj.Any(i => Orbwalk.InAutoAttackRange(i, 30)))
                {
                    obj = minionObj.MinOrDefault(i => i.Health);
                }
                if (obj != null && E.CastOnUnit(obj, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Item"))
            {
                var item = Hydra.IsReady() ? Hydra : Tiamat;
                if (item.IsReady() &&
                    (minionObj.Count(i => item.IsInRange(i)) > 2 ||
                     minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player) < item.Range - 80)))
                {
                    item.Cast();
                }
            }
        }
Esempio n. 5
0
 private static void Fight(string mode)
 {
     if (mode == "Combo" && GetValue <bool>(mode, "E") && GetValue <bool>(mode, "EAoE") && HaveE)
     {
         var target =
             HeroManager.Enemies.Where(i => Orbwalk.InAutoAttackRange(i))
             .MaxOrDefault(i => i.CountEnemiesInRange(150));
         if (target != null)
         {
             Orbwalk.ForcedTarget = target;
         }
     }
     else
     {
         Orbwalk.ForcedTarget = null;
     }
     if (GetValue <bool>(mode, "Q"))
     {
         var target = Q.GetTarget();
         if (target != null &&
             ((Player.Distance(target) > Q.Range - 100 && !target.IsFacing(Player) && Player.IsFacing(target)) ||
              target.HealthPercent > 60 || Player.CountEnemiesInRange(Q.Range) == 1) &&
             Q.CastOnUnit(target, PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady() && E.GetTarget() != null && E.Cast(PacketCast))
     {
         return;
     }
     if (mode != "Combo")
     {
         return;
     }
     if (GetValue <bool>(mode, "W") && GetValue <bool>(mode, "WSpeed") && W.IsReady())
     {
         var target = Q.GetTarget(200);
         if (target != null && !target.IsFacing(Player) && (!HaveE || !Orbwalk.InAutoAttackRange(target)) &&
             (!GetValue <bool>(mode, "Q") || (Q.IsReady() && !Q.IsInRange(target))) && W.Cast(PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "R") && GetValue <StringList>(mode, "RAnti").SelectedIndex > 0 && R.IsReady())
     {
         var obj =
             HeroManager.Allies.Where(
                 i =>
                 i.IsValidTarget(R.Range, false) && RAntiDetected.ContainsKey(i.NetworkId) &&
                 Game.Time > RAntiDetected[i.NetworkId].StartTick && !i.HasBuff("UndyingRage"))
             .MinOrDefault(i => i.Health);
         if (obj != null)
         {
             R.CastOnUnit(obj, PacketCast);
         }
     }
 }
Esempio n. 6
0
        private static void Clear()
        {
            SmiteMob();
            var minionObj = GetMinions(
                E.Range + E.Width / 2, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any())
            {
                return;
            }
            if (GetValue <bool>("Clear", "Q") && (Q.IsReady() || HaveQ))
            {
                var obj =
                    (Obj_AI_Base)
                    ObjectManager.Get <Obj_AI_Turret>()
                    .FirstOrDefault(i => Orbwalk.InAutoAttackRange(i) && CanKill(i, GetBonusDmg(i))) ??
                    minionObj.Where(i => Orbwalk.InAutoAttackRange(i))
                    .FirstOrDefault(
                        i =>
                        CanKill(i, GetBonusDmg(i)) ||
                        !CanKill(
                            i,
                            GetBonusDmg(i) +
                            Player.GetAutoAttackDamage(i, true) *
                            Math.Floor(Q.Instance.Cooldown / 1 / Player.AttackDelay)));
                if (obj != null)
                {
                    if (!HaveQ)
                    {
                        Q.Cast(PacketCast);
                    }
                    Orbwalk.Move   = false;
                    Orbwalk.Attack = false;
                    EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, obj);
                    Orbwalk.Move   = true;
                    Orbwalk.Attack = true;
                }
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady())
            {
                var pos = E.GetCircularFarmLocation(minionObj.Cast <Obj_AI_Base>().ToList());
                if (pos.MinionsHit > 1)
                {
                    E.Cast(pos.Position, PacketCast);
                }
                else
                {
                    var obj = minionObj.FirstOrDefault(i => i.MaxHealth >= 1200);
                    if (obj != null)
                    {
                        E.Cast(obj, PacketCast);
                    }
                }
            }
        }
Esempio n. 7
0
 private static void Fight(string mode)
 {
     if (mode == "Combo")
     {
         if (GetValue <bool>(mode, "R") && R.IsReady() && !Player.InFountain() &&
             (Player.HealthPercent < GetValue <Slider>(mode, "RHpU").Value ||
              Player.CountEnemiesInRange(E.Range) >= GetValue <Slider>(mode, "RCountA").Value) &&
             R.Cast(PacketCast))
         {
             return;
         }
         if (GetValue <bool>(mode, "Q") && (Q.IsReady() || HaveQ))
         {
             var target = Orbwalk.GetBestHeroTarget;
             if (target != null)
             {
                 if (!HaveQ)
                 {
                     Q.Cast(PacketCast);
                 }
                 Orbwalk.Move   = false;
                 Orbwalk.Attack = false;
                 EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                 Orbwalk.Move   = true;
                 Orbwalk.Attack = true;
             }
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady())
     {
         var target = E.GetTarget(E.Width / 2);
         if (target != null && (mode == "Combo" || Orbwalk.InAutoAttackRange(target, 50)) &&
             E.Cast(target, PacketCast).IsCasted())
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "W") && W.IsReady())
     {
         var target = W.GetTarget();
         if (target != null &&
             ((mode == "Combo" && (!Orbwalk.InAutoAttackRange(target, 50) || target.HealthPercent > 30)) ||
              (mode == "Harass" && Orbwalk.InAutoAttackRange(target, 50))))
         {
             W.CastOnUnit(target, PacketCast);
         }
     }
 }
Esempio n. 8
0
        private void Clear()
        {
            SmiteMob();
            var minionObj = MinionManager.GetMinions(
                Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any())
            {
                if (GetValue <bool>("Clear", "W") && W.IsReady() && HaveW)
                {
                    W.Cast(PacketCast);
                }
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady() && minionObj.Any(i => E.IsInRange(i)) && E.Cast(PacketCast))
            {
                return;
            }
            if (GetValue <bool>("Clear", "W") && W.IsReady())
            {
                if (Player.ManaPercent >= GetValue <Slider>("Clear", "WMpA").Value&&
                    (minionObj.Count(i => W.IsInRange(i, W.Range + GetValue <Slider>("Misc", "WExtraRange").Value)) > 1 ||
                     minionObj.Any(
                         i =>
                         i.MaxHealth >= 1200 &&
                         W.IsInRange(i, W.Range + GetValue <Slider>("Misc", "WExtraRange").Value))))
                {
                    if (!HaveW && W.Cast(PacketCast))
                    {
                        return;
                    }
                }
                else if (HaveW && W.Cast(PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady())
            {
                var list = minionObj.Where(i => Q.GetPrediction(i).Hitchance >= HitChance.Medium).ToList();
                var obj  = list.Cast <Obj_AI_Minion>().FirstOrDefault(i => Q.IsKillable(i)) ??
                           list.FirstOrDefault(i => !Orbwalk.InAutoAttackRange(i));
                if (obj != null)
                {
                    Q.CastIfHitchanceEquals(obj, HitChance.Medium, PacketCast);
                }
            }
        }
Esempio n. 9
0
        public static void OnStart()
        {
            var plugin = Type.GetType("BrianSharp.Plugin." + Player.ChampionName);

            if (plugin == null)
            {
                Helper.AddNotif(string.Format("[Brian Sharp] - {0}: Not Load !", Player.ChampionName), 3000);
                return;
            }
            MainMenu = new Menu("Brian Sharp", "BrianSharp", true);
            var infoMenu = new Menu("Info", "Info");

            {
                infoMenu.AddItem(new MenuItem("Author", "Author: Brian"));
                infoMenu.AddItem(new MenuItem("Paypal", "Paypal: [email protected]"));
                MainMenu.AddSubMenu(infoMenu);
            }
            TargetSelector.AddToMenu(MainMenu.AddSubMenu(new Menu("Target Selector", "TS")));
            Orbwalk.Init(MainMenu);

            NewInstance(plugin);

            Helper.AddBool(
                MainMenu.SubMenu(Player.ChampionName + "_Plugin").SubMenu("Misc"),
                "UsePacket",
                "Use Packet To Cast");
            Tiamat  = ItemData.Tiamat_Melee_Only.GetItem();
            Hydra   = ItemData.Ravenous_Hydra_Melee_Only.GetItem();
            Youmuu  = ItemData.Youmuus_Ghostblade.GetItem();
            Zhonya  = ItemData.Zhonyas_Hourglass.GetItem();
            Seraph  = ItemData.Seraphs_Embrace.GetItem();
            Sheen   = ItemData.Sheen.GetItem();
            Iceborn = ItemData.Iceborn_Gauntlet.GetItem();
            Trinity = ItemData.Trinity_Force.GetItem();
            Flash   = Player.GetSpellSlot("summonerflash");
            foreach (var spell in
                     Player.Spellbook.Spells.Where(
                         i =>
                         i.Name.ToLower().Contains("smite") &&
                         (i.Slot == SpellSlot.Summoner1 || i.Slot == SpellSlot.Summoner2)))
            {
                Smite = spell.Slot;
            }
            Ignite = Player.GetSpellSlot("summonerdot");
            MainMenu.AddToMainMenu();
            Helper.AddNotif(string.Format("[Brian Sharp] - {0}: Loaded !", Player.ChampionName), 3000);
        }
Esempio n. 10
0
 private static void Fight(string mode)
 {
     if (mode == "Combo" && GetValue <bool>(mode, "W") && W.IsReady() && !Player.IsDashing())
     {
         var target = W.GetTarget();
         if (target != null)
         {
             if (GetValue <bool>(mode, "WSolo") && LeagueSharp.Common.Utility.IsBothFacing(Player, target) &&
                 Orbwalk.InAutoAttackRange(target) &&
                 Player.GetAutoAttackDamage(target, true) < target.GetAutoAttackDamage(Player, true))
             {
                 return;
             }
             if (Player.IsFacing(target) && !target.IsFacing(Player) && !Orbwalk.InAutoAttackRange(target, 30) &&
                 W.Cast(PacketCast))
             {
                 return;
             }
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady() &&
         (mode == "Combo" || Player.HealthPercent >= GetValue <Slider>(mode, "EHpA").Value))
     {
         var target = E.GetTarget(E.Width);
         if (target != null)
         {
             var predE = E.GetPrediction(target, true);
             if (predE.Hitchance >= E.MinHitChance &&
                 ((mode == "Combo" && !Orbwalk.InAutoAttackRange(target, 20)) ||
                  (mode == "Harass" && Orbwalk.InAutoAttackRange(target, 50))))
             {
                 E.Cast(predE.CastPosition.Extend(Player.ServerPosition, -100), PacketCast);
             }
         }
         else
         {
             var sub = E.GetTarget(Orbwalk.GetAutoAttackRange());
             if (sub != null &&
                 Orbwalk.InAutoAttackRange(sub, 20, Player.ServerPosition.Extend(sub.ServerPosition, E.Range)))
             {
                 E.Cast(Player.ServerPosition.Extend(sub.ServerPosition, E.Range), PacketCast);
             }
         }
     }
 }
Esempio n. 11
0
        private static void AfterAttack(AttackableUnit target)
        {
            if (!E.IsReady())
            {
                return;
            }
            if (((Orbwalk.CurrentMode == Orbwalker.Mode.Clear && target is Obj_AI_Minion) ||
                 ((Orbwalk.CurrentMode == Orbwalker.Mode.Combo ||
                   (Orbwalk.CurrentMode == Orbwalker.Mode.Harass &&
                    Player.HealthPercent >= GetValue <Slider>("Harass", "EHpA").Value)) && target is Obj_AI_Hero)) &&
                GetValue <bool>(Orbwalk.CurrentMode.ToString(), "E") && !HavePassive)
            {
                var obj = (Obj_AI_Base)target;
                if (Orbwalk.CurrentMode == Orbwalker.Mode.Clear || Orbwalk.CurrentMode == Orbwalker.Mode.Harass ||
                    (Orbwalk.CurrentMode == Orbwalker.Mode.Combo &&
                     GetValue <StringList>("Combo", "EMode").SelectedIndex == 0))
                {
                    var pos = Geometry.CircleCircleIntersection(
                        Player.ServerPosition.To2D(), Prediction.GetPrediction(obj, 0.25f).UnitPosition.To2D(), E.Range,
                        Orbwalk.GetAutoAttackRange(obj));
                    if (pos.Count() > 0)
                    {
                        E.Cast(pos.MinOrDefault(i => i.Distance(Game.CursorPos)), PacketCast);
                    }
                    else
                    {
                        E.Cast(Player.ServerPosition.Extend(obj.ServerPosition, -E.Range), PacketCast);
                    }
                }
                else if (Orbwalk.CurrentMode == Orbwalker.Mode.Combo)
                {
                    switch (GetValue <StringList>("Combo", "EMode").SelectedIndex)
                    {
                    case 1:
                        E.Cast(Player.ServerPosition.Extend(Game.CursorPos, E.Range), PacketCast);
                        break;

                    case 2:
                        E.Cast(obj.ServerPosition, PacketCast);
                        break;
                    }
                }
            }
        }
Esempio n. 12
0
        private static void OnGameLoad(EventArgs args)
        {
            Player     = ObjectManager.Player;
            PlayerName = Player.ChampionName;
            Game.PrintChat("<font color = \'{0}'>Brian Sharp</font>", HTMLColor.Lime);
            MainMenu = new Menu("【無爲汉化】Brian合集", "BrianSharp", true);
            var InfoMenu = new Menu("信息", "Info");

            {
                InfoMenu.AddItem(new MenuItem("Author", "作者: Brian"));
                InfoMenu.AddItem(new MenuItem("Paypal", "捐赠: [email protected]"));
                InfoMenu.AddItem(new MenuItem("by", "汉化: 無爲"));
                InfoMenu.AddItem(new MenuItem("qun", "汉化群: 386289593"));
                MainMenu.AddSubMenu(InfoMenu);
            }
            TargetSelector.AddToMenu(MainMenu.AddSubMenu(new Menu("目标选择", "TS")));
            Orbwalk.AddToMainMenu(MainMenu);
            try
            {
                if (Activator.CreateInstance(null, "BrianSharp.Plugin." + PlayerName) != null)
                {
                    Tiamat  = ItemData.Tiamat_Melee_Only.GetItem();
                    Hydra   = ItemData.Ravenous_Hydra_Melee_Only.GetItem();
                    Youmuu  = ItemData.Youmuus_Ghostblade.GetItem();
                    Zhonya  = ItemData.Zhonyas_Hourglass.GetItem();
                    Sheen   = ItemData.Sheen.GetItem();
                    Iceborn = ItemData.Iceborn_Gauntlet.GetItem();
                    Trinity = ItemData.Trinity_Force.GetItem();
                    Helper.AddItem(MainMenu.SubMenu(PlayerName + "_Plugin").SubMenu("Misc"), "UsePacket", "使用封包");
                    Flash = Player.GetSpellSlot("summonerflash");
                    foreach (var Spell in Player.Spellbook.Spells.Where(i => i.Name.ToLower().Contains("smite") && (i.Slot == SpellSlot.Summoner1 || i.Slot == SpellSlot.Summoner2)))
                    {
                        Smite = Spell.Slot;
                    }
                    Ignite = Player.GetSpellSlot("summonerdot");
                    Game.PrintChat("<font color = \'{0}'>-></font> <font color = \'{1}'>Plugin {2}</font>: <font color = \'{3}'>Loaded !</font>", HTMLColor.BlueViolet, HTMLColor.Gold, PlayerName, HTMLColor.Cyan);
                }
            }
            catch
            {
                Game.PrintChat("<font color = \'{0}'>-></font> <font color = \'{1}'>{2}</font>: <font color = \'{3}'>Currently not supported !</font>", HTMLColor.BlueViolet, HTMLColor.Gold, PlayerName, HTMLColor.Cyan);
            }
            MainMenu.AddToMainMenu();
        }
Esempio n. 13
0
 private static void Fight(string mode)
 {
     if (mode == "Combo" && GetValue <bool>(mode, "R") && R.IsReady() && !Player.IsDashing())
     {
         var obj = GetRTarget;
         if ((obj.Count > 1 && obj.Any(i => R.IsKillable(i))) ||
             obj.Any(i => i.HealthPercent < GetValue <Slider>(mode, "RHpU").Value) ||
             obj.Count >= GetValue <Slider>(mode, "RCountA").Value)
         {
             R.Cast(PacketCast);
         }
         if (GetValue <bool>(mode, "E") && E.IsReady() && Player.Mana >= E.Instance.ManaCost + R.Instance.ManaCost)
         {
             var target =
                 obj.Where(
                     i => CanKill(i, R.GetDamage(i) + E.GetDamage(i) + Player.GetAutoAttackDamage(i, true)))
                 .MinOrDefault(i => i.Health);
             if (target != null && R.Cast(PacketCast) && E.CastOnUnit(target, PacketCast))
             {
                 return;
             }
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady())
     {
         var target = E.GetTarget();
         if (target != null)
         {
             if (mode == "Harass")
             {
                 if (Orbwalk.InAutoAttackRange(target, 100))
                 {
                     E.CastOnUnit(target, PacketCast);
                 }
             }
             else if ((!Orbwalk.InAutoAttackRange(target, 20) || Player.Health < target.Health))
             {
                 E.CastOnUnit(target, PacketCast);
             }
         }
     }
 }
Esempio n. 14
0
        private static void Clear()
        {
            SmiteMob();
            var minionObj =
                GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
                .Cast <Obj_AI_Base>()
                .ToList();

            if (!minionObj.Any())
            {
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady() &&
                (minionObj.Count > 2 || minionObj.Any(i => i.MaxHealth >= 1200)))
            {
                var pos = E.GetCircularFarmLocation(minionObj);
                if (pos.MinionsHit > 0 && E.Cast(pos.Position, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady())
            {
                var pos = Q.GetLineFarmLocation(minionObj.Where(i => Q.IsInRange(i)).ToList());
                if (pos.MinionsHit > 0 && Q.Cast(pos.Position, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "W") && W.IsReady())
            {
                var obj = minionObj.Where(i => W.IsInRange(i)).FirstOrDefault(i => i.MaxHealth >= 1200);
                if (obj == null && !minionObj.Any(i => Orbwalk.InAutoAttackRange(i, 40)))
                {
                    obj = minionObj.Where(i => W.IsInRange(i)).MinOrDefault(i => i.Health);
                }
                if (obj != null)
                {
                    W.CastOnUnit(obj, PacketCast);
                }
            }
        }
Esempio n. 15
0
        private static void LastHit()
        {
            if (!GetValue <bool>("LastHit", "Q") || !Q.IsReady() || !IsQOne)
            {
                return;
            }
            var obj =
                GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
                .Where(
                    i =>
                    Q.IsKillable(i) &&
                    (!Orbwalk.InAutoAttackRange(i) || i.Health > Player.GetAutoAttackDamage(i, true)))
                .FirstOrDefault(i => Q.GetPrediction(i).Hitchance >= Q.MinHitChance);

            if (obj == null)
            {
                return;
            }
            Q.Cast(obj, PacketCast);
        }
Esempio n. 16
0
        private void LastHit()
        {
            if (!GetValue <bool>("LastHit", "Q") || !Q.IsReady() || !IsQ)
            {
                return;
            }
            var obj =
                MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
                .Cast <Obj_AI_Minion>()
                .Where(
                    i =>
                    Q.GetPrediction(i).Hitchance >= HitChance.High &&
                    (!Orbwalk.InAutoAttackRange(i) || i.Health > Player.GetAutoAttackDamage(i, true)))
                .FirstOrDefault(i => Q.IsKillable(i));

            if (obj == null)
            {
                return;
            }
            Q.CastIfHitchanceEquals(obj, HitChance.High, PacketCast);
        }
Esempio n. 17
0
        private static void StunCycle()
        {
            var obj =
                HeroManager.Enemies.Where(i => i.IsValidTarget(E.Range) && CanCastE(i))
                .MinOrDefault(i => i.Distance(Player));

            if (obj == null)
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                return;
            }
            if (E.IsReady() && E.Cast(PacketCast))
            {
                return;
            }
            if (Orbwalk.InAutoAttackRange(obj))
            {
                Player.IssueOrder(GameObjectOrder.AttackUnit, obj);
            }
            else
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, obj.ServerPosition);
            }
        }
Esempio n. 18
0
 public static void CustomOrbwalk(Obj_AI_Base target)
 {
     Orbwalker.Orbwalk(Orbwalker.InAutoAttackRange(target) ? target : null);
 }
Esempio n. 19
0
 private static void Fight(string mode)
 {
     if (GetValue <bool>(mode, "P") && HaveP && Orbwalk.GetBestHeroTarget != null && Orbwalk.CanAttack)
     {
         return;
     }
     if (GetValue <bool>(mode, "Q") && Q.IsReady())
     {
         if (IsQOne)
         {
             var target = Q.GetTarget();
             if (target != null)
             {
                 var state = Q.Cast(target, PacketCast);
                 if (state.IsCasted())
                 {
                     return;
                 }
                 if (state == Spell.CastStates.Collision && GetValue <bool>(mode, "QCol") && Smite.IsReady())
                 {
                     var pred = Q.GetPrediction(target);
                     if (
                         pred.CollisionObjects.Count(
                             i => i.IsValid <Obj_AI_Minion>() && IsSmiteable((Obj_AI_Minion)i)) == 1 &&
                         CastSmite(pred.CollisionObjects.First()) && Q.Cast(pred.CastPosition, PacketCast))
                     {
                         return;
                     }
                 }
             }
         }
         else
         {
             var target = Q2.GetTarget(0, HeroManager.Enemies.Where(i => !HaveQ(i)));
             if (target != null &&
                 (QAgain(target) ||
                  ((target.HasBuffOfType(BuffType.Knockback) || target.HasBuffOfType(BuffType.Knockup)) &&
                   Player.Distance(target) > 300 && !R.IsReady() && Utils.TickCount - R.LastCastAttemptT < 1500) ||
                  Q.IsKillable(target, 1) || !Orbwalk.InAutoAttackRange(target, 100) || !HaveP) &&
                 Q2.Cast(PacketCast))
             {
                 return;
             }
             if (target == null)
             {
                 var sub = Q2.GetTarget();
                 if (sub != null &&
                     ObjHaveQ.Any(i => i.Distance(sub) < Player.Distance(sub) && i.Distance(sub) < E.Range) &&
                     Q2.Cast(PacketCast))
                 {
                     return;
                 }
             }
         }
     }
     if (GetValue <bool>(mode, "Smite") && CurrentSmiteType == SmiteType.Red)
     {
         var target = TargetSelector.GetTarget(760, TargetSelector.DamageType.Physical);
         if (target != null)
         {
             CastSmite(target, false);
         }
         return;
     }
     if (GetValue <bool>(mode, "E") && E.IsReady())
     {
         if (IsEOne)
         {
             if (E.GetTarget() != null && Player.Mana >= 70 && E.Cast(PacketCast))
             {
                 return;
             }
         }
         else if (
             HeroManager.Enemies.Where(i => i.IsValidTarget(E2.Range) && HaveE(i))
             .Any(i => EAgain(i) || !Orbwalk.InAutoAttackRange(i, 50) || !HaveP) && Player.Mana >= 50 &&
             E2.Cast(PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "R") && R.IsReady())
     {
         var target = R.GetTarget(0, HeroManager.Enemies.Where(i => !HaveQ(i)));
         if (GetValue <bool>(mode, "Q") && Q.IsReady() && !IsQOne && target != null)
         {
             if (CanKill(target, GetQ2Dmg(target, R.GetDamage(target))) && R.CastOnUnit(target, PacketCast))
             {
                 return;
             }
         }
         else
         {
             foreach (var enemy in
                      HeroManager.Enemies.Where(i => i.IsValidTarget(R.Range) && !R.IsKillable(i)))
             {
                 R2.UpdateSourcePosition(enemy.ServerPosition, enemy.ServerPosition);
                 var enemyBehind =
                     HeroManager.Enemies.Where(
                         i =>
                         i.IsValidTarget(R2.Range) && i.NetworkId != enemy.NetworkId &&
                         R2.WillHit(
                             i, enemy.ServerPosition.Extend(Player.ServerPosition, -R2.Range),
                             (int)enemy.BoundingRadius)).ToList();
                 if (GetValue <bool>(mode, "RBehind") && enemyBehind.Any(i => R.IsKillable(i)) &&
                     R.CastOnUnit(enemy, PacketCast))
                 {
                     break;
                 }
                 if (enemyBehind.Count >= GetValue <Slider>(mode, "RCount").Value&&
                     R.CastOnUnit(enemy, PacketCast))
                 {
                     break;
                 }
             }
         }
     }
     if (GetValue <bool>(mode, "W") && W.IsReady() && Orbwalk.GetBestHeroTarget != null)
     {
         if (IsWOne)
         {
             if (Player.HealthPercent < GetValue <Slider>(mode, "WHpU").Value)
             {
                 W.Cast(PacketCast);
             }
         }
         else if (!Player.HasBuff("BlindMonkSafeguard") &&
                  (Player.HealthPercent < GetValue <Slider>(mode, "WHpU").Value || !HaveP))
         {
             W.Cast(PacketCast);
         }
     }
 }
Esempio n. 20
0
        public Nasus()
        {
            Q = new Spell(SpellSlot.Q, Orbwalk.GetAutoAttackRange());
            W = new Spell(SpellSlot.W, 600);
            E = new Spell(SpellSlot.E, 650, TargetSelector.DamageType.Magical);
            R = new Spell(SpellSlot.R);
            E.SetSkillshot(0.125f, 380, float.MaxValue, false, SkillshotType.SkillshotCircle);

            var champMenu = new Menu("Plugin", Player.ChampionName + "_Plugin");

            {
                var comboMenu = new Menu("Combo", "Combo");
                {
                    AddBool(comboMenu, "Q", "Use Q");
                    AddBool(comboMenu, "W", "Use W");
                    AddBool(comboMenu, "E", "Use E");
                    AddBool(comboMenu, "R", "Use R");
                    AddSlider(comboMenu, "RHpU", "-> If Player Hp Under", 60);
                    AddSlider(comboMenu, "RCountA", "-> If Enemy Above", 2, 1, 5);
                    champMenu.AddSubMenu(comboMenu);
                }
                var harassMenu = new Menu("Harass", "Harass");
                {
                    AddBool(harassMenu, "Q", "Use Q");
                    AddBool(harassMenu, "W", "Use W");
                    AddBool(harassMenu, "E", "Use E");
                    champMenu.AddSubMenu(harassMenu);
                }
                var clearMenu = new Menu("Clear", "Clear");
                {
                    AddSmiteMob(clearMenu);
                    AddBool(clearMenu, "Q", "Use Q");
                    AddBool(clearMenu, "E", "Use E");
                    champMenu.AddSubMenu(clearMenu);
                }
                var lastHitMenu = new Menu("Last Hit", "LastHit");
                {
                    AddBool(lastHitMenu, "Q", "Use Q");
                    champMenu.AddSubMenu(lastHitMenu);
                }
                var miscMenu = new Menu("Misc", "Misc");
                {
                    var killStealMenu = new Menu("Kill Steal", "KillSteal");
                    {
                        AddBool(killStealMenu, "Q", "Use Q");
                        AddBool(killStealMenu, "E", "Use E");
                        AddBool(killStealMenu, "Ignite", "Use Ignite");
                        AddBool(killStealMenu, "Smite", "Use Smite");
                        miscMenu.AddSubMenu(killStealMenu);
                    }
                    var antiGapMenu = new Menu("Anti Gap Closer", "AntiGap");
                    {
                        AddBool(antiGapMenu, "W", "Use W");
                        foreach (var spell in
                                 AntiGapcloser.Spells.Where(
                                     i => HeroManager.Enemies.Any(a => i.ChampionName == a.ChampionName)))
                        {
                            AddBool(
                                antiGapMenu, spell.ChampionName + "_" + spell.Slot,
                                "-> Skill " + spell.Slot + " Of " + spell.ChampionName);
                        }
                        miscMenu.AddSubMenu(antiGapMenu);
                    }
                    champMenu.AddSubMenu(miscMenu);
                }
                var drawMenu = new Menu("Draw", "Draw");
                {
                    AddBool(drawMenu, "QKillObj", "Minion Killable By Q", false);
                    AddBool(drawMenu, "W", "W Range", false);
                    AddBool(drawMenu, "E", "E Range", false);
                    champMenu.AddSubMenu(drawMenu);
                }
                MainMenu.AddSubMenu(champMenu);
            }
            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += OnDraw;
            AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser;
            Orbwalk.AfterAttack            += AfterAttack;
        }
Esempio n. 21
0
 private void Fight(string mode)
 {
     if (mode == "Combo")
     {
         if (GetValue <bool>(mode, "R") && R.IsReady() && !Player.IsDashing())
         {
             var obj = GetRTarget();
             if (((obj.Count > 1 && obj.Any(i => R.IsKillable(i))) ||
                  (obj.Count > 1 && obj.Any(i => i.HealthPercent < GetValue <Slider>(mode, "RHpU").Value)) ||
                  obj.Count >= GetValue <Slider>(mode, "RCountA").Value) && R.Cast(PacketCast))
             {
                 return;
             }
         }
         if (GetValue <bool>(mode, "Q") && Q.IsReady())
         {
             if (GetValue <bool>(mode, "R") && R.IsReady(100))
             {
                 var nearObj = new List <Obj_AI_Base>();
                 nearObj.AddRange(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
                 nearObj.AddRange(HeroManager.Enemies.Where(i => i.IsValidTarget(Q.Range)));
                 var obj = (from i in nearObj
                            where Q.GetPrediction(i).Hitchance >= HitChance.High
                            let enemy = GetRTarget(i.ServerPosition)
                                        where
                                        (enemy.Count > 1 && enemy.Any(a => R.IsKillable(a))) ||
                                        (enemy.Count > 1 &&
                                         enemy.Any(a => a.HealthPercent < GetValue <Slider>(mode, "RHpU").Value)) ||
                                        enemy.Count >= GetValue <Slider>(mode, "RCountA").Value
                                        select i).MaxOrDefault(i => GetRTarget(i.ServerPosition).Count);
                 if (obj != null && Q.CastIfHitchanceEquals(obj, HitChance.High, PacketCast))
                 {
                     return;
                 }
             }
             var target = Q.GetTarget();
             if (target != null && !Orbwalk.InAutoAttackRange(target))
             {
                 var pred = Q.GetPrediction(target);
                 if (pred.Hitchance >= HitChance.High && Q.Cast(pred.CastPosition, PacketCast))
                 {
                     return;
                 }
                 if (GetValue <bool>(mode, "QCol") && pred.Hitchance == HitChance.Collision &&
                     pred.CollisionObjects.Count(IsMinion) == 1 && CastSmite(pred.CollisionObjects.First()) &&
                     Q.Cast(pred.CastPosition, PacketCast))
                 {
                     return;
                 }
             }
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady() && E.GetTarget() != null && E.Cast(PacketCast))
     {
         return;
     }
     if (GetValue <bool>(mode, "W") && W.IsReady())
     {
         if (Player.ManaPercent >= GetValue <Slider>(mode, "WMpA").Value&&
             W.GetTarget(GetValue <Slider>("Misc", "WExtraRange").Value) != null)
         {
             if (!HaveW)
             {
                 W.Cast(PacketCast);
             }
         }
         else if (HaveW)
         {
             W.Cast(PacketCast);
         }
     }
 }
Esempio n. 22
0
        private static void Clear()
        {
            SmiteMob();
            var minionObj = GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (!minionObj.Any())
            {
                return;
            }
            if (GetValue <bool>("Clear", "E") && E.IsReady() && !HaveE)
            {
                if (GetValue <bool>("Clear", "Q") && Q.IsReady() && !minionObj.Any(i => E.IsInRange(i)))
                {
                    var obj =
                        minionObj.MaxOrDefault(
                            i => GetMinions(i.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly).Count > 1);
                    if (obj != null && E.Cast(PacketCast) && Q.CastOnUnit(obj, PacketCast))
                    {
                        return;
                    }
                }
                else if ((minionObj.Any(i => i.MaxHealth >= 1200 && E.IsInRange(i)) ||
                          minionObj.Count(i => E.IsInRange(i)) > 2) && E.Cast(PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "W"))
            {
                if (W.IsReady() && GetValue <bool>("Clear", "Q") && Q.IsReady() &&
                    Player.Mana >= W.Instance.SData.Mana + Q.Instance.SData.Mana)
                {
                    var obj =
                        minionObj.FirstOrDefault(
                            i => i.MaxHealth >= 1200 && CanKill(i, GetBonusDmg(i) + Q.GetDamage(i)));
                    if (obj != null && W.Cast(PacketCast) && Q.CastOnUnit(obj, PacketCast))
                    {
                        return;
                    }
                }
                if (W.IsReady() || HaveW)
                {
                    var obj =
                        minionObj.Where(i => Orbwalk.InAutoAttackRange(i))
                        .FirstOrDefault(i => CanKill(i, GetBonusDmg(i)));
                    if (obj != null)
                    {
                        if (!HaveW)
                        {
                            W.Cast(PacketCast);
                        }
                        Orbwalk.Move   = false;
                        Orbwalk.Attack = false;
                        EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, obj);
                        Orbwalk.Move   = true;
                        Orbwalk.Attack = true;
                    }
                }
            }
            if (GetValue <bool>("Clear", "Q") && Q.IsReady())
            {
                var obj =
                    minionObj.FirstOrDefault(
                        i => i.MaxHealth >= 1200 && CanKill(i, Q.GetDamage(i) + (HaveW ? GetBonusDmg(i) : 0)));
                if (obj == null &&
                    (!minionObj.Any(i => Orbwalk.InAutoAttackRange(i, 40)) ||
                     (GetValue <bool>("Clear", "E") && E.IsReady() && HaveE && !minionObj.Any(i => E.IsInRange(i)))))
                {
                    obj = minionObj.MinOrDefault(i => i.Health);
                }
                if (obj != null && Q.CastOnUnit(obj, PacketCast))
                {
                    return;
                }
            }
            if (GetValue <bool>("Clear", "Item"))
            {
                var item = Hydra.IsReady() ? Hydra : Tiamat;
                if (item.IsReady() &&
                    (minionObj.Count(i => item.IsInRange(i)) > 2 ||
                     minionObj.Any(i => i.MaxHealth >= 1200 && i.Distance(Player) < item.Range - 80)))
                {
                    item.Cast();
                }
            }
        }
Esempio n. 23
0
 private static void Fight(string mode)
 {
     if (GetValue <bool>(mode, "E") && E.IsReady())
     {
         if (!HaveE)
         {
             if (GetValue <bool>(mode, "Q") && Q.IsReady() && E.GetTarget() == null)
             {
                 var target = Q.GetTarget();
                 if (target != null && E.Cast(PacketCast) && Q.CastOnUnit(target, PacketCast))
                 {
                     return;
                 }
             }
             else if (E.GetTarget() != null && E.Cast(PacketCast))
             {
                 return;
             }
         }
         else if ((Player.CountEnemiesInRange(E.Range) >= GetValue <Slider>(mode, "ECountA").Value ||
                   Player.GetEnemiesInRange(E.Range).Any(i => i.IsValidTarget() && !E.IsInRange(i, E.Range - 50))) &&
                  E.Cast(PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "W") && W.IsReady() && GetValue <bool>(mode, "Q") && Q.IsReady() &&
         Player.Mana >= W.Instance.SData.Mana + Q.Instance.SData.Mana)
     {
         var target = Q.GetTarget();
         if (target != null && CanKill(target, GetBonusDmg(target) + Q.GetDamage(target)) && W.Cast(PacketCast) &&
             Q.CastOnUnit(target, PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "Q") && Q.IsReady())
     {
         var target = Q.GetTarget();
         if (target != null)
         {
             if (CanKill(target, Q.GetDamage(target) + (HaveW ? GetBonusDmg(target) : 0)) &&
                 Q.CastOnUnit(target, PacketCast))
             {
                 return;
             }
             if (mode == "Combo" || Player.HealthPercent >= GetValue <Slider>(mode, "QHpA").Value)
             {
                 if ((!Orbwalk.InAutoAttackRange(target, 30) ||
                      (GetValue <bool>(mode, "E") && E.IsReady() && HaveE && !E.IsInRange(target))) &&
                     Q.CastOnUnit(target, PacketCast))
                 {
                     return;
                 }
             }
         }
     }
     if (mode == "Combo" && GetValue <bool>(mode, "R") && R.IsReady() && !Player.InFountain() &&
         (Player.HealthPercent < GetValue <Slider>(mode, "RHpU").Value ||
          Player.CountEnemiesInRange(Q.Range) >= GetValue <Slider>(mode, "RCountA").Value))
     {
         R.Cast(PacketCast);
     }
 }
Esempio n. 24
0
        public Jax()
        {
            Q = new Spell(SpellSlot.Q, 700);
            W = new Spell(SpellSlot.W, Orbwalk.GetAutoAttackRange(), TargetSelector.DamageType.Magical);
            E = new Spell(SpellSlot.E, 375);
            R = new Spell(SpellSlot.R);

            var champMenu = new Menu("Plugin", Player.ChampionName + "_Plugin");

            {
                var comboMenu = new Menu("Combo", "Combo");
                {
                    AddBool(comboMenu, "Q", "Use Q");
                    AddBool(comboMenu, "W", "Use W");
                    AddBool(comboMenu, "E", "Use E");
                    AddSlider(comboMenu, "ECountA", "-> Cancel If Enemy >=", 2, 1, 5);
                    AddBool(comboMenu, "R", "Use R");
                    AddSlider(comboMenu, "RHpU", "-> If Player Hp <", 60);
                    AddSlider(comboMenu, "RCountA", "-> Or Enemy >=", 2, 1, 5);
                    champMenu.AddSubMenu(comboMenu);
                }
                var harassMenu = new Menu("Harass", "Harass");
                {
                    AddBool(harassMenu, "Q", "Use Q");
                    AddSlider(harassMenu, "QHpA", "-> If Hp >=", 20);
                    AddBool(harassMenu, "W", "Use W");
                    AddBool(harassMenu, "E", "Use E");
                    champMenu.AddSubMenu(harassMenu);
                }
                var clearMenu = new Menu("Clear", "Clear");
                {
                    AddSmiteMob(clearMenu);
                    AddBool(clearMenu, "Q", "Use Q");
                    AddBool(clearMenu, "W", "Use W");
                    AddBool(clearMenu, "E", "Use E");
                    AddBool(clearMenu, "Item", "Use Tiamat/Hydra");
                    champMenu.AddSubMenu(clearMenu);
                }
                var lastHitMenu = new Menu("Last Hit", "LastHit");
                {
                    AddBool(lastHitMenu, "W", "Use W");
                    champMenu.AddSubMenu(lastHitMenu);
                }
                var fleeMenu = new Menu("Flee", "Flee");
                {
                    AddBool(fleeMenu, "Q", "Use Q");
                    AddBool(fleeMenu, "PinkWard", "-> Ward Jump Use Pink Ward", false);
                    champMenu.AddSubMenu(fleeMenu);
                }
                var miscMenu = new Menu("Misc", "Misc");
                {
                    var killStealMenu = new Menu("Kill Steal", "KillSteal");
                    {
                        AddBool(killStealMenu, "Q", "Use Q");
                        AddBool(killStealMenu, "W", "Use W");
                        AddBool(killStealMenu, "Ignite", "Use Ignite");
                        AddBool(killStealMenu, "Smite", "Use Smite");
                        miscMenu.AddSubMenu(killStealMenu);
                    }
                    var antiGapMenu = new Menu("Anti Gap Closer", "AntiGap");
                    {
                        AddBool(antiGapMenu, "E", "Use E");
                        foreach (var spell in
                                 AntiGapcloser.Spells.Where(
                                     i => HeroManager.Enemies.Any(a => i.ChampionName == a.ChampionName)))
                        {
                            AddBool(
                                antiGapMenu, spell.ChampionName + "_" + spell.Slot,
                                "-> Skill " + spell.Slot + " Of " + spell.ChampionName);
                        }
                        miscMenu.AddSubMenu(antiGapMenu);
                    }
                    var interruptMenu = new Menu("Interrupt", "Interrupt");
                    {
                        AddBool(interruptMenu, "E", "Use E");
                        foreach (var spell in
                                 Interrupter.Spells.Where(
                                     i => HeroManager.Enemies.Any(a => i.ChampionName == a.ChampionName)))
                        {
                            AddBool(
                                interruptMenu, spell.ChampionName + "_" + spell.Slot,
                                "-> Skill " + spell.Slot + " Of " + spell.ChampionName);
                        }
                        miscMenu.AddSubMenu(interruptMenu);
                    }
                    champMenu.AddSubMenu(miscMenu);
                }
                var drawMenu = new Menu("Draw", "Draw");
                {
                    AddBool(drawMenu, "Q", "Q Range", false);
                    AddBool(drawMenu, "E", "E Range", false);
                    champMenu.AddSubMenu(drawMenu);
                }
                MainMenu.AddSubMenu(champMenu);
            }
            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += OnDraw;
            AntiGapcloser.OnEnemyGapcloser    += OnEnemyGapcloser;
            Interrupter.OnPossibleToInterrupt += OnPossibleToInterrupt;
            Orbwalk.AfterAttack += AfterAttack;
            GameObject.OnCreate += OnCreateWardForFlee;
        }
Esempio n. 25
0
 private void Fight(string mode)
 {
     if (GetValue <bool>(mode, "P") && HaveP && Orbwalk.GetBestHeroTarget != null && Orbwalk.CanAttack)
     {
         return;
     }
     if (GetValue <bool>(mode, "Q") && Q.IsReady())
     {
         if (IsQ)
         {
             var target = Q.GetTarget();
             if (target != null)
             {
                 var pred = Q.GetPrediction(target);
                 if (pred.Hitchance >= HitChance.High && Q.Cast(pred.CastPosition, PacketCast))
                 {
                     return;
                 }
                 if (GetValue <bool>(mode, "QCol") && pred.Hitchance == HitChance.Collision &&
                     pred.CollisionObjects.Count(IsMinion) == 1 && CastSmite(pred.CollisionObjects.First()) &&
                     Q.Cast(pred.CastPosition, PacketCast))
                 {
                     return;
                 }
             }
         }
         else
         {
             var target = Q2.GetTarget(0, HeroManager.Enemies.Where(i => !HaveQ(i)));
             if (target != null &&
                 (QAgain(target) ||
                  ((target.HasBuffOfType(BuffType.Knockback) || target.HasBuffOfType(BuffType.Knockup)) &&
                   Player.Distance(target) > 300 && !R.IsReady()) || Q.IsKillable(target, 1) ||
                  !Orbwalk.InAutoAttackRange(target, 100) || !HaveP) && Q2.Cast(PacketCast))
             {
                 return;
             }
             if (target == null)
             {
                 var sub = Q2.GetTarget();
                 if (sub != null && ObjHaveQ.Any(i => i.Distance(sub) < Player.Distance(sub)) &&
                     Q2.Cast(PacketCast))
                 {
                     return;
                 }
             }
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady())
     {
         if (IsE)
         {
             if (E.GetTarget() != null && E.Cast(PacketCast))
             {
                 return;
             }
         }
         else if (
             HeroManager.Enemies.Where(i => i.IsValidTarget(E2.Range) && HaveE(i))
             .Any(i => EAgain(i) || !Orbwalk.InAutoAttackRange(i, 50) || !HaveP) && E2.Cast(PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "R") && R.IsReady() && GetValue <bool>(mode, "Q") && Q.IsReady() && !IsQ)
     {
         var target = R.GetTarget(0, HeroManager.Enemies.Where(i => !HaveQ(i)));
         if (target != null && CanKill(target, GetQ2Dmg(target, R.GetDamage(target))) &&
             R.CastOnUnit(target, PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "W") && W.IsReady() && Orbwalk.GetBestHeroTarget != null)
     {
         if (IsW)
         {
             if (!HaveP && !Q.IsReady() && !E.IsReady() && Player.HealthPercent < 50)
             {
                 W.Cast(PacketCast);
             }
         }
         else if (!Player.HasBuff("BlindMonkSafeguard") &&
                  (Player.HealthPercent < GetValue <Slider>(mode, "WHpU").Value || !HaveP))
         {
             W2.Cast(PacketCast);
         }
     }
 }
Esempio n. 26
0
 private static void Fight(string mode)
 {
     if (mode == "Combo" && GetValue <bool>(mode, "R") && R.IsReady())
     {
         var target = R.GetTarget();
         if (target != null && CanKill(target, GetRDmg(target)))
         {
             if (Player.Distance(target) > 550 ||
                 (!Orbwalk.InAutoAttackRange(target) && (!GetValue <bool>(mode, "Q") || !Q.IsReady()) &&
                  (!GetValue <bool>(mode, "W") || !W.IsReady()) && (!GetValue <bool>(mode, "E") || !E.IsReady())))
             {
                 if (R.Cast(target, PacketCast).IsCasted())
                 {
                     if (GetValue <bool>(mode, "RItem") && Youmuu.IsReady())
                     {
                         Utility.DelayAction.Add(10, () => Youmuu.Cast());
                     }
                     return;
                 }
             }
         }
     }
     if (mode == "Combo" && GetValue <bool>(mode, "E") && GetValue <bool>(mode, "EGap") && E.IsReady())
     {
         var target = E.GetTarget(Orbwalk.GetAutoAttackRange() - 30);
         if (target != null && !Orbwalk.InAutoAttackRange(target) &&
             Orbwalk.InAutoAttackRange(target, 20, Player.ServerPosition.Extend(Game.CursorPos, E.Range)) &&
             E.Cast(Player.ServerPosition.Extend(Game.CursorPos, E.Range), PacketCast))
         {
             return;
         }
     }
     if (GetValue <bool>(mode, "PSave") && HavePassive)
     {
         return;
     }
     if (GetValue <bool>(mode, "E") &&
         (E.IsReady() || (mode == "Combo" && E.IsReady(GetValue <Slider>(mode, "EDelay").Value))))
     {
         return;
     }
     if (GetValue <bool>(mode, "Q") && Q.IsReady())
     {
         var target = Q.GetTarget() ?? Q2.GetTarget();
         if (target != null)
         {
             if (((Orbwalk.InAutoAttackRange(target) && !HavePassive) ||
                  (!Orbwalk.InAutoAttackRange(target, 20) && Q.IsInRange(target))) &&
                 Q.CastOnUnit(target, PacketCast))
             {
                 return;
             }
             if ((mode == "Harass" || GetValue <bool>(mode, "QExtend")) && !Q.IsInRange(target) &&
                 CastExtendQ(target))
             {
                 return;
             }
         }
     }
     if ((!GetValue <bool>(mode, "Q") || !Q.IsReady()) && GetValue <bool>(mode, "W") && W.IsReady() &&
         !Player.IsDashing())
     {
         var target = W.GetTarget();
         if (target != null &&
             ((Orbwalk.InAutoAttackRange(target) && !HavePassive) || !Orbwalk.InAutoAttackRange(target, 20)))
         {
             if (Orbwalk.InAutoAttackRange(target))
             {
                 W2.CastIfWillHit(target, -1, PacketCast);
             }
             else
             {
                 W.CastIfWillHit(target, -1, PacketCast);
             }
         }
     }
 }
Esempio n. 27
0
 private static void Fight(string mode)
 {
     if (mode == "Combo")
     {
         if (GetValue <bool>(mode, "R") && R.IsReady() && !Player.IsDashing())
         {
             var obj = GetRTarget();
             if (((obj.Count > 1 && obj.Any(i => R.IsKillable(i))) ||
                  obj.Any(i => i.HealthPercent < GetValue <Slider>(mode, "RHpU").Value) ||
                  obj.Count >= GetValue <Slider>(mode, "RCountA").Value) && R.Cast(PacketCast))
             {
                 return;
             }
         }
         if (GetValue <bool>(mode, "Q") && Q.IsReady())
         {
             if (GetValue <bool>(mode, "R") && R.IsReady(100))
             {
                 var nearObj = new List <Obj_AI_Base>();
                 nearObj.AddRange(GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
                 nearObj.AddRange(HeroManager.Enemies.Where(i => i.IsValidTarget(Q.Range)));
                 if ((from i in nearObj
                      let enemy = GetRTarget(i.ServerPosition)
                                  where
                                  (enemy.Count > 1 && enemy.Any(a => R.IsKillable(a))) ||
                                  enemy.Any(a => a.HealthPercent < GetValue <Slider>(mode, "RHpU").Value) ||
                                  enemy.Count >= GetValue <Slider>(mode, "RCountA").Value
                                  orderby enemy.Count descending
                                  where Q.GetPrediction(i).Hitchance >= Q.MinHitChance
                                  select i).Any(i => Q.Cast(i, PacketCast).IsCasted()))
                 {
                     return;
                 }
             }
             var target = Q.GetTarget();
             if (target != null && !Orbwalk.InAutoAttackRange(target))
             {
                 var state = Q.Cast(target, PacketCast);
                 if (state.IsCasted())
                 {
                     return;
                 }
                 if (state == Spell.CastStates.Collision && GetValue <bool>(mode, "QCol"))
                 {
                     var pred = Q.GetPrediction(target);
                     if (
                         pred.CollisionObjects.Count(
                             i => i.IsValid <Obj_AI_Minion>() && IsSmiteable((Obj_AI_Minion)i)) == 1 &&
                         CastSmite(pred.CollisionObjects.First()) && Q.Cast(pred.CastPosition, PacketCast))
                     {
                         return;
                     }
                 }
             }
         }
     }
     if (GetValue <bool>(mode, "E") && E.IsReady() && E.GetTarget() != null && E.Cast(PacketCast))
     {
         return;
     }
     if (GetValue <bool>(mode, "W") && W.IsReady())
     {
         if (Player.ManaPercent >= GetValue <Slider>(mode, "WMpA").Value&&
             W.GetTarget(GetValue <Slider>("Misc", "WExtraRange").Value) != null)
         {
             if (!HaveW)
             {
                 W.Cast(PacketCast);
             }
         }
         else if (HaveW)
         {
             W.Cast(PacketCast);
         }
     }
 }