Exemplo n.º 1
0
        public static IEnumerable <Obj_AI_Base> GetMobGroup(this LeagueSharp.Common.Spell spell,
                                                            FarmMode farmMode,
                                                            GameObjectTeam minionTeam,
                                                            MinionType minionType   = MinionType.All,
                                                            MinionGroup minionGroup = MinionGroup.Alone,
                                                            int minionCount         = 1)
        {
            IEnumerable <Obj_AI_Base> list =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(m => m.LSIsValidTarget(spell.Range) && m.Team == GameObjectTeam.Neutral);

            if (minionType == MinionType.BigMobs)
            {
                IEnumerable <Obj_AI_Base> oMob = (from fMobs in list
                                                  from fBigBoys in
                                                  new[]
                {
                    "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red",
                    "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab"
                }
                                                  where fBigBoys == fMobs.BaseSkinName
                                                  select fMobs).AsEnumerable();
                list = oMob;
            }
            return(list);
        }
Exemplo n.º 2
0
 void FarmPanel_OnPlant(string plantType, string resource)
 {
     PlayState.GUI.ToolTipManager.Popup("Click and drag to plant " + plantType + ".");
     Mode              = FarmMode.Planting;
     PlantType         = plantType;
     RequiredResources = new List <ResourceAmount>()
     {
         new ResourceAmount(resource)
     };
 }
Exemplo n.º 3
0
 void FarmPanel_OnPlant(string plantType, string resource)
 {
     Player.World.ShowToolPopup("Click and drag to plant " + plantType + ".");
     Mode              = FarmMode.Planting;
     PlantType         = plantType;
     RequiredResources = new List <ResourceAmount>()
     {
         new ResourceAmount(resource)
     };
 }
Exemplo n.º 4
0
        public static IEnumerable <Obj_AI_Base> GetMins(this Spell spell, FarmMode farmMode, GameObjectTeam minionTeam,
                                                        MinionType minionType = MinionType.All, MinionGroup minionGroup = MinionGroup.Alone, int minionCount = 1)
        {
            IEnumerable <Obj_AI_Base> list = ObjectManager.Get <Obj_AI_Minion>().Where(m => m.IsValidTarget(spell.Range));
            IEnumerable <Obj_AI_Base> mobs;

            if (farmMode == FarmMode.JungleClear)
            {
                mobs = list.Where(w => w.Team == minionTeam);
                if (minionType == MinionType.BigMobs)
                {
                    IEnumerable <Obj_AI_Base> oMob = (from fMobs in mobs
                                                      from fBigBoys in
                                                      new[]
                    {
                        "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red",
                        "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab"
                    }
                                                      where fBigBoys == fMobs.SkinName
                                                      select fMobs).AsEnumerable();

                    mobs = oMob;
                }
            }
            else
            {
                mobs = list;
            }

            var objAiBases        = mobs as IList <Obj_AI_Base> ?? mobs.ToList();
            List <Obj_AI_Base> m1 = objAiBases.ToList();

            var locLine = spell.GetLineFarmLocation(m1);

            if (locLine.MinionsHit >= 3 && spell.IsInRange(locLine.Position.To3D()))
            {
                spell.Cast(locLine.Position);
            }

            var locCircular = spell.GetCircularFarmLocation(m1, spell.Width);

            if (locCircular.MinionsHit >= minionCount && spell.IsInRange(locCircular.Position.To3D()))
            {
                spell.Cast(locCircular.Position);
            }

            return(null);
        }
Exemplo n.º 5
0
        public static float MinManaPercent(FarmMode farmMode)
        {
            // Enable / Disable Min Mana
            if (!ModeConfig.MenuFarm.Item("Farm.MinMana.Enable").GetValue <KeyBind>().Active)
            {
                return(0f);
            }

            if (farmMode == FarmMode.Lane)
            {
                return(ModeJungle.MenuLocal.Item("Jungle.MinMana").GetValue <Slider>().Value);
            }

            if (farmMode == FarmMode.Lane)
            {
                return(ModeLane.MenuLocal.Item("Lane.MinMana").GetValue <Slider>().Value);
            }

            return(0f);
        }
Exemplo n.º 6
0
        public Config(ZeusPlus main)
        {
            Main   = main;
            Screen = new Vector2(Drawing.Width - 160, Drawing.Height);

            Menu              = new MenuManager(this);
            UpdateMode        = new UpdateMode(this);
            DamageCalculation = new DamageCalculation(this);
            LinkenBreaker     = new LinkenBreaker(this);
            AutoKillSteal     = new AutoKillSteal(this);
            AbilityBreaker    = new AbilityBreaker(this);
            FarmMode          = new FarmMode(this, main.Context);
            Main.Context.Orbwalker.RegisterMode(FarmMode);

            Menu.ComboKeyItem.Item.ValueChanged += ComboKeyChanged;
            var ModeKey = KeyInterop.KeyFromVirtualKey((int)Menu.ComboKeyItem.Value.Key);

            Mode = new Mode(Main.Context, ModeKey, this);
            Main.Context.Orbwalker.RegisterMode(Mode);

            Renderer = new Renderer(this);
        }
Exemplo n.º 7
0
 Vector2 IValue <Vector2> .GetValue(Spell spell, FarmMode farmMode, GameObjectTeam minionTeam, MinionType minionType)
 {
     return(new Vector2(0, 0));
 }
Exemplo n.º 8
0
        IEnumerable <Obj_AI_Base> IValue <IEnumerable <Obj_AI_Base> > .GetValue(Spell spell, FarmMode farmMode, GameObjectTeam minionTeam, MinionType minionType)
        {
            IEnumerable <Obj_AI_Base> list = ObjectManager.Get <Obj_AI_Minion>().Where(m => m.IsValidTarget(spell.Range));
            IEnumerable <Obj_AI_Base> mobs;

            if (farmMode == FarmMode.JungleClear)
            {
                mobs = list.Where(w => w.Team == minionTeam);
                if (minionType == MinionType.BigMobs)
                {
                    IEnumerable <Obj_AI_Base> oMob = (from fMobs in mobs
                                                      from fBigBoys in
                                                      new[]
                    {
                        "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red",
                        "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab"
                    }
                                                      where fBigBoys == fMobs.SkinName
                                                      select fMobs).AsEnumerable();

                    mobs = oMob;
                }
            }
            else
            {
                mobs = list;
            }
            return(mobs);
        }
Exemplo n.º 9
0
 void FarmPanel_OnHarvest()
 {
     PlayState.GUI.ToolTipManager.Popup("Click and drag to harvest.");
     Mode = FarmMode.Harvesting;
 }
Exemplo n.º 10
0
 void FarmPanel_OnTill()
 {
     PlayState.GUI.ToolTipManager.Popup("Click and drag to till soil.");
     Mode = FarmMode.Tilling;
 }
Exemplo n.º 11
0
 void FarmPanel_OnHarvest()
 {
     Player.World.ShowToolPopup("Click and drag to harvest.");
     Mode = FarmMode.Harvesting;
 }
Exemplo n.º 12
0
 void FarmPanel_OnTill()
 {
     Player.World.ShowToolPopup("Click and drag to till soil.");
     Mode = FarmMode.Tilling;
 }
Exemplo n.º 13
0
        public static float MinManaPercent(FarmMode farmMode)
        {
            // Enable / Disable Min Mana
            if (!ModeConfig.MenuFarm.Item("Farm.MinMana.Enable").GetValue<KeyBind>().Active)
            {
                return 0f;
            }

            if (farmMode == FarmMode.Lane)
            {
                return ModeJungle.MenuLocal.Item("Jungle.MinMana").GetValue<Slider>().Value;
            }

            if (farmMode == FarmMode.Lane)
            {
                return ModeLane.MenuLocal.Item("Lane.MinMana").GetValue<Slider>().Value;
            }

            return 0f;
        }