コード例 #1
0
ファイル: ComboBrain.cs プロジェクト: Enochen/AIBot
        public static void Init()
        {
            var target  = GetTarget.GetComboTarget();
            var turrets = EntityManager.Turrets.Enemies;

            foreach (var turret in turrets)
            {
                if (target != null && target.IsValid && !target.IsDead && !target.IsInAutoAttackRange(turret) &&
                    target.Level <= _PlayerClient.Level && ComboWinPrediction.Calculate() > 65)
                {
                    //ComboWinPrediction still in Beta, and more logic needs to be taken in such as items, gold, position, etc.
                    IsDoingCombo = true;
                    StateManager.DoCombo();
                }

                else
                {
                    IsDoingCombo = false;
                }
            }

            Game.OnTick += Combo_ComboTickArgs;
        }
コード例 #2
0
        public static bool Heal()
        {
            var HealBuff =
                ObjectManager.Get <GameObject>()
                .Where(a => a.Name.ToLower().Contains("healingbuff"))
                .OrderBy(a => Player.Instance.Position.Distance(a.Position))
                .First();

            if (Me.IsDead || Me.HealthPercent < 65 || !HealBuff.IsValid)
            {
                return(false);
            }

            if (Me.Position.Distance(HealBuff.Position) <= 600 && Me.CountEnemiesInRange(800) < 0 || (Me.Position.Distance(HealBuff.Position) <= 600 && ComboWinPrediction.Calculate() > 55))
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, HealBuff.Position);
                return(true);
            }

            return(false);
        }
コード例 #3
0
        public static void Execute()
        {
            var target = GetTarget.GetComboTarget();

            if (target == null)
            {
                return;
            }

            if (Ahri.E.IsReady() && target.IsValidTarget(Ahri.E.Range))
            {
                Ahri.E.Cast(target);
            }

            if (Ahri.Q.IsReady() && target.IsValidTarget(Ahri.Q.Range))
            {
                Ahri.Q.Cast(target);
            }

            if (Ahri.W.IsReady() && target.IsValidTarget(Ahri.W.Range))
            {
                Ahri.W.Cast(target);
            }

            if (Ahri.R.IsReady() && target.IsValidTarget(Ahri.R.Range) &&
                Helper.Player.CountEnemiesInRange(Ahri.Q.Range) <= 2 && target.HealthPercent <= 30 && ComboWinPrediction.Calculate() <= 70)
            {
                Ahri.R.Cast(target);
            }
        }