Example #1
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, 250).SetSkillshot(0.01f, 250, 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);
                };
            LeagueSharp.Common.LSEvents.AfterAttack += (args) =>
                {
                    if (!PortAIO.OrbwalkerManager.isLaneClearActive
                        || !(args.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);
                    }
                };
            LeagueSharp.Common.LSEvents.BeforeAttack += (args) =>
            {
                args.Process = !IsDashing;
            };
            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;
                        case "yasuoeqcombosoundmiss":
                        case "YasuoEQComboSoundHit":
                            DelayAction.Add(
                                70,
                                () =>
                                {
                                    EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, Player.ServerPosition.LSExtend(Game.CursorPos, Player.BoundingRadius));
                                });
                            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;
                }
            };
        }
Example #2
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;
                }
            };
        }