{
	saved_FirstTime [1]
	saved_CameFrom [0]
	
	Init[()
	{
		if(saved_FirstTime = 1)
		{
			saved_FirstTime = 0;
			SetNationality (1);
			SetInvulnerable(false);
			SetHealth (256);
			SetWalking();
			PlayAnimation(7);
			Rgun = Random(0, 1);
			switch(Rgun)
			{
				case 0 
				{
					GiveWeapon (53);	
				}
				case 1
				{
					GiveWeapon (55);
				}				
			}
			DropWeaponOnDeath (true);
			LightPatrol();
		}	
	}]
	
	HeavyPatrol[()
	{       
		Level.Log("--> HeavyPatrol[()]");
		StopFollowingPath();
		SetWander(true);
		SetState_Patrol (1);
		SetWalkToDist(8);
		SetAttackDistance(15, 4);
		SetLineOfSight(0);
		Ranim = Random(0,1);
		switch(Ranim)
		{
			case 0
			{
				SetCrouching();		
			}
			case 1
			{
				SetWalking();	
			}	
		}		
	}]
	
	HeavyPatrol_2[()
	{       
		Level.Log("--> HeavyPatrol[()]");
		StopFollowingPath();
		SetWander(0);
		SetState_Patrol (1);
		SetWalkToDist(8);
		SetAttackDistance(15, 4);
		SetLineOfSight(2, 90);
		Ranim = Random(0,1);
		switch(Ranim)
		{
			case 0
			{
				SetCrouching();		
			}
			case 1
			{
				SetWalking();	
			}	
		}		
	}]
	
	PlayerFucked[()
	{
		Level.Log("You are fucked!");
		TurnTo(Level.GetPlayer());
		SetState_Patrol (0);
		SetWalkToDist(8);
		SetAttackDistance (15, 10);
		SetLineOfSight(2, 90);
		SetRunning();
		Ranim = Random(0,1);
		switch(Ranim)
		{
			case 0
			{
				SetCrouching();		
			}
			case 1
			{
				SetWalking();	
			}	
		}		
	}]
	
	LightPatrol[()
	{
		Level.Log("Am I light patroling? Good. Move on fucker");
		SetState_Patrol (1);  
		SetWander(false);     
		SetWalkToDist(4);     
		SetAttackDistance(9, 2); 
		SetLineOfSight(2, 113);
		
		who = GetID();
		switch(who)
		{
			case "group1a" 
			{
				FollowPath("dock_1", 0);
				FollowPathCallback(127, "LookSouth");
				return;
			}
			case "group1b" 
			{
				FollowPath("dock_2", 0);
				FollowPathCallback(127, "LookNorth");
				return;	
			}
			case "group1c" 
			{
				FollowPath("dock_3", 0);
				FollowPathCallback(127, "LookSouth");
				return;
			}
			case "group2a" 
			{
				FollowPath("dock_4", 0);
				FollowPathCallback(127, "LookNorth");
				return;		
			}
			case "group2b" 
			{
				FollowPath("dock_5", 0);
				FollowPathCallback(127, "LookSouth");
				return;	
			}
			case "group2c" 
			{
				FollowPath("dock_6", 0);
				FollowPathCallback(127, "LookNorth");
				return;		
			}	
		}	
	}]      
	LookNorth[()
	{
		saved_CameFrom = 0;
		TurnToLocation(10224, 32112);
		Delay(3,1);
	}]
	LookSouth[()
	{
		saved_CameFrom = 1;
		TurnToLocation(12416, 10000);
		Delay(3,1);
	}]
	LookEast[()
	{
		TurnToLocation(34752, 23312);
		Delay(3,2);
	}]
	
	DelayReached[(x)
	{
		if(x = 1)
		{
			if(not self.IsDead())
			{
				LookEast();
			}	
		}
		if(x = 2)
		{
			if(not self.IsDead())
			{
				if(saved_CameFrom = 0)
				{
					who = GetID();
					switch(who)
					{
						case "group1a"
						{
							FollowPath("dock_1", 0);
							FollowPathCallback(127, "LookSouth");
							return;
						}
						case "group1b"
						{
							FollowPath("dock_2a", 0);
							FollowPathCallback(127, "LookSouth");
							return;
						}
						case "group1c"
						{
							FollowPath("dock_3", 0);
							FollowPathCallback(127, "LookSouth");
							return;
						}
						case "group2a"
						{
							FollowPath("dock_4a", 0);
							FollowPathCallback(127, "LookSouth");
							return;
						}
						case "group2b"
						{
							FollowPath("dock_5", 0);
							FollowPathCallback(127, "LookSouth");
							return;
						}
						case "group2c"
						{
							FollowPath("dock_6a", 0);
							FollowPathCallback(127, "LookSouth");
							return;
						}	
					}	
				}
				if(saved_CameFrom = 1)
				{
					who = GetID();
					switch(who)
					{
						case "group1a"
						{
							FollowPath("dock_1a", 0);
							FollowPathCallback(127, "LookNorth");
							return;
						}
						case "group1b"
						{
							FollowPath("dock_2", 0);
							FollowPathCallback(127, "LookNorth");
							return;
						}
						case "group1c"
						{
							FollowPath("dock_3a", 0);
							FollowPathCallback(127, "LookNorth");
							return;
						}
						case "group2a"
						{
							FollowPath("dock_4", 0);
							FollowPathCallback(127, "LookNorth");
							return;
						}
						case "group2b"
						{
							FollowPath("dock_5a", 0);
							FollowPathCallback(127, "LookNorth");
							return;
						}
						case "group2c"
						{
							FollowPath("dock_6", 0);
							FollowPathCallback(127, "LookNorth");
							return;
						}	
					}
				}
			}		
		}
	}]
}