Example #1
0
        private static void OnGameLoad(EventArgs args)
        {
            _player = ObjectManager.Player;
            Q       = new Spell(SpellSlot.Q);
            W       = new Spell(SpellSlot.W, 900);
            E       = new Spell(SpellSlot.E, 630);
            R       = new Spell(SpellSlot.R, 630);

            W.SetSkillshot(0.25f, 80f, 1150, true, SkillshotType.SkillshotLine); // need to update values
            E.SetTargetted(0.25f, 2000f);

            Config = new Menu("Over9000 Rockets", "Tristana", true);
            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");

            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));
            Config.AddSubMenu(new Menu("Combo", "Combo"));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseQ", "Use Q?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseW", "Use W?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseE", "Use E?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseR", "Use R?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("PressR", "Cast R").SetValue(new KeyBind('R', KeyBindType.Press)));
            //Config.SubMenu("Combo")
            //  .AddItem(new MenuItem("Simulate", "Simulate Vayne").SetValue(new KeyBind('A', KeyBindType.Press)));

            Config.SubMenu("Combo")
            .AddItem(new MenuItem("Interupt", "Interupt spells").SetValue(true));

            Config.SubMenu("Combo")
            .AddItem(new MenuItem("Escape", "Escape").SetValue(new KeyBind('Z', KeyBindType.Press)));

            Config.AddSubMenu(new Menu("Harras", "Harras"));
            Config.SubMenu("Harras").AddItem(new MenuItem("UseEH", "Use E?")).SetValue(true);
            Config.SubMenu("Combo").AddItem(new MenuItem("UsePackets", "Use Packets?").SetValue(false));
            Config.AddSubMenu(new Menu("Settings", "Settings"));
            Config.SubMenu("Settings").AddItem(new MenuItem("DrawD", "Draw damage?").SetValue(true));
            Config.AddSubMenu(new Menu("Escape", "Escape"));
            Config.SubMenu("Escape")
            .AddItem(new MenuItem("allowEnemies", "Enemies around to jump").SetValue(new Slider(3, 2, 5)));
            Config.SubMenu("Escape").AddItem(new MenuItem("gapcloser", "Allow Gapcloser?")).SetValue(true);
            Config.SubMenu("Escape").AddSubMenu(new Menu("Melee", "Melee"));
            foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>())
            {
                if (enemy.IsEnemy && Orbwalking.IsMelee(enemy))
                {
                    Config.SubMenu("Escape")
                    .SubMenu("Melee")
                    .AddItem(new MenuItem(enemy.BaseSkinName, enemy.BaseSkinName).SetValue(false));
                }
                if (enemy.IsEnemy)
                {
                    if (enemy.BaseSkinName == "Fizz")
                    {
                        Config.SubMenu("Escape").AddItem(new MenuItem("fizz", "Allow Anti-Fizz")).SetValue(false);
                    }

                    if (enemy.BaseSkinName == "Zed")
                    {
                        _needProcess = true;
                        Config.SubMenu("Escape").AddItem(new MenuItem("zed", "Allow Anti-Zed")).SetValue(false);
                    }

                    if (enemy.BaseSkinName == "Vayne")
                    {
                        _needProcess = true;
                        Config.SubMenu("Escape").AddItem(new MenuItem("vayne", "Allow Anti-Vayne(Beta)")).SetValue(true);

                        //Game.PrintChat("vayne detected");
                    }

                    if (_needProcess)
                    {
                        Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
                    }
                }
            }


            Config.AddToMainMenu();

            _igniteSlot = _player.GetSpellSlot("SummonerDot");

            AntiGapcloser.OnEnemyGapcloser    += AntiGapcloser_OnEnemyGapcloser;
            Interrupter.OnPossibleToInterrupt += Interrupter_OnPossibleToInterrupt;
            Game.OnGameUpdate += GameUpdate;


            Orbwalking.AfterAttack += OrbwalkingAfterAttack;
        }