Ejemplo n.º 1
0
        private static void SmiteEvent(EventArgs args)
        {
            SetSmiteSlot();
            if (!SmiteSpell.IsReady() || Player.IsDead)
            {
                return;
            }
            if (SmiteMenu["smiteActive"].Cast <KeyBind>().CurrentValue)
            {
                var unit =
                    EntityManager.MinionsAndMonsters.Monsters
                    .Where(
                        a =>
                        SmiteableUnits.Contains(a.BaseSkinName) && a.Health < GetSmiteDamage() &&
                        SmiteMenu[a.BaseSkinName].Cast <CheckBox>().CurrentValue)
                    .OrderByDescending(a => a.MaxHealth)
                    .FirstOrDefault();

                if (unit != null)
                {
                    SmiteSpell.Cast(unit);
                    return;
                }
            }
            if (SmiteMenu["useSlowSmite"].Cast <CheckBox>().CurrentValue&&
                SmiteSpell.Handle.Name == "s5_summonersmiteplayerganker")
            {
                foreach (
                    var target in
                    EntityManager.Heroes.Enemies
                    .Where(h => h.IsValidTarget(SmiteSpell.Range) && h.Health <= 20 + 8 * Player.Level))
                {
                    SmiteSpell.Cast(target);
                    return;
                }
            }
            if (SmiteMenu["comboWithDuelSmite"].Cast <CheckBox>().CurrentValue&&
                SmiteSpell.Handle.Name == "s5_summonersmiteduel" &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                foreach (
                    var target in
                    EntityManager.Heroes.Enemies
                    .Where(h => h.IsValidTarget(SmiteSpell.Range)).OrderByDescending(TargetSelector.GetPriority)
                    )
                {
                    SmiteSpell.Cast(target);
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        private static void OnDraw(EventArgs args)
        {
            // Check if summoner wants circles around smiteables
            if (DrawRange.CurrentValue && (HoldKey.CurrentValue || ToggleKey.CurrentValue))
            {
                foreach (var smiteable in CurrentySmiteable.Where(o => o.IsHPBarRendered).Where(smiteable => Player.Instance.IsInRange(smiteable, SmiteRange * 2)))
                {
                    // Get default out of range color
                    var color = SmiteColorOutOfRange;
                    var width = 1;

                    // Check if player is in range of smiteable
                    if (Player.Instance.IsInRange(smiteable, SmiteRange + Player.Instance.BoundingRadius + smiteable.BoundingRadius))
                    {
                        // In range, apply new color
                        color = SmiteColor;

                        // Check if killable
                        if (smiteable.TotalShieldHealth() <= SmiteDamage)
                        {
                            width = 10;
                        }
                    }

                    // Adjust color
                    if (!SmiteSpell.IsReady())
                    {
                        color   = SmiteColorOutOfRange;
                        color.A = 75;
                    }

                    // Draw the circle around the smiteable
                    Circle.Draw(color, smiteable.BoundingRadius + SmiteRange, width, smiteable);

                    // Check if killable
                    if (SmiteSpell.IsReady() && smiteable.TotalShieldHealth() <= SmiteDamage)
                    {
                        // Draw a bounding circle around the smiteable if killable
                        Circle.Draw(color, smiteable.BoundingRadius, width, smiteable);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 private static void OnUpdate(EventArgs args)
 {
     // Check if summoner wants to smite
     if ((HoldKey.CurrentValue || ToggleKey.CurrentValue) && SmiteSpell.IsReady())
     {
         // Get first smiteable monster
         var smiteable =
             CurrentySmiteable.Where(o => Player.Instance.IsInRange(o, SmiteRange + Player.Instance.BoundingRadius + o.BoundingRadius)).OrderByDescending(o => o.MaxHealth).FirstOrDefault();
         if (smiteable != null)
         {
             // Check if that monster is enabled
             var name = smiteable.BaseSkinName.ToLower();
             if (EnabledMonsters.Any(enabled => name.Equals(enabled.Key.ToLower()) && enabled.Value.CurrentValue))
             {
                 // Check if monster can be killed
                 if (smiteable.TotalShieldHealth() <= SmiteDamage)
                 {
                     // Cast Smite
                     SmiteSpell.Cast(smiteable);
                 }
             }
         }
     }
 }
Ejemplo n.º 4
0
        private static void OnUpdate(EventArgs args)
        {
            try
            {
                if (Player.IsDead)
                {
                    return;
                }

                try
                {
                    if (!InitializeMenu.Menu.Item("ElSmite.Activated").GetValue <KeyBind>().Active)
                    {
                        return;
                    }

                    Minion =
                        (Obj_AI_Minion)
                        MinionManager.GetMinions(Player.ServerPosition, 570f, MinionTypes.All, MinionTeam.Neutral)
                        .FirstOrDefault(
                            buff => buff.Name.StartsWith(buff.CharData.BaseSkinName) &&
                            SmiteObjects.Contains(buff.CharData.BaseSkinName) &&
                            !buff.Name.Contains("Mini") && !buff.Name.Contains("Spawn"));

                    if (Minion == null)
                    {
                        return;
                    }

                    if (InitializeMenu.Menu.Item(Minion.CharData.BaseSkinName).IsActive())
                    {
                        if (SmiteSpell.IsReady())
                        {
                            if (Vector3.Distance(ObjectManager.Player.ServerPosition, Minion.ServerPosition)
                                <= SmiteSpell.Range)
                            {
                                if (Player.GetSummonerSpellDamage(Minion, Damage.SummonerSpell.Smite) >= Minion.Health &&
                                    SmiteSpell.CanCast(Minion))
                                {
                                    Player.Spellbook.CastSpell(SmiteSpell.Slot, Minion);
                                }
                            }

                            if (InitializeMenu.Menu.Item("Smite.Spell").IsActive())
                            {
                                ChampionSpellSmite(
                                    (float)Player.GetSummonerSpellDamage(Minion, Damage.SummonerSpell.Smite),
                                    Minion);
                            }
                        }
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("An error occurred: '{0}'", e);
                }
                SmiteKill();
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }