示例#1
0
        /// <summary>
        ///     Uses MEC to get the perfect position on Circle Skillshots
        /// </summary>
        /// <param name="spell">Give it a spell and it will do the rest of the logic for you</param>
        /// <param name="targetHero">
        ///     If you give it a target it will look around that target for other targets but will always
        ///     focus that target
        /// </param>
        /// <returns></returns>
        internal static OptimizedLocation?GetOptimizedCircleLocation(Spell.Skillshot spell,
                                                                     AIHeroClient targetHero = null)
        {
            if (targetHero != null)
            {
                if (!targetHero.IsValidTarget(spell.Range + spell.Radius))
                {
                    return(null);
                }

                var champs =
                    EntityManager.Heroes.Enemies.Where(e => e.Distance(targetHero) < spell.Radius)
                    .Select(
                        champ =>
                        Prediction.Position.PredictUnitPosition(champ,
                                                                (int)Player.Instance.Distance(champ) / spell.Speed + spell.CastDelay))
                    .ToList();
                return(GetOptimizedCircleLocation(champs, spell.Width, spell.Range));
            }
            if (EntityManager.Heroes.Enemies.Any(e => e.Distance(Player.Instance) < spell.Radius + spell.Range))
            {
                var champs =
                    EntityManager.Heroes.Enemies.Where(e => e.Distance(Player.Instance) < spell.Radius + spell.Range)
                    .Select(
                        champ =>
                        Prediction.Position.PredictUnitPosition(champ,
                                                                (int)Player.Instance.Distance(champ) / spell.Speed + spell.CastDelay)).ToList();

                return(GetOptimizedCircleLocation(champs, spell.Width, spell.Range));
            }
            return(null);
        }
示例#2
0
        public static void OnLoad(EventArgs args)
        {
            switch (Game.MapId)
            {
            case GameMapId.SummonersRift:
                Common.JungleMobsNames = Common.SRJungleMobsNames;
                break;

            case GameMapId.CrystalScar:
                Common.JungleMobsNames = Common.ASCJungleMobsNames;
                break;

            case GameMapId.TwistedTreeline:
                Common.JungleMobsNames = Common.TTJungleMobsNames;
                break;
            }

            var spells = SpellDatabase.GetSpellInfoList(Player.Instance.BaseSkinName);

            if (spells.Count == 0)
            {
                return;
            }

            foreach (var spell in spells)
            {
                var skillshot = new Spell.Skillshot(spell.Slot, (uint)spell.Range, Common.type(spell.Type), (int)spell.Delay, (int)spell.MissileSpeed);
                var ispell    = new ISpells(skillshot, spell);
                Spells.Add(ispell);
            }

            MenuIni         = MainMenu.AddMenu("Auto Steal " + Player.Instance.Hero, "Auto Steal " + Player.Instance.Hero);
            KillStealMenu   = MenuIni.AddSubMenu("Kill Steal ", "Kill Steal");
            JungleStealMenu = MenuIni.AddSubMenu("Jungle Steal ", "Jungle Steal");

            KillStealMenu.AddGroupLabel("Spells");
            foreach (var spell in Spells.Select(s => s.Skillshot))
            {
                KillStealMenu.CreateCheckBox(spell.Slot.ToString(), "Use " + spell.Slot);
            }

            KillStealMenu.AddGroupLabel("Enemies");
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                KillStealMenu.CreateCheckBox(enemy.Name(), "KS " + enemy.Name());
            }

            JungleStealMenu.AddGroupLabel("Spells");
            foreach (var spell in Spells.Select(s => s.Skillshot))
            {
                JungleStealMenu.CreateCheckBox(spell.Slot.ToString(), "Use " + spell.Slot);
            }

            JungleStealMenu.AddGroupLabel("Mobs");
            foreach (var name in Common.JungleMobsNames)
            {
                JungleStealMenu.CreateCheckBox(name, "JS " + name);
            }
            Game.OnUpdate += Game_OnUpdate;
        }
示例#3
0
        public override void Init()
        {
            _q  = new Spell.Targeted(SpellSlot.Q, 675);
            _q1 = new Spell.Skillshot(SpellSlot.Q, 1150, SkillShotType.Linear, 250, int.MaxValue, 65)
            {
                AllowedCollisionCount = int.MaxValue
            };
            _w = new Spell.Skillshot(SpellSlot.W, 1150, SkillShotType.Linear, 250, 1600, 80);
            _e = new Spell.Skillshot(SpellSlot.E, 475, SkillShotType.Linear);
            _r = new Spell.Skillshot(SpellSlot.R, 1400, SkillShotType.Linear, 500, 2800, 110);

            MainMenu.ComboKeys(useR: false);
            MainMenu.Combo.AddGroupLabel("Combo Preferences", "combo.gl.pref", true);
            MainMenu.Combo.Add("combo.mode", new Slider("Combo Mode", 0, 0, 1)).OnValueChange += ModeSlider;
            Value.AdvancedMenuItemUiDs.Add("combo.mode");
            MainMenu.Combo["combo.mode"].IsVisible = MainMenu.Combo["combo.advanced"].Cast <CheckBox>().CurrentValue;
            MainMenu.Combo.Add("combo.speed", new Slider("Combo Speed", 0, 0, 2)).OnValueChange += SpeedSlider;
            Value.AdvancedMenuItemUiDs.Add("combo.speed");
            MainMenu.Combo["combo.speed"].IsVisible = MainMenu.Combo["combo.advanced"].Cast <CheckBox>().CurrentValue;
            MainMenu.Combo.AddSeparator();
            MainMenu.Combo.AddCheckBox("combo.eq", "Use Extended Q if Combo Mode = Normal", true, true);
            MainMenu.Combo.AddCheckBox("combo.wcol", "Check for W collision", false, true);
            MainMenu.Combo.AddCheckBox("combo.egap", "Use E to Gapclose (Not Recommended)", false, true);
            MainMenu.Combo.AddSeparator();
            MainMenu.Combo.Add("combo.emode", new Slider("E Mode: ", 0, 0, 1)).OnValueChange += ComboEModeSlider;
            Value.AdvancedMenuItemUiDs.Add("combo.emode");
            MainMenu.Combo["combo.emode"].Cast <Slider>().IsVisible =
                MainMenu.Combo["combo.advanced"].Cast <CheckBox>().CurrentValue;
            MainMenu.Combo.Add("combo.rbind",
                               new KeyBind("Semi-Auto R (No Lock)", false, KeyBind.BindTypes.HoldActive, 'T'))
            .OnValueChange += OnUltButton;
            Value.AdvancedMenuItemUiDs.Add("combo.rbind");
            MainMenu.Combo["combo.rbind"].IsVisible = MainMenu.Combo["combo.advanced"].Cast <CheckBox>().CurrentValue;

            MainMenu.HarassKeys(useR: false);
            MainMenu.Harass.AddGroupLabel("Harass Preferences", "harass.gl.pref", true);
            MainMenu.Harass.AddCheckBox("harass.eq", "Use Extended Q in Harass", true, true);
            MainMenu.Harass.AddCheckBox("harass.wcol", "Check for W collision", false, true);
            MainMenu.Harass.AddSeparator();
            MainMenu.Harass.Add("harass.emode", new Slider("E Mode: ", 0, 0, 1)).OnValueChange += HarassEModeSlider;
            Value.AdvancedMenuItemUiDs.Add("harass.emode");
            MainMenu.Harass["harass.emode"].IsVisible =
                MainMenu.Harass["harass.advanced"].Cast <CheckBox>().CurrentValue;
            MainMenu.Harass.AddSlider("harass.mana", "Mana Manager:", 60, 0, 100, true);

            MainMenu.JungleKeys(useR: false);
            MainMenu.Jungle.AddSlider("jungle.mana", "Mana Manager:", 80, 0, 100, true);

            MainMenu.LaneKeys(useR: false);
            MainMenu.Lane.AddGroupLabel("LaneClear Preferences", "lane.gl.pref", true);
            MainMenu.Lane.AddCheckBox("lane.qharass", "Q = Harass Enemies", false, true);
            MainMenu.Lane.AddSeparator();
            MainMenu.Lane.AddSlider("lane.minfarm", "Minions for Farm Q", 3, 0, 6, true);
            MainMenu.Lane.AddSlider("lane.mana", "Mana Manager:", 80, 0, 100, true);

            MainMenu.KsKeys(useW: false);

            MainMenu.DrawKeys(useW: false, useE: false);
            MainMenu.Draw.AddSeparator();
            MainMenu.Draw.AddLabel("W/Extended Q Settings");
            MainMenu.Draw.Add("draw.qw", new CheckBox("Draw W/Extended Q"));
            MainMenu.Draw.AddColorItem("color.qw");
            MainMenu.Draw.AddWidthItem("width.qw");
            MainMenu.DamageIndicator(true);

            MainMenu.FleeKeys(false, useW: false, useR: false);
            Value.Init();
            UpdateSlider(1);
            UpdateSlider(2);
            UpdateSlider(3);
            UpdateSlider(4);

            DamageIndicator.DamageToUnit += GetRawDamage;
            Drawing.OnDraw += Draw;
            if (MainMenu.Menu["useonupdate"].Cast <CheckBox>().CurrentValue)
            {
                Game.OnUpdate += Game_OnTick;
            }
            else
            {
                Game.OnTick += Game_OnTick;
            }
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            Orbwalker.OnPostAttack         += OrbwalkerOnPostAttack;
        }
示例#4
0
        public override void Init()
        {
            _q = new Spell.Targeted(SpellSlot.Q, 675);
            _q1 = new Spell.Skillshot(SpellSlot.Q, 1150, SkillShotType.Linear, 250, int.MaxValue, 65)
            {
                AllowedCollisionCount = int.MaxValue
            };
            _w = new Spell.Skillshot(SpellSlot.W, 1150, SkillShotType.Linear, 250, 1600, 80);
            _e = new Spell.Skillshot(SpellSlot.E, 475, SkillShotType.Linear);
            _r = new Spell.Skillshot(SpellSlot.R, 1400, SkillShotType.Linear, 500, 2800, 110);

            MainMenu.ComboKeys(true, true, true, false);
            MainMenu._combo.AddGroupLabel("Combo Preferences", "combo.gl.pref", true);
            MainMenu._combo.Add("combo.mode", new Slider("Combo Mode", 0, 0, 1)).OnValueChange += ModeSlider;
            Value.AdvancedMenuItemUiDs.Add("combo.mode");
            MainMenu._combo["combo.mode"].IsVisible = MainMenu._combo["combo.advanced"].Cast<CheckBox>().CurrentValue;
            MainMenu._combo.Add("combo.speed", new Slider("Combo Speed", 0, 0, 2)).OnValueChange += SpeedSlider;
            Value.AdvancedMenuItemUiDs.Add("combo.speed");
            MainMenu._combo["combo.speed"].IsVisible = MainMenu._combo["combo.advanced"].Cast<CheckBox>().CurrentValue;
            MainMenu._combo.AddSeparator();
            MainMenu._combo.AddCheckBox("combo.eq", "Use Extended Q if Combo Mode = Normal", true, true);
            MainMenu._combo.AddCheckBox("combo.wcol", "Check for W collision", false, true);
            MainMenu._combo.AddCheckBox("combo.egap", "Use E to Gapclose (Not Recommended)", false, true);
            MainMenu._combo.AddSeparator();
            MainMenu._combo.Add("combo.emode", new Slider("E Mode: ", 0, 0, 2)).OnValueChange += ComboEModeSlider;
            Value.AdvancedMenuItemUiDs.Add("combo.emode");
            MainMenu._combo["combo.emode"].Cast<Slider>().IsVisible = MainMenu._combo["combo.advanced"].Cast<CheckBox>().CurrentValue;
            MainMenu._combo.Add("combo.rbind",
                new KeyBind("Semi-Auto R (No Lock)", false, KeyBind.BindTypes.HoldActive, 'T'))
                .OnValueChange += OnUltButton;
            Value.AdvancedMenuItemUiDs.Add("combo.rbind");
            MainMenu._combo["combo.rbind"].IsVisible = MainMenu._combo["combo.advanced"].Cast<CheckBox>().CurrentValue;

            MainMenu.HarassKeys(true, true, true, false);
            MainMenu._harass.AddGroupLabel("Harass Preferences", "harass.gl.pref", true);
            MainMenu._harass.AddCheckBox("harass.eq", "Use Extended Q in Harass", true, true);
            MainMenu._harass.AddCheckBox("harass.wcol", "Check for W collision", false, true);
            MainMenu._harass.AddSeparator();
            MainMenu._harass.Add("harass.emode", new Slider("E Mode: ", 0, 0, 2)).OnValueChange += HarassEModeSlider;
            Value.AdvancedMenuItemUiDs.Add("harass.emode");
            MainMenu._harass["harass.emode"].IsVisible = MainMenu._harass["harass.advanced"].Cast<CheckBox>().CurrentValue;
            MainMenu._harass.AddSlider("harass.mana", "Mana Manager:", 60, 0, 100, true);

            MainMenu.JungleKeys(true, true, true, false);
            MainMenu._jungle.AddSlider("jungle.mana", "Mana Manager:", 80, 0, 100, true);

            MainMenu.LaneKeys(true, true, true, false);
            MainMenu._lane.AddGroupLabel("LaneClear Preferences", "lane.gl.pref", true);
            MainMenu._lane.AddCheckBox("lane.qharass", "Q = Harass Enemies", false, true);
            MainMenu._lane.AddSeparator();
            MainMenu._lane.AddSlider("lane.minfarm", "Minions for Farm Q", 3, 0, 6, true);
            MainMenu._lane.AddSlider("lane.mana", "Mana Manager:", 80, 0, 100, true);

            MainMenu.KsKeys(true, false, true, false);

            MainMenu.DrawKeys(true, false, false, true);
            MainMenu._draw.AddSeparator();
            MainMenu._draw.AddLabel("W/Extended Q Settings");
            MainMenu._draw.Add("draw.qw", new CheckBox("Draw W/Extended Q"));
            MainMenu._draw.AddColorItem("color.qw");
            MainMenu._draw.AddWidthItem("width.qw");
            MainMenu.DamageIndicator(true);
            
            MainMenu.FleeKeys(false, false, true, false);
            Value.Init();
            UpdateSlider(1);
            UpdateSlider(2);
            UpdateSlider(3);
            UpdateSlider(4);

            DamageIndicator.DamageToUnit += GetRawDamage;
            Drawing.OnDraw += Draw;
            if (MainMenu._menu["useonupdate"].Cast<CheckBox>().CurrentValue)
            {
                Game.OnUpdate += Game_OnTick;
            }
            else
            {
                Game.OnTick += Game_OnTick;
            }
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            Orbwalker.OnPostAttack += OrbwalkerOnPostAttack;
        }