Exemplo n.º 1
0
        /// <summary>
        /// Champion constructor
        /// </summary>
        /// <param name="szChampName">The champion name.</param>
        /// <param name="szMenuName">The menu name.</param>
        /// <param name="enableRangeDrawings">if <c>true</c>, enables the spell range drawings</param>
        /// <param name="enableEvader">if <c>true</c>, enables the spell evader if the champion is supported</param>
        public Champion(string szChampName, string szMenuName, bool enableRangeDrawings = true, bool enableEvader = true)
        {
            Text = new Font(Drawing.Direct3DDevice,
                            new FontDescription
            {
                FaceName        = "Malgun Gothic",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural
            });

            ConfigMenu = new Menu(szMenuName, String.Format("SAutoCarry.{0}.Root", szChampName), true);

            TargetSelector.Initialize(ConfigMenu);
            Orbwalker = new Orbwalking.Orbwalker(ConfigMenu);

            SetSpells();

            DrawingMenu = new Menu("Drawings", "drawings");
            if (enableRangeDrawings)
            {
                if (this.Spells[Q] != null && this.Spells[0].Range > 0 && this.Spells[Q].Range < 3000)
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWQ", "Draw Q").SetValue(new Circle(true, Color.Red, this.Spells[Q].Range)));
                }

                if (this.Spells[W] != null && this.Spells[1].Range > 0 && this.Spells[W].Range < 3000)
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWW", "Draw W").SetValue(new Circle(true, Color.Aqua, this.Spells[W].Range)));
                }

                if (this.Spells[E] != null && this.Spells[2].Range > 0 && this.Spells[E].Range < 3000)
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWE", "Draw E").SetValue(new Circle(true, Color.Bisque, this.Spells[E].Range)));
                }

                if (this.Spells[R] != null && this.Spells[3].Range > 0 && this.Spells[R].Range < 3000) //global ult ?
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWR", "Draw R").SetValue(new Circle(true, Color.Chartreuse, this.Spells[R].Range)));
                }
            }
            ConfigMenu.AddSubMenu(DrawingMenu);

            if (enableEvader)
            {
                Menu   evaderMenu = null;
                Evader evader;
                switch (szChampName.ToLower())
                {
                case "ezreal":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Blink, Spells[E]);
                    break;

                case "sivir":
                case "morgana":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.SpellShield, Spells[E]);
                    break;

                case "fizz":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[E]);
                    break;

                case "lissandra":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Invulnerability, Spells[R]);
                    break;

                case "nocturne":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.SpellShield, Spells[W]);
                    break;

                case "vladimir":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Invulnerability, Spells[W]);
                    break;

                case "graves":
                case "gnar":
                case "lucian":
                case "riven":
                case "shen":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[E]);
                    break;

                case "zed":
                case "leblanc":
                case "corki":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[W]);
                    break;

                case "vayne":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[Q]);
                    break;
                }
                if (evaderMenu != null)
                {
                    ConfigMenu.AddSubMenu(evaderMenu);
                }
            }
            CreateConfigMenu();

            Menu credits = new Menu("Credits", "SAutoCarry.Credits.Root");

            credits.AddItem(new MenuItem("SAutoCarry.Credits.Root.Author", "SAutoCarry - Made By Synx"));
            credits.AddItem(new MenuItem("SAutoCarry.Credits.Root.Upvote", "Dont Forget to upvote in DB!"));

            Menu supportedChamps = new Menu("Supported Champions", "SAutoCarry.Credits.Supported");

            Menu adc = new Menu("ADC (5)", "SAutoCarry.Credits.ADC");

            adc.AddItem(new MenuItem("SAutoCarry.Credits.ADC.Supported1", "  ->Corki        "));
            adc.AddItem(new MenuItem("SAutoCarry.Credits.ADC.Supported2", "  ->Lucian       "));
            adc.AddItem(new MenuItem("SAutoCarry.Credits.ADC.Supported3", "  ->Miss Fortune "));
            adc.AddItem(new MenuItem("SAutoCarry.Credits.ADC.Supported4", "  ->Twitch       "));
            adc.AddItem(new MenuItem("SAutoCarry.Credits.ADC.Supported5", "  ->Vayne        "));
            //
            supportedChamps.AddSubMenu(adc);
            //
            Menu mid = new Menu("Mid (6)", "SAutoCarry.Credits.Mid");

            mid.AddItem(new MenuItem("SAutoCarry.Credits.Mid.Supported1", "  ->Azir         "));
            mid.AddItem(new MenuItem("SAutoCarry.Credits.Mid.Supported2", "  ->Cassiopeia   "));
            mid.AddItem(new MenuItem("SAutoCarry.Credits.Mid.Supported3", "  ->Orianna      "));
            mid.AddItem(new MenuItem("SAutoCarry.Credits.Mid.Supported4", "  ->Twisted Fate "));
            mid.AddItem(new MenuItem("SAutoCarry.Credits.Mid.Supported5", "  ->Veigar       "));
            mid.AddItem(new MenuItem("SAutoCarry.Credits.Mid.Supported6", "  ->Viktor       "));
            //
            supportedChamps.AddSubMenu(mid);
            //
            Menu top = new Menu("Top (5)", "SAutoCarry.Credits.Top");

            top.AddItem(new MenuItem("SAutoCarry.Credits.Top.Supported1", "  ->Darius      "));
            top.AddItem(new MenuItem("SAutoCarry.Credits.Top.Supported2", "  ->Dr. Mundo   "));
            top.AddItem(new MenuItem("SAutoCarry.Credits.Top.Supported3", "  ->Pantheon    "));
            top.AddItem(new MenuItem("SAutoCarry.Credits.Top.Supported4", "  ->Rengar      "));
            top.AddItem(new MenuItem("SAutoCarry.Credits.Top.Supported5", "  ->Riven       "));
            //
            supportedChamps.AddSubMenu(top);
            //
            Menu jungle = new Menu("Jungle (3)", "SAutoCarry.Credits.Jungle");

            jungle.AddItem(new MenuItem("SAutoCarry.Credits.Jungle.Supported1", "  ->Jax          "));
            jungle.AddItem(new MenuItem("SAutoCarry.Credits.Jungle.Supported2", "  ->Master Yi    "));
            jungle.AddItem(new MenuItem("SAutoCarry.Credits.Jungle.Supported3", "  ->Shyvana      "));
            //
            supportedChamps.AddSubMenu(jungle);
            //
            Menu support = new Menu("Support (1)", "SAutoCarry.Credits.Support");

            support.AddItem(new MenuItem("SAutoCarry.Credits.Support.Support1", "  ->Blitzcrank   "));
            //
            supportedChamps.AddSubMenu(support);
            //

            credits.AddSubMenu(supportedChamps);

            #region Events
            Game.OnUpdate  += this.Game_OnUpdate;
            Drawing.OnDraw += this.Drawing_OnDraw;
            Orbwalking.Events.BeforeAttack     += this.OrbwalkingEvents_BeforeAttack;
            Orbwalking.Events.AfterAttack      += this.OrbwalkingEvents_AfterAttack;
            AntiGapcloser.OnEnemyGapcloser     += this.AntiGapcloser_OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += this.Interrupter_OnPossibleToInterrupt;
            Obj_AI_Base.OnBuffGain             += this.Obj_AI_Base_OnBuffAdd;
            Obj_AI_Base.OnSpellCast            += this.Obj_AI_Base_OnProcessSpellCast;
            CustomEvents.Unit.OnDash           += this.Unit_OnDash;
            TargetedSpellDetector.OnDetected   += this.TargetedSpellDetector_OnDetected;
            #endregion

            Prediction.Prediction.Initialize(ConfigMenu);
            ConfigMenu.AddSubMenu(credits);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Champion constructor
        /// </summary>
        /// <param name="szChampName">The champion name.</param>
        /// <param name="szMenuName">The menu name.</param>
        /// <param name="enableRangeDrawings">if <c>true</c>, enables the spell range drawings</param>
        /// <param name="enableEvader">if <c>true</c>, enables the spell evader if the champion is supported</param>
        public Champion(string szChampName, string szMenuName, bool enableRangeDrawings = true, bool enableEvader = true)
        {
            Text = new Font(Drawing.Direct3DDevice,
                            new FontDescription
            {
                FaceName        = "Malgun Gothic",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural
            });

            TargetSelector.Initialize(ConfigMenu);

            SetSpells();

            if (enableEvader)
            {
                Menu   evaderMenu = null;
                Evader evader;
                switch (szChampName.ToLower())
                {
                case "ezreal":
                    evader = new Evader(out evaderMenu, EvadeMethods.Blink, Spells[E]);
                    break;

                case "sivir":
                case "morgana":
                    evader = new Evader(out evaderMenu, EvadeMethods.SpellShield, Spells[E]);
                    break;

                case "fizz":
                    evader = new Evader(out evaderMenu, EvadeMethods.Dash, Spells[E]);
                    break;

                case "lissandra":
                    evader = new Evader(out evaderMenu, EvadeMethods.Invulnerability, Spells[R]);
                    break;

                case "nocturne":
                    evader = new Evader(out evaderMenu, EvadeMethods.SpellShield, Spells[W]);
                    break;

                case "vladimir":
                    evader = new Evader(out evaderMenu, EvadeMethods.Invulnerability, Spells[W]);
                    break;

                case "graves":
                case "gnar":
                case "lucian":
                case "riven":
                case "shen":
                    evader = new Evader(out evaderMenu, EvadeMethods.Dash, Spells[E]);
                    break;

                case "zed":
                case "leblanc":
                case "corki":
                    evader = new Evader(out evaderMenu, EvadeMethods.Dash, Spells[W]);
                    break;

                case "vayne":
                    evader = new Evader(out evaderMenu, EvadeMethods.Dash, Spells[Q]);
                    break;
                }
            }

            #region Events

            Game.OnUpdate                      += Game_OnUpdate;
            Drawing.OnDraw                     += Drawing_OnDraw;
            Orbwalker.OnPreAttack              += OrbwalkingEvents_BeforeAttack;
            Orbwalker.OnPostAttack             += OrbwalkingEvents_AfterAttack;
            AntiGapcloser.OnEnemyGapcloser     += AntiGapcloser_OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += Interrupter_OnPossibleToInterrupt;
            Obj_AI_Base.OnBuffGain             += Obj_AI_Base_OnBuffAdd;
            Obj_AI_Base.OnProcessSpellCast     += Obj_AI_Base_OnProcessSpellCast;
            CustomEvents.Unit.OnDash           += Unit_OnDash;
            TargetedSpellDetector.OnDetected   += TargetedSpellDetector_OnDetected;

            #endregion
        }
Exemplo n.º 3
0
        public Champion(string szChampName, string szMenuName, bool enableRangeDrawings = true, bool enableEvader = true)
        {
            Text = new Font(Drawing.Direct3DDevice,
                            new FontDescription
            {
                FaceName        = "Malgun Gothic",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural
            });

            ConfigMenu = new Menu(szMenuName, szChampName, true);

            TargetSelector.Initialize(ConfigMenu);
            Orbwalker = new Orbwalking.Orbwalker(ConfigMenu);

            SetSpells();

            DrawingMenu = new Menu("Drawings", "drawings");
            if (enableRangeDrawings)
            {
                if (this.Spells[0] != null && this.Spells[0].Range > 0)
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWQ", "Draw Q").SetValue(new Circle(true, Color.Red, this.Spells[0].Range)));
                }

                if (this.Spells[1] != null && this.Spells[1].Range > 0)
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWW", "Draw W").SetValue(new Circle(true, Color.Aqua, this.Spells[1].Range)));
                }

                if (this.Spells[2] != null && this.Spells[2].Range > 0)
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWE", "Draw E").SetValue(new Circle(true, Color.Bisque, this.Spells[2].Range)));
                }

                if (this.Spells[3] != null && this.Spells[3].Range > 0 && this.Spells[3].Range < 3000) //global ult ?
                {
                    this.DrawingMenu.AddItem(new MenuItem("DDRAWR", "Draw R").SetValue(new Circle(true, Color.Chartreuse, this.Spells[3].Range)));
                }
            }
            ConfigMenu.AddSubMenu(DrawingMenu);

            if (enableEvader)
            {
                Menu   evaderMenu = null;
                Evader evader;
                switch (szChampName.ToLower())
                {
                case "ezreal":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Blink, Spells[E]);
                    break;

                case "sivir":
                case "morgana":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.SpellShield, Spells[E]);
                    break;

                case "fizz":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[E]);
                    break;

                case "lissandra":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Invulnerability, Spells[R]);
                    break;

                case "nocturne":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.SpellShield, Spells[W]);
                    break;

                case "vladimir":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Invulnerability, Spells[W]);
                    break;

                case "graves":
                case "gnar":
                case "lucian":
                case "riven":
                case "shen":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[E]);
                    break;

                case "zed":
                case "leblanc":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[W]);
                    break;

                case "vayne":
                    evader = new Evader(out evaderMenu, Database.EvadeMethods.Dash, Spells[Q]);
                    break;
                }
                if (evaderMenu != null)
                {
                    ConfigMenu.AddSubMenu(evaderMenu);
                }
            }
            CreateConfigMenu();

            #region Events
            Game.OnUpdate  += this.Game_OnUpdate;
            Drawing.OnDraw += this.Drawing_OnDraw;
            Orbwalking.Events.BeforeAttack     += this.Orbwalking_BeforeAttack;
            Orbwalking.Events.AfterAttack      += this.Orbwalking_AfterAttack;
            AntiGapcloser.OnEnemyGapcloser     += this.AntiGapcloser_OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += this.Interrupter_OnPossibleToInterrupt;
            Obj_AI_Base.OnBuffAdd          += this.Obj_AI_Base_OnBuffAdd;
            Obj_AI_Base.OnProcessSpellCast += this.Obj_AI_Base_OnProcessSpellCast;
            CustomEvents.Unit.OnDash       += Unit_OnDash;
            #endregion

            Prediction.Prediction.Initialize(ConfigMenu);
        }