###===================================================================###
###                                                                   ###
###                                                                   ###
###                    Harry Bo21s Perks v3.0.7                       ###
###         * Overwrites the original _zombiemode_perks.gsc           ###
###                                                                   ###
###                                                                   ###
###===================================================================###

###=================================###
###              SETUP              ###
###=================================###

Before anything, open the mods folder in this download, and rename the folder inside to your mods name. Then back out to the root directory, and drag the contents of the download in, and 
overwrite any files it asks about

Rename the "localized_nazi_zombie_YOURMAPNAME" file that is now in your root/mods/YOURMAPNAME to yours

########################################################################################################################################################################################

IF YOU HAVE NOT EDITED ZOMBIEMODE_SPAWNER.GSC OR ZOMBIEMODE_WEAPONS.GSC YOU CAN USE THE COPIES FROM THE DOWNLOAD AND SKIP THE SCRIPT CHANGES

# 1. Changes to zombiemode_weapons.gsc for Mule Kick

========================================================== Changes to zombiemode_weapons.gsc for Mule Kick =============================================================================

# in _zombiemode_weapons.gsc

# add this at the top (with the # coz its a include)

#include maps\_harrybo21_utilities;

# replace

user thread treasure_chest_give_weapon( weapon_spawn_org.weapon_string );

# with :

user thread harrybo21_give_gun( weapon_spawn_org.weapon_string);

# replace all references to :

player weapon_give( self.zombie_weapon_upgrade ); 

# with :

player thread harrybo21_give_gun( self.zombie_weapon_upgrade );

# 2. Changes to _zombiemode_spawner.gsc for Vultre Aid

================================================================= Changes to _zombiemode_spawner.gsc for Vultre Aid =============================================================================

# Replace this :

find_flesh()
{
	self endon( "death" ); 
	level endon( "intermission" );

	if( level.intermission )
	{
		return;
	}

	self.ignore_player = undefined;

	self zombie_history( "find flesh -> start" );

	self.goalradius = 32;
	while( 1 )
	{

		// try to split the zombies up when the bunch up
		// see if a bunch zombies are already near my current target; if there's a bunch
		// and I'm still far enough away, ignore my current target and go after another one
//		near_zombies = getaiarray("axis");
//		same_enemy_count = 0;
//		for (i = 0; i < near_zombies.size; i++)
//		{
//			if ( isdefined( near_zombies[i] ) && isalive( near_zombies[i] ) )
//			{
//				if ( isdefined( near_zombies[i].favoriteenemy ) && isdefined( self.favoriteenemy ) 
//				&&	near_zombies[i].favoriteenemy == self.favoriteenemy )
//				{
//					if ( distancesquared( near_zombies[i].origin, self.favoriteenemy.origin ) < 225 * 225 
//					&&	 distancesquared( near_zombies[i].origin, self.origin ) > 525 * 525)
//					{
//						same_enemy_count++;
//					}
//				}
//			}
//		}
//		
//		if (same_enemy_count > 12)
//		{
//			self.ignore_player = self.favoriteenemy;
//		}

		zombie_poi = self get_zombie_point_of_interest( self.origin );
		
		players = get_players();
		
		//PI_CHANGE_BEGIN - 6/18/09 JV It was requested that we use the poi functionality to set the "wait" point while all players  
		//are in the process of teleportation. It should not intefere with the monkey.  The way it should work is, if all players are in teleportation,
		//zombies should go and wait at the stage, but if there is a valid player not in teleportation, they should go to him
		if (isDefined(level.zombieTheaterTeleporterSeekLogicFunc) )
		{
       		temp_poi = self [[ level.zombieTheaterTeleporterSeekLogicFunc ]](players, zombie_poi);
       		if (IsDefined(temp_poi))
       			zombie_poi = temp_poi;
       	}
       	//PI_CHANGE_END

					
		// If playing single player, never ignore the player
		if( players.size == 1 )
		{
			self.ignore_player = undefined;
		}
			
		player = get_closest_valid_player( self.origin, self.ignore_player ); 
		
		if( !isDefined( player ) && !isDefined( zombie_poi ) )
		{
			self zombie_history( "find flesh -> can't find player, continue" );
			if( IsDefined( self.ignore_player ) )
			{
				self.ignore_player = undefined;
				self.ignore_player = [];
			}

			wait( 1 ); 
			continue; 
		}
		
		self.ignore_player = undefined;

		self.enemyoverride = zombie_poi;
		self.favoriteenemy = player;
		self thread zombie_pathing();

		self.zombie_path_timer = GetTime() + ( RandomFloatRange( 1, 3 ) * 1000 );
		while( GetTime() < self.zombie_path_timer ) 
		{
			wait( 0.1 );
		}

		self zombie_history( "find flesh -> bottom of loop" );

		debug_print( "Zombie is re-acquiring enemy, ending breadcrumb search" );
		self notify( "zombie_acquire_enemy" );
	}
}

# With this : 

find_flesh()
{
	self endon( "death" ); 
	level endon( "intermission" );

	if( level.intermission )
		return;
	

	self.ignore_player = undefined;
	self zombie_history( "find flesh -> start" );
	self.goalradius = 32;
	while( 1 )
	{	
		// ============================================= VULTURE AID AND QUICK REVIVE ========================================================
		players = get_players();
		if ( maps\_harrybo21_utilities::harry_all_players_invisible() )
		{
			self.favoriteenemy = undefined;
					
			self maps\_harrybo21_utilities::harrybo21_set_random_goal();			
			
			wait randomfloatrange( 1.0, 2.2 );
			continue;
		}
		// ============================================= VULTURE AID AND QUICK REVIVE ========================================================

		zombie_poi = self get_zombie_point_of_interest( self.origin );
		
		players = get_players();
					
		player = get_closest_valid_player( self.origin, self.ignore_player ); 
		
		if( !isDefined( player ) && !isDefined( zombie_poi ) )
		{
			self zombie_history( "find flesh -> can't find player, continue" );
			if( IsDefined( self.ignore_player ) )
			{
				self.ignore_player = undefined;
				self.ignore_player = [];
			}

			wait( 1 ); 
			continue; 
		}
		
		self.ignore_player = undefined;

		self.enemyoverride = zombie_poi;
		self.favoriteenemy = player;
		
		self thread zombie_pathing();

		self.zombie_path_timer = GetTime() + ( RandomFloatRange( 1, 3 ) * 1000 );
		while( GetTime() < self.zombie_path_timer ) 
		{
			if ( players.size == 1 && players[ 0 ] maps\_laststand::player_is_in_laststand() )
				break;
			
			wait( 0.1 );
		}

		self zombie_history( "find flesh -> bottom of loop" );

		debug_print( "Zombie is re-acquiring enemy, ending breadcrumb search" );
		self notify( "zombie_acquire_enemy" );
	}
}

# 3. Changes to clientscripts for dual wield muzzle flash to work ( mustangs )

# Open root/mods/YOURMOD/clientscripts/YOURMODNAME.csc

# Find this line : 

thread clientscripts\_audio::audio_init(0);

# Add this under it :

// ======================= DUAL WEILD ===============================================
thread clientscripts\_dual_wield::init();
// ======================= DUAL WEILD ===============================================

# 4. Loading models, anims, sounds and weapon files

Tick the scripts in launcher, recompile map, build mod and run

# 5. Radiant
===========================================================

# Place the power switch prefab, any perks or pack a punches you want, some distraction points and some whos who respawn points

make sure your zones have this kvp :

"script_noteworthy" - "player_zone"

without this, the "is it in a active zone" check fails, and its used a lot, including for monkeys

===========================================================
