private void Game_OnGameUpdate(EventArgs args)
        {
            if (!IsActive() || !_db.IsReady())
                return;

            AutoItems.UpdateCCList();
            List<BuffInstance> buffList = Activator.GetActiveCcBuffs(AutoItems._buffs);

            if (buffList.Count() >=
                AutoDervishBladeActivator.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                AutoDervishBladeActivator.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfDervishBlade")
                    .GetValue<bool>() &&
                Activator._lastItemCleanseUse + 1 < Game.Time)
            {
                var db = new Items.Item(3137, 0);
                if (db.IsReady())
                {
                    db.Cast();
                    Activator._lastItemCleanseUse = Game.Time;
                }
            }
        }
Beispiel #2
0
        private void UseDb()
        {
            if (!MainMenu.ActivatorDefensiveCleanseSelf.GetActive())
                return;

            List<BuffInstance> buffList = GetActiveCcBuffs(_buffs);

            if (buffList.Count() >=
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfDervishBlade")
                    .GetValue<bool>() &&
                _lastItemCleanseUse + 1 < Game.Time)
            {
                var db = new Items.Item(3137, 0);
                if (db.IsReady())
                {
                    db.Cast();
                    _lastItemCleanseUse = Game.Time;
                }
            }
        }
Beispiel #3
0
 private void UseTalismanofAscension()
 {
     if (
         !MainMenu.ActivatorDefensiveShieldBoost.GetMenuItem(
             "SAwarenessActivatorDefensiveShieldBoostTalismanofAscension").GetValue<bool>())
         return;
     var ta = new Items.Item(3069, 0);
     Obj_AI_Hero hero = TargetSelector.GetTarget(1000, TargetSelector.DamageType.True);
     if (hero != null && hero.IsValid && !ImFleeing(hero) && IsFleeing(hero))
     {
         if ((hero.Health/hero.MaxHealth*100) <= 50)
         {
             if (ta.IsReady())
             {
                 ta.Cast();
             }
         }
     }
     else if (ObjectManager.Player.ServerPosition.CountEnemiesInRange(1000) >
              ObjectManager.Get<Obj_AI_Hero>().Where((units => units.IsAlly)).Count((units =>
                  (double)
                      Vector2.Distance(ObjectManager.Player.Position.To2D(),
                          units.Position.To2D()) <= (double) 1000)) &&
              ObjectManager.Player.Health != ObjectManager.Player.MaxHealth)
     {
         if (ta.IsReady())
         {
             ta.Cast();
         }
     }
 }
Beispiel #4
0
        private void UseRanduins()
        {
            if (!MainMenu.ActivatorDefensiveDebuffSlow.GetActive())
                return;

            Obj_AI_Hero hero = GetHighestAdEnemy();
            int count = ObjectManager.Player.ServerPosition.CountEnemiesInRange(400);
            if (hero == null || !hero.IsValid || hero.IsDead)
                return;

            if (
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem("SAwarenessActivatorDefensiveDebuffSlowRanduins")
                    .GetValue<bool>() &&
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem("SAwarenessActivatorDefensiveDebuffSlowConfigRanduins")
                    .GetValue<Slider>()
                    .Value >= count &&
                ImFleeing(hero) || IsFleeing(hero) && !ImFleeing(hero))
            {
                var randuins = new Items.Item(3143, 0);
                if (randuins.IsReady())
                {
                    randuins.Cast();
                }
            }
        }
Beispiel #5
0
        private void UseOffensiveItems_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!MainMenu.ActivatorOffensive.GetActive())
                return;
            if (sender.NetworkId != ObjectManager.Player.NetworkId)
                return;
            if (!args.SData.Name.ToLower().Contains("attack") || args.Target.Type != GameObjectType.obj_AI_Hero)
                return;

            if (MainMenu.ActivatorOffensiveAd.GetActive())
            {
                Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
                if (target == null || !target.IsValid)
                    return;
                var entropy = new Items.Item(3184, 400);
                var hydra = new Items.Item(3074, 400);
                var botrk = new Items.Item(3153, 450);
                var tiamat = new Items.Item(3077, 450);
                var devinesword = new Items.Item(3131, 900);
                var youmuus = new Items.Item(3142, 900);

                if (entropy.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdEntropy").GetValue<bool>())
                {
                    entropy.Cast();
                }
                if (hydra.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdRavenousHydra")
                        .GetValue<bool>())
                {
                    hydra.Cast();
                }
                if (botrk.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdBOTRK").GetValue<bool>())
                {
                    botrk.Cast(target);
                }
                if (tiamat.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdTiamat").GetValue<bool>())
                {
                    tiamat.Cast();
                }
                if (devinesword.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdSwordOfTheDevine")
                        .GetValue<bool>())
                {
                    devinesword.Cast();
                }
                if (youmuus.IsReady() &&
                    MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdYoumuusGhostblade")
                        .GetValue<bool>())
                {
                    youmuus.Cast();
                }
            }
        }
Beispiel #6
0
 private void UseOffensiveItems_OnGameUpdate()
 {
     if (!MainMenu.ActivatorOffensive.GetActive() ||
         !MainMenu.ActivatorOffensive.GetMenuItem("SAwarenessActivatorOffensiveKey").GetValue<KeyBind>().Active)
         return;
     if (MainMenu.ActivatorOffensiveAd.GetActive())
     {
         Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
         if (target == null || !target.IsValid)
             return;
         var botrk = new Items.Item(3153, 450);
         if (botrk.IsReady() &&
             MainMenu.ActivatorOffensiveAd.GetMenuItem("SAwarenessActivatorOffensiveAdBOTRK").GetValue<bool>())
         {
             botrk.Cast(target);
         }
     }
     if (MainMenu.ActivatorOffensiveAp.GetActive())
     {
         Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
         if (target == null || !target.IsValid)
             return;
         var bilgewater = new Items.Item(3144, 450);
         var hextech = new Items.Item(3146, 700);
         var blackfire = new Items.Item(3188, 750);
         var dfg = new Items.Item(3128, 750);
         var twinshadows = new Items.Item(3023, 1000);
         if (Utility.Map.GetMap().Type == Utility.Map.MapType.CrystalScar)
             twinshadows = new Items.Item(3290, 1000);
         if (bilgewater.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApBilgewaterCutlass")
                 .GetValue<bool>())
         {
             bilgewater.Cast(target);
         }
         if (hextech.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApHextechGunblade")
                 .GetValue<bool>())
         {
             hextech.Cast(target);
         }
         if (blackfire.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApBlackfireTorch").GetValue<bool>())
         {
             blackfire.Cast(target);
         }
         if (dfg.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApDFG").GetValue<bool>())
         {
             dfg.Cast(target);
         }
         if (twinshadows.IsReady() &&
             MainMenu.ActivatorOffensiveAp.GetMenuItem("SAwarenessActivatorOffensiveApTwinShadows").GetValue<bool>())
         {
             twinshadows.Cast();
         }
     }
 }
Beispiel #7
0
        private void UseMs()
        {
            if (!MainMenu.ActivatorDefensiveCleanseSelf.GetActive())
                return;

            List<BuffInstance> buffList = GetActiveCcBuffs(_buffs);

            if (buffList.Count() >=
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                MainMenu.ActivatorDefensiveCleanseSelf.GetMenuItem(
                    "SAwarenessActivatorDefensiveCleanseSelfMercurialScimitar").GetValue<bool>() &&
                _lastItemCleanseUse + 1 < Game.Time)
            {
                var ms = new Items.Item(3139, 0);
                if (ms.IsReady())
                {
                    foreach (BuffInstance instance in buffList)
                    {
                        Console.WriteLine(instance.Name);
                    }
                    ms.Cast();
                    _lastItemCleanseUse = Game.Time;
                }
            }
        }
Beispiel #8
0
        private void UseMikaelsCrucible()
        {
            if (!MainMenu.ActivatorDefensiveMikaelCleanse.GetActive() && _lastItemCleanseUse + 1 > Game.Time)
                return;

            var mc = new Items.Item(3222, 750);

            if (
                MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                    "SAwarenessActivatorDefensiveMikaelCleanseConfigAlly").GetValue<bool>())
            {
                foreach (Obj_AI_Hero ally in ObjectManager.Get<Obj_AI_Hero>())
                {
                    if (ally.IsEnemy)
                        return;

                    if (ally.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 750 && !ally.IsDead &&
                        !ally.HasBuff("Recall"))
                    {
                        double health = (ally.Health/ally.MaxHealth)*100;
                        List<BuffInstance> activeCc = GetActiveCcBuffs(ally, _buffs);
                        if (activeCc.Count >=
                            MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                                "SAwarenessActivatorDefensiveMikaelCleanseConfigMinSpells").GetValue<Slider>().Value)
                        {
                            if (mc.IsReady())
                            {
                                mc.Cast(ally);
                                _lastItemCleanseUse = Game.Time;
                            }
                        }
                        if (health <= MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                            "SAwarenessActivatorDefensiveMikaelCleanseConfigAllyHealth").GetValue<Slider>().Value)
                        {
                            if (mc.IsReady())
                            {
                                mc.Cast(ally);
                                _lastItemCleanseUse = Game.Time;
                            }
                        }
                    }
                }
            }
            else
            {
                if (!ObjectManager.Player.IsDead && !ObjectManager.Player.HasBuff("Recall"))
                {
                    double health = (ObjectManager.Player.Health/ObjectManager.Player.MaxHealth)*100;
                    List<BuffInstance> activeCc = GetActiveCcBuffs(_buffs);
                    if (activeCc.Count >=
                        MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                            "SAwarenessActivatorDefensiveMikaelCleanseConfigMinSpells").GetValue<Slider>().Value)
                    {
                        if (mc.IsReady())
                        {
                            mc.Cast(ObjectManager.Player);
                            _lastItemCleanseUse = Game.Time;
                        }
                    }
                    if (health <= MainMenu.ActivatorDefensiveMikaelCleanse.GetMenuItem(
                        "SAwarenessActivatorDefensiveMikaelCleanseConfigSelfHealth").GetValue<Slider>().Value)
                    {
                        if (mc.IsReady())
                        {
                            mc.Cast(ObjectManager.Player);
                            _lastItemCleanseUse = Game.Time;
                        }
                    }
                }
            }
        }
Beispiel #9
0
 private void UseLocketofIronSolari()
 {
     if (
         !MainMenu.ActivatorDefensiveShieldBoost.GetMenuItem(
             "SAwarenessActivatorDefensiveShieldBoostLocketofIronSolari").GetValue<bool>())
         return;
     foreach (var pair in Damages)
     {
         double damage = CalcMaxDamage(pair.Key);
         Obj_AI_Hero hero = pair.Key;
         CheckForHit(hero);
         if (!hero.IsDead)
         {
             var lis = new Items.Item(3190, 700);
             if (hero.Health < damage && hero.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 700)
             {
                 if (lis.IsReady())
                 {
                     lis.Cast();
                 }
             }
             else if (GetNegativBuff(hero) != null && Game.Time > GetNegativBuff(hero).EndTime - 0.1)
             {
                 if (lis.IsReady())
                 {
                     lis.Cast();
                 }
             }
         }
     }
 }
Beispiel #10
0
 private void UseGuardiansHorn()
 {
     if (
         !MainMenu.ActivatorDefensiveShieldBoost.GetMenuItem("SAwarenessActivatorDefensiveShieldBoostGuardiansHorn")
             .GetValue<bool>())
         return;
     if (Utility.Map.GetMap().Type != Utility.Map.MapType.HowlingAbyss)
         return;
     Obj_AI_Hero hero = TargetSelector.GetTarget(1000, TargetSelector.DamageType.True);
     if (hero != null && hero.IsValid && !ImFleeing(hero) && IsFleeing(hero))
     {
         var gh = new Items.Item(2051, 0);
         if (gh.IsReady())
         {
             gh.Cast();
         }
     }
 }
Beispiel #11
0
        private void UseFrostQueensClaim()
        {
            if (!MainMenu.ActivatorDefensiveDebuffSlow.GetActive())
                return;

            Obj_AI_Hero enemy = null;
            int count = 0;
            int nCount = 0;

            foreach (Obj_AI_Hero hero1 in ObjectManager.Get<Obj_AI_Hero>())
            {
                if (hero1.IsEnemy && hero1.IsVisible)
                {
                    if (hero1.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 750)
                    {
                        foreach (Obj_AI_Hero hero2 in ObjectManager.Get<Obj_AI_Hero>())
                        {
                            if (hero2.IsEnemy && hero2.IsVisible)
                            {
                                if (hero2.ServerPosition.Distance(hero1.ServerPosition) < 200)
                                {
                                    count++;
                                }
                            }
                        }
                        if (count == 0)
                        {
                            enemy = hero1;
                        }
                        else if (nCount < count)
                        {
                            nCount = count;
                            enemy = hero1;
                        }
                    }
                }
            }

            if (enemy == null || !enemy.IsValid || enemy.IsDead ||
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem(
                    "SAwarenessActivatorDefensiveDebuffSlowConfigFrostQueensClaim").GetValue<Slider>().Value > nCount)
                return;

            if (
                MainMenu.ActivatorDefensiveDebuffSlow.GetMenuItem("SAwarenessActivatorDefensiveDebuffSlowFrostQueensClaim")
                    .GetValue<bool>())
            {
                var fqc = new Items.Item(3092, 850);
                if (fqc.IsReady())
                {
                    fqc.Cast(enemy.ServerPosition);
                }
            }
        }
Beispiel #12
0
        private void UseQss()
        {
            if (!Menu.ActivatorDefensiveCleanseSelf.GetActive())
                return;

            List<BuffInstance> buffList = GetActiveCcBuffs(_buffs);

            if (buffList.Count() >=
                Menu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfConfigMinSpells")
                    .GetValue<Slider>()
                    .Value &&
                Menu.ActivatorDefensiveCleanseSelf.GetMenuItem("SAwarenessActivatorDefensiveCleanseSelfQSS")
                    .GetValue<bool>() &&
                _lastItemCleanseUse + 1 < Game.Time)
            {
                var qss = new Items.Item(3140, 0);
                if (qss.IsReady())
                {
                    qss.Cast();
                    _lastItemCleanseUse = Game.Time;
                }
            }
        }
Beispiel #13
0
		private static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
		{
			if (sender.IsEnemy && sender.Type == GameObjectType.obj_AI_Minion)
			{
				if (GetBool("FW") && W.IsReady() && GetActive("FarmActive") && args.Target.Name == Player.Name && Player.Mana/Player.MaxMana*100 >= GetSlider("MP") )
				{
					if (GrabAlly("HP") == null) W.Cast(sender,GetBool("UsePacket"));
					else W.CastIfHitchanceEquals(GrabAlly("HP"), HitC ,GetBool("UsePacket"));
				}
				
			}
			if (GetBool("AutoW") && W.IsReady() && sender.IsEnemy && (sender.Type == GameObjectType.obj_AI_Hero || sender.Type == GameObjectType.obj_AI_Turret ))
			{
				if ( (args.SData.Name != null && IsOnTheLine(Player.Position,args.Start,args.End)) || (args.Target == Player && Player.Distance(sender) <= 450) || args.Target == Player && Utility.UnderTurret(Player,true))
				{
					if (GrabAlly("HP") == null) W.Cast(sender,GetBool("UsePacket"));
					else W.CastIfHitchanceEquals(GrabAlly("HP"), HitC ,GetBool("UsePacket"));
				}
			}
			if (sender.IsValid && sender.IsEnemy && args.SData.Name == "YasuoWMovingWall")
			{
				WallCastT = Environment.TickCount;
				YasuoWallCastedPos = sender.ServerPosition.To2D();
			}
			if (!GetBool("Mikeal") && !GetBool("Iron")) return;
			Items.Item Mikael = new Items.Item(3222,750);;
			Items.Item Iron = new Items.Item(3190,600);;
			if (!Mikael.IsReady() || !Iron.IsReady()) return;
			if (sender.IsValid && sender.IsEnemy)
			{
				var allies = GrabAlly("ItemHP");
				if (allies != null && args.Target == allies)
				{
					if (Utility.CountEnemiesInRange(allies,1200) > 0 && !Utility.InFountain(allies))
					{
						if (Mikael.IsReady() && Mikael.IsInRange(allies)) Mikael.Cast(allies);
						if (Iron.IsReady() && Iron.IsInRange(allies)) Iron.Cast();
					}
					else if (sender.Type == GameObjectType.obj_AI_Turret && Utility.UnderTurret(allies,true))
					{
						if (Mikael.IsReady() && Mikael.IsInRange(allies)) Mikael.Cast(allies);
						if (Iron.IsReady() && Iron.IsInRange(allies)) Iron.Cast();
					}
				}
				else if (allies == null && args.Target == Player && !Utility.InFountain(Player))
				{
					if (Player.HealthPercentage() <= GetSlider("ItemHP") && Utility.CountEnemiesInRange(Player,1200) > 0)
					{
						if (Mikael.IsReady()) Mikael.Cast(Player);
						if (Iron.IsReady()) Iron.Cast();
					}
				}
			}
		}