示例#1
0
 private static void Game_OnTick(EventArgs args)
 {
     HPOT = new Item((int)ItemId.Health_Potion);
     if (_Player.HealthPercent <= 60 && HPOT.IsOwned())
     {
         HPOT.Cast();
     }
     if (Spells[SpellSlot.E].IsReady() && !_Player.IsDead)
     {
         Brain.KStiloso();
     }
     switch (Orbwalker.ActiveModesFlags)
     {
         case Orbwalker.ActiveModes.Combo:
             Brain.Combo();
             return;
         case Orbwalker.ActiveModes.Harass:
             Brain.Harass();
             return;
         case Orbwalker.ActiveModes.LaneClear:
            // Brain.LaneClear();
             return;
         case Orbwalker.ActiveModes.JungleClear:
            // Brain.LaneClear();
             return;
     }
 }
示例#2
0
 public static void Hydra()
 {
     var hydra = new Item(ItemId.Ravenous_Hydra_Melee_Only, 400);
     if (hydra.IsOwned() && hydra.IsReady())
     {
         hydra.Cast();
     }
 }
示例#3
0
 public static void Tiamath()
 {
     var tiamat = new Item(ItemId.Tiamat_Melee_Only, 400);
     if (tiamat.IsOwned() && tiamat.IsReady())
     {
         tiamat.Cast();
     }
 }
示例#4
0
        public static Item zhonya; // Zhonya test

        #endregion Fields

        #region Methods

        /// <summary>
        /// Casts zhonya if Katarina is low on health.
        /// </summary>
        /// <param name="myHero">AIHeroClient reference -- ourselves</param>
        /// <returns>true if zhonya suceeded</returns>
        public static bool CastZhonya(AIHeroClient myHero, int zHealth)
        {
            zhonya = new Item((int)ItemId.Zhonyas_Hourglass);
            if(zhonya == null || !zhonya.IsReady() || !zhonya.IsOwned()) return false;

            if(myHero.HealthPercent <= zHealth) {
                zhonya.Cast();
                return true;
            }

            return false;
        }
示例#5
0
文件: Brain.cs 项目: FireBuddy/zilean
        public static void Combo()
        {
            BTRK1 = new Item((int)ItemId.Blade_of_the_Ruined_King);
            BTRK2 = new Item((int)ItemId.Bilgewater_Cutlass);
            YOMU = new Item((int)ItemId.Youmuus_Ghostblade);
            var target = TargetSelector2.GetTarget(Program.Spells[SpellSlot.W].Range, DamageType.Physical);
            if (target == null) return;
            if (MenuX.ComboMenu["useWCombo"].Cast<CheckBox>().CurrentValue)
            {
                if (target.IsValidTarget(Program.Spells[SpellSlot.W].Range) && Program.Spells[SpellSlot.W].IsReady())
                {
                    Program.Spells[SpellSlot.W].Cast(target);
                }
            }
            if (MenuX.ComboMenu["useRCombo"].Cast<CheckBox>().CurrentValue)
            {
                foreach (
                    var enemy in
                        ObjectManager.Get<AIHeroClient>()
                            .Where(enemy => enemy.Distance(_Player) <= Program.Spells[SpellSlot.R].Range))
                {
                    if (enemy.CountEnemiesInRange(850) >= MenuX.ComboMenu["minRCombo"].Cast<Slider>().CurrentValue)
                    {
                        Program.Spells[SpellSlot.R].Cast();
                    }
                }
            }
            if (target.HealthPercent <= 80 && (BTRK1.IsOwned() || BTRK2.IsOwned()) && (BTRK1.IsReady() || BTRK2.IsReady()))
            {
                BTRK1.Cast(target);
                BTRK2.Cast(target);
            }
            if (target.HealthPercent <= 75 && YOMU.IsOwned() && YOMU.IsReady())
            {
                YOMU.Cast();
            }

        }
示例#6
0
        private static bool HasYellowWardPlus()
        {
            YellowWardPlus = new Item(3361, 600);

            if (YellowWardPlus.IsOwned(_playerClient))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
示例#7
0
        private static bool HasPinkWard()
        {
            PinkWard = new Item(2043, 600);

            if (PinkWard.IsOwned(_playerClient))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
示例#8
0
        private static bool HasGreenWard()
        {
            GreenWard = new Item(2044, 600);

            if (GreenWard.IsOwned(_playerClient))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
示例#9
0
        static void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var hydra = new Item((int)ItemId.Ravenous_Hydra_Melee_Only);
                var youmuus = new Item((int)ItemId.Youmuus_Ghostblade);

                if (hydra.IsOwned() && hydra.IsReady() || youmuus.IsOwned() && youmuus.IsReady())
                {
                    hydra.Cast();
                    youmuus.Cast();
                }
            }
        }
示例#10
0
 private static void TryBuySell(Item item, char bs)
 {
     switch (bs)
     {
         case 'b':
         {
             if (Player.Instance.Gold >= goldReq)
             {
                 Shop.BuyItem(item.Id);
                 current++;
             }
             /*else if (Settings.buyComp.CurrentValue)
                 {
                     foreach (var comp1 in item.GetComponents().OrderByDescending(x => x.GoldRequired()))
                     {
                         if (Shop.BuyItem(comp1.Id))
                             goldReq -= comp1.ItemInfo.Gold.Base;
                     }
                 }*/
         }
             break;
         case 's':
             if (item.Id == hppot.Id)
             {
                 if (hppot.IsOwned())
                 {
                     Shop.SellItem(GetSlot(hppot).Slot);
                     current++;
                 }
                 else if (bisc.IsOwned())
                 {
                     Shop.SellItem(GetSlot(bisc).Slot);
                     current++;
                 }
             }
             else if (item.IsOwned())
             {
                 Shop.SellItem(GetSlot(item).Slot);
                 current++;
             }
             break;
         default:
             Console.WriteLine("Error: item set for {0} was not set properly - b:ItemId or s:ItemId",
                 Player.Instance.ChampionName);
             break;
     }
 }
示例#11
0
 public static void Youmu()
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         var youmu = new Item(ItemId.Youmuus_Ghostblade);
         if (youmu.IsOwned() && youmu.IsReady())
         {
             youmu.Cast();
         }
     }
 }
示例#12
0
        private static void LastHit()
        {
            var minions = ObjectManager.Get<Obj_AI_Minion>().OrderBy(m => m.Health).Where(m => m.IsEnemy);
            var useQ = SettingsMenu["Qlast"].Cast<CheckBox>().CurrentValue;
            var lich = new Item((int)ItemId.Lich_Bane);

            if (minions == null)
                return;
            foreach(var minion in minions)
            {
                if (Q.IsReady()&& lich.IsOwned() && useQ && minion.IsValidTarget(Q.Range) && minion.Health <= _Player.GetSpellDamage(minion, SpellSlot.Q) + _Player.GetItemDamage(minion, ItemId.Lich_Bane))
                {
                    Q.Cast(minion);
                }
                if (Q.IsReady() && useQ && minion.IsValidTarget(Q.Range) && minion.Health <= _Player.GetSpellDamage(minion, SpellSlot.Q))
                {
                    Q.Cast(minion);
                }
            }
        }
示例#13
0
        private static void KillSteal()
        {
            var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
            var useQ = SettingsMenu["Qks"].Cast<CheckBox>().CurrentValue;
            var useR = SettingsMenu["Rks"].Cast<CheckBox>().CurrentValue;
            var lich = new Item((int)ItemId.Lich_Bane);

            if (useR && R.IsReady() && !target.IsZombie && R.GetPrediction(target).HitChance >= HitChance.High && target.IsValidTarget(R.Range) && target.Health
                <= _Player.GetSpellDamage(target, SpellSlot.R))
            {
                R.Cast(target);
            }
            if (useQ && Q.IsReady() && !target.IsZombie && target.Health <= _Player.GetSpellDamage(target, SpellSlot.Q))
            {
                Q.Cast(target);
            }
            if (useQ && Q.IsReady() && lich.IsOwned() && !target.IsZombie && target.Health <= _Player.GetSpellDamage(target, SpellSlot.Q) + _Player.GetItemDamage(target, ItemId.Lich_Bane))
            {
                Q.Cast(target);
            }
        }