Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
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); 
            }
           
        }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
0
 public CommonSpell(
     SpellSlot slot,
     float range = 0,
     TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
     : base(slot, range, damageType)
 {
 }
Ejemplo n.º 5
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;
        }
Ejemplo n.º 6
0
 public OlafSpell(SpellSlot slot, float range, TargetSelector.DamageType damageType)
     : base(slot, range, damageType)
 {
     UseOnCombo = false;
     UseOnHarass = false;
     UseOnLastHit = false;
     UseOnLaneClear = false;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 13
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;
        }
Ejemplo n.º 14
0
        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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 16
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("showcd", true).GetValue <bool>())
            {
                string msg = " ";

                if (Range)
                {
                    msg = "Q " + (int)Q2cd + "   W " + (int)W2cd + "   E " + (int)E2cd;
                    Drawing.DrawText(Drawing.Width * 0.5f - 50, Drawing.Height * 0.3f, System.Drawing.Color.Orange, msg);
                }
                else
                {
                    msg = "Q " + (int)Qcd + "   W " + (int)Wcd + "   E " + (int)Ecd;
                    Drawing.DrawText(Drawing.Width * 0.5f - 50, Drawing.Height * 0.3f, System.Drawing.Color.Aqua, msg);
                }
            }


            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        if (Range)
                        {
                            if (CanUseQE())
                            {
                                Render.Circle.DrawCircle(Player.Position, Qext.Range, System.Drawing.Color.Cyan, 1);
                            }
                            else
                            {
                                Render.Circle.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                            }
                        }
                        else
                        {
                            Render.Circle.DrawCircle(Player.Position, Q2.Range, System.Drawing.Color.Orange, 1);
                        }
                    }
                }
                else
                {
                    if (Range)
                    {
                        if (CanUseQE())
                        {
                            Render.Circle.DrawCircle(Player.Position, Qext.Range, System.Drawing.Color.Cyan, 1);
                        }
                        else
                        {
                            Render.Circle.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                        }
                    }
                    else
                    {
                        Render.Circle.DrawCircle(Player.Position, Q2.Range, System.Drawing.Color.Orange, 1);
                    }
                }
            }

            if (Config.Item("noti", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(1600, TargetSelector.DamageType.Physical);

                if (t.IsValidTargetLS())
                {
                    var damageCombo = GetComboDMG(t);
                    if (damageCombo > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Red, "Combo deal  " + damageCombo + " to " + t.ChampionName);
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.Yellow);
                    }
                }
            }
        }
Ejemplo n.º 17
0
        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;
        }
Ejemplo n.º 18
0
 public Obj_AI_Hero GetTarget(
     float vRange = 0,
     TargetSelector.DamageType vDamageType = TargetSelector.DamageType.Physical)
 {
     return TsEnemy;
 }
Ejemplo n.º 19
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

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

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

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

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

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


                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Player.Mana > RMANA + WMANA + EMANA + QMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if (Program.Farm && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && Player.Mana > Player.MaxMana * 0.8 && Player.Mana > RMANA + WMANA + EMANA + QMANA + WMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA + EMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        W.Cast(enemy, true);
                    }
                }
            }
        }
Ejemplo n.º 20
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                }
            }
            if (Config.Item("wRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (W.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
                }
            }
            if (Config.Item("eRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (E.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
                }
            }
            if (Config.Item("rRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (R.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
                }
            }
            if (Config.Item("noti", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget() && R.IsReady())
                {
                    var rDamage = R.GetDamage(t);
                    if (rDamage > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Red, "Ult can kill: " + t.ChampionName + " have: " + t.Health + "hp");
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.Yellow);
                    }
                }

                var tw = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                if (tw.IsValidTarget())
                {
                    if (Q.GetDamage(tw) > tw.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.4f, System.Drawing.Color.Red, "Q can kill: " + t.ChampionName + " have: " + t.Health + "hp");
                    }
                }
            }
        }
Ejemplo n.º 21
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && Config.Item("Qon" + t.ChampionName).GetValue <bool>())
            {
                if (Program.Combo && Player.Mana > RMANA + QMANA + WMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && OktwCommon.CanHarras() && Config.Item("harrasQ", true).GetValue <bool>() &&
                         Config.Item("harras" + t.ChampionName).GetValue <bool>() && Player.ManaPercent > Config.Item("QHarassMana", true).GetValue <Slider>().Value)
                {
                    Program.CastSpell(Q, t);
                }
                else if (OktwCommon.GetKsDamage(t, Q) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                {
                    Program.CastSpell(Q, t);
                }
            }
            if (!OktwCommon.CanHarras())
            {
                return;
            }

            if (!Program.None && !Program.Combo && Player.Mana > RMANA + QMANA * 2)
            {
                var allMinions = Cache.GetMinions(Player.ServerPosition, Q.Range);

                if (Config.Item("farmQout", true).GetValue <bool>())
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range) && (!Orbwalker.InAutoAttackRange(minion) || (!minion.UnderTurret(true) && minion.UnderTurret()))))
                    {
                        var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 1100);
                        if (hpPred < GetQDamage(minion) * 0.9 && hpPred > minion.Health - hpPred * 2)
                        {
                            Q.Cast(minion);
                            return;
                        }
                    }
                }

                if (Program.LaneClear && Config.Item("farmQ", true).GetValue <bool>() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range) && Orbwalker.InAutoAttackRange(minion)))
                    {
                        var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 1100);
                        if (hpPred < GetQDamage(minion) * 0.9 && hpPred > minion.Health - hpPred * 2)
                        {
                            Q.Cast(minion);
                            return;
                        }
                    }
                }

                if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>())
                {
                    var farmPos = Q.GetCircularFarmLocation(allMinions, Q.Width);
                    if (farmPos.MinionsHit >= Config.Item("QLCminions", true).GetValue <Slider>().Value)
                    {
                        Q.Cast(farmPos.Position);
                    }
                }
            }
        }
Ejemplo n.º 22
0
        private void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            var t1 = TargetSelector.GetTarget(Q1.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTargetLS(Q.Range) && Player.Distance(t.ServerPosition) > 500)
            {
                var qDmg = OktwCommon.GetKsDamage(t, Q);
                if (qDmg + Player.GetAutoAttackDamage(t) > t.Health)
                {
                    Q.Cast(t);
                }
                else if (qDmg + Player.GetAutoAttackDamage(t) * 3 > t.Health)
                {
                    Q.Cast(t);
                }
                else if (Program.Combo && Player.Mana > RMANA + QMANA + WMANA)
                {
                    Q.Cast(t);
                }
                else if (Program.Farm && Player.Mana > RMANA + QMANA + EMANA + WMANA)
                {
                    Q.Cast(t);
                }
            }
            else if (t1.IsValidTargetLS(Q1.Range) && Config.Item("harasQ", true).GetValue <bool>() && Player.Distance(t1.ServerPosition) > Q.Range + 50)
            {
                var minions = Cache.GetMinions(Player.ServerPosition, Q1.Range);



                if (Config.Item("qMinionMove", true).GetValue <bool>())
                {
                    if (minions.Exists(x => x.IsMoving))
                    {
                        return;
                    }
                }

                var enemyPredictionPos = SebbyLib.Prediction.Prediction.GetPrediction(t1, 0.2f).CastPosition;
                foreach (var minion in minions)
                {
                    if (Config.Item("killQ", true).GetValue <bool>() && Q.GetDamage(minion) < minion.Health)
                    {
                        continue;
                    }

                    var posExt = Player.ServerPosition.Extend(minion.ServerPosition, 420 + Player.Distance(minion)).To3DWorld();

                    if (InCone(enemyPredictionPos, posExt, minion.ServerPosition, Config.Item("qMinionWidth", true).GetValue <Slider>().Value))
                    {
                        Program.debug("dupa");
                        if (minions.Exists(x =>
                                           InCone(x.Position, posExt, minion.ServerPosition, Config.Item("qMinionWidth", true).GetValue <Slider>().Value)
                                           ))
                        {
                            continue;
                        }
                        Q.Cast(minion);
                        return;
                    }
                }
            }
        }
Ejemplo n.º 23
0
        static void Game_OnGameLoad(EventArgs args)
        {
            if (Player.ChampionName != "Thresh")
            {
                return;
            }
            Notifications.AddNotification("Thresh - The Chain Warden by DanZ Loaded!", 1000);
            FlashSlot = Player.GetSpellSlot("SummonerFlash");

            Q  = new Spell(SpellSlot.Q, 1100);
            Q2 = new Spell(SpellSlot.Q, 1400);
            W  = new Spell(SpellSlot.W, 950);
            E  = new Spell(SpellSlot.E, 450);
            R  = new Spell(SpellSlot.R, 450);

            Q.SetSkillshot(0.500f, 70, 1900f, true, SkillshotType.SkillshotLine);
            Q2.SetSkillshot(0.500f, 70, 1900f, true, SkillshotType.SkillshotLine);

            Config = new Menu("Thresh", "thresh_menu", true);
            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");

            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            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("EPush", "E Push/Pull(on/off)")).SetValue(true);//get used to check out commit

            Config.AddSubMenu(new Menu("Harass", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q")).SetValue(true);
            Config.SubMenu("Harass").AddItem(new MenuItem("UseEHarass", "Use E")).SetValue(true);

            Config.AddSubMenu(new Menu("Flay", "Flay"));
            Config.SubMenu("Flay").AddItem(new MenuItem("Push", "Push")).SetValue(new KeyBind('I', KeyBindType.Press));
            Config.SubMenu("Flay").AddItem(new MenuItem("Pull", "Pull")).SetValue(new KeyBind('U', KeyBindType.Press));


            Config.AddSubMenu(new Menu("Flash Hook", "Fhook"));
            Config.SubMenu("Fhook").AddItem(new MenuItem("FlashQCombo", "Flash + Hook").SetValue(new KeyBind('G', KeyBindType.Press)));

            Config.AddSubMenu(new Menu("Interrupts", "Interrupts"));
            Config.SubMenu("Interrupts").AddItem(new MenuItem("EInterrupt", "Interrupt Spells with E").SetValue(true));

            Config.AddSubMenu(new Menu("Gap Closers", "GapClosers"));
            Config.SubMenu("GapClosers").AddItem(new MenuItem("EGapCloser", "Auto use E away on Gap Closers").SetValue(true));
            Config.SubMenu("GapClosers").AddItem(new MenuItem("RGapCloser", "Auto use R on Gap Closers").SetValue(false));

            Config.AddSubMenu(new Menu("Lantern Settings", "LanternSettings"));
            Config.SubMenu("LanternSettings").AddItem(new MenuItem("ThrowLantern", "Throw Lantern to Ally")).SetValue(new KeyBind('T', KeyBindType.Press));
            Config.SubMenu("LanternSettings").AddItem(new MenuItem("ThrowLanternNear", "Prioritize Nearest Ally")).SetValue(true);
            Config.SubMenu("LanternSettings").AddItem(new MenuItem("ThrowLanternLife", "Prioritize Low Ally")).SetValue(false);

            Config.AddSubMenu(new Menu("Drawings", "Drawings"));
            Config.SubMenu("Drawings").AddItem(new MenuItem("drawEnable", "Enable Drawing")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("drawQpred", "Draw Q line prediction")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("drawQ", "Draw Q")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("drawW", "Draw W")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("drawE", "Draw E")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("drawR", "Draw R")).SetValue(true);

            Config.AddSubMenu(new Menu("Debug", "Debug"));
            Config.SubMenu("Debug").AddItem(new MenuItem("debugE", "Debug E")).SetValue(false);
            Config.SubMenu("Debug").AddItem(new MenuItem("debugFlash", "Debug flash+hook")).SetValue(false);

            Config.AddToMainMenu();

            OnBeforeAttack(); //You can use OnBeforeAttack event here instead of declaring new delegate in function
            Game.OnUpdate  += OnGameUpdate;
            Drawing.OnDraw += OnDraw;
            AntiGapcloser.OnEnemyGapcloser     += OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += OnPossibleToInterrupt;
        }
Ejemplo n.º 24
0
        private static void OnDraw(EventArgs args)
        {
            var myPos = Drawing.WorldToScreen(Player.Position);

            if (Config.Item("drawEnable").GetValue <bool>())
            {
                if (Config.Item("drawQ").GetValue <bool>())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range, Color.Aqua, 1);
                }

                if (Config.Item("drawW").GetValue <bool>())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range, Color.Aqua, 1);
                }
                if (Config.Item("drawE").GetValue <bool>())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, E.Range, Color.Aqua, 1);
                }
                if (Config.Item("drawR").GetValue <bool>())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, R.Range, Color.Aqua, 1);
                }
            }
            var            enemy     = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Magical);
            List <Vector2> waypoints = enemy.GetWaypointsLS();

            for (int i = 0; i < waypoints.Count - 1; i++)
            {
                oWp = Drawing.WorldToScreen(waypoints[i].To3D());
                nWp = Drawing.WorldToScreen(waypoints[i + 1].To3D());
                if (!waypoints[i].IsOnScreen() && !waypoints[i + 1].IsOnScreen())
                {
                    continue;
                }
                //Drawing.DrawLine(oWp[0], oWp[1], nWp[0], nWp[1], 3, System.Drawing.Color.Red);


                //var pos = Player.Position + Vector3.Normalize(enemy.Position - Player.Position) * 100;
                //pos = Player.Position + Vector3.Normalize(enemy.Position - Player.Position) * Player.Distance3D(enemy);
                //var ePos = Drawing.WorldToScreen(pos);


                if (Config.Item("drawQpred").GetValue <bool>())
                {
                    Drawing.DrawLine(myPos.X - 25, myPos.Y - 25, nWp[0] - 10, nWp[1] - 25, 1, Color.Red);
                    Drawing.DrawLine(myPos.X + 25, myPos.Y + 25, nWp[0] + 10, nWp[1] + 25, 1, Color.Red);
                }

                if (Config.Item("debugFlash").GetValue <bool>())
                {
                    Q2.UpdateSourcePosition(V2E(ObjectManager.Player.Position, enemy.Position, 400).To3D());
                    var predPos = Q2.GetPrediction(enemy);
                    Render.Circle.DrawCircle(V2E(ObjectManager.Player.Position, enemy.Position, 400).To3D(), 100, Color.Aqua, 1);
                    Drawing.DrawLine(Drawing.WorldToScreen(V2E(ObjectManager.Player.Position, enemy.Position, 400).To3D()), Drawing.WorldToScreen(predPos.CastPosition), 2, Color.Aqua);
                    var toScreen = Drawing.WorldToScreen(enemy.Position);
                    Drawing.DrawText(toScreen.X + 70, toScreen.Y, Color.Aqua, predPos.Hitchance.ToString());
                }

                if (Config.Item("debugE").GetValue <bool>())
                {
                    var target2 = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
                    if (!Config.Item("EPush").GetValue <bool>())
                    {
                        Render.Circle.DrawCircle(V2E(target2.Position, Player.Position, Player.Distance(target2.Position) + 400).To3D(), 100, Color.Red, 1);
                    }
                    else
                    {
                        Render.Circle.DrawCircle(target2.Position, 100, Color.Red, 1);
                    }
                }
            }
        }
Ejemplo n.º 25
0
        private static void OnUpdate(EventArgs args)
        {
            if (Program.E.IsReady())
            {
                //KS
                if (
                    HeroManager.Enemies.Any(
                        en => Program.E.IsInRange(en) && en.IsRendKillable() && en.Health > 0))
                {
                    Program.E.Cast();
                }
                //worm/drake stealer
                if (
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Any(
                        m =>
                        m.Distance(ObjectManager.Player) < 1000 && m.IsRendKillable() &&
                        (m.Name == "SRU_Dragon6.1.1" || m.Name == "SRU_Baron12.1.1" || m.Name == "SRU_Red10.1.1" ||
                         m.Name == "SRU_Red10.1.1" || m.Name == "SRU_Red4.1.1")))
                {
                    Program.E.Cast();
                }
            }

            switch (Program.Orbwalker.ActiveMode)
            {
            case MyOrbwalker.OrbwalkingMode.Combo:
            {
                if (Program.E.IsReady())
                {
                    //Minion Resets
                    if (Program.ComboMenu.Item("EComboMinionReset").GetValue <bool>() &&
                        MinionManager.GetMinions(Program.E.Range).Any(m => m.IsRendKillable()))
                    {
                        if (
                            HeroManager.Enemies.Where(e => !e.HasUndyingBuff() && !e.HasSpellShield())
                            .Select(en => en.GetRendBuff())
                            .Any(buf => buf != null &&
                                 buf.Count >=
                                 Program.ComboMenu.Item("EComboMinionResetStacks")
                                 .GetValue <Slider>()
                                 .Value))
                        {
                            Program.E.Cast();
                            return;
                        }
                    }
                }
                if (Program.ComboMenu.Item("QCombo").GetValue <bool>() && ObjectManager.Player.ManaPercent > Program.ComboMenu.Item("QMinMana").GetValue <Slider>().Value&& Program.Q.IsReady())
                {
                    var target = TargetSelector.GetTarget(Program.Q.Range, TargetSelector.DamageType.Physical);
                    if (target.IsValidTarget())
                    {
                        Program.Q.Cast(target);
                        return;
                    }
                }
            }
            break;

            case MyOrbwalker.OrbwalkingMode.LaneClear:
                //E Laneclear
                if (Program.LaneClearMenu.Item("LaneclearE").GetValue <bool>() &&
                    (ObjectManager.Player.ManaPercent <
                     Program.LaneClearMenu.Item("LaneclearEMinMana").GetValue <Slider>().Value&&
                     MinionManager.GetMinions(1000f).Count(m => m.IsRendKillable()) >
                     Program.LaneClearMenu.Item("LaneclearEMinions").GetValue <Slider>().Value) ||
                    MinionManager.GetMinions(1000f, MinionTypes.All, MinionTeam.Neutral)
                    .Any(m => m.IsRendKillable()))
                {
                    Program.E.Cast();
                }
                //E poke, slow
                if ((from enemy in HeroManager.Enemies.Where(e => Program.E.IsInRange(e))
                     let buff = enemy.GetRendBuff()
                                where Program.E.IsReady() && buff != null && Program.E.IsInRange(enemy)
                                where buff.Count >= Program.ComboMenu.Item("EComboMinStacks").GetValue <Slider>().Value
                                where (enemy.Distance(ObjectManager.Player, true) > Math.Pow(Program.E.Range * 0.80, 2) ||
                                       buff.EndTime - Game.Time < 0.3)
                                select enemy).Any())
                {
                    Program.E.Cast();
                }
                break;

            default:

                //E poke, slow
                if ((from enemy in HeroManager.Enemies.Where(e => Program.E.IsInRange(e))
                     let buff = enemy.GetRendBuff()
                                where Program.E.IsReady() && buff != null && Program.E.IsInRange(enemy)
                                where buff.Count >= Program.ComboMenu.Item("EComboMinStacks").GetValue <Slider>().Value
                                where (enemy.Distance(ObjectManager.Player, true) > Math.Pow(Program.E.Range * 0.80, 2) ||
                                       buff.EndTime - Game.Time < 0.3)
                                select enemy).Any())
                {
                    Program.E.Cast();
                }
                break;
            }
        }
Ejemplo n.º 26
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (GLP800.IsReady() && Config.Item("GLP800").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(GLP800.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("GLP800KS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 200 + Player.FlatMagicDamageMod * 0.35) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        GLP800.Cast(LeagueSharp.Common.Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (Config.Item("GLP800Combo").GetValue <bool>() && Program.Combo)
                    {
                        Program.debug("PRO");
                        GLP800.Cast(LeagueSharp.Common.Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            if (Protobelt.IsReady() && Config.Item("Protobelt").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Protobelt.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("ProtobeltKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.35) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Protobelt.Cast(LeagueSharp.Common.Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (Config.Item("ProtobeltCombo").GetValue <bool>() && Program.Combo)
                    {
                        Program.debug("PRO");
                        Protobelt.Cast(LeagueSharp.Common.Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>() && Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>() && Program.Combo)
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>())
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Ejemplo n.º 27
0
 private void LogicR()
 {
     if (RMissile == null)
     {
         var t = TargetSelector.GetTarget(R.Range + 400, TargetSelector.DamageType.Magical);
         if (t.IsValidTargetLS())
         {
             if (R.GetDamage(t) > t.Health)
             {
                 R.Cast(t, true, true);
             }
             else if (Player.Mana > RMANA + EMANA && E.GetDamage(t) * 2 + R.GetDamage(t) > t.Health)
             {
                 R.Cast(t, true, true);
             }
             if (Player.Mana > RMANA + EMANA + QMANA + WMANA && Program.Combo)
             {
                 R.Cast(t, true, true);
             }
         }
         if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmR", true).GetValue <bool>())
         {
             var allMinions = Cache.GetMinions(Player.ServerPosition, R.Range);
             var farmPos    = R.GetCircularFarmLocation(allMinions, Rwidth);
             if (farmPos.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
             {
                 R.Cast(farmPos.Position);
             }
         }
     }
     else
     {
         if (Program.LaneClear && Config.Item("farmR", true).GetValue <bool>())
         {
             var allMinions = Cache.GetMinions(RMissile.Position, Rwidth);
             var mobs       = Cache.GetMinions(RMissile.Position, Rwidth, MinionTeam.Neutral);
             if (mobs.Count > 0)
             {
                 if (!Config.Item("jungleR", true).GetValue <bool>())
                 {
                     R.Cast();
                 }
             }
             else if (allMinions.Count > 0)
             {
                 if (allMinions.Count < 2 || Player.ManaPercent < Config.Item("Mana", true).GetValue <Slider>().Value)
                 {
                     R.Cast();
                 }
                 else if (Player.ManaPercent < Config.Item("Mana", true).GetValue <Slider>().Value)
                 {
                     R.Cast();
                 }
             }
             else
             {
                 R.Cast();
             }
         }
         else if (!Program.None && (RMissile.Position.CountEnemiesInRange(470) == 0 || Player.Mana < EMANA + QMANA))
         {
             R.Cast();
         }
     }
 }
Ejemplo n.º 28
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("notif", true).GetValue <bool>())
            {
                if (Player.HasBuff("sivirwmarker"))
                {
                    var color    = System.Drawing.Color.Yellow;
                    var buffTime = OktwCommon.GetPassiveTime(Player, "sivirwmarker");
                    if (buffTime < 1)
                    {
                        color = System.Drawing.Color.Red;
                    }
                    drawText2("W:  " + String.Format("{0:0.0}", buffTime), Player.Position, 175, color);
                }
                if (Player.HasBuff("SivirE"))
                {
                    var color    = System.Drawing.Color.Aqua;
                    var buffTime = OktwCommon.GetPassiveTime(Player, "SivirE");
                    if (buffTime < 1)
                    {
                        color = System.Drawing.Color.Red;
                    }
                    drawText2("E:  " + String.Format("{0:0.0}", buffTime), Player.Position, 200, color);
                }
                if (Player.HasBuff("SivirR"))
                {
                    var color    = System.Drawing.Color.GreenYellow;
                    var buffTime = OktwCommon.GetPassiveTime(Player, "SivirR");
                    if (buffTime < 1)
                    {
                        color = System.Drawing.Color.Red;
                    }
                    drawText2("R:  " + String.Format("{0:0.0}", buffTime), Player.Position, 225, color);
                }
            }

            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                }
            }

            if (Config.Item("noti", true).GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (target.IsValidTargetLS())
                {
                    if (Q.GetDamage(target) * 2 > target.Health)
                    {
                        Render.Circle.DrawCircle(target.ServerPosition, 200, System.Drawing.Color.Red);
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.4f, System.Drawing.Color.Red, "Q kill: " + target.ChampionName + " have: " + target.Health + "hp");
                    }
                }
            }
        }
Ejemplo n.º 29
0
        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;
        }
Ejemplo n.º 30
0
 private static void Combo()
 {
     if (IgniteSlot != SpellSlot.Unknown && IgniteSlot.IsReady() && Menu.Item("UseIgniteC").GetValue <bool>())
     {
         var t = TargetSelector.GetTarget(600, TargetSelector.DamageType.True);
         if (t != null)
         {
             if (t.Health < ComboDmg(t))
             {
                 Player.Spellbook.CastSpell(IgniteSlot, t);
             }
         }
     }
     if (Q.IsReady() && Menu.Item("UseQC").GetValue <bool>())
     {
         var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
         if (t != null)
         {
             if (EloBuddy.Player.Instance.IsInAutoAttackRange(t))
             {
                 Q.Cast(t);
             }
             else if (!Menu.Item("UseQinAA").GetValue <bool>())
             {
                 Q.Cast(t);
             }
         }
     }
     if (W.IsReady() && Menu.Item("UseWC").GetValue <bool>())
     {
         var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);
         if (t != null)
         {
             if (t.Path.Count() < 2)
             {
                 if (t.HasBuffOfType(BuffType.Slow))
                 {
                     if (W.GetPrediction(t).Hitchance >= HitChance.VeryHigh)
                     {
                         if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                         {
                             return;
                         }
                     }
                 }
                 if (t.CountEnemiesInRange(250) > 2)
                 {
                     if (W.GetPrediction(t).Hitchance >= HitChance.VeryHigh)
                     {
                         if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                         {
                             return;
                         }
                     }
                 }
                 if (Player.Position.Distance(t.ServerPosition) < Player.Position.Distance(t.Position))
                 {
                     if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                     {
                         return;
                     }
                 }
                 else
                 {
                     if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                     {
                         return;
                     }
                 }
             }
         }
     }
     if (E.IsReady() && Menu.Item("UseEC").GetValue <bool>())
     {
         var hitchance = (HitChance)(Menu.Item("PredEC").GetValue <StringList>().SelectedIndex + 3);
         var t         = TargetSelector.GetTarget(ECastRange + E.Range, TargetSelector.DamageType.Magical);
         if (t != null)
         {
             CastE(t, hitchance);
         }
     }
     if (R.IsReady() && Menu.Item("UseRC").GetValue <bool>() && R.Instance.Name == "ViktorChaosStorm")
     {
         var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
         if (t != null)
         {
             if (t.Health < ComboDmg(t) && t.HealthPercent > 5)
             {
                 LeagueSharp.Common.Utility.DelayAction.Add(100, () => R.Cast(t, false, true));
             }
         }
         foreach (var unit in HeroManager.Enemies.Where(h => h.IsValidTargetLS(R.Range)))
         {
             R.CastIfWillHit(unit, Menu.Item("HitRC").GetValue <Slider>().Value);
         }
     }
 }
Ejemplo n.º 31
0
        private void LogicR()
        {
            var dashPosition = Player.Position.Extend(Game.CursorPos, 450);

            if (Player.Distance(Game.CursorPos) < 450)
            {
                dashPosition = Game.CursorPos;
            }

            if (dashPosition.CountEnemiesInRange(800) > 2)
            {
                return;
            }

            if (Config.Item("autoR2", true).GetValue <bool>())
            {
                if (Player.HasBuff("AhriTumble"))
                {
                    var BuffTime = OktwCommon.GetPassiveTime(Player, "AhriTumble");
                    if (BuffTime < 3)
                    {
                        R.Cast(dashPosition);
                    }

                    var posPred = missileManager.CalculateReturnPos();
                    if (posPred != Vector3.Zero)
                    {
                        if (missileManager.Missile.SData.Name == "AhriOrbReturn" && Player.Distance(posPred) > 200)
                        {
                            R.Cast(posPred);
                            Program.debug("AIMMMM");
                        }
                    }
                }
            }

            if (Config.Item("autoR", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(450 + R.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    var comboDmg = R.GetDamage(t) * 3;
                    if (Q.IsReady())
                    {
                        comboDmg += Q.GetDamage(t) * 2;
                    }
                    if (W.IsReady())
                    {
                        comboDmg += W.GetDamage(t) + W.GetDamage(t, 1);
                    }
                    if (t.CountAlliesInRange(600) < 2 && comboDmg > t.Health && t.Position.Distance(Game.CursorPos) < t.Position.Distance(Player.Position) && dashPosition.Distance(t.ServerPosition) < 500)
                    {
                        R.Cast(dashPosition);
                    }

                    foreach (var target in HeroManager.Enemies.Where(target => target.IsMelee && target.IsValidTarget(300)))
                    {
                        R.Cast(dashPosition);
                    }
                }
            }
        }
Ejemplo n.º 32
0
        private static void OnGameLoad(EventArgs args)
        {
            if (Player.ChampionName != "Viktor")
            {
                return;
            }
            Utils.ClearConsole();

            #region Spells
            Q = new Spell(SpellSlot.Q, 700);
            W = new Spell(SpellSlot.W, 700);
            E = new Spell(SpellSlot.E, 700);
            R = new Spell(SpellSlot.R, 700);

            Q.SetTargetted(0.25f, 2000);
            W.SetSkillshot(0.25f, 300, float.MaxValue, false, SkillshotType.SkillshotCircle);
            E.SetSkillshot(0.0f, 90, 1200, false, SkillshotType.SkillshotLine);
            R.SetSkillshot(0.25f, 250, float.MaxValue, false, SkillshotType.SkillshotCircle);

            EELO = new EloBuddy.SDK.Spell.Skillshot(SpellSlot.E, 525, EloBuddy.SDK.Enumerations.SkillShotType.Linear, 250, int.MaxValue, 100);
            EELO.AllowedCollisionCount = int.MaxValue;
            #endregion

            #region Menu
            Menu = new Menu("Apollo's Viktor", "Viktor", true);

            TargetSelector.AddToMenu(Menu.SubMenu("Target Selector"));
            Orbwalker = new Orbwalking.Orbwalker(Menu.AddSubMenu(new Menu("Orbwalking", "Orbwalking")));

            Menu.SubMenu("Combo").AddItem(new MenuItem("UseQC", "Use Q").SetValue(true));
            Menu.SubMenu("Combo").AddItem(new MenuItem("UseWC", "Use W").SetValue(true));
            Menu.SubMenu("Combo").AddItem(new MenuItem("UseEC", "Use E").SetValue(true));
            Menu.SubMenu("Combo").AddItem(new MenuItem("UseRC", "Use R").SetValue(true));
            Menu.SubMenu("Combo").AddItem(new MenuItem("kek", ""));
            Menu.SubMenu("Combo").AddItem(new MenuItem("PredEC", "Minimum HitChance E").SetValue(new StringList((new[] { "Low", "Medium", "High", "Very High" }), 2)));
            Menu.SubMenu("Combo").AddItem(new MenuItem("HitRC", "Minimum Hit R").SetValue(new Slider(3, 1, 5)));
            Menu.SubMenu("Combo").AddItem(new MenuItem("UseIgniteC", "Use Ignite").SetValue(true));
            Menu.SubMenu("Combo").AddItem(new MenuItem("KeyC", "Combo (" + Utils.KeyToText(Menu.Item("Orbwalk").GetValue <KeyBind>().Key) + ")", true)).DontSave();

            Menu.SubMenu("Harass").AddItem(new MenuItem("UseQH", "Use Q").SetValue(true));
            Menu.SubMenu("Harass").AddItem(new MenuItem("UseEH", "Use E").SetValue(true));
            Menu.SubMenu("Harass").AddItem(new MenuItem("kek", ""));
            Menu.SubMenu("Harass").AddItem(new MenuItem("PredEH", "Minimum HitChance E").SetValue(new StringList((new[] { "Low", "Medium", "High", "Very High" }), 3)));
            Menu.SubMenu("Harass").AddItem(new MenuItem("ManaH", "Minimum Mana%").SetValue(new Slider(30)));
            Menu.SubMenu("Harass").AddItem(new MenuItem("KeyH", "Harass (" + Utils.KeyToText(Menu.Item("Farm").GetValue <KeyBind>().Key) + ")", true)).DontSave();

            Menu.SubMenu("LaneClear").AddItem(new MenuItem("UseQL", "Use Q").SetValue(true));
            Menu.SubMenu("LaneClear").AddItem(new MenuItem("UseEL", "Use E").SetValue(true));
            Menu.SubMenu("LaneClear").AddItem(new MenuItem("kek", ""));
            Menu.SubMenu("LaneClear").AddItem(new MenuItem("HitEL", "Minimum Hit E").SetValue(new Slider(3, 1, 10)));
            Menu.SubMenu("LaneClear").AddItem(new MenuItem("ManaL", "Minimum Mana%").SetValue(new Slider(30)));
            Menu.SubMenu("LaneClear").AddItem(new MenuItem("KeyL", "LaneClear (" + Utils.KeyToText(Menu.Item("LaneClear").GetValue <KeyBind>().Key) + ")", true)).DontSave();

            Menu.SubMenu("Misc").AddItem(new MenuItem("UseQinAA", "Only use Q in AA range").SetValue(false));
            Menu.SubMenu("Misc").AddItem(new MenuItem("AutoW", "Auto W").SetValue(true));
            Menu.SubMenu("Misc").AddItem(new MenuItem("AutoFollowR", "Auto Follow R").SetValue(true));
            Menu.SubMenu("Misc").AddItem(new MenuItem("KsE", "Use E for KS").SetValue(false));
            Menu.SubMenu("Misc").AddItem(new MenuItem("GapcloserW", "Use W as AntiGapcloser").SetValue(true));
            Menu.SubMenu("Misc").AddItem(new MenuItem("InterrupterW", "Use W as Interrupter").SetValue(true));
            Menu.SubMenu("Misc").AddItem(new MenuItem("InterrupterR", "Use R as Interrupter").SetValue(false));

            Menu.SubMenu("Drawings").AddItem(new MenuItem("DrawQ", "Q Range").SetValue(new Circle(true, Color.AntiqueWhite)));
            Menu.SubMenu("Drawings").AddItem(new MenuItem("DrawW", "W Range").SetValue(new Circle(false, Color.AntiqueWhite)));
            Menu.SubMenu("Drawings").AddItem(new MenuItem("DrawE", "E Range").SetValue(new Circle(true, Color.AntiqueWhite)));
            Menu.SubMenu("Drawings").AddItem(new MenuItem("DrawR", "R Range").SetValue(new Circle(false, Color.AntiqueWhite)));
            Menu.SubMenu("Drawings").AddItem(new MenuItem("CDDraw", "Draw CD").SetValue(new Circle(false, Color.DarkRed)));
            MenuItem drawComboDamageMenu = new MenuItem("DmgDraw", "Draw Combo Damage", true).SetValue(true);
            MenuItem drawFill            = new MenuItem("DmgFillDraw", "Draw Combo Damage Fill", true).SetValue(new Circle(true, Color.FromArgb(90, 255, 169, 4)));
            Menu.SubMenu("Drawings").AddItem(drawComboDamageMenu);
            Menu.SubMenu("Drawings").AddItem(drawFill);
            DamageIndicator.DamageToUnit      = ComboDmg;
            DamageIndicator.Enabled           = drawComboDamageMenu.GetValue <bool>();
            DamageIndicator.Fill              = drawFill.GetValue <Circle>().Active;
            DamageIndicator.FillColor         = drawFill.GetValue <Circle>().Color;
            drawComboDamageMenu.ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                DamageIndicator.Enabled = eventArgs.GetNewValue <bool>();
            };
            drawFill.ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                DamageIndicator.Fill      = eventArgs.GetNewValue <Circle>().Active;
                DamageIndicator.FillColor = eventArgs.GetNewValue <Circle>().Color;
            };

            Menu.AddToMainMenu();
            #endregion

//            UpdateChecker.Init("Apollo16", "Viktor");
            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += OnDraw;
            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;
            AntiGapcloser.OnEnemyGapcloser     += OnEnemyGapcloser;
            ShowNotification("Apollo's " + ObjectManager.Player.ChampionName + " Loaded", NotificationColor, 7000);
        }
Ejemplo n.º 33
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("noti", true).GetValue <bool>() && R.IsReady())
            {
                var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (t.IsValidTargetLS())
                {
                    var rDamage = R.GetDamage(t) + (W.GetDamage(t) * 10);
                    if (rDamage * 8 > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.GreenYellow, "8 x R wave can kill: " + t.ChampionName + " have: " + t.Health + "hp");
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.GreenYellow);
                    }
                    else if (rDamage * 5 > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Orange, "5 x R wave can kill: " + t.ChampionName + " have: " + t.Health + "hp");
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.Orange);
                    }
                    else if (rDamage * 3 > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Yellow, "3 x R wave can kill: " + t.ChampionName + " have: " + t.Health + "hp");
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.Yellow);
                    }
                    else if (rDamage > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Red, "1 x R wave can kill: " + t.ChampionName + " have: " + t.Health + "hp");
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.Red);
                    }
                }
            }

            if (Config.Item("QRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (W.IsReady())
                    {
                        Render.Circle.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                }
            }
            if (Config.Item("ERange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (E.IsReady())
                    {
                        Render.Circle.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Orange, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Orange, 1);
                }
            }
            if (Config.Item("RRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (R.IsReady())
                    {
                        Render.Circle.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1);
                }
            }
        }
Ejemplo n.º 34
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                var wDmg = GetWdmg(t);
                if (wDmg > t.Health - OktwCommon.GetIncomingDamage(t))
                {
                    Program.CastSpell(W, t);
                }

                if (Config.Item("autoWcombo", true).GetValue <bool>() && !Program.Combo)
                {
                    return;
                }

                if (Player.CountEnemiesInRange(400) > 1 || Player.CountEnemiesInRange(250) > 0)
                {
                    return;
                }

                if (t.HasBuff("jhinespotteddebuff") || !Config.Item("Wmark", true).GetValue <bool>())
                {
                    if (Player.Distance(t) < Config.Item("MaxRangeW", true).GetValue <Slider>().Value)
                    {
                        if (Program.Combo && Player.Mana > RMANA + WMANA)
                        {
                            Program.CastSpell(W, t);
                        }
                        else if (Program.Farm && Config.Item("harrasW", true).GetValue <bool>() && Config.Item("harras" + t.ChampionName).GetValue <bool>() &&
                                 Player.Mana > RMANA + WMANA + QMANA + WMANA && OktwCommon.CanHarras())
                        {
                            Program.CastSpell(W, t);
                        }
                    }
                }

                if (!Program.None && Player.Mana > RMANA + WMANA)
                {
                    if (Config.Item("Waoe", true).GetValue <bool>())
                    {
                        W.CastIfWillHit(t, 2);
                    }

                    if (Config.Item("autoWcc", true).GetValue <bool>())
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            Program.CastSpell(W, enemy);
                        }
                    }
                    if (Config.Item("Wmarkall", true).GetValue <bool>())
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && enemy.HasBuff("jhinespotteddebuff")))
                        {
                            Program.CastSpell(W, enemy);
                        }
                    }
                }
            }
            if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmW", true).GetValue <bool>() && Player.Mana > RMANA + WMANA)
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, W.Range);
                var farmPosition = W.GetLineFarmLocation(minionList, W.Width);

                if (farmPosition.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    W.Cast(farmPosition.Position);
                }
            }
        }
Ejemplo n.º 35
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                }
            }
            if (Config.Item("wRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (W.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
                }
            }
            if (Config.Item("eRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (E.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
                }
            }
            if (Config.Item("rRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (R.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
                }
            }
            if (R.IsReady() && Config.Item("noti", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

                if (t.IsValidTarget() && OktwCommon.GetKsDamage(t, R) > t.Health)
                {
                    Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Red, "Ult can kill: " + t.ChampionName + " Heal - damage =  " + (t.Health - OktwCommon.GetKsDamage(t, R)) + " hp");
                }
            }
        }
Ejemplo n.º 36
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (Player.HasBuff("Recall"))
            {
                return;
            }

            HaveStun = Player.HasBuff("pyromania_particle");

            SetMana();

            if (R.IsReady() && (Program.LagFree(1) || Program.LagFree(3)) && !HaveTibers)
            {
                var realRange = R.Range;

                if (flash.IsReady())
                {
                    realRange = FR.Range;
                }

                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(realRange) && OktwCommon.ValidUlt(enemy)))
                {
                    if (enemy.IsValidTarget(R.Range))
                    {
                        int Rmode = Config.Item("UM" + enemy.ChampionName, true).GetValue <StringList>().SelectedIndex;

                        if (Rmode == 2)
                        {
                            continue;
                        }

                        var poutput  = R.GetPrediction(enemy, true);
                        var aoeCount = poutput.AoeTargetsHitCount;

                        if (Rmode == 1)
                        {
                            R.Cast(poutput.CastPosition);
                        }

                        if (Rmode == 3 && HaveStun)
                        {
                            R.Cast(poutput.CastPosition);
                        }

                        if (aoeCount >= Config.Item("rCount", true).GetValue <Slider>().Value&& Config.Item("rCount", true).GetValue <Slider>().Value > 0)
                        {
                            R.Cast(poutput.CastPosition);
                        }
                        else if (Program.Combo && HaveStun && Config.Item("autoRcombo", true).GetValue <bool>())
                        {
                            R.Cast(poutput.CastPosition);
                        }
                        else if (Config.Item("autoRks", true).GetValue <bool>())
                        {
                            var comboDmg = OktwCommon.GetKsDamage(enemy, R);

                            if (W.IsReady() && RMANA + WMANA < Player.Mana)
                            {
                                comboDmg += W.GetDamage(enemy);
                            }

                            if (Q.IsReady() && RMANA + WMANA + QMANA < Player.Mana)
                            {
                                comboDmg += Q.GetDamage(enemy);
                            }

                            if (enemy.Health < comboDmg)
                            {
                                R.Cast(poutput.CastPosition);
                            }
                        }
                    }
                    else if (HaveStun && flash.IsReady())
                    {
                        var poutputFlas   = FR.GetPrediction(enemy, true);
                        var aoeCountFlash = poutputFlas.AoeTargetsHitCount;
                        if (HaveStun && aoeCountFlash >= Config.Item("rCountFlash", true).GetValue <Slider>().Value&& Config.Item("rCountFlash", true).GetValue <Slider>().Value > 0)
                        {
                            Player.Spellbook.CastSpell(flash, poutputFlas.CastPosition);
                            R.Cast(poutputFlas.CastPosition);
                        }
                    }
                }
            }

            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && Program.LagFree(2))
            {
                if (Q.IsReady() && Config.Item("autoQ", true).GetValue <bool>())
                {
                    if (Program.Combo && RMANA + WMANA < Player.Mana)
                    {
                        Q.Cast(t);
                    }
                    else if (Program.Farm && RMANA + WMANA + QMANA < Player.Mana && Config.Item("harrasQ", true).GetValue <bool>())
                    {
                        Q.Cast(t);
                    }
                    else
                    {
                        var qDmg = OktwCommon.GetKsDamage(t, Q);
                        var wDmg = W.GetDamage(t);
                        if (qDmg > t.Health)
                        {
                            Q.Cast(t);
                        }
                        else if (qDmg + wDmg > t.Health && Player.Mana > QMANA + WMANA)
                        {
                            Q.Cast(t);
                        }
                    }
                }
                if (W.IsReady() && Config.Item("autoW", true).GetValue <bool>() && t.IsValidTarget(W.Range))
                {
                    var poutput  = W.GetPrediction(t, true);
                    var aoeCount = poutput.AoeTargetsHitCount;

                    if (Program.Combo && RMANA + WMANA < Player.Mana)
                    {
                        W.Cast(poutput.CastPosition);
                    }
                    else if (Program.Farm && RMANA + WMANA + QMANA < Player.Mana && Config.Item("harrasW", true).GetValue <bool>())
                    {
                        W.Cast(poutput.CastPosition);
                    }
                    else
                    {
                        var wDmg = OktwCommon.GetKsDamage(t, W);
                        var qDmg = Q.GetDamage(t);
                        if (wDmg > t.Health)
                        {
                            W.Cast(poutput.CastPosition);
                        }
                        else if (qDmg + wDmg > t.Health && Player.Mana > QMANA + WMANA)
                        {
                            W.Cast(poutput.CastPosition);
                        }
                    }
                }
            }
            else if (Q.IsReady() || W.IsReady())
            {
                if (Config.Item("farmQ", true).GetValue <bool>())
                {
                    if (Config.Item("supportMode", true).GetValue <bool>())
                    {
                        if (Program.LaneClear && Player.Mana > RMANA + QMANA)
                        {
                            farm();
                        }
                    }
                    else
                    {
                        if ((!HaveStun || Program.LaneClear) && Program.Farm)
                        {
                            farm();
                        }
                    }
                }
            }

            if (Program.LagFree(3))
            {
                if (!HaveStun)
                {
                    if (E.IsReady() && !Program.LaneClear && Config.Item("autoE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + QMANA + WMANA)
                    {
                        E.Cast();
                    }
                    else if (W.IsReady() && Player.InFountain())
                    {
                        W.Cast(Player.Position);
                    }
                }
                if (R.IsReady())
                {
                    if (Config.Item("tibers", true).GetValue <bool>() && HaveTibers && Tibbers != null && Tibbers.IsValid)
                    {
                        var enemy = HeroManager.Enemies.Where(x => x.IsValidTarget() && Tibbers.Distance(x.Position) < 1000 && !x.UnderTurret(true)).OrderBy(x => x.Distance(Tibbers)).FirstOrDefault();
                        if (enemy != null)
                        {
                            if (Tibbers.Distance(enemy.Position) > 200)
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.MovePet, enemy);
                            }
                            else
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, enemy);
                            }
                        }
                        else
                        {
                            var annieTarget = Orbwalker.GetTarget() as Obj_AI_Base;
                            if (annieTarget != null)
                            {
                                if (Tibbers.Distance(annieTarget.Position) > 200)
                                {
                                    EloBuddy.Player.IssueOrder(GameObjectOrder.MovePet, annieTarget);
                                }
                                else
                                {
                                    EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, annieTarget);
                                }
                            }
                            else if (Tibbers.UnderTurret(true))
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.MovePet, Player);
                            }
                        }
                    }
                    else
                    {
                        Tibbers = null;
                    }
                }
            }
        }
Ejemplo n.º 37
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range - 50, TargetSelector.DamageType.Physical);

            if (t.IsValidTargetLS())
            {
                var step = t.Distance(Player) / 20;
                for (var i = 0; i < 20; i++)
                {
                    var p = Player.Position.Extend(t.Position, step * i);
                    if (p.IsWall())
                    {
                        return;
                    }
                }

                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("haras" + t.ChampionName).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + QMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else
                {
                    var qDmg = OktwCommon.GetKsDamage(t, Q);
                    var rDmg = R.GetDamage(t);
                    if (qDmg > t.Health)
                    {
                        Q.Cast(t, true);
                        OverKill = Game.Time;
                        Program.debug("Q ks");
                    }
                    else if (qDmg + rDmg > t.Health && R.IsReady() && Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                        if (Config.Item("fastR", true).GetValue <bool>() && rDmg < t.Health)
                        {
                            Program.CastSpell(R, t);
                        }
                        Program.debug("Q + R ks");
                    }
                }

                if (!Program.None && Player.Mana > RMANA + QMANA + EMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(Q.Range - 50) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA)
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range - 50);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > 2)
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Ejemplo n.º 38
0
 public KalistaQ(SpellSlot slot, float range, TargetSelector.DamageType damageType)
     : base(slot, range, damageType)
 {
 }
Ejemplo n.º 39
0
        internal static void Game_OnUpdate(EventArgs args)
        {
            Target = TargetSelector.GetTarget(KL.Spells["Javelin"].Range, TargetSelector.DamageType.Magical);

            #region Active Modes

            if (Root.Item("usecombo2").GetValue <KeyBind>().Active)
            {
                Combo2();
            }

            if (Root.Item("usecombo").GetValue <KeyBind>().Active)
            {
                Combo();
            }

            if (Root.Item("useharass").GetValue <KeyBind>().Active)
            {
                Harass();
            }

            if (Root.Item("usefarm").GetValue <KeyBind>().Active)
            {
                Clear();
            }

            if (Root.Item("flee").GetValue <KeyBind>().Active)
            {
                Flee();
            }

            #endregion

            #region Auto Heal

            // auto heal on ally hero
            if (KL.CanUse(KL.Spells["Primalsurge"], true, "on"))
            {
                if (!Player.Spellbook.IsChanneling && !Player.IsRecalling())
                {
                    if (Root.Item("flee").GetValue <KeyBind>().Active&& KL.CatForm())
                    {
                        return;
                    }

                    foreach (
                        var hero in
                        Allies().Where(
                            h => Root.Item("xx" + h.ChampionName).GetValue <bool>() &&
                            h.IsValidTargetLS(KL.Spells["Primalsurge"].Range, false) &&
                            h.Health / h.MaxHealth * 100 <
                            Root.Item("zz" + h.ChampionName).GetValue <Slider>().Value))
                    {
                        if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None ||
                            hero.Health / hero.MaxHealth * 100 <= 20 || !KL.CatForm())
                        {
                            if (Player.Mana / Player.MaxMana * 100 < Root.Item("ndhemana").GetValue <Slider>().Value&&
                                !(hero.Health / hero.MaxHealth * 100 <= 20))
                            {
                                return;
                            }

                            if (KL.CatForm() == false)
                            {
                                KL.Spells["Primalsurge"].CastOnUnit(hero);
                            }

                            if (KL.CatForm() && Root.Item("ndhesw").GetValue <bool>() &&
                                KL.SpellTimer["Primalsurge"].IsReady() &&
                                KL.Spells["Aspect"].IsReady())
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }
            }

            #endregion
        }
Ejemplo n.º 40
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                }
            }

            if (Config.Item("wRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (W.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
                }
            }

            if (Config.Item("eRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (E.IsReady())
                    {
                        LeagueSharp.Common.Utility.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
                    }
                }
                else
                {
                    LeagueSharp.Common.Utility.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
                }
            }

            if (Config.Item("noti", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget())
                {
                    var comboDmg = 0f;
                    if (R.IsReady())
                    {
                        comboDmg += R.GetDamage(t) * 3;
                    }
                    if (Q.IsReady())
                    {
                        comboDmg += Q.GetDamage(t) * 2;
                    }
                    if (W.IsReady())
                    {
                        comboDmg += W.GetDamage(t) + W.GetDamage(t, 1);
                    }
                    if (comboDmg > t.Health)
                    {
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.5f, System.Drawing.Color.Red, "COMBO KILL " + t.ChampionName + " have: " + t.Health + "hp");
                        drawLine(t.Position, Player.Position, 10, System.Drawing.Color.Yellow);
                    }
                }
            }
        }
Ejemplo n.º 41
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))));
            Combo.AddItem((new MenuItem("Combo.MinRHealth", "Min Enemy Health To Ult them").SetValue(new Slider(25, 1, 100))));
            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 E2", 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))).Permashow();
            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);

            var dmgAfterE = new MenuItem("DrawComboDamage", "Draw combo damage").SetValue(true);
            var drawFill  =
                new MenuItem("DrawColour", "Fill colour", true).SetValue(
                    new Circle(true, Color.Goldenrod));

            Drawings.AddItem(drawFill);
            Drawings.AddItem(dmgAfterE);

            DamageIndicator.DamageToUnit = Lissandra.GetAvailableDamage;
            DamageIndicator.Enabled      = dmgAfterE.GetValue <bool>();
            DamageIndicator.Fill         = drawFill.GetValue <Circle>().Active;
            DamageIndicator.FillColor    = drawFill.GetValue <Circle>().Color;

            dmgAfterE.ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                DamageIndicator.Enabled = eventArgs.GetNewValue <bool>();
            };

            drawFill.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                DamageIndicator.Fill      = eventArgs.GetNewValue <Circle>().Active;
                DamageIndicator.FillColor = eventArgs.GetNewValue <Circle>().Color;
            };

            Drawings.AddItem(new MenuItem("Drawing.DrawQ", "Draw Q").SetValue(new Circle(false, Color.White)));
            Drawings.AddItem(new MenuItem("Drawing.DrawW", "Draw W").SetValue(new Circle(false, Color.Green)));
            Drawings.AddItem(new MenuItem("Drawing.DrawE", "Draw E").SetValue(new Circle(false, Color.RoyalBlue)));
            Drawings.AddItem(new MenuItem("Drawing.DrawR", "Draw R").SetValue(new Circle(false, Color.Red)));

            Config.AddSubMenu(Drawings);

            return(Config);
        }
Ejemplo n.º 42
0
        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;
        }
Ejemplo n.º 43
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;
        }
Ejemplo n.º 44
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;
        }
Ejemplo n.º 45
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);
        }
Ejemplo n.º 46
0
        private static void onLoad(EventArgs args)
        {
            if (ObjectManager.Player.ChampionName != CharName)
            {
                return;
            }

            Yasuo.setSkillShots();
            Yasuo.setDashes();
            Yasuo.point1 = Yasuo.Player.Position;
            Chat.Print("YasuoSharpV2 by DeTuKs");

            Console.WriteLine("YasuoSharpV2 by DeTuKs");

            try
            {
                Config = new Menu("YasuoSharp", "Yasuo", true);
                //Orbwalker
                Config.AddSubMenu(new Menu("Orbwalker", "Orbwalker"));
                Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalker"));
                //TS
                var TargetSelectorMenu = new Menu("Target Selector", "Target Selector");
                TargetSelector.AddToMenu(TargetSelectorMenu);
                Config.AddSubMenu(TargetSelectorMenu);
                //Combo
                Config.AddSubMenu(new Menu("Combo Sharp", "combo"));
                Config.SubMenu("combo").AddItem(new MenuItem("comboItems", "Use Items")).SetValue(true);
                //SmartR
                Config.SubMenu("combo").AddItem(new MenuItem("smartR", "Smart R")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("useRHit", "Use R if hit")).SetValue(new Slider(3, 5, 1));
                Config.SubMenu("combo").AddItem(new MenuItem("useRHitTime", "Use R when they land")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("useEWall", "use E to safe")).SetValue(true);
                //Flee away
                Config.SubMenu("combo").AddItem(new MenuItem("flee", "E away")).SetValue(new KeyBind('Z', KeyBindType.Press, false));
                Config.SubMenu("combo").AddItem(new MenuItem("fleeStack", "Stack Q while flee")).SetValue(true);


                //LastHit
                Config.AddSubMenu(new Menu("LastHit Sharp", "lHit"));
                Config.SubMenu("lHit").AddItem(new MenuItem("useQlh", "Use Q")).SetValue(true);
                Config.SubMenu("lHit").AddItem(new MenuItem("useElh", "Use E")).SetValue(true);
                //LaneClear
                Config.AddSubMenu(new Menu("LaneClear Sharp", "lClear"));
                Config.SubMenu("lClear").AddItem(new MenuItem("useQlc", "Use Q")).SetValue(true);
                Config.SubMenu("lClear").AddItem(new MenuItem("useEmpQHit", "Emp Q Min hit")).SetValue(new Slider(3, 6, 1));
                Config.SubMenu("lClear").AddItem(new MenuItem("useElc", "Use E")).SetValue(true);
                //Harass
                Config.AddSubMenu(new Menu("Harass Sharp", "harass"));
                Config.SubMenu("harass").AddItem(new MenuItem("harassTower", "Harass under tower")).SetValue(false);
                Config.SubMenu("harass").AddItem(new MenuItem("harassOn", "Harass enemies")).SetValue(true);
                Config.SubMenu("harass").AddItem(new MenuItem("harQ3Only", "Use only Q3")).SetValue(false);
                //Drawings
                Config.AddSubMenu(new Menu("Drawing Sharp", "drawing"));
                Config.SubMenu("drawing").AddItem(new MenuItem("disDraw", "Dissabel drawing")).SetValue(false);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawQ", "Draw Q range")).SetValue(true);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawE", "Draw E range")).SetValue(true);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawR", "Draw R range")).SetValue(true);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawWJ", "Draw Wall Jumps")).SetValue(true);

                //Extra
                Config.AddSubMenu(new Menu("Extra Sharp", "extra"));
                Config.SubMenu("extra").AddItem(new MenuItem("djTur", "Dont Jump turrets")).SetValue(true);
                Config.SubMenu("extra").AddItem(new MenuItem("autoLevel", "Auto Level")).SetValue(true);
                Config.SubMenu("extra").AddItem(new MenuItem("levUpSeq", "")).SetValue(new StringList(new string[2] {
                    "Q E W Q start", "Q E Q W start"
                }));

                //LastHit
                Config.AddSubMenu(new Menu("Wall Usage", "aShots"));
                //SmartW
                Config.SubMenu("aShots").AddItem(new MenuItem("smartW", "Smart WW")).SetValue(true);
                Config.SubMenu("aShots").AddItem(new MenuItem("smartEDogue", "E use dogue")).SetValue(true);
                Config.SubMenu("aShots").AddItem(new MenuItem("wwDanger", "WW only dangerous")).SetValue(false);
                Config.SubMenu("aShots").AddItem(new MenuItem("wwDmg", "WW if does proc HP")).SetValue(new Slider(0, 100, 1));
                skillShotMenu = getSkilshotMenu();
                Config.SubMenu("aShots").AddSubMenu(skillShotMenu);

                Config.SubMenu("aShots").AddSubMenu(TargetedSpellManager.setUp());
                //Streaming
                Config.AddSubMenu(new Menu("Stream Sharp", "stream"));
                Config.SubMenu("stream").AddItem(new MenuItem("streamMouse", "SimulateMouse")).SetValue(false);

                //Debug
                //   Config.AddSubMenu(new Menu("Debug", "debug"));
                //   Config.SubMenu("debug").AddItem(new MenuItem("WWLast", "Print last ww blocked")).SetValue(new KeyBind('T', KeyBindType.Press, false));
                //   Config.SubMenu("debug").AddItem(new MenuItem("saveDash", "saveDashd")).SetValue(new KeyBind('O', KeyBindType.Press, false));
                //   Config.SubMenu("debug").AddItem(new MenuItem("exportDash", "export dashes")).SetValue(new KeyBind('P', KeyBindType.Press, false));
                //   Config.SubMenu("debug").AddItem(new MenuItem("deleteDash", "deleteLastDash")).SetValue(new KeyBind('I', KeyBindType.Press, false));

                Config.AddToMainMenu();

                TargetSpellDetector.init();

                Drawing.OnDraw += onDraw;
                Game.OnUpdate  += OnGameUpdate;

                GameObject.OnCreate               += OnCreateObject;
                GameObject.OnDelete               += OnDeleteObject;
                Obj_AI_Base.OnProcessSpellCast    += OnProcessSpell;
                Spellbook.OnStopCast              += onStopCast;
                Obj_AI_Base.OnFloatPropertyChange += OnFloatPropertyChange;
//                    CustomEvents.Unit.OnLevelUp += OnLevelUp;

                Game.OnSendPacket    += OnGameSendPacket;
                Game.OnProcessPacket += OnGameProcessPacket;

                SkillshotDetector.OnDetectSkillshot += OnDetectSkillshot;
                SkillshotDetector.OnDeleteMissile   += OnDeleteMissile;


                Orbwalking.BeforeAttack += beforeAttack;
//                    SmoothMouse.start();
            }
            catch
            {
                Chat.Print("Oops. Something went wrong with Yasuo - Sharpino");
            }
        }
Ejemplo n.º 47
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));
        }
Ejemplo n.º 48
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;
        }
Ejemplo n.º 49
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;
 }
Ejemplo n.º 50
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (Config.Item("disableBlock", true).GetValue <KeyBind>().Active)
            {
                LeagueSharp.Common.Orbwalking.Attack = true;
                LeagueSharp.Common.Orbwalking.Move   = true;
                OktwCommon.blockSpells = false;
                OktwCommon.blockAttack = false;
                OktwCommon.blockMove   = false;
                return;
            }
            else if (Player.IsChannelingImportantSpell() || Game.Time - RCastTime < 0.3)
            {
                if (Config.Item("forceBlockMove", true).GetValue <bool>())
                {
                    OktwCommon.blockMove   = true;
                    OktwCommon.blockAttack = true;
                    OktwCommon.blockSpells = true;
                }

                LeagueSharp.Common.Orbwalking.Attack = false;
                LeagueSharp.Common.Orbwalking.Move   = false;

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

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

                AIHeroClient t2 = null;

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

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

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

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

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

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

            if (Program.LagFree(4) && !Player.Spellbook.IsAutoAttacking && R.IsReady() && Config.Item("autoR", true).GetValue <bool>())
            {
                LogicR();
            }
        }
Ejemplo n.º 51
0
        private void LogicE()
        {
            if (Config.Item("autoE", true).GetValue <bool>())
            {
                var trapPos = OktwCommon.GetTrapPos(E.Range);
                if (!trapPos.IsZero)
                {
                    E.Cast(trapPos);
                }

                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && !OktwCommon.CanMove(enemy)))
                {
                    E.Cast(enemy);
                }
            }

            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget() && Config.Item("EmodeCombo", true).GetValue <StringList>().SelectedIndex != 2)
            {
                if (Program.Combo && !Player.Spellbook.IsAutoAttacking)
                {
                    if (Config.Item("EmodeCombo", true).GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (E.GetPrediction(t).CastPosition.Distance(t.Position) > 100)
                        {
                            if (Player.Position.Distance(t.ServerPosition) > Player.Position.Distance(t.Position))
                            {
                                if (t.Position.Distance(Player.ServerPosition) < t.Position.Distance(Player.Position))
                                {
                                    Program.CastSpell(E, t);
                                }
                            }
                            else
                            {
                                if (t.Position.Distance(Player.ServerPosition) > t.Position.Distance(Player.Position))
                                {
                                    Program.CastSpell(E, t);
                                }
                            }
                        }
                    }
                    else
                    {
                        Program.CastSpell(E, t);
                    }
                }

                E.CastIfWillHit(t, Config.Item("Eaoe", true).GetValue <Slider>().Value);
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmE", true).GetValue <bool>())
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, E.Range);
                var farmPosition = E.GetCircularFarmLocation(minionList, E.Width);

                if (farmPosition.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    E.Cast(farmPosition.Position);
                }
            }
        }
Ejemplo n.º 52
0
        protected override void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            var myRange = Orbwalking.GetRealAutoAttackRange(null);

            if (unit != Player)
            {
                return;
            }
            var possibleHeroTarget = TargetSelector.GetTarget(myRange,
                                                              TargetSelector.DamageType.Physical);

            if (target is Obj_AI_Minion && target.Health > Player.GetAutoAttackDamage((Obj_AI_Minion)target) && possibleHeroTarget != null)
            {
                Orbwalker.ForceTarget(possibleHeroTarget);
                return;
            }

            if (Q.IsReady() && Player.CountEnemiesInRange(1400) == 0 && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && !Orbwalker.ShouldWait() && Player.ManaPercent > 70 && LaneClearMenu.Item("QFarm").GetValue <bool>() && MinionManager.GetMinions(Game.CursorPos, myRange).Any())
            {
                if (Game.CursorPos.UnderTurret(Player.Team == GameObjectTeam.Order
                                  ? GameObjectTeam.Chaos
                                  : GameObjectTeam.Order) && !Player.UnderTurret(true))
                {
                    return;
                }
                Q.Cast(Game.CursorPos);
            }

            var AArange = myRange + 15;

            if (target == null)
            {
                return;
            }
            var tg         = (Obj_AI_Hero)target;
            var realTarget = Utils.TargetSelector.GetTarget(AArange, TargetSelector.DamageType.Physical);

            if (target is Obj_AI_Hero && tg != realTarget && realTarget.IsValidTarget(AArange))
            {
                Orbwalker.ForceTarget(realTarget);
            }



            if (E.IsReady() && tg.VayneWStacks() == 2 && tg.Health < Player.GetSpellDamage(tg, SpellSlot.W))
            {
                E.Cast(tg);
            }

            if (!Q.IsReady())
            {
                if (_tumbleToKillSecondMinion)
                {
                    _tumbleToKillSecondMinion = false;
                }
                return;
            }

            if (Player.ManaPercent > 70 && target is Obj_AI_Hero && unit.IsMe && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                var t = (Obj_AI_Hero)target;
                if (Player.CountAlliesInRange(1000) >= Player.CountEnemiesInRange(1000) && t.Distance(Player) < 850)
                {
                    if (t.IsKillable())
                    {
                        Orbwalker.ForceTarget(t);
                    }
                    if (Player.CountEnemiesInRange(1000) <= Player.CountAlliesInRange(1000) &&
                        Player.CountEnemiesInRange(1000) <= 2 && Player.CountEnemiesInRange(1000) != 0)
                    {
                        var tumblePos = Player.ServerPosition.Extend(t.ServerPosition,
                                                                     Player.Distance(t.ServerPosition) - myRange + 15);
                        if (tumblePos.UnderTurret(Player.Team == GameObjectTeam.Order
                                ? GameObjectTeam.Chaos
                                : GameObjectTeam.Order) && !Player.UnderTurret(true))
                        {
                            return;
                        }
                        if (!tumblePos.IsShroom() && t.Distance(Player) > myRange && t.CountEnemiesInRange(myRange) == 0 &&
                            Player.Level >= t.Level)
                        {
                            if (tumblePos.CountEnemiesInRange(300) < 2 && Q.IsReady())
                            {
                                Q.Cast(tumblePos);
                            }
                            Orbwalker.ForceTarget(t);
                        }
                    }
                }
            }

            if (ComboMenu.Item("QChecks").GetValue <bool>() && Game.CursorPos.IsShroom())
            {
                return;
            }

            if (HasUltiBuff() && ComboMenu.Item("QUltSpam").GetValue <bool>())
            {
                Q.Cast(Game.CursorPos);
            }
            if (LaneClearMenu.Item("QFarm").GetValue <bool>() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
                _tumbleToKillSecondMinion && MinionManager.GetMinions(Game.CursorPos, myRange).Any(m => m.IsValidTarget()) && Q.IsReady())
            {
                if (Game.CursorPos.UnderTurret(Player.Team == GameObjectTeam.Order
                               ? GameObjectTeam.Chaos
                               : GameObjectTeam.Order) && !Player.UnderTurret(true))
                {
                    return;
                }
                Q.Cast(Game.CursorPos);
                _tumbleToKillSecondMinion = false;
                return;
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                if (ComboMenu.Item("QHarass").GetValue <bool>() && Game.CursorPos.Distance(target.Position) < myRange && Q.IsReady() && Player.CountEnemiesInRange(1000) <= 2 && Player.Level < 11)
                {
                    var pos = Player.Position.Extend(Game.CursorPos,
                                                     Player.Distance(target.Position) - myRange + 15);
                    if (
                        pos.UnderTurret(Player.Team == GameObjectTeam.Order
                            ? GameObjectTeam.Chaos
                            : GameObjectTeam.Order) && !Player.UnderTurret(true))
                    {
                        return;
                    }
                    Q.Cast(pos);
                }
            }

            if (!ComboMenu.Item("QCombo").GetValue <bool>())
            {
                return;
            }
            if (Player.ManaPercent > 25)
            {
                if (unit.IsMe &&
                    Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && !HasUltiBuff() && Q.IsReady())
                {
                    Q.Cast(Game.CursorPos);
                }
            }
            if (Player.CountEnemiesInRange(1000) > 0 || Player.ManaPercent < 70)
            {
                _tumbleToKillSecondMinion = false;
            }
        }
Ejemplo n.º 53
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;
        }
Ejemplo n.º 54
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (Program.LagFree(0))
            {
                SetMana();
            }
            if (R.IsReady() && Config.Item("Rjungle", true).GetValue <bool>())
            {
                KsJungle();
            }
            else
            {
                DragonTime = 0;
            }

            if (E.IsReady())
            {
                if (Program.LagFree(0))
                {
                    LogicE();
                }

                if (Config.Item("smartE", true).GetValue <KeyBind>().Active)
                {
                    Esmart = true;
                }
                if (Config.Item("smartEW", true).GetValue <KeyBind>().Active&& W.IsReady())
                {
                    CursorPosition = Game.CursorPos;
                    W.Cast(CursorPosition);
                }
                if (Esmart && Player.Position.Extend(Game.CursorPos, E.Range).CountEnemiesInRange(500) < 4)
                {
                    E.Cast(Player.Position.Extend(Game.CursorPos, E.Range), true);
                }

                if (!CursorPosition.IsZero)
                {
                    E.Cast(Player.Position.Extend(CursorPosition, E.Range), true);
                }
            }
            else
            {
                CursorPosition = Vector3.Zero;
                Esmart         = false;
            }

            if (Q.IsReady())
            {
                LogicQ();
            }

            if (Program.LagFree(3) && W.IsReady() && Config.Item("autoW", true).GetValue <bool>())
            {
                LogicW();
            }

            if (R.IsReady())
            {
                if (Config.Item("useR", true).GetValue <KeyBind>().Active)
                {
                    var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                    if (t.IsValidTargetLS())
                    {
                        R.Cast(t, true, true);
                    }
                }

                if (Program.LagFree(4))
                {
                    LogicR();
                }
            }
        }
Ejemplo n.º 55
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        Render.Circle.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(Player.Position, Q.Range, System.Drawing.Color.Cyan, 1);
                }
            }
            if (Config.Item("wRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (W.IsReady())
                    {
                        Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1);
                }
            }
            if (Config.Item("eRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (E.IsReady())
                    {
                        Render.Circle.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1);
                }
            }
            if (Config.Item("rRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (R.IsReady())
                    {
                        Render.Circle.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1);
                    }
                }
                else
                {
                    Render.Circle.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1);
                }
            }


            if (Config.Item("noti", true).GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (target.IsValidTargetLS())
                {
                    var poutput = Q.GetPrediction(target);
                    if ((int)poutput.Hitchance == 5)
                    {
                        Render.Circle.DrawCircle(poutput.CastPosition, 50, System.Drawing.Color.YellowGreen);
                    }
                    if (Q.GetDamage(target) > target.Health)
                    {
                        Render.Circle.DrawCircle(target.ServerPosition, 200, System.Drawing.Color.Red);
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.4f, System.Drawing.Color.Red, "Q kill: " + target.ChampionName + " have: " + target.Health + "hp");
                    }
                    else if (Q.GetDamage(target) + W.GetDamage(target) > target.Health)
                    {
                        Render.Circle.DrawCircle(target.ServerPosition, 200, System.Drawing.Color.Red);
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.4f, System.Drawing.Color.Red, "Q + W kill: " + target.ChampionName + " have: " + target.Health + "hp");
                    }
                    else if (Q.GetDamage(target) + W.GetDamage(target) + E.GetDamage(target) > target.Health)
                    {
                        Render.Circle.DrawCircle(target.ServerPosition, 200, System.Drawing.Color.Red);
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.4f, System.Drawing.Color.Red, "Q + W + E kill: " + target.ChampionName + " have: " + target.Health + "hp");
                    }
                }
            }
        }
Ejemplo n.º 56
0
        private void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            var t1 = TargetSelector.GetTarget(Q1.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                missileManager.Target = t;
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("haras" + t.ChampionName).GetValue <bool>() && Player.Mana > RMANA + WMANA + QMANA + QMANA && OktwCommon.CanHarras())
                {
                    Program.CastSpell(Q, t);
                }
                else if (OktwCommon.GetKsDamage(t, Q) * 2 > t.Health)
                {
                    Program.CastSpell(Q, t);
                }
                if (Player.Mana > RMANA + QMANA + WMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true, true);
                    }
                }
            }
            else if (t1.IsValidTarget())
            {
                missileManager.Target = t1;
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q1, t1);
                }
                else if (Program.Farm && Config.Item("haras" + t1.ChampionName).GetValue <bool>() && Player.Mana > RMANA + WMANA + QMANA + QMANA && OktwCommon.CanHarras())
                {
                    Program.CastSpell(Q1, t1);
                }
                else if (OktwCommon.GetKsDamage(t1, Q1) * 2 > t1.Health)
                {
                    Program.CastSpell(Q1, t1);
                }
                if (Player.Mana > RMANA + QMANA + WMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q1.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q1.Cast(enemy, true, true);
                    }
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA)
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q1.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, 100);
                if (Qfarm.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Ejemplo n.º 57
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();
     }
 }
Ejemplo n.º 58
0
        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);
        }
Ejemplo n.º 59
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;
        }
Ejemplo n.º 60
0
        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;
        }