Esempio n. 1
0
        protected override void Farming()
        {
            float manapercent = RootMenu["farming"]["lane"]["mana"].As <MenuSlider>().Value;

            if (manapercent < Player.ManaPercent())
            {
                bool useQ = RootMenu["farming"]["lane"]["useq"].Enabled;

                bool useE = RootMenu["farming"]["lane"]["usee"].Enabled;

                bool useW = RootMenu["farming"]["lane"]["usew"].Enabled;

                if (useQ)
                {
                    if (Q.Ready)
                    {
                        foreach (var minion in Bases.Extensions.GetEnemyLaneMinionsTargetsInRange(Q.Range))
                        {
                            if (minion.IsValidTarget(Q.Range) && minion != null)
                            {
                                var result = FarmHelper.GetLineClearLocation(Q.Range, 105);

                                if (result != null)
                                {
                                    if (result.numberOfMinionsHit >=
                                        RootMenu["farming"]["lane"]["qhit"].As <MenuSlider>().Value)
                                    {
                                        Q.Cast(result.CastPosition);
                                    }
                                }
                            }
                        }
                    }
                }
                if (useW)
                {
                    if (W.Ready)
                    {
                        foreach (var minion in Bases.Extensions.GetEnemyLaneMinionsTargetsInRange(W.Range))
                        {
                            if (minion.IsValidTarget(W.Range) && minion != null)
                            {
                                W.Cast();
                            }
                        }
                    }
                }
                if (useE)
                {
                    if (E.Ready)
                    {
                        if (RootMenu["farming"]["lane"]["laste"].Enabled)
                        {
                            foreach (var minion in Bases.Extensions.GetEnemyLaneMinionsTargetsInRange(E.Range))
                            {
                                if (minion.IsValidTarget(E.Range) && minion != null)
                                {
                                    if (minion.Health <= Player.GetSpellDamage(minion, SpellSlot.E))
                                    {
                                        E.Cast(minion);
                                    }
                                }
                            }
                        }
                        if (!RootMenu["farming"]["lane"]["laste"].Enabled)
                        {
                            foreach (var minion in Bases.Extensions.GetEnemyLaneMinionsTargetsInRange(Q.Range))
                            {
                                if (minion.IsValidTarget(Q.Range) && minion != null)
                                {
                                    E.Cast(minion);
                                }
                            }
                        }
                    }
                }
            }
            foreach (var jungleTarget in Bases.GameObjects.JungleLarge.Where(m => m.IsValidTarget(Q.Range))
                     .ToList())
            {
                if (!jungleTarget.IsValidTarget() || jungleTarget.UnitSkinName.Contains("Plant"))
                {
                    return;
                }

                float manapercents = RootMenu["farming"]["jungle"]["mana"].As <MenuSlider>().Value;

                if (manapercents < Player.ManaPercent())
                {
                    bool useQs = RootMenu["farming"]["jungle"]["useq"].Enabled;


                    if (useQs && Q.Ready && jungleTarget.IsValidTarget(Q.Range))
                    {
                        Q.Cast(jungleTarget);
                    }
                    if (RootMenu["farming"]["jungle"]["usew"].Enabled && W.Ready &&
                        jungleTarget.IsValidTarget(W.Range))
                    {
                        W.Cast();
                    }
                    if (RootMenu["farming"]["jungle"]["usee"].Enabled && E.Ready && jungleTarget.IsValidTarget(E.Range))
                    {
                        E.Cast(jungleTarget);
                    }
                }
            }



            foreach (var jungleTarget in Bases.GameObjects.Jungle.Where(m => m.IsValidTarget(E.Range)).ToList())
            {
                if (!jungleTarget.IsValidTarget() || jungleTarget.UnitSkinName.Contains("Plant"))
                {
                    return;
                }

                bool  useQs        = RootMenu["farming"]["jungle"]["useq"].Enabled;
                float manapercents = RootMenu["farming"]["jungle"]["mana"].As <MenuSlider>().Value;

                if (manapercents < Player.ManaPercent())
                {
                    if (useQs && Q.Ready && jungleTarget.IsValidTarget(Q.Range))
                    {
                        Q.Cast(jungleTarget);
                    }
                    if (RootMenu["farming"]["jungle"]["usew"].Enabled && W.Ready &&
                        jungleTarget.IsValidTarget(W.Range))
                    {
                        W.Cast();
                    }
                    if (RootMenu["farming"]["jungle"]["usee"].Enabled && E.Ready && jungleTarget.IsValidTarget(E.Range))
                    {
                        E.Cast(jungleTarget);
                    }
                }
            }
        }
Esempio n. 2
0
        protected override void Farming()
        {
            float manapercent = RootMenu["farming"]["lane"]["mana"].As <MenuSlider>().Value;

            if (manapercent < Player.ManaPercent())
            {
                bool useQ = RootMenu["farming"]["lane"]["useQ"].Enabled;

                bool useE = RootMenu["farming"]["lane"]["useW"].Enabled;


                if (useQ)
                {
                    if (Q.Ready)
                    {
                        foreach (var minion in Bases.Extensions.GetEnemyLaneMinionsTargetsInRange(Q.Range))
                        {
                            if (minion.IsValidTarget(Q.Range) && minion != null)
                            {
                                var result = FarmHelper.GetLineClearLocation(Q.Range, 180);

                                if (result != null)
                                {
                                    if (result.numberOfMinionsHit >=
                                        RootMenu["farming"]["lane"]["qhit"].As <MenuSlider>().Value)
                                    {
                                        if (!Q.IsCharging)
                                        {
                                            Q.StartCharging(result.CastPosition);
                                        }
                                        if (Q.IsCharging && Meowmeowtimer < Game.TickCount)
                                        {
                                            Q.ShootChargedSpell(result.CastPosition, true);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }



                if (useE)
                {
                    if (W.Ready)
                    {
                        foreach (var minion in Bases.Extensions.GetEnemyLaneMinionsTargetsInRange(W.Range))
                        {
                            if (minion.IsValidTarget(W.Range) && minion != null)
                            {
                                if (!Player.HasBuff("sionwshieldstacks"))
                                {
                                    if (GameObjects.EnemyMinions.Count(h => h.IsValidTarget(W.Range, false, false,
                                                                                            Player.ServerPosition)) >= RootMenu["farming"]["lane"]["whit"]
                                        .As <MenuSlider>().Value)
                                    {
                                        W.Cast();
                                    }
                                }
                            }
                        }
                    }
                }



                foreach (var jungleTarget in Bases.GameObjects.JungleLarge.Where(m => m.IsValidTarget(Q.Range))
                         .ToList())
                {
                    if (!jungleTarget.IsValidTarget() || jungleTarget.UnitSkinName.Contains("Plant"))
                    {
                        return;
                    }

                    float manapercents = RootMenu["farming"]["jungle"]["mana"].As <MenuSlider>().Value;

                    if (manapercents < Player.ManaPercent())
                    {
                        bool useQs = RootMenu["farming"]["jungle"]["useQ"].Enabled;


                        if (RootMenu["farming"]["jungle"]["useW"].Enabled && jungleTarget.IsValidTarget(W.Range))
                        {
                            if (!Player.HasBuff("sionwshieldstacks"))
                            {
                                W.Cast();
                            }
                        }
                        if (useQs && Q.Ready && jungleTarget.IsValidTarget(Q.Range - 100))
                        {
                            if (!Q.IsCharging)
                            {
                                Q.StartCharging(jungleTarget.ServerPosition);
                            }
                            if (Q.IsCharging && Meowmeowtimer < Game.TickCount)
                            {
                                Q.ShootChargedSpell(jungleTarget.ServerPosition, true);
                            }
                        }
                        if (RootMenu["farming"]["jungle"]["useE"].Enabled && E.Ready &&
                            jungleTarget.IsValidTarget(E.Range))
                        {
                            E.Cast(jungleTarget);
                        }
                    }
                }
                foreach (var jungleTarget in Bases.GameObjects.Jungle.Where(m => m.IsValidTarget(E.Range)).ToList())
                {
                    if (!jungleTarget.IsValidTarget() || jungleTarget.UnitSkinName.Contains("Plant"))
                    {
                        return;
                    }

                    bool  useQs        = RootMenu["farming"]["jungle"]["useQ"].Enabled;
                    float manapercents = RootMenu["farming"]["jungle"]["mana"].As <MenuSlider>().Value;

                    if (manapercents < Player.ManaPercent())
                    {
                        if (useQs && Q.Ready && jungleTarget.IsValidTarget(Q.Range - 100))
                        {
                            if (!Q.IsCharging)
                            {
                                Q.StartCharging(jungleTarget.ServerPosition);
                            }
                            if (Q.IsCharging && Meowmeowtimer < Game.TickCount)
                            {
                                Q.ShootChargedSpell(jungleTarget.ServerPosition, true);
                            }
                        }
                        if (RootMenu["farming"]["jungle"]["useW"].Enabled && W.Ready &&
                            jungleTarget.IsValidTarget(W.Range))
                        {
                            if (!Player.HasBuff("sionwshieldstacks"))
                            {
                                W.Cast();
                            }
                        }
                        if (RootMenu["farming"]["jungle"]["useE"].Enabled && E.Ready &&
                            jungleTarget.IsValidTarget(E.Range))
                        {
                            E.Cast(jungleTarget);
                        }
                    }
                }
            }
        }