Beispiel #1
0
        private static void Clear()
        {
            var minions = ObjectManager.Get <Obj_AI_Minion>().Where(m => m.IsValidTarget(400)).ToList();

            if (minions.Count() > 2)
            {
                if (Items.HasItem(3077) && Items.CanUseItem(3077))
                {
                    Items.UseItem(3077);
                }
                if (Items.HasItem(3074) && Items.CanUseItem(3074))
                {
                    Items.UseItem(3074);
                }
            }
            float perc = (float)config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (me.Mana < me.MaxMana * perc)
            {
                return;
            }

            Q.SetSkillshot(
                Q.Instance.SData.SpellCastTime, Q.Instance.SData.LineWidth, Q.Instance.SData.MissileSpeed, false,
                SkillshotType.SkillshotLine);
            var minionsSpells = ObjectManager.Get <Obj_AI_Minion>().Where(m => m.IsValidTarget(W.Range)).ToList();

            if (W.IsReady() && minionsSpells.Count() > 1 && config.Item("usewC", true).GetValue <bool>() &&
                me.Spellbook.GetSpell(SpellSlot.W).ManaCost <= me.Mana)
            {
                W.Cast();
            }
            var minHit = config.Item("useeCmin", true).GetValue <Slider>().Value;

            if (E.IsReady() && me.Spellbook.GetSpell(SpellSlot.Q).ManaCost <= me.Mana &&
                CombatHelper.SejuaniCountFrostMinion(E.Range) >= minHit &&
                (!(!Q.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.Q).ManaCost < me.MaxMana * perc) ||
                 !(!W.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.W).ManaCost < me.MaxMana * perc)))
            {
                E.Cast();
            }
            if (config.Item("useqC", true).GetValue <bool>() && Q.IsReady() &&
                me.Spellbook.GetSpell(SpellSlot.Q).ManaCost <= me.Mana)
            {
                var minionsForQ = MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                MinionManager.FarmLocation bestPosition = Q.GetLineFarmLocation(minionsForQ);
                if (bestPosition.Position.IsValid())
                {
                    if (bestPosition.MinionsHit >= 2)
                    {
                        Q.Cast(bestPosition.Position, config.Item("packets").GetValue <bool>());
                    }
                }
            }

            Q.SetSkillshot(
                Q.Instance.SData.SpellCastTime, Q.Instance.SData.LineWidth, Q.Instance.SData.MissileSpeed, true,
                SkillshotType.SkillshotLine);
        }