Esempio n. 1
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!SmiteMenu["smiteEnabled"].Cast <KeyBind>().CurrentValue || Smite == null)
            {
                return;
            }

            SetSmiteSlot();

            var minion = ObjectManager.Get <Obj_AI_Base>().Where(a => SmiteableUnits.Contains(a.BaseSkinName) && SmiteMenu[a.BaseSkinName].Cast <CheckBox>() != null && SmiteMenu[a.BaseSkinName].Cast <CheckBox>().CurrentValue).OrderByDescending(a => a.MaxHealth).FirstOrDefault(a => a.IsValidTarget(1400));

            if (minion == null)
            {
                return;
            }
            if (Smite.IsReady() && minion.IsValidTarget(Smite.Range) && minion.Health <= GetSmiteDamage() && SmiteMenu["regularSmite"].Cast <CheckBox>().CurrentValue || ForceSmite && Player.Instance.Distance(minion) < 100)
            {
                Smite.Cast(minion);
                ForceSmite = false;
                return;
            }
            if (SpellsManager.Q.IsReady() && minion.HasQBuff() && SmiteMenu["QSmite"].Cast <CheckBox>().CurrentValue&& minion.Health <= SpellsManager.Q2Damage(minion, GetSmiteDamage(), true) + GetSmiteDamage())
            {
                SpellsManager.Q2.Cast();
                ForceSmite = true;
                return;
            }
            if (SpellsManager.Q.IsReady() && SmiteMenu["QSmite"].Cast <CheckBox>().CurrentValue&& SpellsManager.Q.Name == Extensions.Spellss["Q1"] && minion.IsValidTarget(SpellsManager.Q.Range) &&
                minion.Health <=
                SpellsManager.QDamage(minion) + SpellsManager.Q2Damage(minion, SpellsManager.Q2Damage(minion) + GetSmiteDamage(), true) +
                GetSmiteDamage())
            {
                SpellsManager.Q.Cast(minion);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// This event is triggered when the game loads
        /// </summary>
        /// <param name="args"></param>
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            //Put the name of the champion here
            if (Player.Instance.ChampionName != "LeeSin")
            {
                return;
            }

            SpellsManager.InitializeSpells();
            Menus.CreateMenu();
            ModeManager.InitializeModes();
            DrawingsManager.InitializeDrawings();
            Combo.OnLoad();
            Orbwalker.OnPostAttack += Orbwalker_OnPostAttack;
            GameObject.OnCreate    += OnCreate;
            GameObject.OnDelete    += GameObject_OnDelete;
            Smiter.Init();
            Game.OnWndProc += Game_OnWndProc;
        }