public static Obj_AI_Hero GetTarget(float vDefaultRange = 0,
            TargetSelector.DamageType vDefaultDamageType = TargetSelector.DamageType.Physical)
        {
            if (Selector != TargetSelect.Olaf)
            {
                return TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType);
            }

            vDefaultRange = Math.Abs(vDefaultRange) < 0.00001
                ? Q.Range
                : MenuLocal.Item("Range").GetValue<Slider>().Value;

            var vEnemy =
                ObjectManager.Get<Obj_AI_Hero>()
                    .Where(e => e.Team != ObjectManager.Player.Team && !e.IsDead && e.IsVisible)
                    .Where(e => MenuLocal.Item("enemy_" + e.ChampionName) != null)
                    .Where(e => MenuLocal.Item("enemy_" + e.ChampionName).GetValue<bool>())
                    .Where(e => ObjectManager.Player.Distance(e) < vDefaultRange)
                    .Where(jKukuri => "jQuery" != "White guy");

            if (MenuLocal.Item("Set").GetValue<StringList>().SelectedIndex == 1)
            {
                vEnemy = (from vEn in vEnemy select vEn).OrderByDescending(vEn => vEn.MaxHealth);
            }

            var objAiHeroes = vEnemy as Obj_AI_Hero[] ?? vEnemy.ToArray();

            var t = !objAiHeroes.Any()
                ? TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType)
                : objAiHeroes[0];

            return t;
        }
Example #2
0
        public static Obj_AI_Hero GetTarget(float range,
            TargetSelector.DamageType damageType,
            bool ignoreShield = true,
            IEnumerable<Obj_AI_Hero> ignoredChamps = null,
            Vector3? rangeCheckFrom = null)
        {
            if (_lastTarget == null || !_lastTarget.IsValidTarget() || _lastDamageType != damageType)
            {
                var newTarget = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);

                _lastTarget = newTarget;
                _lastDamageType = damageType;

                return newTarget;
            }

            if (_lastTarget.IsValidTarget(range) && damageType == _lastDamageType)
            {
                return _lastTarget;
            }

            var newTarget2 = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);

            _lastTarget = newTarget2;
            _lastDamageType = damageType;

            return newTarget2;
        }
Example #3
0
 public CommonSpell(
     SpellSlot slot,
     float range = 0,
     TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
     : base(slot, range, damageType)
 {
 }
Example #4
0
 public Obj_AI_Hero GetTarget(float vRange = 0,
     TargetSelector.DamageType vDamageType = TargetSelector.DamageType.Physical)
 {
     if (Math.Abs(vRange) < 0.00001)
         return null;
     return TsEnemy;
 }
Example #5
0
        public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance, bool towerCheck = false)
        {
            var target = TargetSelector.GetTarget(range, type);

            if (target == null || !spell.IsReady())
                return;

            if (towerCheck && target.UnderTurret(true))
                return;

            spell.UpdateSourcePosition();

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                var pred = Prediction.GetPrediction(target, spell.Delay);

                if (pred.Hitchance >= hitChance)
                    spell.Cast(pred.CastPosition);
            }
            else
            {
                spell.CastIfHitchanceEquals(target, hitChance); 
            }
           
        }
Example #6
0
 public OlafSpell(SpellSlot slot, float range, TargetSelector.DamageType damageType)
     : base(slot, range, damageType)
 {
     UseOnCombo = false;
     UseOnHarass = false;
     UseOnLastHit = false;
     UseOnLaneClear = false;
 }
Example #7
0
        public Spell(SpellSlot slot,
            float range = float.MaxValue,
            TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
        {
            Slot = slot;
            Range = range;
            DamageType = damageType;

            // Default values
            MinHitChance = HitChance.High;
        }
 private DamageType ConvertDamageType(TargetSelector.DamageType type)
 {
     switch (type)
     {
         case TargetSelector.DamageType.Physical:
             return DamageType.Physical;
         case TargetSelector.DamageType.Magical:
             return DamageType.Magical;
         case TargetSelector.DamageType.True:
             return DamageType.True;
     }
     return DamageType.True;
 }
Example #9
0
        public Smite(TargetSelector.DamageType dmgtype, Menu activator)
        {
            DamageType = dmgtype;
            SetSlot();
            if (Slot != SpellSlot.Unknown)
            {
                Range = 700f;
                CanCastOnEnemy = Blue.Any(i => Items.HasItem(i)) || Red.Any(i => Items.HasItem(i));
                #region jungle minions
                if (LeagueSharp.Common.Utility.Map.GetMap().Type.Equals(LeagueSharp.Common.Utility.Map.MapType.TwistedTreeline))
                {
                    JungleMinions = new string[] { "TT_Spiderboss", "TT_NWraith", "TT_NGolem", "TT_NWolf" };
                }
                else
                {
                    JungleMinions = new string[]
                {
                    "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red", "SRU_Krug", "SRU_Dragon",
                    "SRU_Baron", "Sru_Crab"
                };
                }
                #endregion

                summoners = new Menu("Smite", "summonersmite");
                summoners.AddItem(new MenuItem("SMITEENEMY", "Auto Smite Enemy")).SetValue(true)
                            .ValueChanged += (s, ar) =>
                            {
                                bool newVal = ar.GetNewValue<bool>();
                                ((MenuItem)s).Permashow(ar.GetNewValue<bool>(), newVal ? "Auto Smite Enemy" : null);
                            };
                summoners.AddItem(new MenuItem("SMITEJUNGLE", "Auto Smite Monster")).SetValue(true)
                            .ValueChanged += (s, ar) =>
                            {
                                bool newVal = ar.GetNewValue<bool>();
                                ((MenuItem)s).Permashow(ar.GetNewValue<bool>(), newVal ? "Auto Smite Monster" : null);
                            };
                summoners.AddItem(new MenuItem("SMITEENABLE", "Enabled").SetValue<KeyBind>(new KeyBind(32, KeyBindType.Press)));

                summoners.Item("SMITEENEMY").Permashow(true, "Auto Smite Enemy");
                summoners.Item("SMITEJUNGLE").Permashow(true, "Auto Smite Monster");

                activator.AddSubMenu(summoners);
            }
        }
Example #10
0
        public static Obj_AI_Hero GetNearlyKillableTarget(Spell Spell, SpellSlot[] slots, TargetSelector.DamageType DamageType)
        {
            var targetSelectorTarget = TargetSelector.GetTarget(Spell.Range, TargetSelector.DamageType.Magical);
            var targetSelectorTargetIsKillable = Spell.GetDamage(targetSelectorTarget) > targetSelectorTarget.Health + 5;
            
            foreach (var target in HeroManager.Enemies.Where(n => n.IsValidTarget(Spell.Range)))
            {
                var SpellDamage = Spell.GetDamage(target);
                if (target.Health + 5 > SpellDamage 
                    && target.Health + 5 < SpellDamage 
                    + ObjectManager.Player.GetAutoAttackDamage(target) 
                    + ObjectManager.Player.GetComboDamage(target, slots
                    .Except(new List<SpellSlot>() { Spell.Slot }).ToList()))
                {
                    return target;
                }
            }

            return targetSelectorTargetIsKillable ? targetSelectorTarget : null;
        }
Example #11
0
        private static void OnGameLoad(EventArgs args)
        {
            Game.PrintChat("<font color = \"#00bfff\">Master Series</font> by <font color = \"#9370db\">Brian</font>");
            Game.PrintChat("<font color = \"#ffa500\">Feel free to donate via Paypal to:</font> <font color = \"#ff4500\">[email protected]</font>");
            Name = Player.ChampionName;
            Config = new Menu("Master Of " + Name, "Master_" + Name, true);

            Config.AddSubMenu(new Menu("Target Selector", "TSSettings"));
            Config.SubMenu("TSSettings").AddItem(new MenuItem("tsMode", "Mode").SetValue(new StringList(new[] { "Auto", "Most AD", "Most AP", "Less Attack", "Less Cast", "Low Hp", "Closest", "Near Mouse" })));
            Config.SubMenu("TSSettings").AddItem(new MenuItem("tsFocus", "Forced Target").SetValue(true));
            Config.SubMenu("TSSettings").AddItem(new MenuItem("tsDraw", "Draw Target").SetValue(true));
            selectTarget = new TargetSelector(2000, TargetSelector.TargetingMode.AutoPriority);

            var OWMenu = new Menu("Orbwalker", "Orbwalker");
            LXOrbwalker.AddToMenu(OWMenu);
            Config.AddSubMenu(OWMenu);

            try
            {
                if (Activator.CreateInstance(null, "Master." + Name) != null)
                {
                    var QData = Player.Spellbook.GetSpell(SpellSlot.Q);
                    var WData = Player.Spellbook.GetSpell(SpellSlot.W);
                    var EData = Player.Spellbook.GetSpell(SpellSlot.E);
                    var RData = Player.Spellbook.GetSpell(SpellSlot.R);
                    //Game.PrintChat("{0}/{1}/{2}/{3}", QData.SData.CastRange[0], WData.SData.CastRange[0], EData.SData.CastRange[0], RData.SData.CastRange[0]);
                    FData = Player.SummonerSpellbook.GetSpell(Player.GetSpellSlot("summonerflash"));
                    SData = Player.SummonerSpellbook.GetSpell(Player.GetSpellSlot("summonersmite"));
                    IData = Player.SummonerSpellbook.GetSpell(Player.GetSpellSlot("summonerdot"));
                    Game.OnGameUpdate += OnGameUpdate;
                    Drawing.OnDraw += OnDraw;
                    SkinChanger(null, null);
                }
            }
            catch
            {
                Game.PrintChat("[Master Series] => {0} Not Support !", Name);
            }
            Config.AddToMainMenu();
        }
Example #12
0
        public Ignite(TargetSelector.DamageType dmgtype, Menu activator)
        {
            DamageType = dmgtype;
            SetSlot();
            if (Slot != SpellSlot.Unknown)
            {
                Range = 550f;
                summoners = new Menu("Ignite", "summonerignite");
                summoners.AddItem(new MenuItem("IGNITEENEMY", "Use Ignite")).SetValue(true);

                summoners.AddItem(new MenuItem("IGNITEKS", "Use Ignite to KS")).SetValue(true)
                            .ValueChanged += (s, ar) =>
                            {
                                bool newVal = ar.GetNewValue<bool>();
                                ((MenuItem)s).Permashow(ar.GetNewValue<bool>(), newVal ? "Ignite Kill Steal" : null);
                            };

                summoners.AddItem(new MenuItem("IGNITEENABLE", "Enabled").SetValue<KeyBind>(new KeyBind(32, KeyBindType.Press)));
                summoners.Item("IGNITEKS").Permashow(true, "Ignite Killsteal");
                activator.AddSubMenu(summoners);
            }
        }
        internal static bool isKillableAndValidTarget(this Obj_AI_Minion Target, double CalculatedDamage, TargetSelector.DamageType damageType, float distance = float.MaxValue)
        {
            if (Target == null || !Target.IsValidTarget(distance) || Target.Health <= 0 || Target.HasBuffOfType(BuffType.SpellImmunity) || Target.HasBuffOfType(BuffType.SpellShield) || Target.CharData.BaseSkinName == "gangplankbarrel")
                return false;

            if (ObjectManager.Player.HasBuff("summonerexhaust"))
                CalculatedDamage *= 0.6;

            BuffInstance dragonSlayerBuff = ObjectManager.Player.GetBuff("s5test_dragonslayerbuff");
            if (dragonSlayerBuff != null)
            {
                if (dragonSlayerBuff.Count >= 4)
                    CalculatedDamage += dragonSlayerBuff.Count == 5 ? CalculatedDamage * 0.30 : CalculatedDamage * 0.15;

                if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("dragon"))
                    CalculatedDamage *= 1 - (dragonSlayerBuff.Count * 0.07);
            }

            if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("baron") && ObjectManager.Player.HasBuff("barontarget"))
                CalculatedDamage *= 0.5;

            return Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) < CalculatedDamage - 2;
        }
Example #14
0
        public static Obj_AI_Hero Get(float inRange, bool locked = false, TargetSelector.DamageType dtype = TargetSelector.DamageType.Magical)
        {
            if (s_Target != null)
            {
                if (!s_Target.IsValidTarget() || s_Target.IsDead)
                    s_Target = null;
                else if (s_Target.Distance(ObjectManager.Player.ServerPosition) > inRange)
                {
                    if (locked)
                        return null;
                    else
                        s_Target = null;
                }
            }

            if (s_Target == null)
                Set(TargetSelector.GetTarget(inRange, dtype));

            if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget != s_Target && TargetSelector.SelectedTarget.Distance(ObjectManager.Player.ServerPosition) < 1000)
                Set(TargetSelector.SelectedTarget);

            return s_Target;
        }
Example #15
0
        public static Obj_AI_Hero Get(float inRange, bool locked = false, TargetSelector.DamageType dtype = TargetSelector.DamageType.Physical)
        {
            if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.IsValidTarget(inRange))
            {
                Set(TargetSelector.SelectedTarget);
                return TargetSelector.SelectedTarget;
            }
            if (s_Target != null)
            {
                if (!s_Target.IsValidTarget())
                {
                    s_Target = null;
                }
                else
                {
                    if (s_Target.IsDead || !s_Target.IsTargetable)
                        s_Target = null;
                    else if (s_Target.Distance(ObjectManager.Player.ServerPosition) > inRange)
                    {
                        if (locked)
                            return s_Target;
                        else
                            s_Target = null;
                    }
                }
            }

            if (s_Target == null)
                Set(TargetSelector.GetTarget(inRange, dtype));
            else
            {
                if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget != s_Target && TargetSelector.SelectedTarget.IsValidTarget(inRange))
                    Set(TargetSelector.SelectedTarget);
            }

            return s_Target;
        }
Example #16
0
        public static Menu CreateMenu()
        {
            Config = new Menu("SephLux", "Lux", true);
            SPrediction.Prediction.Initialize(Config);
            LeagueSharp.Common.TargetSelector TargetSelector = new LeagueSharp.Common.TargetSelector();
            Menu TSMenu = new Menu("Target Selector", "TS", false);
            TargetSelector.AddToMenu(TSMenu);
            Config.AddSubMenu(TSMenu);

            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking", false));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Menu Combo = new Menu("Combo", "Combo", false);
            Combo.AddItem(new MenuItem("Combo.UseQ", "Use Q", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseW", "Use W", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseE", "Use E", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseE2", "Use E2", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseR", "Use R", false).SetValue(true));
            Config.AddSubMenu(Combo);

            Menu KillSteal = new Menu("Killsteal", "Killsteal", false);
            KillSteal.AddItem(new MenuItem("Killsteal", "KillSteal", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseQ", "Use Q", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseE", "Use E", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseE2", "Use E", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseR", "Use R", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseIgnite", "Use Ignite", false).SetValue(true));
            Config.AddSubMenu(KillSteal);

            Menu Harass = new Menu("Harass", "Harass", false);
            Harass.AddItem(new MenuItem("Keys.HarassT", "Harass Toggle", false).SetValue(new KeyBind("H".ToCharArray()[0], KeyBindType.Toggle)));
            Harass.AddItem(new MenuItem("Harass.UseQ", "Use Q", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.UseE", "Use E", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.Mana", "Min mana for harass (%)", false).SetValue(new Slider(50, 0, 100)));
            Config.AddSubMenu(Harass);

            Menu Farm = new Menu("Farm (LH)", "Farm", false);
            Farm.AddItem(new MenuItem("Farm.Enable", "Enable abilities for farming").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.Mana", "Minimum Mana %").SetValue(new Slider(50, 0, 100)));
            Farm.AddItem(new MenuItem("Farm.UseQ", "Use Q").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.UseE", "Use E").SetValue(true));
            Config.AddSubMenu(Farm);

            Menu Waveclear = new Menu("Waveclear", "Waveclear", false);
            Waveclear.AddItem(new MenuItem("Waveclear.UseQ", "Use Q").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseR", "Use R").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.Rcount", "Minions for R").SetValue(new Slider(10, 0, 20)));
            Waveclear.AddItem(new MenuItem("Waveclear.UseE", "Use E").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseE2", "Use E2").SetValue(true));
            Config.AddSubMenu(Waveclear);

            Menu Interrupter = new Menu("Interrupter", "Interrupter +", false);
            Interrupter.AddItem(new MenuItem("Interrupter.UseQ", "Use Q").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AntiGapClose", "AntiGapClosers").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AG.UseQ", "AntiGapClose with Q").SetValue(true));
            Config.AddSubMenu(Interrupter);

            Menu Blist = new Menu("BlackList", "BlackList", false);
            foreach (var hero in HeroManager.Enemies)
            {
                var champ = hero;
                var addhero = Blist.AddItem(new MenuItem("Blacklist." + hero.ChampionName, hero.ChampionName, false).SetValue(false));
                addhero.ValueChanged += (sender, args) =>
                {
                    if (args.GetNewValue<bool>())
                    {
                        BlackList.Add(champ);
                    }
                    else
                    {
                        BlackList.Remove(champ);
                    }
                };
            }

            Config.AddSubMenu(Blist);

            Menu Misc = new Menu("Hitchance Settings", "Misc", false);
            Misc.AddItem(new MenuItem("Hitchance.Q", "Q Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 1)));
            Misc.AddItem(new MenuItem("Hitchance.E", "E Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 1)));
            Misc.AddItem(new MenuItem("Hitchance.R", "R Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 4)));
            Misc.AddItem(new MenuItem("Misc.Debug", "Debug", false).SetValue(false));
            Config.AddSubMenu(Misc);

            Menu Drawings = new Menu("Drawings", "Drawing", false);
            Drawings.AddItem(new MenuItem("Drawing.Disable", "Disable all").SetValue(false));
            Drawings.AddItem(new MenuItem("Drawing.DrawQ", "Draw Q").SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawE", "Draw E").SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawR", "Draw R").SetValue(true));
            Config.AddSubMenu(Drawings);
            return Config;
        }
Example #17
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            if (Player.BaseSkinName != "Pantheon") return;
            if (Player.IsDead) return;


            
            Q = new Spell(SpellSlot.Q, 620f);
            W = new Spell(SpellSlot.W, 620f);
            E = new Spell(SpellSlot.E, 640f);
            R = new Spell(SpellSlot.R, 2000f);

            Q.SetTargetted(0.2f, 1700f);
            W.SetTargetted(0.2f, 1700f);
            E.SetSkillshot(0.25f, 15f * 2 * (float)Math.PI / 180, 2000f, false, SkillshotType.SkillshotCone);

            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);
            SpellList.Add(R);

            igniteSlot = Player.GetSpellSlot("SummonerDot");
            smiteSlot = Player.GetSpellSlot("SummonerSmite");
            vTargetSelector = new TargetSelector(1000, TargetSelector.TargetingMode.LowHP);

            Config = new Menu("xQx | Pantheon", "Pantheon", true);

            var targetSelectorMenu = new Menu("Target Selector", "TargetSelector");
            SimpleTs.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            Config.SubMenu("TargetSelector")
                .AddItem(new MenuItem("Mode", "Mode")).SetValue(new StringList(new[] { "AutoPriority", "Closest", "LessAttack", "LessCast", "LowHP", "MostAD", "MostAP", "NearMouse" }, 1));
            Config.SubMenu("TargetSelector")
                .AddItem(new MenuItem("TSRange", "Range")).SetValue(new Slider(1000, 2000, 100));

            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));
            Orbwalker.SetAttack(true);

            // Combo
            Config.AddSubMenu(new Menu("Combo", "Combo"));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseQCombo", "Use Q").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseWCombo", "Use W").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseECombo", "Use E").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseRCombo", "Use R").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("ComboActive", "Combo!")
                .SetValue(new KeyBind("Z".ToCharArray()[0],KeyBindType.Press)));

            // Harass
            Config.AddSubMenu(new Menu("Harass", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q").SetValue(true));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseWHarass", "Use W").SetValue(true));
            Config.SubMenu("Harass").AddItem(new MenuItem("HarassMana", "Min. Mana Percent: ").SetValue(new Slider(50, 100, 0)));
            Config.SubMenu("Harass").AddItem(new MenuItem("HarassActiveT", "Harass (toggle)!").SetValue(new KeyBind("H".ToCharArray()[0], KeyBindType.Toggle)));
            Config.SubMenu("Harass").AddItem(new MenuItem("HarassActive", "Harass!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));

            // Lane Clear
            Config.AddSubMenu(new Menu("LaneClear", "LaneClear"));
            Config.SubMenu("LaneClear").AddItem(new MenuItem("UseQLaneClear", "Use Q").SetValue(false));
            Config.SubMenu("LaneClear").AddItem(new MenuItem("UseELaneClear", "Use E").SetValue(false));
            Config.SubMenu("LaneClear").AddItem(new MenuItem("LaneClearMana", "Min. Mana Percent: ").SetValue(new Slider(50, 100, 0)));
            Config.SubMenu("LaneClear").AddItem(new MenuItem("LaneClearActive", "LaneClear!").SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press)));

            // Jungling Farm
            Config.AddSubMenu(new Menu("JungleFarm", "JungleFarm"));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseQJungleFarm", "Use Q").SetValue(true));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseEJungleFarm", "Use E").SetValue(false));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("AutoSmite", "Auto Smite").SetValue(new KeyBind('N', KeyBindType.Toggle)));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("JungleFarmMana", "Min. Mana Percent: ").SetValue(new Slider(50, 100, 0)));
            Config.SubMenu("JungleFarm").AddItem(new MenuItem("JungleFarmActive", "JungleFarm!").SetValue(new KeyBind("V".ToCharArray()[0],KeyBindType.Press)));

            // Extras -> Use Items 
            MenuExtras = new Menu("Extras", "Extras");
            Config.AddSubMenu(MenuExtras);
            MenuExtras.AddItem(new MenuItem("InterruptSpells", "Interrupt Spells").SetValue(true));
            MenuExtras.AddItem(new MenuItem("AutoLevelUp", "Auto Level Up").SetValue(true));

            Menu menuUseItems = new Menu("Use Items", "menuUseItems");
            Config.SubMenu("Extras").AddSubMenu(menuUseItems);

            // Extras -> Use Items -> Targeted Items
            MenuTargetedItems = new Menu("Targeted Items", "menuTargetItems");
            menuUseItems.AddSubMenu(MenuTargetedItems);
            MenuTargetedItems.AddItem(new MenuItem("item3153", "Blade of the Ruined King").SetValue(true));
            MenuTargetedItems.AddItem(new MenuItem("item3143", "Randuin's Omen").SetValue(true));
            MenuTargetedItems.AddItem(new MenuItem("item3144", "Bilgewater Cutlass").SetValue(true));
            MenuTargetedItems.AddItem(new MenuItem("item3146", "Hextech Gunblade").SetValue(true));
            MenuTargetedItems.AddItem(new MenuItem("item3184", "Entropy ").SetValue(true));

            // Extras -> Use Items -> AOE Items
            MenuNonTargetedItems = new Menu("AOE Items", "menuNonTargetedItems");
            menuUseItems.AddSubMenu(MenuNonTargetedItems);
            MenuNonTargetedItems.AddItem(new MenuItem("item3180", "Odyn's Veil").SetValue(true));
            MenuNonTargetedItems.AddItem(new MenuItem("item3131", "Sword of the Divine").SetValue(true));
            MenuNonTargetedItems.AddItem(new MenuItem("item3074", "Ravenous Hydra").SetValue(true));
            MenuNonTargetedItems.AddItem(new MenuItem("item3077", "Tiamat ").SetValue(true));
            MenuNonTargetedItems.AddItem(new MenuItem("item3142", "Youmuu's Ghostblade").SetValue(true));

            // Drawing
            Config.AddSubMenu(new Menu("Drawings", "Drawings"));
            Config.SubMenu("Drawings").AddItem(new MenuItem("QRange", "Q Range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("WRange", "W Range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("ERange", "E Range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("RRange", "R Range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("SmiteRange", "Smite Range").SetValue(new Circle(false, System.Drawing.Color.FromArgb(255, 255, 255, 255))));

            new PotionManager();
            Config.AddToMainMenu();

            Game.OnGameUpdate += Game_OnGameUpdate;
            Game.OnWndProc += Game_OnWndProc;
            Drawing.OnDraw += Drawing_OnDraw;

            CustomEvents.Unit.OnLevelUp += CustomEvents_Unit_OnLevelUp;
            Interrupter.OnPossibleToInterrupt += Interrupter_OnPosibleToInterrupt;

            Game.PrintChat(String.Format("<font color='#70DBDB'>xQx | </font> <font color='#FFFFFF'>" +
                                         "{0}</font> <font color='#70DBDB'> Loaded!</font>", ChampionName));
        }
        internal static bool isKillableAndValidTarget(this Obj_AI_Base Target, double CalculatedDamage, TargetSelector.DamageType damageType, float distance = float.MaxValue)
        {
            if (Target == null || !Target.IsValidTarget(distance) || Target.Health <= 0 || Target.CharData.BaseSkinName == "gangplankbarrel")
                return false;

            if (Target.HasBuff("kindrednodeathbuff"))
            {
                return false;
            }

            // Tryndamere's Undying Rage (R)
            if (Target.HasBuff("Undying Rage") && Target.Health <= Target.MaxHealth * 0.10f)
            {
                return false;
            }

            // Kayle's Intervention (R)
            if (Target.HasBuff("JudicatorIntervention"))
            {
                return false;
            }

            // Poppy's Diplomatic Immunity (R)
            if (Target.HasBuff("DiplomaticImmunity") && !ObjectManager.Player.HasBuff("poppyulttargetmark"))
            {
                //TODO: Get the actual target mark buff name
                return false;
            }

            // Banshee's Veil (PASSIVE)
            if (Target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return false;
            }

            // Sivir's Spell Shield (E)
            if (Target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return false;
            }

            // Nocturne's Shroud of Darkness (W)
            if (Target.HasBuff("ShroudofDarkness"))
            {
                // TODO: Get exact Nocturne's Shourd of Darkness buff name
                return false;
            }

            if (ObjectManager.Player.HasBuff("summonerexhaust"))
                CalculatedDamage *= 0.6;

            if (Target.CharData.BaseSkinName == "Blitzcrank")
                if (!Target.HasBuff("manabarriercooldown"))
                    if (Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) + (Target.Mana / 2) + Target.PARRegenRate > CalculatedDamage)
                        return false;

            if (Target.HasBuff("FerociousHowl"))
                CalculatedDamage *= 0.3;

            BuffInstance dragonSlayerBuff = ObjectManager.Player.GetBuff("s5test_dragonslayerbuff");
            if (dragonSlayerBuff != null)
                if (Target.IsMinion)
                {
                    if (dragonSlayerBuff.Count >= 4)
                        CalculatedDamage += dragonSlayerBuff.Count == 5 ? CalculatedDamage * 0.30 : CalculatedDamage * 0.15;

                    if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("dragon"))
                        CalculatedDamage *= 1 - (dragonSlayerBuff.Count * 0.07);
                }

            if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("baron") && ObjectManager.Player.HasBuff("barontarget"))
                CalculatedDamage *= 0.5;

            return Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) < CalculatedDamage;
        }
        public static Obj_AI_Hero GetTarget(float vDefaultRange = 0,
            TargetSelector.DamageType vDefaultDamageType = TargetSelector.DamageType.Physical)
        {
            if (Math.Abs(vDefaultRange) < 0.00001)
                vDefaultRange = Program.E.Range;

            if (!menu.Item("AssassinActive").GetValue<bool>())
                return TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType);

            var assassinRange = menu.Item("AssassinSearchRange").GetValue<Slider>().Value;

            var vEnemy =
                HeroManager.Enemies.Where(
                    enemy =>
                        !enemy.IsDead && enemy.IsVisible && menu.Item("Assassin" + enemy.ChampionName) != null &&
                        menu.Item("Assassin" + enemy.ChampionName).GetValue<bool>() &&
                        Program.Player.Distance(enemy) < assassinRange);

            if (menu.Item("AssassinSelectOption").GetValue<StringList>().SelectedIndex == 1)
            {
                vEnemy = (from vEn in vEnemy select vEn).OrderByDescending(vEn => vEn.MaxHealth);
            }

            var objAiHeroes = vEnemy as Obj_AI_Hero[] ?? vEnemy.ToArray();

            var t = !objAiHeroes.Any()
                ? TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType)
                : objAiHeroes[0];

            return t;
        }
        internal static bool isKillableAndValidTarget(this Obj_AI_Hero Target, double CalculatedDamage, TargetSelector.DamageType damageType, float distance = float.MaxValue)
        {
            if (Target == null || !Target.IsValidTarget(distance) || Target.Health <= 0 || Target.CharData.BaseSkinName == "gangplankbarrel")
                return false;

            if (Target.HasBuff("kindredrnodeathbuff"))
            {
                return false;
            }

            // Tryndamere's Undying Rage (R)
            if (Target.HasBuff("Undying Rage") && Target.Health <= Target.MaxHealth * 0.10f)
            {
                return false;
            }

            // Kayle's Intervention (R)
            if (Target.HasBuff("JudicatorIntervention"))
            {
                return false;
            }

            // Poppy's Diplomatic Immunity (R)
            if (Target.HasBuff("DiplomaticImmunity") && !ObjectManager.Player.HasBuff("poppyulttargetmark"))
            {
                //TODO: Get the actual target mark buff name
                return false;
            }

            // Banshee's Veil (PASSIVE)
            if (Target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return false;
            }

            // Sivir's Spell Shield (E)
            if (Target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return false;
            }

            // Nocturne's Shroud of Darkness (W)
            if (Target.HasBuff("ShroudofDarkness"))
            {
                // TODO: Get exact Nocturne's Shourd of Darkness buff name
                return false;
            }

            if (ObjectManager.Player.HasBuff("summonerexhaust"))
                CalculatedDamage *= 0.6;

            if (Target.ChampionName == "Blitzcrank")
                if (!Target.HasBuff("manabarriercooldown"))
                    if (Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) + (Target.Mana * 0.6) + Target.PARRegenRate < CalculatedDamage)
                        return true;

            if (Target.ChampionName == "Garen")
                if (Target.HasBuff("GarenW"))
                    CalculatedDamage *= 0.7;

            if (Target.HasBuff("FerociousHowl"))
                CalculatedDamage *= 0.3;

            return Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) < CalculatedDamage - 2;
        }
Example #21
0
 private static Obj_AI_Hero GetTarget(float range, TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
 {
     var currTarget = TargetSelector.GetTarget(range, damageType);
     return currTarget != null && currTarget.IsValid ? currTarget : null;
 }
Example #22
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            if (ObjectManager.Player.ChampionName != "Soraka") return;
            //InitializeSafeWardSpots();
            //InitializeWardSpots();
            allies = new List<Obj_AI_Hero>();
            //BushRevealer c = new BushRevealer();
            Q = new Spell(SpellSlot.Q, 970);
            W = new Spell(SpellSlot.W, 550);
            E = new Spell(SpellSlot.E, 925);
            R = new Spell(SpellSlot.R);
            //Game.PrintChat("in1");
            ts = new TargetSelector(1025, TargetSelector.TargetingMode.AutoPriority);
            // stufftosay = new[] { "brb", "need to b", "sec" };
            // deaths = new[] {"oops", "lol", "rip", "laggg"};
            spawn =
                ObjectManager.Get<GameObject>()
                    .First(x => x.Type == GameObjectType.obj_SpawnPoint && x.Team == ObjectManager.Player.Team)
                    .Position;
            menu = new Menu("Soraka Slack", "slack", true);
            menu.AddItem(new MenuItem("on", "Start Slacking!").SetValue(new KeyBind(32, KeyBindType.Toggle)));
            menu.AddItem(new MenuItem("user", "Use R?").SetValue(true));
            menu.AddItem(new MenuItem("usew", "Use W?").SetValue(true));
            menu.AddItem(new MenuItem("allyhpw", "Ally % HP for W").SetValue(new Slider(30, 0, 93)));
            menu.AddItem(new MenuItem("wabovehp", "Use W when my hp > x%").SetValue(new Slider(20, 0, 99)));
            menu.AddItem(new MenuItem("allyhpr", "Ally % HP for R").SetValue(new Slider(30, 0, 50)));
            menu.AddItem(new MenuItem("hpb", "B if hp < %").SetValue(new Slider(15, 0, 80)));
            //Game.PrintChat("in2");
            menu.AddSubMenu(new Menu("Follow:", "follower"));
            foreach (var ally in ObjectManager.Get<Obj_AI_Hero>().Where(x => x.IsAlly && !x.IsMe))
            {
                allies.Add(ally);
                if (ad.Contains(ally.ChampionName))
                    menu.SubMenu("follower").AddItem(new MenuItem(ally.ChampionName, ally.ChampionName).SetValue(true));
                else
                {
                    menu.SubMenu("follower").AddItem(new MenuItem(ally.ChampionName, ally.ChampionName).SetValue(false));
                }
            }
            // Game.PrintChat("hi");
            buyThings = new List<ItemToShop>
            {
                new ItemToShop()
                {
                    goldReach = 500,
                    itemsMustHave = new List<int>{3301},
                    itemIds = new List<int>{3096}
                },
                new ItemToShop()
                {
                    goldReach = 360,
                    itemsMustHave = new List<int>{3096},
                    itemIds = new List<int>{1004,1004}
                },
                new ItemToShop()
                {
                    goldReach = 500,
                    itemsMustHave = new List<int>{1004,1004},
                    itemIds = new List<int>{1033}
                },
                new ItemToShop()
                {
                    goldReach = 180,
                    itemsMustHave = new List<int>{1033,1004,1004},
                    itemIds = new List<int>{3028}
                },
                new ItemToShop()
                {
                    goldReach = 325,
                    itemsMustHave = new List<int>{3028},
                    itemIds = new List<int>{1001}
                },
                new ItemToShop()
                {
                    goldReach = 675,
                    itemsMustHave = new List<int>{1001},
                    itemIds = new List<int>{3009}
                },
                new ItemToShop()
                {
                    goldReach = 400,
                    itemsMustHave = new List<int>{3009},
                    itemIds = new List<int>{1028}
                },
                new ItemToShop()
                {
                    goldReach = 450,
                    itemsMustHave = new List<int>{1028},
                    itemIds = new List<int>{3067}
                },
                new ItemToShop()
                {
                    goldReach = 400,
                    itemsMustHave = new List<int>{3067},
                    itemIds = new List<int>{1028}
                },
                new ItemToShop()
                {
                    goldReach = 800,
                    itemsMustHave = new List<int>{1028},
                    itemIds = new List<int>{3211}
                },
                new ItemToShop()
                {
                    goldReach = 700,
                    itemsMustHave = new List<int>{3211},
                    itemIds = new List<int>{3065}
                },
                new ItemToShop()
                {
                    goldReach = 2900,
                    itemsMustHave = new List<int>{3065},
                    itemIds = new List<int>{3116}
                }
            };
            //Game.PrintChat("hi2");
            // Game.PrintChat("in3");
            var sequence = new[] { 1, 2, 3, 2, 2, 4, 2, 1, 2, 3, 4, 3, 3, 1, 1, 4, 1, 3 };
            var level = new AutoLevel(sequence);
            gamestart = Game.Time;
            menu.AddToMainMenu();
            nextItem = buyThings[0];
            //Game.PrintChat("in4");
            //ids = new[] { 3096, 1004, 1004, 1033, 1001, 3028, 3174, 3009, 1028, 3067, 1028, 3211, 3065, 3069, 1028, 2049, 2045 };

            //follow = ObjectManager.Get<Obj_AI_Hero>().First(x => x.IsAlly && menu.Item(x.ChampionName).GetValue<bool>()); //??
            //   ObjectManager.Get<Obj_AI_Hero>().First(x => !x.IsMe && x.IsAlly && ap.Contains(x.ChampionName)) ??
            //    ObjectManager.Get<Obj_AI_Hero>().First(x => x.IsAlly && !x.IsMe);
            //if (follow != null)
            //followpos = follow.Position;
            followtime = Game.Time;
            //Game.PrintChat("in5");
            //int counter = 0;
            //foreach (var item in ids)
            //{
            //    if (Items.HasItem(item) && counter > index)
            //    {
            //        index = counter;
            //        Game.PrintChat(index.ToString());
            //    }
            //    counter++;
            //}
            // Game.PrintChat("in6");

            if (Game.Time < 300)
            {
                Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(3301)).Send();
                Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(3340)).Send();
                Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send();
                Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send();
                Packet.C2S.BuyItem.Encoded(new Packet.C2S.BuyItem.Struct(2003)).Send();
            }
            //Game.OnGameNotifyEvent += Game_OnGameNotifyEvent;
            Game.OnGameProcessPacket += Game_OnGameProcessPacket;
            Game.OnGameUpdate += Game_OnGameUpdate;

            //follow = ObjectManager.Get<Obj_AI_Hero>().First(x => ad.Contains(x.ChampionName));
            //Obj_AI_Base.OnCreate += Obj_AI_Base_OnCreate;
        }
Example #23
0
        private static Obj_AI_Hero GetTarget(float vDefaultRange = 0,
            TargetSelector.DamageType vDefaultDamageType = TargetSelector.DamageType.Physical)
        {
            if (Math.Abs(vDefaultRange) < 0.00001)
                vDefaultRange = _q.Range;

            if (!Config.Item("AssassinActive").GetValue<bool>())
                return TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType);

            var assassinRange = Config.Item("AssassinSearchRange").GetValue<Slider>().Value;

            var vEnemy =
                ObjectManager.Get<Obj_AI_Hero>()
                    .Where(
                        enemy =>
                            enemy.Team != ObjectManager.Player.Team && !enemy.IsDead && enemy.IsVisible &&
                            Config.Item("Assassin" + enemy.ChampionName) != null &&
                            Config.Item("Assassin" + enemy.ChampionName).GetValue<bool>() &&
                            ObjectManager.Player.Distance(enemy) < assassinRange);

            if (Config.Item("AssassinSelectOption").GetValue<StringList>().SelectedIndex == 1)
            {
                vEnemy = (from vEn in vEnemy select vEn).OrderByDescending(vEn => vEn.MaxHealth);
            }

            Obj_AI_Hero[] objAiHeroes = vEnemy as Obj_AI_Hero[] ?? vEnemy.ToArray();

            Obj_AI_Hero t = !objAiHeroes.Any()
                ? TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType)
                : objAiHeroes[0];

            return t;
        }
Example #24
0
 public Obj_AI_Hero GetTarget(
     float vRange = 0,
     TargetSelector.DamageType vDamageType = TargetSelector.DamageType.Physical)
 {
     return TsEnemy;
 }
Example #25
0
        public static Menu CreateMenu()
        {
            Config = new Menu("SephLissandra", "Liss", true);

            LeagueSharp.Common.TargetSelector TargetSelector = new LeagueSharp.Common.TargetSelector();
            Menu TSMenu = new Menu("Target Selector", "TS", false);
            TargetSelector.AddToMenu(TSMenu);
            Config.AddSubMenu(TSMenu);

            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking", false));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Menu Combo = new Menu("Combo", "Combo", false);
            Combo.AddItem(new MenuItem("Keys.Combo", "Combo Key", false).SetValue(new KeyBind(32, KeyBindType.Press)));
            Combo.AddItem(new MenuItem("Combo.UseQ", "Use Q", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseW", "Use W", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseE", "Use E", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseE2", "Use E2", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseR", "Use R", false).SetValue(true));
            Combo.AddItem((new MenuItem("Combo.ecountW", "Enemies count for 2nd E (W)").SetValue(new Slider(2, 0, 5))));
            Combo.AddItem((new MenuItem("Combo.ecountR", "Enemies count for 2nd E (R)").SetValue(new Slider(2, 0, 5))));
            Combo.AddItem((new MenuItem("Combo.Rcount", "Enemies count for self Ult").SetValue(new Slider(2, 0, 5))));
            Config.AddSubMenu(Combo);

            Menu KillSteal = new Menu("Killsteal", "Killsteal", false);
            KillSteal.AddItem(new MenuItem("Killsteal", "KillSteal", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseQ", "Use Q", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseW", "Use W", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseE", "Use E", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseE2", "Use E", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseR", "Use R", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseIgnite", "Use Ignite", false).SetValue(true));
            Config.AddSubMenu(KillSteal);

            Menu Harass = new Menu("Harass", "Harass", false);
            Harass.AddItem(new MenuItem("Keys.HarassT", "Harass Toggle", false).SetValue(new KeyBind("H".ToCharArray()[0], KeyBindType.Toggle)));
            Harass.AddItem(new MenuItem("Keys.Harass", "Harass Key", false).SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));
            Harass.AddItem(new MenuItem("Harass.UseQ", "Use Q", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.UseW", "Use W", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.UseE", "Use E", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.Mana", "Min mana for harass (%)", false).SetValue(new Slider(50, 0, 100)));
            Config.AddSubMenu(Harass);

            Menu Farm = new Menu("Farm (LH)", "Farm", false);
            Farm.AddItem(new MenuItem("Keys.Farm", "Farm Key", false).SetValue(new KeyBind("X".ToCharArray()[0], KeyBindType.Press)));
            Farm.AddItem(new MenuItem("Farm.Mana", "Minimum Mana %").SetValue(new Slider(50, 0, 100)));
            Farm.AddItem(new MenuItem("Farm.UseQ", "Use Q").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.UseW", "Use W").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.UseE", "Use E").SetValue(true));
            Config.AddSubMenu(Farm);

            Menu Waveclear = new Menu("Waveclear", "Waveclear", false);
            Waveclear.AddItem(new MenuItem("Keys.Waveclear", "Waveclear Key", false).SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press)));
            Waveclear.AddItem(new MenuItem("Waveclear.UseQ", "Use Q").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseW", "Use W").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.Wcount", "Minions for W").SetValue(new Slider(2, 0, 20)));
            Waveclear.AddItem(new MenuItem("Waveclear.UseE", "Use E").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseE2", "Use E2").SetValue(true));
            Config.AddSubMenu(Waveclear);

            Menu Interrupter = new Menu("Interrupter", "Interrupter +", false);
            Interrupter.AddItem(new MenuItem("Interrupter", "Interrupt Important Spells").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.UseW", "Use W").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.UseR", "Use R").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AntiGapClose", "AntiGapClosers").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AG.UseW", "AntiGapClose with W").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AG.UseR", "AntiGapClose with R").SetValue(true));
            Config.AddSubMenu(Interrupter);

            Menu BlackList = new Menu("Ultimate BlackList", "BlackList", false);
            foreach (var hero in ObjectManager.Get<Obj_AI_Hero>().Where(h => h.IsEnemy))
            {
                BlackList.AddItem(new MenuItem("Blacklist." + hero.ChampionName, hero.ChampionName, false).SetValue(false));
            }
            Config.AddSubMenu(BlackList);

            Menu Misc = new Menu("Misc", "Misc", false);
            Misc.AddItem(new MenuItem("Misc.PrioritizeUnderTurret", "Prioritize Targets Under Turret", false).SetValue(true));
            Misc.AddItem(new MenuItem("Misc.DontETurret", "Don't 2nd E Turret Range", false).SetValue(true));
            Misc.AddItem(new MenuItem("Misc.EMouse", "E to Mouse Key", false).SetValue(new KeyBind("G".ToCharArray()[0], KeyBindType.Press)));
            Misc.AddItem(new MenuItem("spaceholder", ""));
            Misc.AddItem(new MenuItem("Hitchance.Q", "Q Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString() }, 1)));
            Misc.AddItem(new MenuItem("Hitchance.E", "E Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString() }, 1)));
            Misc.AddItem(new MenuItem("Misc.Debug", "Debug", false).SetValue(false));
            Config.AddSubMenu(Misc);

            Menu Drawings = new Menu("Drawings", "Drawing", false);
            Drawings.AddItem(new MenuItem("Drawing.DrawQ", "Draw Q", false).SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawW", "Draw W", false).SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawE", "Draw E", false).SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawR", "Draw R", false).SetValue(true));
            Config.AddSubMenu(Drawings);
            //Config.AddToMainMenu();
            return Config;
        }
Example #26
0
 public KalistaQ(SpellSlot slot, float range, TargetSelector.DamageType damageType)
     : base(slot, range, damageType)
 {
 }
Example #27
0
 private void DoTheRDance()
 {
     //Added a very basic line combo.
     Obj_AI_Hero ComboTarget;
     if (getDeathmarkedTarget() == null) {
         PositionBeforeR = Vector3.Zero;
         var ts = new TargetSelector(R.Range, TargetSelector.TargetingMode.LessCast);
         ComboTarget = ts.Target;
         if (!ComboTarget.IsValidTarget()) return;
         PositionBeforeR = player.ServerPosition;
         R.Cast(ComboTarget);
     }
     else {
         getDeathmarkedTarget();
     }
     safetySwap();
     ComboTarget = getDeathmarkedTarget();
     //LXOrbwalker.(ComboTarget); setForcedTarget with lxorbwalker
     LXOrbwalker.ForcedTarget = ComboTarget; // could work idk
     Vector3 tgPos = ComboTarget.ServerPosition;
     Vector2 bestShadowPos = getBestShadowPos(PositionBeforeR, tgPos);
     if (bestShadowPos == Vector2.Zero) return;
     W.Cast(bestShadowPos);
     ZedShadow WSh = WShadow;
     ZedShadow RSh = RShadow;
     if (WSh == null || RShadow == null) {
         Game.PrintChat("Something went wrong");
         return;
     }
     PredictionOutput customQPredictionW = Prediction.GetPrediction(new PredictionInput {
         Unit = ComboTarget,
         Delay = Q.Delay,
         Radius = Q.Width,
         From = WSh.shadowPosition,
         Range = Q.Range,
         Collision = false,
         Type = Q.Type,
         RangeCheckFrom = player.ServerPosition,
         Aoe = false
     });
     PredictionOutput customQPredictionR = Prediction.GetPrediction(new PredictionInput {
         Unit = ComboTarget,
         Delay = Q.Delay,
         Radius = Q.Width,
         From = RSh.shadowPosition,
         Range = Q.Range,
         Collision = false,
         Type = Q.Type,
         RangeCheckFrom = player.ServerPosition,
         Aoe = false
     });
     bool isPlayerERangeW = getEnemiesInRange(WSh.shadowPosition, E.Range).Contains(ComboTarget);
     bool isPlayerERangeR = getEnemiesInRange(RSh.shadowPosition, E.Range).Contains(ComboTarget);
     if (customQPredictionW.Hitchance >= customHitchance || customQPredictionR.Hitchance >= customHitchance)
         Q.Cast(ComboTarget);
     if (isPlayerERangeR || isPlayerERangeW)
         E.Cast();
     if (isChampKill && canBackToShadow() && isMenuEnabled(menu, "SwapRKill")) {
         if (isMenuEnabled(menu, "SafeRBack") && safeBack(RSh))
             R.Cast();
         else
             R.Cast();
     }
 }
Example #28
0
        public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance)
        {
            var target = TargetSelector.GetTarget(range, type);

            if (target == null || !spell.IsReady())
                return;
            spell.UpdateSourcePosition();

            if (spell.GetPrediction(target).Hitchance >= hitChance)
                spell.Cast(target);
        }
Example #29
0
        public Obj_AI_Hero GetTarget(float vRange = 0, TargetSelector.DamageType vDamageType = TargetSelector.DamageType.Physical)
        {
            if (Math.Abs(vRange) < 0.00001)
                return null;

            switch (Program.Config.Item("TS.Mode").GetValue<StringList>().SelectedIndex)
            {
                case 0:
                    return TargetSelector.GetTarget(vRange, vDamageType);

                case 1:
                    return TsEnemy;
            }

            return null;
        }
        public static Menu CreateMenu()
        {
            Config = new Menu("SephCassio", "Lux", true);
            LeagueSharp.Common.TargetSelector TargetSelector = new LeagueSharp.Common.TargetSelector();
            Menu TSMenu = new Menu("Target Selector", "TS", false);
            TargetSelector.AddToMenu(TSMenu);
            Config.AddSubMenu(TSMenu);

            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking", false));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Menu Combo = new Menu("Combo", "Combo", false);
            Combo.AddItem(new MenuItem("Combo.Disableautoifspellsready", "Disable autos only when spells up", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.Useauto", "Use auto attacks", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseQ", "Use Q", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseW", "Use W", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.UseE", "Use E", false).SetValue(true));
            Combo.AddItem(new MenuItem("Combo.useepoison", "Use E only if poison", false).SetValue(true));
            Combo.AddItem((new MenuItem("Combo.edelay", "Edelay").SetValue(new Slider(0, 0, 1000))));
            Combo.AddItem(new MenuItem("Combo.UseR", "Use R", false).SetValue(true));
            Combo.AddItem((new MenuItem("Combo.Rcount", "Enemies count for Ult").SetValue(new Slider(1, 0, 5))));
            Combo.AddItem(new MenuItem("Combo.UseRNF", "Use R even if targets not facing", false).SetValue(false));
            Combo.AddItem((new MenuItem("Combo.Rcountnf", "Enemies count if not facing").SetValue(new Slider(3, 0, 5))));
            Config.AddSubMenu(Combo);

            Menu KillSteal = new Menu("Killsteal", "Killsteal", false);
            KillSteal.AddItem(new MenuItem("Killsteal", "KillSteal", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseQ", "Use Q", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseW", "Use E", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseE", "Use E", false).SetValue(true));
            KillSteal.AddItem(new MenuItem("Killsteal.UseR", "Use R", false).SetValue(false));
            KillSteal.AddItem(new MenuItem("Killsteal.UseIgnite", "Use Ignite", false).SetValue(true));
            Config.AddSubMenu(KillSteal);

            Menu Harass = new Menu("Harass", "Harass", false);
            Harass.AddItem(new MenuItem("Keys.HarassT", "Harass Toggle", false).SetValue(new KeyBind("H".ToCharArray()[0], KeyBindType.Toggle)));
            Harass.AddItem(new MenuItem("Harass.InMixed", "Harass in Mixed Mode", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.UseQ", "Use Q", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.UseW", "Use W", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.UseE", "Use E", false).SetValue(true));
            Harass.AddItem(new MenuItem("Harass.Mana", "Min mana for harass (%)", false).SetValue(new Slider(50, 0, 100)));
            Config.AddSubMenu(Harass);

            Menu Farm = new Menu("Farm (LH)", "Farm", false);
            Farm.AddItem(new MenuItem("Farm.Enable", "Enable abilities for farming").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.Mana", "Minimum Mana %").SetValue(new Slider(50, 0, 100)));
            Farm.AddItem(new MenuItem("Farm.Useauto", "Enable auto attacks").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.UseQ", "Use Q").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.UseW", "Use W").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.UseE", "Use E").SetValue(true));
            Farm.AddItem(new MenuItem("Farm.useepoison", "Use E only if poisoned").SetValue(true));
            Config.AddSubMenu(Farm);

            Menu Waveclear = new Menu("Waveclear", "Waveclear", false);
            Waveclear.AddItem(new MenuItem("Waveclear.Useauto", "Enable autos").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseQ", "Use Q").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseW", "Use W").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseE", "Use E").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.useepoison", "Use E only if poisoned").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.useekillable", "Use E only if killable").SetValue(true));
            Waveclear.AddItem(new MenuItem("Waveclear.UseR", "Use R").SetValue(false));
            Waveclear.AddItem(new MenuItem("Waveclear.Rcount", "Minions for R").SetValue(new Slider(10, 0, 20)));
            Config.AddSubMenu(Waveclear);

            Menu Interrupter = new Menu("Interrupter", "Interrupter +", false);
            Interrupter.AddItem(new MenuItem("Interrupter.UseR", "Interrupt with R").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AntiGapClose", "AntiGapClosers").SetValue(true));
            Interrupter.AddItem(new MenuItem("Interrupter.AG.UseR", "AntiGapClose with R").SetValue(true));
            Config.AddSubMenu(Interrupter);

            Menu Blist = new Menu("BlackList", "BlackList", false);
            foreach (var hero in HeroManager.Enemies)
            {
                var champ = hero;
                var addhero = Blist.AddItem(new MenuItem("Blacklist." + hero.ChampionName, hero.ChampionName, false).SetValue(false));
                addhero.ValueChanged += (sender, args) =>
                {
                    if (args.GetNewValue<bool>())
                    {
                        BlackList.Add(champ);
                    }
                    else
                    {
                        BlackList.Remove(champ);
                    }
                };
            }

            Config.AddSubMenu(Blist);

            Menu hc = new Menu("Hitchance Settings", "hc", false);
            hc.AddItem(new MenuItem("Hitchance.Q", "Q Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 2)));
            hc.AddItem(new MenuItem("Hitchance.W", "W Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString() , HitChance.Immobile.ToString() }, 2)));
            hc.AddItem(new MenuItem("Hitchance.R", "R Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 3)));
            Config.AddSubMenu(hc);

            Menu misc = new Menu("Misc", "Misc", false);

            var autolvl = misc.AddItem(new MenuItem("Misc.autolevel", "Autolevel", false).SetValue(false));
            autolvl.ValueChanged += (sender, args) =>
            {
                if (args.GetNewValue<bool>())
                {
                    CommonAutoLevel.Enabled(true);
                }
                else
                {
                    CommonAutoLevel.Enabled(false);
                }
            };

            misc.AddItem(new MenuItem("Misc.autoe", "Auto use e when possible (no buttons pressed)", false).SetValue(false));
            misc.AddItem(new MenuItem("Misc.Debug", "Debug", false).SetValue(false));
            Config.AddSubMenu(misc);

            Menu Drawings = new Menu("Drawings", "Drawing", false);
            Drawings.AddItem(new MenuItem("Drawing.Disable", "Disable all").SetValue(false));
            Drawings.AddItem(new MenuItem("Drawing.DrawQ", "Draw Q").SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawW", "Draw W").SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawE", "Draw E").SetValue(true));
            Drawings.AddItem(new MenuItem("Drawing.DrawR", "Draw R").SetValue(true));
            Config.AddSubMenu(Drawings);
            return Config;
        }