Exemple #1
0
        public static void Initialize()
        {
            if (_initialized)
            {
                return;
            }

            _initialized = true;

            Menu = new Menu("TreeLib", "TreeLib", true);
            Menu.AddToMainMenu();
            SpellManager.Initialize();
            CustomEvents.Game.OnGameLoad += args => { Evade.Init(); };
        }
Exemple #2
0
        public Zed()
        {
            Q              = new LeagueSharp.SDK.Spell(SpellSlot.Q, 925).SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            Q3             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            W              = new LeagueSharp.SDK.Spell(SpellSlot.W, 700).SetSkillshot(0, 0, 1750, false, SkillshotType.SkillshotLine);
            E              = new LeagueSharp.SDK.Spell(SpellSlot.E, 290).SetTargetted(0.005f, float.MaxValue);
            R              = new LeagueSharp.SDK.Spell(SpellSlot.R, 625);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = HitChance.VeryHigh;

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q/E: Always On");
            comboMenu.Add("Ignite", new CheckBox("Use Ignite"));
            comboMenu.Add("Items", new CheckBox("Use Items"));
            comboMenu.AddGroupLabel("Swap Settings");
            comboMenu.Add("SwapIfKill", new CheckBox("Swap W/R If Mark Can Kill Target", false));
            comboMenu.Add("SwapIfHpU", new Slider("Swap W/R If Hp < (%)", 10));
            comboMenu.Add("SwapGap", new ComboBox("Swap W/R To Gap Close", 1, "OFF", "Smart", "Always"));
            comboMenu.AddGroupLabel("W Settings");
            comboMenu.Add("WNormal", new CheckBox("Use For Non-R Combo"));
            comboMenu.Add("WAdv", new ComboBox("Use For R Combo", 1, "OFF", "Line", "Triangle", "Mouse"));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RMode", new ComboBox("Mode", 0, "Always", "Wait Q/E"));
            comboMenu.Add("RStopRange", new Slider("Prevent Q/W/E If R Ready And Distance <=", (int)(R.Range + 200), (int)R.Range, (int)(R.Range + W.Range)));
            if (GameObjects.EnemyHeroes.Any())
            {
                comboMenu.AddGroupLabel("Extra R Settings");
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
                {
                    comboMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
                }
            }

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.Add("Mode", new ComboBox("Mode", 1, "W-E-Q", "E-Q", "Q"));
            hybridMenu.Add("WEQ", new KeyBind("Only W If Hit E-Q", false, KeyBind.BindTypes.PressToggle, 'X'));
            hybridMenu.AddGroupLabel("Auto Q Settings (Champ)");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQMpA", new Slider("If Mp >=", 100, 0, 200));
            hybridMenu.AddGroupLabel("Auto E Settings (Champ/Shadow)");
            hybridMenu.Add("AutoE", new CheckBox("Auto", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.Add("Q", new CheckBox("Use Q"));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));

            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("W", new CheckBox("W Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("RStop", new CheckBox("Prevent Q/W/E Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("Target", new CheckBox("Target"));
            drawMenu.Add("DMark", new CheckBox("Death Mark"));
            drawMenu.Add("WPos", new CheckBox("W Shadow"));
            drawMenu.Add("RPos", new CheckBox("R Shadow"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("FleeW", new KeyBind("Use W To Flee", false, KeyBind.BindTypes.HoldActive, 'C'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.W && args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                else if (args.Slot == SpellSlot.R && args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                if (sender.IsEnemy)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || !shadow.IsAlly || shadow.CharData.BaseSkinName != "ZedUltMissile" || shadow.CharData.BaseSkinName != "ZedShadowDashMissile" || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                if (wCasted)
                {
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    wCasted  = rCasted = false;
                }
                else if (rCasted)
                {
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    wCasted  = rCasted = false;
                }
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (sender.IsEnemy || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow != null && shadow.IsAlly && shadow.BaseSkinName == "ZedShadow" && args.Buff.Caster.IsMe)
                {
                    switch (args.Buff.Name)
                    {
                    case "zedwshadowbuff":
                        if (!wShadow.Compare(shadow))
                        {
                            wShadowT = Variables.TickCount;
                            wShadow  = shadow;
                        }
                        break;

                    case "zedrshadowbuff":
                        if (!rShadow.Compare(shadow))
                        {
                            rShadowT = Variables.TickCount;
                            rShadow  = shadow;
                        }
                        break;
                    }
                }
            };
            Obj_AI_Base.OnPlayAnimation += (sender, args) =>
            {
                if (sender.IsMe || sender.IsEnemy || args.Animation != "Death")
                {
                    return;
                }
                if (sender.Compare(wShadow))
                {
                    wShadow = null;
                }
                else if (sender.Compare(rShadow))
                {
                    rShadow = null;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                if (missile != null)
                {
                    if (missile.SpellCaster.IsMe && missile.SData.Name == "ZedWMissile")
                    {
                        wMissile = missile;
                    }
                    return;
                }
                if (sender.Name != "Zed_Base_R_buf_tell.troy")
                {
                    return;
                }
                var target = EntityManager.Heroes.Enemies.FirstOrDefault(i => i.LSIsValidTarget() && HaveR(i));
                if (target != null && target.Distance(sender) < 150)
                {
                    deathMark = sender;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                if (sender.Compare(wMissile))
                {
                    wMissile = null;
                }
                else if (sender.Compare(deathMark))
                {
                    deathMark = null;
                }
            };
        }
Exemple #3
0
        public Yasuo()
        {
            Q                = new LeagueSharp.SDK.Spell(SpellSlot.Q, 505).SetSkillshot(QDelay, 20, float.MaxValue, false, SkillshotType.SkillshotLine);
            Q2               = new LeagueSharp.SDK.Spell(Q.Slot, 1100).SetSkillshot(Q2Delay, 90, 1200, true, Q.Type);
            Q3               = new LeagueSharp.SDK.Spell(Q.Slot, 250).SetTargetted(0.005f, float.MaxValue);
            W                = new LeagueSharp.SDK.Spell(SpellSlot.W, 400);
            E                = new LeagueSharp.SDK.Spell(SpellSlot.E, 475).SetTargetted(0, 1050);
            E2               = new LeagueSharp.SDK.Spell(E.Slot).SetTargetted(E.Delay + Q3.Delay, E.Speed);
            R                = new LeagueSharp.SDK.Spell(SpellSlot.R, 1200);
            Q.DamageType     = Q2.DamageType = R.DamageType = DamageType.Physical;
            E.DamageType     = DamageType.Magical;
            Q.MinHitChance   = Q2.MinHitChance = HitChance.VeryHigh;
            E.CastCondition += () => !posDash.IsValid();

            if (YasuoPro.YasuoMenu.ComboM != null)
            {
                if (EntityManager.Heroes.Enemies.Any())
                {
                    Evade.Init();
                }
                Evade.Evading    += Evading;
                Evade.TryEvading += TryEvading;
                return;
            }

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q: Always On");
            comboMenu.AddGroupLabel("E Gap Settings");
            comboMenu.Add("EGap", new CheckBox("Use E"));
            comboMenu.Add("EMode", new ComboBox("Follow Mode", 0, "Enemy", "Mouse"));
            comboMenu.Add("ETower", new CheckBox("Under Tower", false));
            comboMenu.Add("EStackQ", new CheckBox("Stack Q While Gap", false));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RDelay", new CheckBox("Delay Cast"));
            comboMenu.Add("RHpU", new Slider("If Enemies Hp < (%)", 60));
            comboMenu.Add("RCountA", new Slider("Or Count >=", 2, 1, 5));

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.AddGroupLabel("Q: Always On");
            hybridMenu.Add("Q3", new CheckBox("Also Q3"));
            hybridMenu.Add("QLastHit", new CheckBox("Last Hit (Q1/2)"));
            hybridMenu.AddGroupLabel("Auto Q Settings");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQ3", new CheckBox("Also Q3", false));

            lcMenu = config.AddSubMenu("LaneClear", "Lane Clear");
            lcMenu.AddGroupLabel("Q Settings");
            lcMenu.Add("Q", new CheckBox("Use Q"));
            lcMenu.Add("Q3", new CheckBox("Also Q3", false));
            lcMenu.AddGroupLabel("E Settings");
            lcMenu.Add("E", new CheckBox("Use E"));
            lcMenu.Add("ELastHit", new CheckBox("Last Hit Only", false));
            lcMenu.Add("ETower", new CheckBox("Under Tower", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.AddGroupLabel("Q Settings");
            lhMenu.Add("Q", new CheckBox("Use Q"));
            lhMenu.Add("Q3", new CheckBox("Also Q3", false));
            lhMenu.AddGroupLabel("E Settings");
            lhMenu.Add("E", new CheckBox("Use E"));
            lhMenu.Add("ETower", new CheckBox("Under Tower", false));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));
            ksMenu.Add("R", new CheckBox("Use R"));
            foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
            {
                ksMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
            }

            fleeMenu = config.AddSubMenu("Flee", "Flee");
            fleeMenu.Add("E", new KeyBind("Use E", false, KeyBind.BindTypes.HoldActive, 'C'));
            fleeMenu.Add("Q", new CheckBox("Stack Q While Dash"));

            if (EntityManager.Heroes.Enemies.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("StackQ", new CheckBox("Auto Stack Q Status"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("StackQ", new KeyBind("Auto Stack Q", false, KeyBind.BindTypes.PressToggle, 'Z'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Game.OnUpdate    += args =>
            {
                if (Player.IsDead)
                {
                    if (isDash)
                    {
                        isDash  = false;
                        posDash = new Vector2();
                    }
                    return;
                }
                if (isDash && !Player.IsDashing())
                {
                    isDash = false;
                    DelayAction.Add(50, () => posDash = new Vector2());
                }
                Q.Delay  = GetQDelay(false);
                Q2.Delay = GetQDelay(true);
                E.Speed  = E2.Speed = 1045 + (Player.MoveSpeed - 345);
            };
            Orbwalker.OnPostAttack += (sender, args) =>
            {
                if (!Q.IsReady() || haveQ3 || (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) || Orbwalker.LastTarget is AIHeroClient || Orbwalker.LastTarget is Obj_AI_Minion)
                {
                    return;
                }
                if (Q.GetTarget(50) != null || Common.ListMinions().Count(i => i.IsValidTarget(Q.Range + 50)) > 0)
                {
                    return;
                }
                if ((Items.HasItem((int)ItemId.Sheen) && Items.CanUseItem((int)ItemId.Sheen)) || (Items.HasItem((int)ItemId.Trinity_Force) && Items.CanUseItem((int)ItemId.Trinity_Force)))
                {
                    Q.Cast(Game.CursorPos);
                }
            };
            Events.OnDash += (sender, args) =>
            {
                if (!args.Unit.IsMe)
                {
                    return;
                }
                isDash  = true;
                posDash = args.EndPos;
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = true;
                    break;

                case "YasuoDashScalar":
                    cDash = 1;
                    break;
                }
            };
            Obj_AI_Base.OnBuffUpdate += (sender, args) =>
            {
                if (!sender.IsMe || !args.Buff.Caster.IsMe || args.Buff.DisplayName != "YasuoDashScalar")
                {
                    return;
                }
                cDash = 2;
            };
            Obj_AI_Base.OnBuffLose += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = false;
                    break;

                case "YasuoDashScalar":
                    cDash = 0;
                    break;
                }
            };
            Obj_AI_Base.OnSpellCast += (sender, args) =>
            {
                if (!sender.IsMe || !args.SData.Name.StartsWith("YasuoQ") || args.SData.Name.EndsWith("Mis"))
                {
                    return;
                }
                if (args.SData.Name.EndsWith("W"))
                {
                    DelayAction.Add(50, Orbwalker.ResetAutoAttack);
                }
                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, Player.ServerPosition.LSExtend(args.End, -(Player.BoundingRadius * 2)));
            };
        }
Exemple #4
0
        public Yasuo()
        {
            Q                 = new LeagueSharp.SDK.Spell(SpellSlot.Q, 505).SetSkillshot(0.4f, 20, float.MaxValue, false, SkillshotType.SkillshotLine);
            Q2                = new LeagueSharp.SDK.Spell(Q.Slot, 1100).SetSkillshot(Q.Delay, 90, 1250, true, Q.Type);
            Q3                = new LeagueSharp.SDK.Spell(Q.Slot, 250).SetTargetted(0.01f, float.MaxValue);
            W                 = new LeagueSharp.SDK.Spell(SpellSlot.W, 400);
            E                 = new LeagueSharp.SDK.Spell(SpellSlot.E, 475).SetTargetted(0.01f, 1250);
            E2                = new LeagueSharp.SDK.Spell(Q.Slot).SetTargetted(E.Delay + Q3.Delay, E.Speed);
            R                 = new LeagueSharp.SDK.Spell(SpellSlot.R, 1200);
            Q.DamageType      = Q2.DamageType = R.DamageType = DamageType.Physical;
            E.DamageType      = DamageType.Magical;
            Q.MinHitChance    = Q2.MinHitChance = HitChance.VeryHigh;
            Q.CastCondition  += () => !isBlockQ;
            Q2.CastCondition += () => !isBlockQ;
            Q3.CastCondition += () => !isBlockQ && IsDashing;

            if (YasuoPro.YasuoMenu.ComboM != null)
            {
                if (EntityManager.Heroes.Enemies.Any())
                {
                    Evade.Init();
                }
                Evade.Evading    += Evading;
                Evade.TryEvading += TryEvading;
                return;
            }

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q: Always On");
            comboMenu.AddGroupLabel("E Gap Settings");
            comboMenu.Add("EGap", new CheckBox("Use E"));
            comboMenu.Add("EMode", new ComboBox("Follow Mode", 0, "Enemy", "Mouse"));
            comboMenu.Add("ETower", new CheckBox("Under Tower", false));
            comboMenu.Add("EStackQ", new CheckBox("Stack Q While Gap", false));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RDelay", new CheckBox("Delay Cast"));
            comboMenu.Add("RHpU", new Slider("If Enemies Hp < (%)", 60));
            comboMenu.Add("RCountA", new Slider("Or Count >=", 2, 1, 5));

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.AddGroupLabel("Q: Always On");
            hybridMenu.Add("Q3", new CheckBox("Also Q3"));
            hybridMenu.Add("QLastHit", new CheckBox("Last Hit (Q1/2)"));
            hybridMenu.AddGroupLabel("Auto Q Settings");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQ3", new CheckBox("Also Q3", false));

            lcMenu = config.AddSubMenu("LaneClear", "Lane Clear");
            lcMenu.AddGroupLabel("Q Settings");
            lcMenu.Add("Q", new CheckBox("Use Q"));
            lcMenu.Add("Q3", new CheckBox("Also Q3", false));
            lcMenu.AddGroupLabel("E Settings");
            lcMenu.Add("E", new CheckBox("Use E"));
            lcMenu.Add("ELastHit", new CheckBox("Last Hit Only", false));
            lcMenu.Add("ETower", new CheckBox("Under Tower", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.AddGroupLabel("Q Settings");
            lhMenu.Add("Q", new CheckBox("Use Q"));
            lhMenu.Add("Q3", new CheckBox("Also Q3", false));
            lhMenu.AddGroupLabel("E Settings");
            lhMenu.Add("E", new CheckBox("Use E"));
            lhMenu.Add("ETower", new CheckBox("Under Tower", false));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));
            ksMenu.Add("R", new CheckBox("Use R"));
            foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
            {
                ksMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
            }

            fleeMenu = config.AddSubMenu("Flee", "Flee");
            fleeMenu.Add("E", new KeyBind("Use E", false, KeyBind.BindTypes.HoldActive, 'C'));
            fleeMenu.Add("Q", new CheckBox("Stack Q While Dash"));

            if (EntityManager.Heroes.Enemies.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("StackQ", new CheckBox("Auto Stack Q Status"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("StackQ", new KeyBind("Auto Stack Q", false, KeyBind.BindTypes.PressToggle, 'Z'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Game.OnUpdate    += args =>
            {
                if (Player.IsDead)
                {
                    if (endDashT > 0)
                    {
                        endDashT = 0;
                        posDash  = new Vector3();
                    }
                    return;
                }
                if (endDashT > 0 && !Player.IsDashing())
                {
                    endDashT = 0;
                    DelayAction.Add(70, () => posDash = new Vector3());
                }
                if (!haveQ3 && Q.Delay > 0.18f)
                {
                    var qDelay = Math.Max(0.4f * (1 - Math.Min((Player.AttackSpeedMod - 1) * 0.5f, 0.55f)), 0.18f);
                    if (!Q.Delay.Equals(qDelay))
                    {
                        Q.Delay = qDelay;
                    }
                }
                if (haveQ3 && Q2.Delay > 0.27f)
                {
                    var qDelay = Math.Max(
                        0.4f * (1 - Math.Min((Player.AttackSpeedMod - 1) * 0.296f, 0.325f)),
                        0.27f);
                    if (!Q2.Delay.Equals(qDelay))
                    {
                        Q2.Delay = qDelay;
                    }
                }
                var eSpeed = 1250 + (Player.MoveSpeed - 345);
                if (!E.Speed.Equals(eSpeed))
                {
                    E.Speed = E2.Speed = eSpeed;
                }
            };
            Orbwalker.OnPostAttack += (sender, args) =>
            {
                if (!Q.IsReady() || haveQ3 || (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) || Orbwalker.LastTarget is AIHeroClient || Orbwalker.LastTarget is Obj_AI_Minion)
                {
                    return;
                }
                if (Q.GetTarget(50) != null || EntityManager.MinionsAndMonsters.EnemyMinions.Where(i => i.IsMinion() || i.IsPet(false)).Concat(EntityManager.MinionsAndMonsters.Monsters).Count(i => i.IsValidTarget(Q.Range + 50)) > 0)
                {
                    return;
                }
                if ((Items.HasItem((int)ItemId.Sheen) && Items.CanUseItem((int)ItemId.Sheen)) || (Items.HasItem((int)ItemId.Trinity_Force) && Items.CanUseItem((int)ItemId.Trinity_Force)))
                {
                    Q.Cast(Game.CursorPos);
                }
            };
            Events.OnDash += (sender, args) =>
            {
                if (!args.Unit.IsMe)
                {
                    return;
                }
                posDash  = args.EndPos.ToVector3();
                endDashT = args.EndTick;
            };
            Game.OnUpdate += args =>
            {
                if (Player.IsDead)
                {
                    return;
                }
                if (cDash == 1 && Player.GetBuffCount("YasuoDashScalar") == 2)
                {
                    cDash = 2;
                }
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (!sender.IsMe || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = true;
                    break;

                case "YasuoDashScalar":
                    cDash = 1;
                    break;

                case "YasuoRArmorPen":
                    haveR = isBlockQ = true;
                    Orbwalker.DisableAttacking = true;
                    Orbwalker.DisableMovement  = true;
                    break;

                case "yasuoeqcombosoundmiss":
                case "YasuoEQComboSoundHit":
                    DelayAction.Add(
                        70,
                        () =>
                    {
                        if (Player.IsDead)
                        {
                            return;
                        }
                        Orbwalker.ResetAutoAttack();
                        EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, Player.ServerPosition.LSExtend(Game.CursorPos, Player.BoundingRadius * 2));
                    });
                    break;
                }
            };
            Obj_AI_Base.OnBuffLose += (sender, args) =>
            {
                if (!sender.IsMe || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = false;
                    break;

                case "YasuoDashScalar":
                    cDash = 0;
                    break;
                }
            };
            Obj_AI_Base.OnBuffLose += (sender, args) =>
            {
                if (sender.IsAlly || !haveR || args.Buff.DisplayName != "yasuorknockupcombotar")
                {
                    return;
                }
                haveR = false;
                DelayAction.Add(
                    7,
                    () =>
                {
                    Orbwalker.DisableAttacking = false;
                    Orbwalker.DisableMovement  = false;
                });
                DelayAction.Add(22, () => isBlockQ = false);
            };
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe || args.Slot != SpellSlot.Q)
                {
                    return;
                }
                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, args.Start.LSExtend(args.End, Player.BoundingRadius * 2));
            };
        }
Exemple #5
0
        public Vladimir()
        {
            Q              = new Spell(SpellSlot.Q, 600).SetTargetted(0.25f, float.MaxValue);
            W              = new Spell(SpellSlot.W, 350);
            E              = new Spell(SpellSlot.E, 630).SetSkillshot(0, 40, 4000, false, SkillshotType.SkillshotLine);
            R              = new Spell(SpellSlot.R, 700).SetSkillshot(0, 375, float.MaxValue, false, SkillshotType.SkillshotCircle);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Magical;
            R.MinHitChance = HitChance.VeryHigh;

            var comboMenu = MainMenu.Add(new Menu("Combo", "Combo"));
            {
                comboMenu.Separator("Q: Always On");
                comboMenu.Bool("Ignite", "Use Ignite");
                comboMenu.Bool("E", "Use E");
                comboMenu.Separator("R Settings");
                comboMenu.Bool("R", "Use R");
                comboMenu.Slider("RHpU", "If Enemies Hp < (%) And Hit >= 2", 60);
                comboMenu.Slider("RCountA", "Or Count >=", 3, 1, 5);
            }
            var hybridMenu = MainMenu.Add(new Menu("Hybrid", "Hybrid"));
            {
                hybridMenu.Separator("Q: Always On");
                hybridMenu.Bool("QLastHit", "Last Hit (Stack < 2)");
                hybridMenu.Bool("E", "Use E", false);
            }
            var lcMenu = MainMenu.Add(new Menu("LaneClear", "Lane Clear"));
            {
                lcMenu.Separator("Q: Always On");
                lcMenu.Bool("E", "Use E");
            }
            var lhMenu = MainMenu.Add(new Menu("LastHit", "Last Hit"));
            {
                lhMenu.Bool("Q", "Use Q");
            }
            var ksMenu = MainMenu.Add(new Menu("KillSteal", "Kill Steal"));

            {
                ksMenu.Bool("Q", "Use Q");
                ksMenu.Bool("E", "Use E");
            }
            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
                EvadeTarget.Init();
            }
            var drawMenu = MainMenu.Add(new Menu("Draw", "Draw"));

            {
                drawMenu.Bool("Q", "Q Range", false);
                drawMenu.Bool("E", "E Range", false);
                drawMenu.Bool("R", "R Range", false);
            }
            MainMenu.KeyBind("FleeW", "Use W To Flee", Keys.C);

            Game.OnUpdate                += OnUpdate;
            Drawing.OnEndScene           += OnEndScene;
            Variables.Orbwalker.OnAction += (sender, args) =>
            {
                if (args.Type != OrbwalkingType.BeforeAttack ||
                    (Variables.Orbwalker.ActiveMode != OrbwalkingMode.Combo &&
                     Variables.Orbwalker.ActiveMode != OrbwalkingMode.Hybrid) || !(args.Target is AIHeroClient) ||
                    !Q.IsReady(100))
                {
                    return;
                }
                args.Process = false;
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "VladimirQFrenzy":
                    haveQEmp = true;
                    break;

                case "VladimirSanguinePool":
                    haveW = true;
                    break;

                case "VladimirE":
                    haveE = true;
                    buffE = args.Buff;
                    break;
                }
            };
            Obj_AI_Base.OnBuffLose += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "VladimirQFrenzy":
                    haveQEmp = false;
                    break;

                case "VladimirSanguinePool":
                    haveW = false;
                    break;

                case "VladimirE":
                    haveE = false;
                    buffE = null;
                    break;
                }
            };
            GameObjectNotifier <MissileClient> .OnCreate += (sender, args) =>
            {
                var spellCaster = args.SpellCaster as AIHeroClient;
                if (spellCaster == null || !spellCaster.IsMe || args.SData.Name != "VladimirEMissile" || !haveE)
                {
                    return;
                }
                haveE = false;
                buffE = null;
            };
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.SData.Name)
                {
                case "VladimirQ":
                    haveQ = true;
                    break;

                case "VladimirE":
                    if (buffE == null && !haveE)
                    {
                        haveE = true;
                    }
                    break;
                }
            };
            Spellbook.OnUpdateChargeableSpell += (sender, args) =>
            {
                if (!sender.Owner.IsMe || Variables.TickCount - lastECharge >= 3000 || !args.ReleaseCast)
                {
                    return;
                }
                args.Process = false;
            };
            Spellbook.OnCastSpell += (sender, args) =>
            {
                if (args.Slot != E.Slot || Variables.TickCount - lastECharge <= 500 || IsChargeE)
                {
                    return;
                }
                ERelease();
            };
            Obj_AI_Base.OnSpellCast += (sender, args) =>
            {
                if (!sender.IsMe || args.Slot != Q.Slot || !haveQ)
                {
                    return;
                }
                haveQ = false;
            };
        }
Exemple #6
0
        public Zed()
        {
            Q              = new Spell(SpellSlot.Q, 925).SetSkillshot(0.275f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2             = new Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            Q3             = new Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            W              = new Spell(SpellSlot.W, 700).SetTargetted(0, 1750);
            E              = new Spell(SpellSlot.E, 290).SetTargetted(0.001f, float.MaxValue);
            R              = new Spell(SpellSlot.R, 625);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = HitChance.VeryHigh;

            var comboMenu = MainMenu.Add(new Menu("Combo", "Combo"));
            {
                comboMenu.Separator("Q/E: Always On");
                comboMenu.Bool("Ignite", "Use Ignite");
                comboMenu.Bool("Item", "Use Item");
                comboMenu.Separator("Swap Settings");
                comboMenu.Bool("SwapIfKill", "Swap W/R If Mark Can Kill Target", false);
                comboMenu.Slider("SwapIfHpU", "Swap W/R If Hp < (%)", 10);
                comboMenu.List("SwapGap", "Swap W/R To Gap Close", new[] { "OFF", "Smart", "Always" }, 1);
                comboMenu.Separator("W Settings");
                comboMenu.Bool("WNormal", "Use For Non-R Combo");
                comboMenu.List("WAdv", "Use For R Combo", new[] { "OFF", "Line", "Triangle", "Mouse" }, 1);
                comboMenu.Separator("R Settings");
                comboMenu.KeyBind("R", "Use R", Keys.X, KeyBindType.Toggle);
                comboMenu.List("RMode", "Mode", new[] { "Always", "Wait Q/E" });
                comboMenu.Slider(
                    "RStopRange",
                    "Prevent Q/W/E If R Ready And Distance <=",
                    (int)(R.Range + 200),
                    (int)R.Range,
                    (int)(R.Range + W.Range));
                if (GameObjects.EnemyHeroes.Any())
                {
                    comboMenu.Separator("Extra R Settings");
                    GameObjects.EnemyHeroes.ForEach(
                        i => comboMenu.Bool("RCast" + i.ChampionName, "Cast On " + i.ChampionName, false));
                }
            }
            var hybridMenu = MainMenu.Add(new Menu("Hybrid", "Hybrid"));
            {
                hybridMenu.List("Mode", "Mode", new[] { "W-E-Q", "E-Q", "Q" });
                hybridMenu.Separator("Auto Q Settings (Champ)");
                hybridMenu.KeyBind("AutoQ", "KeyBind", Keys.T, KeyBindType.Toggle);
                hybridMenu.Slider("AutoQMpA", "If Mp >=", 100, 0, 200);
                hybridMenu.Separator("Auto E Settings (Champ/Shadow)");
                hybridMenu.Bool("AutoE", "Auto", false);
            }
            var lhMenu = MainMenu.Add(new Menu("LastHit", "Last Hit"));
            {
                lhMenu.Bool("Q", "Use Q");
            }
            var ksMenu = MainMenu.Add(new Menu("KillSteal", "Kill Steal"));

            {
                ksMenu.Bool("Q", "Use Q");
                ksMenu.Bool("E", "Use E");
            }
            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
                EvadeTarget.Init();
            }
            var drawMenu = MainMenu.Add(new Menu("Draw", "Draw"));

            {
                drawMenu.Bool("Q", "Q Range", false);
                drawMenu.Bool("W", "W Range", false);
                drawMenu.Bool("E", "E Range", false);
                drawMenu.Bool("R", "R Range", false);
                drawMenu.Bool("RStop", "Prevent Q/W/E Range", false);
                drawMenu.Bool("UseR", "R In Combo Status");
                drawMenu.Bool("Target", "Target");
                drawMenu.Bool("DMark", "Death Mark");
                drawMenu.Bool("WPos", "W Shadow");
                drawMenu.Bool("RPos", "R Shadow");
            }
            MainMenu.KeyBind("FleeW", "Use W To Flee", Keys.C);

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.W && args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                else if (args.Slot == SpellSlot.R && args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                if (sender.IsEnemy)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                if (wCasted)
                {
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    wCasted  = rCasted = false;
                }
                else if (rCasted)
                {
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    wCasted  = rCasted = false;
                }
            };
            Obj_AI_Base.OnBuffAdd += (sender, args) =>
            {
                if (sender.IsEnemy || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                switch (args.Buff.Name)
                {
                case "zedwshadowbuff":
                    if (wShadow.Compare(shadow))
                    {
                        return;
                    }
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    break;

                case "zedrshadowbuff":
                    if (rShadow.Compare(shadow))
                    {
                        return;
                    }
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    break;
                }
            };
            Obj_AI_Base.OnPlayAnimation += (sender, args) =>
            {
                if (sender.IsMe || sender.IsEnemy || args.Animation != "Death")
                {
                    return;
                }
                if (sender.Compare(wShadow))
                {
                    wShadow = null;
                }
                else if (sender.Compare(rShadow))
                {
                    rShadow = null;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster.IsMe && missile.SData.Name == "ZedWMissile")
                {
                    wMissile = missile;
                    return;
                }
                if (sender.Name != "Zed_Base_R_buf_tell.troy")
                {
                    return;
                }
                var target = GameObjects.EnemyHeroes.FirstOrDefault(i => i.IsValidTarget() && HaveR(i));
                if (target != null && target.Distance(sender) < 150)
                {
                    deathMark = sender;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                if (sender.Compare(wMissile))
                {
                    wMissile = null;
                }
                else if (sender.Compare(deathMark))
                {
                    deathMark = null;
                }
            };
        }
Exemple #7
0
        public Yasuo()
        {
            Q  = new Spell(SpellSlot.Q, 510);
            Q2 = new Spell(SpellSlot.Q, 1150);
            W  = new Spell(SpellSlot.W, 400);
            E  = new Spell(SpellSlot.E, 475);
            R  = new Spell(SpellSlot.R, 1300);
            Q.SetSkillshot(GetQ12Delay, 20, float.MaxValue, false, SkillshotType.SkillshotLine);
            Q2.SetSkillshot(GetQ3Delay, 90, 1500, false, SkillshotType.SkillshotLine);
            E.SetTargetted(0, GetESpeed);
            Q.DamageType   = Q2.DamageType = R.DamageType = DamageType.Physical;
            E.DamageType   = DamageType.Magical;
            Q.MinHitChance = Q2.MinHitChance = HitChance.VeryHigh;

            var orbwalkMenu = new Menu("Orbwalk", "Orbwalk");
            {
                Config.Separator(orbwalkMenu, "blank0", "Q/Ignite/Item: Always On");
                Config.Separator(orbwalkMenu, "blank1", "E Gap Settings");
                Config.Bool(orbwalkMenu, "EGap", "Use E");
                Config.Slider(orbwalkMenu, "ERange", "If Distance >", 300, 0, (int)E.Range);
                Config.Bool(orbwalkMenu, "ETower", "Under Tower");
                Config.Bool(orbwalkMenu, "EStackQ", "Stack Q While Gap", false);
                Config.Separator(orbwalkMenu, "blank2", "R Settings");
                Config.Bool(orbwalkMenu, "R", "Use R");
                Config.Bool(orbwalkMenu, "RDelay", "Delay Casting");
                Config.Slider(orbwalkMenu, "RHpU", "If Enemy Hp < (%)", 60);
                Config.Slider(orbwalkMenu, "RCountA", "Or Enemy >=", 2, 1, 5);
                MainMenu.Add(orbwalkMenu);
            }
            var hybridMenu = new Menu("Hybrid", "Hybrid");
            {
                Config.Separator(hybridMenu, "blank3", "Q: Always On");
                Config.Bool(hybridMenu, "Q3", "Also Q3");
                Config.Bool(hybridMenu, "QLastHit", "Last Hit (Q1/2)");
                Config.Separator(hybridMenu, "blank4", "Auto Q Settings");
                Config.KeyBind(hybridMenu, "AutoQ", "KeyBind", Keys.T, KeyBindType.Toggle);
                Config.Bool(hybridMenu, "AutoQ3", "Also Q3", false);
                MainMenu.Add(hybridMenu);
            }
            var lcMenu = new Menu("LaneClear", "Lane Clear");
            {
                Config.Separator(lcMenu, "blank5", "Q: Always On");
                Config.Bool(lcMenu, "Q3", "Also Q3");
                Config.Separator(lcMenu, "blank6", "E Settings");
                Config.Bool(lcMenu, "E", "Use E");
                Config.Bool(lcMenu, "ELastHit", "Last Hit Only", false);
                Config.Bool(lcMenu, "ETower", "Under Tower", false);
                MainMenu.Add(lcMenu);
            }
            var farmMenu = new Menu("Farm", "Farm");
            {
                Config.Separator(farmMenu, "blank7", "Q Settings");
                Config.Bool(farmMenu, "Q", "Use Q");
                Config.Bool(farmMenu, "Q3", "Also Q3", false);
                Config.Separator(farmMenu, "blank8", "E Settings");
                Config.Bool(farmMenu, "E", "Use E");
                Config.Bool(farmMenu, "ETower", "Under Tower", false);
                MainMenu.Add(farmMenu);
            }
            var ksMenu = new Menu("KillSteal", "Kill Steal");
            {
                Config.Bool(ksMenu, "Q", "Use Q");
                Config.Bool(ksMenu, "E", "Use E");
                Config.Bool(ksMenu, "R", "Use R");
                Config.Separator(ksMenu, "blank7", "Extra R Settings");
                foreach (var enemy in GameObjects.EnemyHeroes)
                {
                    Config.Bool(ksMenu, "RCast" + enemy.ChampionName, "Cast On " + enemy.ChampionName, false);
                }
                MainMenu.Add(ksMenu);
            }
            var fleeMenu = new Menu("Flee", "Flee");

            {
                Config.KeyBind(fleeMenu, "E", "Use E", Keys.C);
                Config.Bool(fleeMenu, "Q", "Stack Q While Dash");
                MainMenu.Add(fleeMenu);
            }
            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }
            var drawMenu = new Menu("Draw", "Draw");

            {
                Config.Bool(drawMenu, "Q", "Q Range");
                Config.Bool(drawMenu, "E", "E Range", false);
                Config.Bool(drawMenu, "R", "R Range");
                Config.Bool(drawMenu, "StackQ", "Auto Stack Q Status");
                MainMenu.Add(drawMenu);
            }
            Config.KeyBind(MainMenu, "StackQ", "Auto Stack Q", Keys.Z, KeyBindType.Toggle);

            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += OnDraw;
            Game.OnUpdate  += OnUpdateEvade;
        }
Exemple #8
0
        public Yasuo()
        {
            QEB  = GetQ();
            Q3EB = new EloBuddy.SDK.Spell.Skillshot(SpellSlot.Q, 1100, EloBuddy.SDK.Enumerations.SkillShotType.Linear, 300, 1200, 90)
            {
                AllowedCollisionCount = int.MaxValue
            };

            Q                = new LeagueSharp.SDK.Spell(SpellSlot.Q, 505).SetSkillshot(QDelay, 20, float.MaxValue, false, SkillshotType.SkillshotLine);
            Q2               = new LeagueSharp.SDK.Spell(Q.Slot, 1100).SetSkillshot(Q2Delay, 90, 1200, true, Q.Type);
            Q3               = new LeagueSharp.SDK.Spell(Q.Slot, 220).SetSkillshot(0.001f, 220, float.MaxValue, false, SkillshotType.SkillshotCircle);
            W                = new LeagueSharp.SDK.Spell(SpellSlot.W, 400).SetTargetted(0.25f, float.MaxValue);
            E                = new LeagueSharp.SDK.Spell(SpellSlot.E, 475).SetTargetted(0, 1200);
            E2               = new LeagueSharp.SDK.Spell(E.Slot, E.Range).SetTargetted(Q3.Delay, E.Speed);
            R                = new LeagueSharp.SDK.Spell(SpellSlot.R, 1200);
            Q.DamageType     = Q2.DamageType = R.DamageType = DamageType.Physical;
            E.DamageType     = DamageType.Magical;
            Q.MinHitChance   = Q2.MinHitChance = HitChance.VeryHigh;
            E.CastCondition += () => !posDash.IsValid();

            if (YasuoPro.YasuoMenu.ComboM != null || YasuoSharpV2.YasuoSharp.comboMenu != null)
            {
                if (EntityManager.Heroes.Enemies.Any())
                {
                    Evade.Init();
                }
                Evade.Evading    += Evading;
                Evade.TryEvading += TryEvading;
                return;
            }

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q: Always On");
            comboMenu.AddGroupLabel("Smart Settings");
            comboMenu.Add("W", new CheckBox("Use W", false));
            comboMenu.Add("E", new CheckBox("Use E", false));
            comboMenu.AddGroupLabel("E Gap Settings");
            comboMenu.Add("EGap", new CheckBox("Use E"));
            comboMenu.Add("EMode", new ComboBox("Follow Mode", 0, "Enemy", "Mouse"));
            comboMenu.Add("ETower", new CheckBox("Under Tower", false));
            comboMenu.Add("EStackQ", new CheckBox("Stack Q While Gap", false));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RDelay", new CheckBox("Delay Cast"));
            comboMenu.Add("RHpU", new Slider("If Enemies Hp < (%)", 60));
            comboMenu.Add("RCountA", new Slider("Or Count >=", 2, 1, 5));

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.AddGroupLabel("Q: Always On");
            hybridMenu.Add("Q3", new CheckBox("Also Q3"));
            hybridMenu.Add("QLastHit", new CheckBox("Last Hit (Q1/2)"));
            hybridMenu.AddGroupLabel("Auto Q Settings");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQ3", new CheckBox("Also Q3", false));

            lcMenu = config.AddSubMenu("LaneClear", "Lane Clear");
            lcMenu.AddGroupLabel("Q Settings");
            lcMenu.Add("Q", new CheckBox("Use Q"));
            lcMenu.Add("Q3", new CheckBox("Also Q3", false));
            lcMenu.AddGroupLabel("E Settings");
            lcMenu.Add("E", new CheckBox("Use E"));
            lcMenu.Add("ELastHit", new CheckBox("Last Hit Only", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.AddGroupLabel("Q Settings");
            lhMenu.Add("Q", new CheckBox("Use Q"));
            lhMenu.Add("Q3", new CheckBox("Also Q3", false));
            lhMenu.AddGroupLabel("E Settings");
            lhMenu.Add("E", new CheckBox("Use E"));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));
            ksMenu.Add("R", new CheckBox("Use R"));
            foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
            {
                ksMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
            }

            fleeMenu = config.AddSubMenu("Flee", "Flee");
            fleeMenu.Add("E", new KeyBind("Use E", false, KeyBind.BindTypes.HoldActive, 'C'));
            fleeMenu.Add("Q", new CheckBox("Stack Q While Dash"));

            if (EntityManager.Heroes.Enemies.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("StackQ", new CheckBox("Auto Stack Q Status"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("StackQ", new KeyBind("Auto Stack Q", false, KeyBind.BindTypes.PressToggle, 'Z'));
            miscMenu.Add("EQ3Flash", new KeyBind("Use E-Q3-Flash", false, KeyBind.BindTypes.HoldActive, 'X'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Game.OnUpdate    += args =>
            {
                if (Player.IsDead)
                {
                    if (isDash)
                    {
                        isDash  = false;
                        posDash = new Vector3();
                    }
                    return;
                }
                if (isDash && !Player.IsDashing())
                {
                    isDash = false;
                    DelayAction.Add(
                        50,
                        () =>
                    {
                        if (!isDash)
                        {
                            posDash = new Vector3();
                        }
                    });
                }
                Q.Delay  = GetQDelay(false);
                Q2.Delay = GetQDelay(true);
                E.Speed  = E2.Speed = 1200 + (Player.MoveSpeed - 345);
            };
            Orbwalker.OnPostAttack += (target, args) =>
            {
                if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) ||
                    !(target is Obj_AI_Turret) || !Q.IsReady() || haveQ3)
                {
                    return;
                }
                if (Q.GetTarget(50) != null ||
                    Common.ListMinions().Count(i => i.IsValidTarget(Q.Range + 50)) > 0)
                {
                    return;
                }
                if ((Items.HasItem((int)ItemId.Sheen) && Items.CanUseItem((int)ItemId.Sheen)) ||
                    (Items.HasItem((int)ItemId.Trinity_Force) &&
                     Items.CanUseItem((int)ItemId.Trinity_Force)))
                {
                    Q.Cast(Game.CursorPos);
                }
            };
            Orbwalker.OnPreAttack += (target, args) =>
            {
                args.Process = !IsDashing;
            };
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.E)
                {
                    lastE = Variables.TickCount;
                }
            };
            Events.OnDash += (sender, args) =>
            {
                if (!args.Unit.IsMe)
                {
                    return;
                }
                isDash  = true;
                posDash = args.EndPos.ToVector3();
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = true;
                    break;

                case "YasuoDashScalar":
                    cDash = 1;
                    break;
                }
            };
            Obj_AI_Base.OnBuffUpdate += (sender, args) =>
            {
                if (!sender.IsMe || !args.Buff.Caster.IsMe || args.Buff.DisplayName != "YasuoDashScalar")
                {
                    return;
                }
                cDash = 2;
            };
            Obj_AI_Base.OnBuffLose += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = false;
                    break;

                case "YasuoDashScalar":
                    cDash = 0;
                    break;
                }
            };

            GameObjectNotifier <MissileClient> .OnCreate += (sender, args) =>
            {
                var spellCaster = args.SpellCaster as AIHeroClient;
                if (spellCaster == null || !spellCaster.IsMe)
                {
                    return;
                }
                switch (args.SData.Name)
                {
                case "YasuoWMovingWallMisL":
                    wallLeft = args;
                    break;

                case "YasuoWMovingWallMisR":
                    wallRight = args;
                    break;
                }
            };
            GameObjectNotifier <MissileClient> .OnDelete += (sender, args) =>
            {
                if (args.Compare(wallLeft))
                {
                    wallLeft = null;
                }
                else if (args.Compare(wallRight))
                {
                    wallRight = null;
                }
            };
        }
Exemple #9
0
        public Zed()
        {
            Q  = new Spell(SpellSlot.Q, 925);
            Q2 = new Spell(SpellSlot.Q, 925);
            W  = new Spell(SpellSlot.W, 600);
            E  = new Spell(SpellSlot.E, 280);
            R  = new Spell(SpellSlot.R, 700);
            Q.SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2.SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            E.SetTargetted(0.05f, float.MaxValue);
            Q.DamageType   = Q2.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = Q2.MinHitChance = HitChance.VeryHigh;

            var orbwalkMenu = MainMenu.Add(new Menu("Orbwalk", "Orbwalk"));
            {
                orbwalkMenu.Separator("Q/E: Always On");
                orbwalkMenu.Separator("Sub Settings");
                orbwalkMenu.Bool("Ignite", "Use Ignite");
                orbwalkMenu.Bool("Item", "Use Item");
                orbwalkMenu.Separator("W Settings");
                orbwalkMenu.Bool("WNormal", "Use For Non-R Combo");
                orbwalkMenu.List("WAdv", "Use For R Combo", new[] { "OFF", "Line", "Triangle", "Mouse" }, 1);
                orbwalkMenu.List("WSwapGap", "Swap To Gap Close", new[] { "OFF", "Smart", "Always" }, 1);
                orbwalkMenu.Separator("R Settings");
                orbwalkMenu.Bool("R", "Use R");
                orbwalkMenu.Slider(
                    "RStopRange",
                    "Priorize If Ready And Distance <=",
                    (int)(R.Range + 200),
                    (int)R.Range,
                    (int)(R.Range + W.Range));
                orbwalkMenu.List("RSwapGap", "Swap To Gap Close", new[] { "OFF", "Smart", "Always" }, 1);
                orbwalkMenu.Slider("RSwapIfHpU", "Swap If Hp < (%)", 20);
                orbwalkMenu.Bool("RSwapIfKill", "Swap If Mark Can Kill Target");
                orbwalkMenu.Separator("Extra R Settings");
                foreach (var enemy in GameObjects.EnemyHeroes)
                {
                    orbwalkMenu.Bool("RCast" + enemy.ChampionName, "Not Cast On " + enemy.ChampionName, true);
                }
            }
            var hybridMenu = MainMenu.Add(new Menu("Hybrid", "Hybrid"));
            {
                hybridMenu.List("Mode", "Mode", new[] { "W-E-Q", "E-Q", "Q" });
                hybridMenu.Separator("Auto Q Settings");
                hybridMenu.KeyBind("AutoQ", "KeyBind", Keys.T, KeyBindType.Toggle);
                hybridMenu.Slider("AutoQMpA", "If Mp >=", 100, 0, 200);
            }
            var farmMenu = MainMenu.Add(new Menu("Farm", "Farm"));
            {
                farmMenu.Bool("Q", "Use Q");
                farmMenu.Bool("E", "Use E", false);
            }
            var ksMenu = MainMenu.Add(new Menu("KillSteal", "Kill Steal"));

            {
                ksMenu.Bool("Q", "Use Q");
                ksMenu.Bool("E", "Use E");
            }
            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }
            var drawMenu = MainMenu.Add(new Menu("Draw", "Draw"));

            {
                drawMenu.Bool("Q", "Q Range");
                drawMenu.Bool("W", "W Range");
                drawMenu.Bool("E", "E Range", false);
                drawMenu.Bool("R", "R Range");
                drawMenu.Bool("Target", "Target");
                drawMenu.Bool("WPos", "W Shadow");
                drawMenu.Bool("RPos", "R Shadow");
            }
            MainMenu.KeyBind("FleeW", "Use W To Flee", Keys.C);

            Evade.TryEvading    += TryEvading;
            Game.OnUpdate       += OnUpdate;
            Drawing.OnDraw      += OnDraw;
            GameObject.OnCreate += (sender, args) =>
            {
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || !shadow.IsValid || shadow.Name != "Shadow" || shadow.IsEnemy)
                {
                    return;
                }
                if (wCasted)
                {
                    wShadow = shadow;
                    wCasted = false;
                    rCasted = false;
                    DelayAction.Add(4450, () => wShadow = null);
                }
                else if (rCasted)
                {
                    rShadow = shadow;
                    rCasted = false;
                    wCasted = false;
                    DelayAction.Add(7450, () => rShadow = null);
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var mark = sender as Obj_GeneralParticleEmitter;
                if (mark != null && mark.IsValid && mark.Name == "Zed_Base_R_buf_tell.troy" && rShadow.IsValid() &&
                    deathMark == null)
                {
                    deathMark = mark;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                var mark = sender as Obj_GeneralParticleEmitter;
                if (mark != null && mark.IsValid && mark.Name == "Zed_Base_R_buf_tell.troy" &&
                    deathMark.NetworkId == mark.NetworkId)
                {
                    deathMark = null;
                }
            };
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                if (args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
        }
Exemple #10
0
        public Zed()
        {
            Q              = new LeagueSharp.SDK.Spell(SpellSlot.Q, 925).SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            Q3             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            W              = new LeagueSharp.SDK.Spell(SpellSlot.W, 700).SetSkillshot(0, 60, 1750, false, SkillshotType.SkillshotLine);
            E              = new LeagueSharp.SDK.Spell(SpellSlot.E, 290).SetTargetted(0.005f, float.MaxValue);
            R              = new LeagueSharp.SDK.Spell(SpellSlot.R, 625);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = HitChance.VeryHigh;

            comboMenu = config.AddSubMenu("连招", "Combo");
            comboMenu.AddGroupLabel("Q/E: 持续开启");
            comboMenu.Add("Ignite", new CheckBox("使用 点燃"));
            comboMenu.Add("Items", new CheckBox("使用 物品"));
            comboMenu.AddGroupLabel("替换设置");
            comboMenu.Add("SwapIfKill", new CheckBox("替换W/R 如果标记能杀死目标", false));
            comboMenu.Add("SwapIfHpU", new Slider("替换 W/R 如果血量 < (%)", 10));
            comboMenu.Add("SwapGap", new ComboBox("替换 W/R 接近", 1, "关闭", "智能", "一直"));
            comboMenu.AddGroupLabel("W 设置");
            comboMenu.Add("WNormal", new CheckBox("用于 非连招"));
            comboMenu.Add("WAdv", new ComboBox("用于 R 连招", 1, "关闭", "线形", "三角", "鼠标"));
            comboMenu.AddGroupLabel("R 设置");
            comboMenu.Add("R", new KeyBind("使用 R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RMode", new ComboBox("模式", 0, "一直", "等待 Q/E"));
            comboMenu.Add("RStopRange", new Slider("防止 Q/W/E  如果 R 可用并且距离<=", (int)(R.Range + 200), (int)R.Range, (int)(R.Range + W.Range)));
            if (GameObjects.EnemyHeroes.Any())
            {
                comboMenu.AddGroupLabel("额外 R 设置");
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
                {
                    comboMenu.Add("RCast" + enemy.ChampionName, new CheckBox("用于 " + enemy.ChampionName, false));
                }
            }

            hybridMenu = config.AddSubMenu("混合", "Hybrid");
            hybridMenu.Add("Mode", new ComboBox("模式", 0, "W-E-Q", "E-Q", "Q"));
            hybridMenu.AddGroupLabel("自动 Q 设置 (英雄)");
            hybridMenu.Add("AutoQ", new KeyBind("按键", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQMpA", new Slider("如果能量 >=", 100, 0, 200));
            hybridMenu.AddGroupLabel("自动 E 设置 (英雄/影子)");
            hybridMenu.Add("AutoE", new CheckBox("自动", false));

            lhMenu = config.AddSubMenu("LastHit", "尾兵");
            lhMenu.Add("Q", new CheckBox("使用 Q"));

            ksMenu = config.AddSubMenu("KillSteal", "抢头");
            ksMenu.Add("Q", new CheckBox("使用 Q"));
            ksMenu.Add("E", new CheckBox("使用 E"));

            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("线圈", "Draw");
            drawMenu.Add("Q", new CheckBox("Q 范围", false));
            drawMenu.Add("W", new CheckBox("W 范围", false));
            drawMenu.Add("E", new CheckBox("E 范围", false));
            drawMenu.Add("R", new CheckBox("R 范围", false));
            drawMenu.Add("RStop", new CheckBox("防止 Q/W/E 范围", false));
            drawMenu.Add("UseR", new CheckBox("连招R 状态"));
            drawMenu.Add("Target", new CheckBox("目标"));
            drawMenu.Add("DMark", new CheckBox("死亡标记"));
            drawMenu.Add("WPos", new CheckBox("W 影子"));
            drawMenu.Add("RPos", new CheckBox("R 影子"));

            miscMenu = config.AddSubMenu("Misc", "杂项");
            miscMenu.Add("FleeW", new KeyBind("使用 W 逃跑", false, KeyBind.BindTypes.HoldActive, 'C'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.W && args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                else if (args.Slot == SpellSlot.R && args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                if (sender.IsEnemy)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || !shadow.IsAlly || shadow.CharData.BaseSkinName != "ZedUltMissile" || shadow.CharData.BaseSkinName != "ZedShadowDashMissile" || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                if (wCasted)
                {
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    wCasted  = rCasted = false;
                }
                else if (rCasted)
                {
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    wCasted  = rCasted = false;
                }
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (sender.IsEnemy || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow != null && shadow.IsAlly && shadow.BaseSkinName == "ZedShadow" && args.Buff.Caster.IsMe)
                {
                    switch (args.Buff.Name)
                    {
                    case "zedwshadowbuff":
                        if (!wShadow.Compare(shadow))
                        {
                            wShadowT = Variables.TickCount;
                            wShadow  = shadow;
                        }
                        break;

                    case "zedrshadowbuff":
                        if (!rShadow.Compare(shadow))
                        {
                            rShadowT = Variables.TickCount;
                            rShadow  = shadow;
                        }
                        break;
                    }
                }
            };
            Obj_AI_Base.OnPlayAnimation += (sender, args) =>
            {
                if (sender.IsMe || sender.IsEnemy || args.Animation != "Death")
                {
                    return;
                }
                if (sender.Compare(wShadow))
                {
                    wShadow = null;
                }
                else if (sender.Compare(rShadow))
                {
                    rShadow = null;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                if (missile != null)
                {
                    if (missile.SpellCaster.IsMe && missile.SData.Name == "ZedWMissile")
                    {
                        wMissile = missile;
                    }
                    return;
                }
                if (sender.Name != "Zed_Base_R_buf_tell.troy")
                {
                    return;
                }
                var target = EntityManager.Heroes.Enemies.FirstOrDefault(i => i.LSIsValidTarget() && HaveR(i));
                if (target != null && target.Distance(sender) < 150)
                {
                    deathMark = sender;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                if (sender.Compare(wMissile))
                {
                    wMissile = null;
                }
                else if (sender.Compare(deathMark))
                {
                    deathMark = null;
                }
            };
        }