Exemple #1
0
        public override void Init()
        {
            try
            {
                //Create spells
                _q = new Spell.Active(SpellSlot.Q);
                _w = new Spell.Skillshot(SpellSlot.W, 1500, SkillShotType.Linear, 600, 3300, 60)
                {
                    MinimumHitChance      = HitChance.Medium,
                    AllowedCollisionCount = 0
                };
                _e = new Spell.Skillshot(SpellSlot.E, 900, SkillShotType.Circular, 1200, 1750, 100);
                _r = new Spell.Skillshot(SpellSlot.R, 3000, SkillShotType.Linear, 600, 1700, 140)
                {
                    MinimumHitChance = HitChance.Medium
                };

                try
                {
                    #region Create menu

                    //Combo Menu Settings
                    MainMenu.ComboKeys();
                    MainMenu.ComboManaManager(false, true, false, false, 0, 40, 0, 0);

                    //Lane Clear Menu Settings
                    MainMenu.LaneKeys(useW: false, useE: false, useR: false);
                    MainMenu.Lane.Add("lane.mana", new Slider("Minimum {0}% mana to laneclear with Q", 80));

                    //Jungle Clear Menu Settings
                    MainMenu.JungleKeys(useE: false, useR: false);
                    MainMenu.JungleManaManager(false, true, false, false, 0, 40, 0, 0);

                    //Harras Menu Settings
                    MainMenu.HarassKeys(useR: false);
                    MainMenu.HarassManaManager(false, true, false, false, 0, 40, 0, 0);

                    //Killsteal Menu
                    MainMenu.KsKeys(false, useW: false, useE: false);


                    //Misc Menu
                    MainMenu.MiscMenu();
                    MainMenu.Misc.Add("misc.farmQAARange", new CheckBox("Use Q when minion out of AA range"));
                    MainMenu.Misc.Add("misc.teleportE", new CheckBox("Use E on teleport position"));
                    MainMenu.Misc.Add("misc.spellcastE", new CheckBox("Use E OnProcessSpellCast"));
                    MainMenu.Misc.Add("misc.enemyTurretR", new CheckBox("Don't use R under enemy turret"));

                    //Draw Menu
                    MainMenu.DrawKeys(false, useR: false);
                    MainMenu.DamageIndicator(false, "Ultimate (R) damage");

                    Value.Init();

                    #endregion
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    Chat.Print(
                        "<font color='#23ADDB'>Marksman AIO:</font><font color='#E81A0C'> an error ocurred. (Code MENU)</font>");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Chat.Print(
                    "<font color='#23ADDB'>Marksman AIO:</font><font color='#E81A0C'> an error ocurred. (Code 503)</font>");
            }

            try
            {
                DamageIndicator.DamageToUnit = DamageInidicatorDmg;
                Game.OnTick                    += OnTick;
                Drawing.OnDraw                 += OnDraw;
                Orbwalker.OnPreAttack          += OnPreAttack;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
                Chat.Print("Jinx Loaded!", Color.Chartreuse);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Chat.Print(
                    "<font color='#23ADDB'>Marksman AIO:</font><font color='#E81A0C'> an error ocurred. (Code INIT)</font>");
            }

            foreach (var hero in ObjectManager.Get <AIHeroClient>())
            {
                Recalls.Add(new Recall(hero, RecallStatus.Inactive));
            }
        }