Example #1
0
 private static void ChkRecall()
 {
     if (!_myJungler.IsRecalling() && !_myJungler.IsInFountainRange())
     {
         Player.ForceIssueOrder(GameObjectOrder.MoveTo, _user.Position, false);
     }
 }
Example #2
0
        private static void Game_OnNotify(GameNotifyEventArgs args)
        {
            if (args.EventId == GameEventId.OnReconnect && args.NetworkId == _myJunglerAfkBackup.NetworkId)
            {
                Chat.Print("NunuTrollBot: Following jungler " + _myJunglerAfkBackup.ChampionName + " again!");
                _myJungler = _myJunglerAfkBackup;
            }
            if (args.NetworkId == _myJungler.NetworkId && args.EventId == GameEventId.OnLeave)
            {
                Chat.Print("NunuTrollBot: Jungler left the game! Great success!");
                while (_myJungler.NetworkId == _myJunglerAfkBackup.NetworkId)
                {
                    Chat.Print("NunuTrollBot: Finding a champion to follow!");
                    _myJungler =
                        EntityManager.Heroes.Allies
                        .FirstOrDefault(a => !a.IsMe && a.IsMoving && a.NetworkId != _myJunglerAfkBackup.NetworkId);
                    Thread.Sleep(500);
                }
                Chat.Print("NunuTrollBot: Following " + _myJungler.ChampionName + "!");
            }

            if (args.NetworkId == _user.NetworkId && args.EventId == GameEventId.OnKill)
            {
                if (args.EventId == GameEventId.OnChampionKill)
                {
                    Core.DelayAction(() => Chat.Say("/masterybadge"), 600);
                }
                Core.DelayAction(() => Player.DoEmote(Emote.Laugh), 600);
            }
        }
Example #3
0
        private static void JungleSteal()
        {
            var killableJungle =
                EntityManager.MinionsAndMonsters.GetJungleMonsters()
                .OrderByDescending(a => a.MaxHealth)
                .FirstOrDefault(b => b.Distance(_user) <= 500);

            if (killableJungle != null && !killableJungle.Name.Contains("Mini"))
            {
                if (killableJungle.Name.Contains("Baron") || killableJungle.Name.Contains("Dragon") ||
                    killableJungle.Name.Contains("Red") || killableJungle.Name.Contains("Blue"))
                {
                    if (_q.IsReady() && _smite.IsReady())
                    {
                        if (killableJungle.Health <=
                            _user.GetSpellDamage(killableJungle, SpellSlot.Q) +
                            _user.GetSummonerSpellDamage(killableJungle, DamageLibrary.SummonerSpells.Smite))
                        {
                            Player.CastSpell(SpellSlot.Q, killableJungle);
                        }
                    }
                    else if (_q.IsReady() && !_smite.IsReady())
                    {
                        if (killableJungle.Health <= _user.GetSpellDamage(killableJungle, SpellSlot.Q))
                        {
                            Player.CastSpell(SpellSlot.Q, killableJungle);
                        }
                    }
                    else if (!_q.IsReady() && _smite.IsReady())
                    {
                        if (killableJungle.Health <=
                            _user.GetSummonerSpellDamage(killableJungle, DamageLibrary.SummonerSpells.Smite))
                        {
                            Player.CastSpell(_smite.Slot, killableJungle);
                        }
                    }
                }
                else
                {
                    if (_q.IsReady())
                    {
                        if (killableJungle.Health <= _user.GetSpellDamage(killableJungle, SpellSlot.Q))
                        {
                            Player.CastSpell(SpellSlot.Q, killableJungle);
                        }
                    }
                }
            }
        }
Example #4
0
 private static void BadManners()
 {
     if (_user.Position == _lastPosition)
     {
         _idleCounter++;
     }
     else
     {
         _lastPosition = _user.Position;
         _idleCounter  = 1;
     }
     if (_idleCounter == 150)
     {
         Player.DoEmote(Emote.Dance);
         _idleCounter = 1;
     }
 }
Example #5
0
        private static void KillSteal()
        {
            // E Killsteal
            if (_e.IsReady())
            {
                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    if (enemy.Distance(_user.Position) <= 550 &&
                        enemy.TotalShieldHealth() <= _user.GetSpellDamage(enemy, SpellSlot.E))
                    {
                        Player.CastSpell(SpellSlot.E, enemy);
                        return;
                    }
                }
            }

            // Autoattack creeps
            var killableMinion = EntityManager.MinionsAndMonsters.EnemyMinions.OrderBy(a => a.Health)
                                 .FirstOrDefault(b => b.Distance(_user) <= 500);

            if (killableMinion != null && !killableMinion.IsDead && killableMinion.BaseSkinName.Contains("Siege") &&
                killableMinion.Health <= _user.GetSpellDamage(killableMinion, SpellSlot.Q))
            {
                Player.CastSpell(SpellSlot.Q, killableMinion);
                return;
            }
            if (killableMinion != null && !killableMinion.IsDead &&
                killableMinion.Health <= _user.GetAutoAttackDamage(killableMinion, true))
            {
                Player.IssueOrder(GameObjectOrder.AttackTo, killableMinion);
                return;
            }

            // And jungle too
            var jungleCreep =
                EntityManager.MinionsAndMonsters.GetJungleMonsters()
                .OrderBy(a => a.Health)
                .FirstOrDefault(b => b.Distance(_user) <= 500);

            if (jungleCreep != null && !jungleCreep.IsDead &&
                jungleCreep.Health <= _user.GetAutoAttackDamage(jungleCreep, true))
            {
                Player.IssueOrder(GameObjectOrder.AttackTo, jungleCreep);
            }
        }
Example #6
0
 private static void Obj_AI_Base_OnTeleport(Obj_AI_Base sender, GameObjectTeleportEventArgs args)
 {
     if (_user.IsDead)
     {
         return;
     }
     if (sender.NetworkId == _myJungler.NetworkId)
     {
         if (args.RecallName == "Recall")
         {
             if (!_user.IsInFountainRange() && !_myJungler.IsInFountainRange())
             {
                 Core.DelayAction(() => Player.CastSpell(SpellSlot.Recall), 200);
                 return;
             }
         }
         if (_user.IsRecalling())
         {
             Core.DelayAction(() => ChkRecall(), Game.Ping + 200);
         }
     }
 }