Ejemplo n.º 1
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            var hasEnemy = Utility.CountEnemiesInRange(1200) > 0;

            Game.PrintChat(HealthCheck + " // " + _hero.HealthPercent + " // " + hasEnemy);

            if (!_hero.IsDead && !_hero.InFountain() && !_hero.HasBuff("Recall"))
            {
                //gucken ob gegner in der Nähe sind



                //wenn Healautopot
                if (HealthCheck && _hero.HealthPercent <= HpTrigger && hasEnemy)
                {
                    // das nur benutzen wenn auch noch zusätzlich mana fehlt < 75%
                    BarPot lastPot = new BarPot(HealthPrediction.GetHealthPrediction(_hero, _healthPotion.ProcessTime), _hero.Mana);
                    if ((_hero.ManaPercent <= MpTrigger || _hero.ManaPercent < 75) && _flaskPotion.IsReady())
                    {
                        _flaskPotion.Cast();
                        return;
                    }

                    // die anderen beiden varianten testen
                    if (_biscuitPotion.IsReady())
                    {
                        _biscuitPotion.Cast();
                    }
                    else if (_healthPotion.IsReady())
                    {
                        _healthPotion.Cast();
                    }
                }

                if (ManaCheck && _hero.ManaPercent <= MpTrigger && hasEnemy)
                {
                    // benutzen für Mana logisch xD
                    if (_manaPotion.IsReady())
                    {
                        _manaPotion.Cast();
                    }// bei zusätzlich leben auch das :)
                    else if (_flaskPotion.IsReady() && _hero.HealthPercent < 75)
                    {
                        _flaskPotion.Cast();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            var hasEnemy = Utility.CountEnemiesInRange(1200) > 0;
            Game.PrintChat(HealthCheck + " // " + _hero.HealthPercent + " // " + hasEnemy);

            if ( !_hero.IsDead && !_hero.InFountain() && !_hero.HasBuff("Recall"))
            {
                //gucken ob gegner in der Nähe sind

                //wenn Healautopot
                if (HealthCheck && _hero.HealthPercent <= HpTrigger && hasEnemy)
                {
                    // das nur benutzen wenn auch noch zusätzlich mana fehlt < 75%
                    BarPot lastPot = new BarPot(HealthPrediction.GetHealthPrediction(_hero, _healthPotion.ProcessTime), _hero.Mana);
                    if ((_hero.ManaPercent <= MpTrigger || _hero.ManaPercent < 75) && _flaskPotion.IsReady())
                    {
                        _flaskPotion.Cast();
                        return;
                    }

                    // die anderen beiden varianten testen
                    if (_biscuitPotion.IsReady())
                    {
                        _biscuitPotion.Cast();
                    }
                    else if (_healthPotion.IsReady())
                    {
                        _healthPotion.Cast();
                    }

                }

                if (ManaCheck && _hero.ManaPercent <= MpTrigger && hasEnemy)
                {
                    // benutzen für Mana logisch xD
                    if (_manaPotion.IsReady())
                    {
                        _manaPotion.Cast();
                    }// bei zusätzlich leben auch das :)
                    else if (_flaskPotion.IsReady() && _hero.HealthPercent < 75)
                    {
                        _flaskPotion.Cast();
                    }
                }
            }
        }
Ejemplo n.º 3
0
 private void Game_OnGameUpdate(EventArgs args)
 {
     if (!ObjectManager.Player.IsDead && !ObjectManager.Player.InFountain() && !ObjectManager.Player.HasBuff("Recall"))
     {
         BarPot lastBar  = new BarPot(ObjectManager.Player.PredictedHealth(_healthPotion.ProcessTime), ObjectManager.Player.PredictedMana(_manaPotion.ProcessTime));
         bool   hasEnemy = Utility.CountEnemiesInRange(800) > 0;
         if (HealthCheck && ((lastBar.HealthPercent <= HpTrigger && hasEnemy || (lastBar.HealthPercent < 50))))
         {
             if ((lastBar.ManaPercent <= ManaTrigger && hasEnemy || lastBar.ManaPercent < 50) && _flaskPotion.IsReady())
             {
                 _flaskPotion.Cast();
                 return;
             }
             if (_healthPotion.IsReady())
             {
                 _healthPotion.Cast();
             }
             else if (_biscuitPotion.IsReady())
             {
                 _biscuitPotion.Cast();
             }
             else if (_flaskPotion.IsReady())
             {
                 _flaskPotion.Cast();
                 return;
             }
         }
         if (ManaCheck && (lastBar.ManaPercent <= ManaTrigger && hasEnemy || lastBar.ManaPercent < 50))
         {
             if (_manaPotion.IsReady())
             {
                 _manaPotion.Cast();
             }
             else if (_flaskPotion.IsReady())
             {
                 _flaskPotion.Cast();
             }
         }
     }
 }
Ejemplo n.º 4
0
 private void Game_OnGameUpdate(EventArgs args)
 {
     if (!ObjectManager.Player.IsDead && !ObjectManager.Player.InFountain() && !ObjectManager.Player.HasBuff("Recall"))
     {
         BarPot lastBar = new BarPot(ObjectManager.Player.PredictedHealth(_healthPotion.ProcessTime), ObjectManager.Player.PredictedMana(_manaPotion.ProcessTime));
         bool hasEnemy = Utility.CountEnemiesInRange(800) > 0;
         if (HealthCheck && ((lastBar.HealthPercent <= HpTrigger && hasEnemy || (lastBar.HealthPercent < 50))))
         {
             if ((lastBar.ManaPercent <= ManaTrigger && hasEnemy || lastBar.ManaPercent < 50) && _flaskPotion.IsReady())
             {
                 _flaskPotion.Cast();
                 return;
             }
             if (_healthPotion.IsReady())
             {
                 _healthPotion.Cast();
             }
             else if (_biscuitPotion.IsReady())
             {
                 _biscuitPotion.Cast();
             }
             else if (_flaskPotion.IsReady())
             {
                 _flaskPotion.Cast();
                 return;
             }
         }
         if (ManaCheck && (lastBar.ManaPercent <= ManaTrigger && hasEnemy || lastBar.ManaPercent < 50))
         {
             if (_manaPotion.IsReady())
             {
                 _manaPotion.Cast();
             }
             else if (_flaskPotion.IsReady())
             {
                 _flaskPotion.Cast();
             }
         }
     }
 }