コード例 #1
0
ファイル: Program.cs プロジェクト: qktlfflzk/Backup5.4
		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();
					}
				}
			}
		}