Пример #1
0
        public Cassiopeia()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 850)
            {
                Width = 75,
                CastDelay = 400
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 850)
            {
                Width = 90,
                CastDelay = 250,
                Speed = 2500
            };
            E = new SpellBase(SpellSlot.E, SpellType.Targeted, 700)
            {
                Speed = 1900,
                CastDelay = 125
            };
            R = new SpellBase(SpellSlot.R, SpellType.Cone, 825)
            {
                Width = 80,
                CastDelay = 500
            };

            Spellbook.OnCastSpell += delegate (Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    switch (args.Slot)
                    {
                        case SpellSlot.Q:
                            Q.LastSentTime = Core.GameTickCount;
                            Q.LastEndPosition = args.EndPosition;
                            break;
                        case SpellSlot.W:
                            W.LastSentTime = Core.GameTickCount;
                            W.LastEndPosition = args.EndPosition;
                            break;
                    }
                }
            };

            Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                        case SpellSlot.Q:
                            Q.LastCastTime = Core.GameTickCount;
                            Q.LastEndPosition = args.End;
                            break;
                        case SpellSlot.W:
                            W.LastCastTime = Core.GameTickCount;
                            W.LastEndPosition = args.End;
                            break;
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.Add("AssistedUltimate",
                    new KeyBind("Assisted Ultimate", false, KeyBind.BindTypes.HoldActive, 'T'));
                ToggleManager.RegisterToggle(
                    KeysMenu.Add("HarassToggle", new KeyBind("Harass Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                    {
                        if (!ModeManager.Combo)
                        {
                            Harass();
                        }
                    });
                ToggleManager.RegisterToggle(
                    KeysMenu.Add("LastHitToggle",
                        new KeyBind("LastHit Toggle", false, KeyBind.BindTypes.PressToggle, 'L')),
                    delegate
                    {
                        if (!ModeManager.Combo)
                        {
                            LastHit();
                        }
                    });
            }
            Q.AddConfigurableHitChancePercent();
            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.Add("Q", new CheckBox("Use Q"));
                ComboMenu.Add("W", new CheckBox("Use W"));
                ComboMenu.AddStringList("E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1);
                ComboMenu.Add("R", new Slider("Use R if enemies inside >= {0}", 3, 0, 5));
            }

            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.Add("Q", new CheckBox("Use Q"));
                HarassMenu.Add("W", new CheckBox("Use W"));
                HarassMenu.AddStringList("E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1);
                HarassMenu.Add("ManaPercent", new Slider("Min. ManaPercent", 25));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddGroupLabel("LaneClear");
                {
                    ClearMenu.Add("LaneClear.Q", new Slider("Use Q if hit >= {0}", 2, 0, 10));
                    ClearMenu.Add("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddStringList("LaneClear.E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1);
                    ClearMenu.Add("LaneClear.ManaPercent", new Slider("Min. ManaPercent", 50));
                }
                ClearMenu.AddGroupLabel("LastHit");
                {
                    ClearMenu.AddStringList("LastHit.E", "Use E", new[] { "Never", "On Poisoned", "Always" }, 1);
                    ClearMenu.Add("LastHit.ManaPercent", new Slider("Min. ManaPercent", 50));
                }
                ClearMenu.AddGroupLabel("JungleClear");
                {
                    ClearMenu.Add("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.Add("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.Add("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.Add("JungleClear.ManaPercent", new Slider("Min. ManaPercent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.Add("Q", new CheckBox("Use Q"));
                KillStealMenu.Add("W", new CheckBox("Use W"));
                KillStealMenu.Add("E", new CheckBox("Use E"));
                KillStealMenu.Add("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.Add("R", new CheckBox("Use R to interrupt enemy spells"));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings(false);
                E.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.Add("Toggles", new CheckBox("Draw toggles status"));
            }
        }
Пример #2
0
        public Diana()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 825)
            {
                Width = 185,
                CastDelay = 250,
                Speed = 1640
            };
            W = new SpellBase(SpellSlot.W, SpellType.Self, 250);
            E = new SpellBase(SpellSlot.E, SpellType.Self, 450)
            {
                CastDelay = 250
            };
            R = new SpellBase(SpellSlot.R, SpellType.Targeted, 825)
            {
                Speed = 2500
            };
            Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                        case SpellSlot.Q:
                            Q.LastCastTime = Core.GameTickCount;
                            QEndPosition = args.End; // +(args.End - sender.ServerPosition).Normalized() * Q.Width / 2;
                            break;
                        case SpellSlot.R:
                            R.LastCastTime = Core.GameTickCount;
                            break;
                    }
                }
            };
            GameObject.OnCreate += delegate (GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
                {
                    if (missile.SData.Name.Equals(QMissileName))
                    {
                        QMissile = missile;
                    }
                }
            };
            GameObject.OnDelete += delegate (GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
                {
                    if (missile.SData.Name.Equals(QMissileName))
                    {
                        QMissile = null;
                    }
                }
            };
            Gapcloser.OnGapcloser += delegate (AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsEnemy)
                {
                    if (AutomaticMenu.CheckBox("Gapcloser"))
                    {
                        E.Cast(sender);
                    }
                }
            };
            Interrupter.OnInterruptableSpell +=
                delegate (Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
                {
                    if (sender.IsEnemy)
                    {
                        if (AutomaticMenu.CheckBox("Interrupter"))
                        {
                            E.Cast(sender);
                        }
                    }
                };
            Dash.OnDash += delegate (Obj_AI_Base sender, Dash.DashEventArgs args)
            {
                if (sender.IsEnemy)
                {
                    if (AutomaticMenu.CheckBox("Gapcloser"))
                    {
                        E.Cast(sender);
                    }
                }
            };
            Q.AddConfigurableHitChancePercent();
            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddValue("QR", new CheckBox("Use QR on minion to gapclose"));
                ComboMenu.AddValue("Ignite", new CheckBox("Use Ignite if target is killable", false));
                ComboMenu.AddStringList("E", "Use E", new[] { "Never", "Smartly", "Always" }, 1);
                ComboMenu.AddStringList("R", "Use R", new[] { "Never", "Smartly", "Always" }, 1);
                ComboMenu.AddValue("2ndR", new CheckBox("Use always second r", false));
            }

            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W"));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 4, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.R", new CheckBox("Use R"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }

            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("R", new CheckBox("Use R"));
            }

            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                AutomaticMenu.AddValue("Interrupter", new CheckBox("Use E on channeling spells"));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings();
                E.AddDrawings(false);
                R.AddDrawings();
            }
        }
Пример #3
0
        public Orianna()
        {
            try
            {
                AIO.Initializers.Add(delegate
                {
                    _ballObject =
                        ObjectManager.Get<Obj_GeneralParticleEmitter>()
                            .FirstOrDefault(
                                o => o.IsValid && !o.IsDead && o.Name.Equals(BallName));
                });
                Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 815)
                {
                    Speed = 1200,
                    Width = 80,
                    CollidesWithYasuoWall = false
                };
                Q.SetSourceFunction(() => Ball);
                W = new SpellBase(SpellSlot.W, SpellType.Self, 255);
                W.SetSourceFunction(() => Ball);
                W.SetRangeCheckSourceFunction(() => Ball);
                E = new SpellBase(SpellSlot.E, SpellType.Circular, 1095)
                {
                    Speed = 1800,
                    Width = 85,
                    MinHitChancePercent = 45,
                    CollidesWithYasuoWall = false
                };
                E.SetSourceFunction(() => Ball);
                R = new SpellBase(SpellSlot.R, SpellType.Self, 400)
                {
                    CastDelay = 500
                };
                R.SetSourceFunction(() => Ball);
                R.SetRangeCheckSourceFunction(() => Ball);
                Spellbook.OnCastSpell += delegate (Spellbook sender, SpellbookCastSpellEventArgs args)
                {
                    if (sender.Owner.IsMe)
                    {
                        if (args.Slot == SpellSlot.R && MiscMenu.CheckBox("R.Block"))
                        {
                            args.Process = _hitR != 0 && !_ballIsMissile;
                        }
                    }
                };
                GameObject eTarget = null;
                Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsMe)
                    {
                        if (args.Slot == SpellSlot.E)
                        {
                            eTarget = args.Target;
                        }
                    }
                };
                GameObject.OnCreate += delegate (GameObject sender, EventArgs args)
                {
                    if (sender.Name.Equals(BallName))
                    {
                        _ballObject = sender;
                    }
                    else
                    {
                        var missile = sender as MissileClient;
                        if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
                        {
                            if (missile.SData.Name.Equals("orianaizuna") || missile.SData.Name.Equals("orianaredact"))
                            {
                                _ballObject = missile;
                            }
                        }
                    }
                };
                GameObject.OnDelete += delegate (GameObject sender, EventArgs args)
                {
                    var missile = sender as MissileClient;
                    if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
                    {
                        if (missile.SData.Name.Equals("orianaredact"))
                        {
                            _ballObject = eTarget;
                        }
                    }
                };
                Obj_AI_Base.OnPlayAnimation += delegate (Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
                {
                    if (sender.IsMe && args.Animation.Equals("Prop"))
                    {
                        _ballObject = sender;
                    }
                };
                Gapcloser.OnGapcloser += delegate (AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
                {
                    if (sender.IsAlly)
                    {
                        if (Target != null && AutomaticMenu.CheckBox("Gapcloser") &&
                            Ball.GetDistanceSqr(Target) > args.End.Distance(Target, true) && args.End.Distance(Target, true) < args.Sender.GetDistanceSqr(Target))
                        {
                            CastE(sender);
                        }
                    }
                };
                Dash.OnDash += delegate (Obj_AI_Base sender, Dash.DashEventArgs args)
                {
                    if (sender.IsAlly)
                    {
                        if (Target != null && AutomaticMenu.CheckBox("Gapcloser") &&
                            Ball.GetDistanceSqr(Target) > args.EndPos.Distance(Target, true) && args.EndPos.Distance(Target, true) < sender.GetDistanceSqr(Target))
                        {
                            CastE(sender);
                        }
                    }
                };
                Interrupter.OnInterruptableSpell +=
                    delegate (Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
                    {
                        if (sender.IsEnemy)
                        {
                            if (AutomaticMenu.CheckBox("Interrupter"))
                            {
                                if (!Ball.InRange(args.Sender, R.Range))
                                {
                                    ThrowBall(args.Sender);
                                }
                                else
                                {
                                    CastR(args.Sender);
                                }
                            }
                        }
                    };
                Obj_AI_Base.OnBasicAttack += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsEnemy && _canShield && args.Target != null && args.Target.IsMe)
                    {
                        if (sender.Type == GameObjectType.AIHeroClient)
                        {
                            if (sender.IsMelee)
                            {
                                CastE(MyHero);
                            }
                        }
                        else if (sender.Type == GameObjectType.obj_AI_Turret)
                        {
                            CastE(MyHero);
                        }
                    }
                };
                Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsEnemy && _canShield && args.Target != null && args.Target.IsMe)
                    {
                        if (sender.Type == GameObjectType.AIHeroClient)
                        {
                            CastE(MyHero);
                        }
                    }
                };

                Q.AddConfigurableHitChancePercent();
                R.AddConfigurableHitChancePercent();

                MenuManager.AddSubMenu("Combo");
                {
                    ComboMenu.Add("TeamFight", new Slider("Use TeamFight logic if enemies near >= {0}", 3, 1, 5));
                    ComboMenu.AddGroupLabel("Common logic");
                    ComboMenu.Add("Q", new CheckBox("Use Q on target"));
                    ComboMenu.Add("W", new CheckBox("Use W on target"));
                    ComboMenu.Add("E.Shield", new CheckBox("Use E on enemy spells"));
                    ComboMenu.Add("E.HealthPercent", new Slider("Use E if HealthPercent <= {0}", 40));
                    ComboMenu.AddGroupLabel("1 vs 1 logic");
                    ComboMenu.Add("R.Killable", new CheckBox("Use R on target if killable"));
                    ComboMenu.AddGroupLabel("TeamFight logic");
                    ComboMenu.Add("Q.Hit", new Slider("Use Q if hit >= {0}", 2, 1, 5));
                    ComboMenu.Add("W.Hit", new Slider("Use W if hit >= {0}", 2, 1, 5));
                    ComboMenu.Add("R.Hit", new Slider("Use R if hit >= {0}", 3, 1, 5));
                }

                MenuManager.AddSubMenu("Harass");
                {
                    HarassMenu.Add("Q", new CheckBox("Use Q"));
                    HarassMenu.Add("W", new CheckBox("Use W"));
                    HarassMenu.Add("E.Shield", new CheckBox("Use E on enemy spells"));
                    HarassMenu.Add("E.HealthPercent", new Slider("Use E if HealthPercent <= {0}", 40));
                    HarassMenu.Add("ManaPercent", new Slider("Min. ManaPercent", 25));
                }

                MenuManager.AddSubMenu("Clear");
                {
                    ClearMenu.AddGroupLabel("LaneClear");
                    {
                        ClearMenu.Add("LaneClear.Q", new Slider("Use Q if hit >= {0}", 4, 0, 10));
                        ClearMenu.Add("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                        ClearMenu.Add("LaneClear.E", new Slider("Use E if hit >= {0}", 6, 0, 10));
                        ClearMenu.Add("LaneClear.ManaPercent", new Slider("Min. ManaPercent", 50));
                    }
                    ClearMenu.AddGroupLabel("LastHit");
                    {
                        ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "None", "Smart", "Always" }, 1);
                        ClearMenu.Add("LastHit.ManaPercent", new Slider("Min. ManaPercent", 50));
                    }
                    ClearMenu.AddGroupLabel("JungleClear");
                    {
                        ClearMenu.Add("JungleClear.Q", new CheckBox("Use Q"));
                        ClearMenu.Add("JungleClear.W", new CheckBox("Use W"));
                        ClearMenu.Add("JungleClear.E", new CheckBox("Use E"));
                        ClearMenu.Add("JungleClear.ManaPercent", new Slider("Min. ManaPercent", 20));
                    }
                }

                MenuManager.AddKillStealMenu();
                {
                    KillStealMenu.Add("Q", new CheckBox("Use Q"));
                    KillStealMenu.Add("W", new CheckBox("Use W"));
                    KillStealMenu.Add("E", new CheckBox("Use E"));
                    KillStealMenu.Add("R", new CheckBox("Use R", false));
                }

                MenuManager.AddSubMenu("Automatic");
                {
                    AutomaticMenu.Add("Gapcloser", new CheckBox("Use E on ally gapclosing"));
                    AutomaticMenu.Add("Interrupter", new CheckBox("Use R to interrupt enemy spell"));
                    AutomaticMenu.Add("E.Shield", new CheckBox("Use E on enemy spells"));
                    AutomaticMenu.Add("W.Hit", new Slider("Use W if hit >= {0}", 2, 1, 5));
                    AutomaticMenu.Add("R.Hit", new Slider("Use R if hit >= {0}", 3, 1, 5));
                }

                MenuManager.AddDrawingsMenu();
                {
                    var c = DrawingsMenu.Add("Ball", new CheckBox("Draw ball position"));
                    CircleManager.Circles.Add(new Circle(c, new ColorBGRA(0, 0, 255, 100), () => 120, () => true,
                        () => Ball)
                    { Width = 3 });
                    Q.AddDrawings();
                    W.AddDrawings();
                    E.AddDrawings(false);
                    R.AddDrawings();
                }
                MenuManager.AddSubMenu("Misc");
                {
                    MiscMenu.Add("R.Block", new CheckBox("Block R if will not hit"));
                    if (EntityManager.Heroes.Enemies.Count > 0)
                    {
                        var enemiesAdded = new HashSet<string>();
                        MiscMenu.AddGroupLabel("Don't use R in:");
                        foreach (var enemy in EntityManager.Heroes.Enemies)
                        {
                            if (!enemiesAdded.Contains(enemy.ChampionName))
                            {
                                MiscMenu.Add("BlackList." + enemy.ChampionName, new CheckBox(enemy.ChampionName, false));
                                enemiesAdded.Add(enemy.ChampionName);
                            }
                        }
                    }
                }

            }
            catch (Exception e)
            {
                AIO.WriteInConsole(e.ToString());
            }
        }
Пример #4
0
        public Zed()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Linear, 925)
            {
                CastDelay = 250,
                Speed = 1700,
                Width = 50
            };
            Q.SetSourceFunction(() => MyHero);
            Q.SetRangeCheckSourceFunction(() => MyHero);
            W = new SpellBase(SpellSlot.W, SpellType.Linear, WRange)
            {
                Speed = 1750,
                Width = 60
            };
            E = new SpellBase(SpellSlot.E, SpellType.Self, 280);
            E.SetSourceFunction(() => MyHero);
            E.SetRangeCheckSourceFunction(() => MyHero);
            R = new SpellBase(SpellSlot.R, SpellType.Targeted, 625);
            IsDeadText = new Text("", new Font("Arial", 30F, FontStyle.Bold))
            {
                Color = Color.Red,
                Position = new Vector2(100, 50)
            };
            Obj_AI_Base.OnBuffGain += delegate (Obj_AI_Base sender, Obj_AI_BaseBuffGainEventArgs args)
            {
                var minion = sender as Obj_AI_Minion;
                if (minion != null && minion.IsAlly && minion.BaseSkinName == ShadowSkinName && args.Buff.Caster.IsMe)
                {
                    switch (args.Buff.Name)
                    {
                        case "zedwshadowbuff":
                            WShadow = minion;
                            break;
                        case "zedrshadowbuff":
                            RShadow = minion;
                            break;
                    }
                }
            };
            Obj_AI_Base.OnPlayAnimation += delegate (Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
            {
                var minion = sender as Obj_AI_Minion;
                if (minion != null && minion.IsAlly && minion.BaseSkinName == ShadowSkinName)
                {
                    if (args.Animation == "Death")
                    {
                        if (WShadow.IdEquals(minion))
                        {
                            WShadow = null;
                        }
                        else if (RShadow.IdEquals(minion))
                        {
                            RShadow = null;
                        }
                    }
                }
            };
            GameObject.OnCreate += delegate (GameObject sender, EventArgs args)
            {
                if (sender.Name == IsDeadName && RTarget != null && RTarget.IsInRange(sender, 200))
                {
                    IsDeadObject = sender;
                }
            };
            GameObject.OnDelete += delegate (GameObject sender, EventArgs args)
            {
                var minion = sender as Obj_AI_Minion;
                if (minion != null && minion.IsAlly && minion.BaseSkinName == ShadowSkinName)
                {
                    if (WShadow.IdEquals(minion))
                    {
                        WShadow = null;
                    }
                    else if (RShadow.IdEquals(minion))
                    {
                        RShadow = null;
                    }
                }
                else if (sender.IdEquals(IsDeadObject))
                {
                    IsDeadObject = null;
                }
            };
            Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                        case SpellSlot.W:
                            if (args.SData.Name == "ZedW")
                            {
                                W.LastCastTime = Core.GameTickCount;
                                W.LastEndPosition = args.End;
                            }
                            break;
                        case SpellSlot.R:
                            if (args.SData.Name == "ZedR")
                            {
                            }
                            break;
                    }
                }
            };
            Evader.OnEvader += delegate (EvaderArgs args)
            {
                var w1Distance = W.IsReady && IsW1 && EvaderMenu.CheckBox("Evader.W1")
                    ? MyHero.GetDistanceSqr(args.Sender)
                    : 16000000;
                var w2Distance = W.IsReady && WShadowIsValid && EvaderMenu.CheckBox("Evader.W2") &&
                                 !args.WillHitMyHero(WShadow.Position)
                    ? WShadow.GetDistanceSqr(args.Sender)
                    : 16000000;
                var rTarget = TargetSelector.GetTarget(R.Range, DamageType.Physical) ?? args.Sender;
                var r1Distance = R.IsReady && IsR1 && rTarget != null && R.InRange(rTarget) &&
                                 EvaderMenu.CheckBox("Evader.R1")
                    ? MyHero.GetDistanceSqr(args.Sender)
                    : 16000000;
                var r2Distance = R.IsReady && RShadowIsValid && EvaderMenu.CheckBox("Evader.R2") &&
                                 !args.WillHitMyHero(RShadow.Position)
                    ? RShadow.GetDistanceSqr(args.Sender)
                    : 16000000;
                var min = Math.Min(w1Distance, Math.Min(w2Distance, Math.Min(r1Distance, r2Distance)));
                if (min < 16000000)
                {
                    if (Math.Abs(min - r2Distance) < float.Epsilon)
                    {
                        R.Cast();
                    }
                    else if (Math.Abs(min - r1Distance) < float.Epsilon)
                    {
                        R.Cast(rTarget);
                    }
                    else if (Math.Abs(min - w2Distance) < float.Epsilon)
                    {
                        W.Cast();
                    }
                    else if (Math.Abs(min - w1Distance) < float.Epsilon)
                    {
                        var wPos = MyHero.ServerPosition +
                                   ((args.Sender.ServerPosition - MyHero.ServerPosition).Normalized() * WRange)
                                       .To2D()
                                       .Perpendicular()
                                       .To3DWorld();
                        W.Cast(wPos);
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                Orbwalker.RegisterKeyBind(
                    KeysMenu.AddValue("Combo2", new KeyBind("Combo without R", false, KeyBind.BindTypes.HoldActive, 'A')),
                    Orbwalker.ActiveModes.Combo);
                Orbwalker.RegisterKeyBind(
                    KeysMenu.AddValue("Harass2", new KeyBind("Harass WEQ", false, KeyBind.BindTypes.HoldActive, 'S')),
                    Orbwalker.ActiveModes.Harass);
            }

            Q.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddStringList("Mode", "R Combo Mode", new[] { "Line", "Triangle", "MousePos" });
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
                ComboMenu.AddValue("R", new CheckBox("Use R"));
                ComboMenu.AddValue("Items", new CheckBox("Use offensive items"));
                ComboMenu.AddValue("SwapDead", new CheckBox("Use W2/R2 if target will die"));
                ComboMenu.AddValue("SwapGapclose", new CheckBox("Use W2/R2 to get close to target"));
                ComboMenu.AddValue("SwapHP", new Slider("Use W2/R2 if my % of health is less than {0}", 15));
                ComboMenu.AddValue("Prevent", new CheckBox("Don't use spells before R"));
                if (EntityManager.Heroes.Enemies.Count > 0)
                {
                    ComboMenu.AddValue("BlackList.R", new GroupLabel("Don't use R on:"));
                    var enemiesAdded = new HashSet<string>();
                    foreach (var enemy in EntityManager.Heroes.Enemies)
                    {
                        if (!enemiesAdded.Contains(enemy.ChampionName))
                        {
                            ComboMenu.AddValue("BlackList." + enemy.ChampionName,
                                new CheckBox(enemy.ChampionName, false));
                            enemiesAdded.Add(enemy.ChampionName);
                        }
                    }
                }
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Collision", new CheckBox("Check collision when casting Q (more damage)", false));
                HarassMenu.AddValue("WE", new CheckBox("Only harass when combo WE will hit", false));
                HarassMenu.AddValue("SwapGapclose", new CheckBox("Use W2 if target is killable"));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 20));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 4, 0, 10));
                    ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit is greater than {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddStringList("LastHit.E", "Use E", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }

            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
            }

            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("E", new CheckBox("Use E", false));
                AutomaticMenu.AddValue("SwapDead", new CheckBox("Use W2/R2 if target will die", false));
            }
            MenuManager.AddSubMenu("Evader");
            {
                EvaderMenu.AddValue("Evader.W1", new CheckBox("Use W1", false));
                EvaderMenu.AddValue("Evader.W2", new CheckBox("Use W2"));
                EvaderMenu.AddValue("Evader.R1", new CheckBox("Use R1"));
                EvaderMenu.AddValue("Evader.R2", new CheckBox("Use R2"));
            }
            Evader.Initialize();
            Evader.AddCrowdControlSpells();
            Evader.AddDangerousSpells();
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings();
                E.AddDrawings(false);
                R.AddDrawings();
                CircleManager.Circles.Add(new Circle(
                    DrawingsMenu.AddValue("W.Shadow", new CheckBox("Draw W shadow circle")), SharpDX.Color.Blue,
                    () => 100, () => WShadowIsValid,
                    () => WShadow)
                { Width = 1 });

                CircleManager.Circles.Add(new Circle(
                    DrawingsMenu.AddValue("R.Shadow", new CheckBox("Draw R shadow circle")), SharpDX.Color.Orange,
                    () => 100, () => RShadowIsValid,
                    () => RShadow)
                { Width = 1 });
                DrawingsMenu.AddValue("IsDead", new CheckBox("Draw text if target will die"));
                DrawingsMenu.AddValue("Passive", new CheckBox("Draw text when passive is available"));
            }
        }
Пример #5
0
        public Syndra()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 825)
            {
                CastDelay = 600,
                Width = Spells.Q.Width,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 950)
            {
                CastDelay = 250,
                Width = Spells.W.Width,
                Speed = 1450,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Cone, 675 + Spells.E.ExtraRange)
            {
                CastDelay = 250,
                Width = Spells.E.Level1Angle,
                Speed = 2500,
            };
            QE = new SpellBase(SpellSlot.E, SpellType.Linear, Spells.QE.Range)
            {
                CastDelay = Spells.QE.CastDelay,
                Width = 60,
                Speed = Spells.QE.Speed,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Targeted, Spells.R.Level1Range);
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                IsKillableOnEnemyPosition.Add(enemy.NetworkId, new Text("R KILLABLE", new Font("Arial", TextEnemyPositionSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
                IsKillableOnScreen.Add(enemy.NetworkId, new Text(enemy.BaseSkinName + " is killable", new Font("Arial", TextScreenSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
            }
            Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                        case SpellSlot.Q:
                            Q.LastEndPosition = args.End.IsInRange(sender, Q.Range) ? args.End : (MyHero.Position + (args.End - MyHero.Position).Normalized() * Q.Range);
                            Q.LastCastTime = Core.GameTickCount;
                            break;
                        case SpellSlot.W:
                            if (args.SData.Name.ToLower() == "syndrawcast")
                            {
                                W.LastEndPosition = args.End.IsInRange(sender, W.Range) ? args.End : (MyHero.Position + (args.End - MyHero.Position).Normalized() * W.Range);
                                W.LastCastTime = Core.GameTickCount;
                            }
                            break;
                        case SpellSlot.E:
                            E.LastCastTime = Core.GameTickCount;
                            break;
                    }
                }
            };
            GameObject.OnCreate += delegate (GameObject sender, EventArgs args)
            {
                var objBase = sender as Obj_AI_Base;
                if (objBase != null && Sphere.IsMySphere(objBase))
                {
                    Spheres.Add(new Sphere(objBase));
                }
            };
            Gapcloser.OnGapcloser += delegate (AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.End.Distance(MyHero, true) <= sender.Distance(MyHero, true))
                {
                    CastE(sender);
                    CastQE(sender);
                }
            };
            Dash.OnDash += delegate (Obj_AI_Base sender, Dash.DashEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.EndPos.Distance(MyHero, true) <= sender.Distance(MyHero, true))
                {
                    CastE(sender);
                    CastQE(sender);
                }
            };
            Interrupter.OnInterruptableSpell +=
                delegate (Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
                {
                    if (sender.IsEnemy && AutomaticMenu.CheckBox("Interrupter"))
                    {
                        CastE(sender);
                        CastQE(sender);
                    }
                };
            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("QE",
                    new KeyBind("Use QE/WE on enemy near mouse", false, KeyBind.BindTypes.HoldActive, 'E'));
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("HarassToggle",
                        new KeyBind("Harass Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                    {
                        if (!ModeManager.Combo)
                        {
                            Harass(HarassMenu);
                        }
                    });
            }
            Q.AddConfigurableHitChancePercent(50);
            W.AddConfigurableHitChancePercent(60);
            QE.AddConfigurableHitChancePercent(75);

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
                ComboMenu.AddValue("QE", new CheckBox("Use QE"));
                ComboMenu.AddValue("WE", new CheckBox("Use WE"));
            }

            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddValue("BlackList", new GroupLabel("BlackList"));
                var hashSet = new HashSet<string>();
                foreach (var enemy in EntityManager.Heroes.Enemies.Where(enemy => hashSet.Add(enemy.ChampionName)))
                {
                    UltimateMenu.AddValue("BlackList." + enemy.ChampionName, new CheckBox(enemy.ChampionName));
                }
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Turret", new CheckBox("Don't harass under enemy turret"));
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("QE", new CheckBox("Use QE", false));
                HarassMenu.AddValue("WE", new CheckBox("Use WE", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }
            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("Interrupter", new CheckBox("Use E on channeling spells"));
                AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
            }
            MenuManager.AddSubMenu("Misc");
            {
                MiscMenu.AddValue("QE.ReducedRange", new Slider("Less QE Range", 0, 0, 650));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings();
                QE.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.AddValue("R.Killable", new CheckBox("Draw text if target is r killable"));
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
                DrawingsMenu.AddValue("E.Lines", new CheckBox("Draw lines for E"));
            }
            foreach (var sphere in ObjectManager.Get<Obj_AI_Minion>().Where(o => o.IsValid && o.IsVisible && !o.IsDead && Sphere.IsMySphere(o)))
            {
                Spheres.Add(new Sphere(sphere));
            }
        }
Пример #6
0
        public Xerath()
        {
            Q = new SpellBase(SpellSlot.Q, SpellType.Linear, 1500)
            {
                CastDelay = 500,
                Width = 95,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Circular, 1000)
            {
                CastDelay = 750,
                Width = 100,//Width = 250,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Linear, 1125)
            {
                CastDelay = 250,
                Speed = 1400,
                Width = 60,
                CollidesWithYasuoWall = true,
                AllowedCollisionCount = 0,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Circular, 5600)
            {
                Width = 200,
                CastDelay = 600,
            };
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                IsKillableOnEnemyPosition.Add(enemy.NetworkId, new Text("R KILLABLE", new Font("Arial", TextEnemyPositionSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
                IsKillableOnScreen.Add(enemy.NetworkId, new Text(enemy.BaseSkinName + " is killable", new Font("Arial", TextScreenSize, FontStyle.Bold))
                {
                    Color = Color.Red,
                });
            }
            Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                        case SpellSlot.Q:
                            Q.LastCastTime = Core.GameTickCount;
                            break;
                        case SpellSlot.W:
                            W.LastCastTime = Core.GameTickCount;
                            W.LastEndPosition = args.End;
                            break;
                        case SpellSlot.E:
                            E.LastCastTime = Core.GameTickCount;
                            E.LastEndPosition = sender.Position + (args.End - sender.Position).Normalized() * E.Range;
                            break;
                        case SpellSlot.R:
                            R.LastCastTime = Core.GameTickCount;
                            TapKeyPressed = false;
                            break;
                    }
                }
            };
            GameObject.OnCreate += delegate (GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster.IsMe && missile.SData.Name.ToLower() == Spells.E.MissileName)
                {
                    Spells.E.Missile = missile;
                }
            };
            GameObject.OnDelete += delegate (GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && missile.SpellCaster.IsMe && missile.SData.Name.ToLower() == Spells.E.MissileName)
                {
                    Spells.E.Missile = null;
                }
            };
            Gapcloser.OnGapcloser += delegate (AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.End.Distance(MyHero, true) <= sender.Distance(MyHero, true))
                {
                    CastE(sender);
                }
            };
            Dash.OnDash += delegate (Obj_AI_Base sender, Dash.DashEventArgs args)
            {
                if (sender.IsEnemy && AutomaticMenu.CheckBox("Gapcloser") && args.EndPos.Distance(MyHero, true) <= sender.Distance(MyHero, true))
                {
                    CastE(sender);
                }
            };
            Interrupter.OnInterruptableSpell +=
                delegate (Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
                {
                    if (sender.IsEnemy && AutomaticMenu.CheckBox("Interrupter"))
                    {
                        CastE(sender);
                    }
                };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("TapKey",
                    new KeyBind("R Tap Key", false, KeyBind.BindTypes.HoldActive, 'T')).OnValueChange += delegate (ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
                    {
                        if (args.NewValue && R.IsLearned)
                        {
                            TapKeyPressed = true;
                            if (!IsCastingR)
                            {
                                R.Cast();
                            }
                        }
                    };
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("StartWithCC",
                        new KeyBind("Start with CC", false, KeyBind.BindTypes.PressToggle, 'L')),
                    delegate
                    {

                    });
            }
            Q.AddConfigurableHitChancePercent();
            W.AddConfigurableHitChancePercent();
            E.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
            }

            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddStringList("Mode", "R AIM Mode", new[] { "Disabled", "Using TapKey", "Automatic" }, 2);
                UltimateMenu.AddValue("Delay", new Slider("Delay between R's (in ms)", 0, 0, 1500));
                UltimateMenu.AddValue("NearMouse", new GroupLabel("Near Mouse Settings"));
                UltimateMenu.AddValue("NearMouse.Enabled", new CheckBox("Only select target near mouse", false));
                UltimateMenu.AddValue("NearMouse.Radius", new Slider("Near mouse radius", 500, 100, 1500));
                UltimateMenu.AddValue("NearMouse.Draw", new CheckBox("Draw near mouse radius"));
            }

            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q", false));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit >= {0}", 0, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }
            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R", false));
            }
            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("Interrupter", new CheckBox("Use E on channeling spells"));
                AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings();
                W.AddDrawings();
                E.AddDrawings();
                R.AddDrawings();
                DrawingsMenu.AddValue("R.Killable", new CheckBox("Draw text if target is r killable"));
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
            }
        }
Пример #7
0
        public Orianna()
        {
            try
            {
                AIO.Initializers.Add(delegate
                {
                    _cachedBallObject = OriannaBall(MyHero);
                });
                Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 815)
                {
                    Speed = 1200,
                    Width = 80,
                    CollidesWithYasuoWall = false
                };
                Q.SetSourceFunction(() => _cachedBallObject);
                W = new SpellBase(SpellSlot.W, SpellType.Self, 255);
                W.SetSourceFunction(() => _cachedBallObject);
                W.SetRangeCheckSourceFunction(() => _cachedBallObject);
                E = new SpellBase(SpellSlot.E, SpellType.Linear, 1095)
                {
                    Speed = 1800,
                    Width = 85,
                    MinHitChancePercent = 45,
                    CollidesWithYasuoWall = false
                };
                E.SetSourceFunction(() => _cachedBallObject);
                R = new SpellBase(SpellSlot.R, SpellType.Self, 400)
                {
                    CastDelay = 500
                };
                R.SetSourceFunction(() => _cachedBallObject);
                R.SetRangeCheckSourceFunction(() => _cachedBallObject);
                Spellbook.OnCastSpell += delegate (Spellbook sender, SpellbookCastSpellEventArgs args)
                {
                    if (sender.Owner.IsMe)
                    {
                        if (args.Slot == SpellSlot.R && MiscMenu.CheckBox("R.Block"))
                        {
                            args.Process = _hitR != 0 && !_ballIsMissile;
                        }
                    }
                };
                GameObject eTarget = null;
                Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsMe)
                    {
                        if (args.Slot == SpellSlot.E)
                        {
                            eTarget = args.Target;
                        }
                    }
                };
                Gapcloser.OnGapcloser += delegate (AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
                {
                    if (sender.IsAlly)
                    {
                        if (Target != null && AutomaticMenu.CheckBox("Gapcloser") &&
                            _cachedBallObject.GetDistanceSqr(Target) > args.End.Distance(Target, true) &&
                            args.End.Distance(Target, true) < args.Sender.GetDistanceSqr(Target))
                        {
                            CastE(sender);
                        }
                    }
                };
                Dash.OnDash += delegate (Obj_AI_Base sender, Dash.DashEventArgs args)
                {
                    if (sender.IsAlly)
                    {
                        if (Target != null && AutomaticMenu.CheckBox("Gapcloser") &&
                            _cachedBallObject.GetDistanceSqr(Target) > args.EndPos.Distance(Target, true) &&
                            args.EndPos.Distance(Target, true) < sender.GetDistanceSqr(Target))
                        {
                            CastE(sender);
                        }
                    }
                };
                Interrupter.OnInterruptableSpell +=
                    delegate (Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
                    {
                        if (sender.IsEnemy)
                        {
                            if (AutomaticMenu.CheckBox("Interrupter"))
                            {
                                if (!_cachedBallObject.InRange(args.Sender, R.Range))
                                {
                                    ThrowBall(args.Sender);
                                }
                                else
                                {
                                    CastR(args.Sender);
                                }
                            }
                        }
                    };
                Obj_AI_Base.OnBasicAttack += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsEnemy && _canShield && args.Target != null && args.Target.IsMe)
                    {
                        if (sender.Type == GameObjectType.AIHeroClient)
                        {
                            if (sender.IsMelee)
                            {
                                CastE(MyHero);
                            }
                        }
                        else if (sender.Type == GameObjectType.obj_AI_Turret)
                        {
                            CastE(MyHero);
                        }
                    }
                };
                Obj_AI_Base.OnProcessSpellCast += delegate (Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsEnemy && _canShield && args.Target != null && args.Target.IsMe)
                    {
                        if (sender.Type == GameObjectType.AIHeroClient)
                        {
                            CastE(MyHero);
                        }
                    }
                };

                Game.OnUpdate += delegate
                {
                    _cachedBallObject = OriannaBall(MyHero);
                };

                Q.AddConfigurableHitChancePercent();
                W.AddConfigurableHitChancePercent();
                E.AddConfigurableHitChancePercent();
                R.AddConfigurableHitChancePercent();

                MenuManager.AddSubMenu("Combo");
                {
                    ComboMenu.AddValue("TeamFight",
                        new Slider("Use TeamFight logic if enemies near >= {0}", 3, 1, 5));
                    ComboMenu.AddValue("Common", new GroupLabel("Common logic"));
                    ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                    ComboMenu.AddValue("W", new CheckBox("Use W"));
                    ComboMenu.AddValue("E.Shield", new CheckBox("Use E on enemy spells"));
                    ComboMenu.AddValue("E.HealthPercent", new Slider("Use E if my % of health is less than {0}", 40));
                    ComboMenu.AddValue("1vs1", new GroupLabel("1 vs 1 logic"));
                    ComboMenu.AddValue("R.Killable", new CheckBox("Use R if target is killable"));
                    ComboMenu.AddValue("TeamFightLogic", new GroupLabel("TeamFight logic"));
                    ComboMenu.AddValue("Q.Hit", new Slider("Use Q if hit >= {0}", 2, 1, 5));
                    ComboMenu.AddValue("W.Hit", new Slider("Use W if hit >= {0}", 2, 1, 5));
                    ComboMenu.AddValue("R.Hit", new Slider("Use R if hit >= {0}", 3, 1, 5));
                }

                MenuManager.AddSubMenu("Harass");
                {
                    HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                    HarassMenu.AddValue("W", new CheckBox("Use W"));
                    HarassMenu.AddValue("E.Shield", new CheckBox("Use E on enemy spells"));
                    HarassMenu.AddValue("E.HealthPercent", new Slider("Use E if my % of health is less than {0}", 40));
                    HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
                }

                MenuManager.AddSubMenu("Clear");
                {
                    ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                    {
                        ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit >= {0}", 4, 0, 10));
                        ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit >= {0}", 3, 0, 10));
                        ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit >= {0}", 6, 0, 10));
                        ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                    }
                    ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                    {
                        ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                        ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                    }
                    ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                    {
                        ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                        ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                        ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                        ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                    }
                }

                MenuManager.AddKillStealMenu();
                {
                    KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                    KillStealMenu.AddValue("W", new CheckBox("Use W"));
                    KillStealMenu.AddValue("E", new CheckBox("Use E"));
                    KillStealMenu.AddValue("R", new CheckBox("Use R", false));
                }

                MenuManager.AddSubMenu("Automatic");
                {
                    AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                    AutomaticMenu.AddValue("Interrupter", new CheckBox("Use R on channeling spells"));
                    AutomaticMenu.AddValue("E.Shield", new CheckBox("Use E on enemy spells"));
                    AutomaticMenu.AddValue("W.Hit", new Slider("Use W if hit >= {0}", 2, 1, 5));
                    AutomaticMenu.AddValue("R.Hit", new Slider("Use R if hit >= {0}", 3, 1, 5));
                }

                MenuManager.AddDrawingsMenu();
                {
                    var c = DrawingsMenu.AddValue("_cachedBallObject", new CheckBox("Draw ball position"));
                    CircleManager.Circles.Add(new Circle(c, new ColorBGRA(0, 0, 255, 100), () => 120, () => true,
                        () => _cachedBallObject)
                    { Width = 3 });
                    Q.AddDrawings();
                    W.AddDrawings();
                    E.AddDrawings(false);
                    R.AddDrawings();
                }
                MenuManager.AddSubMenu("Misc");
                {
                    MiscMenu.AddValue("R.Block", new CheckBox("Block R if will not hit"));
                    if (EntityManager.Heroes.Enemies.Count > 0)
                    {
                        var enemiesAdded = new HashSet<string>();
                        MiscMenu.AddValue("BlackList.R", new GroupLabel("Don't use R on:"));
                        foreach (var enemy in EntityManager.Heroes.Enemies.Where(enemy => enemiesAdded.Add(enemy.ChampionName)))
                        {
                            MiscMenu.AddValue("BlackList." + enemy.ChampionName,
                                new CheckBox(enemy.ChampionName, false));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                AIO.WriteInConsole(e.ToString());
            }
        }