Results 1 to 1 of 1
  1. #1
    Member
    Join Date
    Jan 2015
    Posts
    71
    Points
    138
         User Info     Contact     Gamer ID
    Join Date
    Jan 2015
    Posts
    71
    Points
    138

    Contact info:

    Youtube Channel: http://www.youtube.com/user/nicisthatdeal

    Post (SC7E52)AllMoDs Zombies - Chaos Dogs with Ray Gun Gametype Edit

    1st creds to
    Jellyinjector and kylaii
    canniball666
    MWisBest

    PLAYS ON ALL MAPS

    WARNING WARNING
    put in a modmenu that had chaos dogs in it
    reason i put the dog power ups in this zombies
    replace chaosdogs with this


    I added every maps
    perk machines
    mystery box
    pack a punch
    AND INSTKILL WORKS ON ZOMBIES AS OF 7/9/2015

    you will not spawn in non of the stuff i put out

    COMMING SOON

    i will make traps on all maps and make them work on the dogs
    if i dont have to do it in the dogs.gsc
    and more



    NEW UPDATES MADE 7/13/2015


    LASTMAN WEP IS A RAYGUN THAT CAN BE packapunched TO HAVE Dual wield RAY GUNS OR YOU CAN HIT THE MS BOX AND GET NEW GUN THAT WILL SHOOT RAY GUN AMO WITH NO ERROR
    IF YOU SHOOT TO CLOSE TO WALLS OR A PLAYER IT WILL TAKE YOUR HEALTH

    zombies have a perk box now that gives infin knifes and hatchets and more heath wont freez from them they auto deleat

    GAME TIME IS 10 MIN



    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    
    #include maps\mp\gametypes\_hud_util;
    
    #include Modding\Mod\_Utility;
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    
    	level.prematchPeriod = 10;
    	level.instaKill = 0;
    	level.doublePoints = 0;
    	level.lastPowerup = 99;
    
    	thread globalVariables();
    	thread spawnMysteryBox();
    	thread checkIfAllDead();
    	thread createGameText();
    	thread monitorNuke();
    	thread spawnDogs();
    	
    	//The variables used for monitoring kills and damage
    	level.onPlayerKilled = ::onPlayerKilled;
    	level.onPlayerDamage = ::onPlayerDamage;
    	
    	wait 2;
            level.fx_tabun_0 = level._effect["fx_fire_player_sm_smk_2sec"];
            level.fx_tabun_1 = level._effect["character_fire_death_sm"];
            level.fx_tabun_2 = level._effect["character_fire_death_torso"];
            level.fx_tabun_3 = "napalmground_sm_mp";
            level.fx_tabun_single = "napalmground_lg_mp";
            
    	PreCacheItem(level.fx_tabun_0);
            PreCacheItem(level.fx_tabun_1);
            PreCacheItem(level.fx_tabun_2);
            PreCacheItem(level.fx_tabun_3);
            PreCacheItem(level.fx_tabun_single);
    	preCacheShader( "compass_waypoint_target" );
    	preCacheShader( "headicon_dead" );
    	preCacheShader( "perk_sleight_of_hand" );
    	preCacheShader( "perk_lightweight" );
    	preCacheShader( "rank_prestige07" );
    	PrecacheShader( "hud_ammo_refill_drop" );
    	PrecacheShader( "hud_ks_minigun" );
    	PrecacheShader( "perk_times_two" );
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connecting", player );
    		
    		player thread onPlayerSpawned();
    		player thread playerVariables();
    	}
    }
    
    onPlayerConnected()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    	
    		player thread setupGame();
    		player thread checkDistance();
    		//player thread doVision();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    
    		self thread autoDeleteKnives();
    		self thread autoDeleteTomahawks();
    		
    		if( self.isZombie == false )
    		{
    		if( self.pers["team"] == "allies" )
    			{
    				self thread humanSettings();
    
    			}
    			else if( self.pers["team"] != "allies" )
    			{
    				self.isZombie = false;
    				self [[level.allies]]();
    			}
    		}
    		else if( self.isZombie == true )
    		{
    			if( self.pers["team"] == "axis" )
    			{
    				self thread zombieSettings();
    				self thread ZombieHealth();
    			}
    			else if( self.pers["team"] != "axis" )
    			{
    				self.isZombie = true;
    				self [[level.axis]]();
    			}
    		}
    	}
    }
    
    onPlayerDamage( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    	if( attacker.isZombie == false && attacker.pers["team"] == "allies" )
    	{
    		if( self.isZombie == true && self.pers["team"] == "axis" && sWeapon != "minigun_mp" ) attacker thread addMoney( iDamage * level.variable["cash_multiplier"] );
    	}
    	else if( attacker.isZombie == true && attacker.pers["team"] == "axis" )
    	{
    		if( sWeapon == "hatchet_mp" ) iDamage = 650;
    	}
    	return iDamage;
    }
    
    onPlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    	if( level.variable["zombies_released"] == 1 )
    	{
    		if( self.pers["team"] == "allies" && self.isZombie == false && sMeansOfDeath != "MOD_SUICIDE" )
    		{
    			self thread changeToZombie();
    		}
    		else if( self.pers["team"] == "axis" && self.isZombie == true )
    		{
    			MagicBullet( "tabun_gas_mp", self.origin, self.origin, self );
    		}
    	}
    }
    doVision()
    {
        self setClientDvar("r_filmTweakInvert", "0");
        self setClientDvar("r_filmUseTweaks", "1");
        self setClientDvar("r_filmTweakEnable", "1");
        self setClientDvar("r_filmTweakLightTint", "0 0 0");
        self setClientDvar("r_filmTweakSaturation", "1 1 1");
        self setClientDvar("r_filmTweakHue", "0 0 0");
    }
    spawnDogs()
    {
    	for(;;)
    	{
    		wait randomFloatRange( 70, 150, 240, 500 );
    		
    		for( i = 0; i < level.players.size; i++ )
    		{
    			if( level.players[i].pers["team"] == "axis" && level.players[i].isZombie == true )
    			{
    				level.players[i] thread maps\mp\_dogs::useKillstreakDogs( "dogs_mp" );
    				break;
    			}
    		}
    		iPrintlnBold( "^1O Shit!!! Here come the Puppies" );
    	}
    }
    
    globalVariables()
    {
    	//Variables
    	
    	level.variable = [];
    	level.variable["perkz_slots"] = 0;
            level.variable["slotsz_left"] = 2;
    	level.variable["game_ready"] = 0;
    	level.variable["zombies_released"] = 0;
    	level.variable["mysterybox_in_use"] = 0;
    	level.variable["cash_multiplier"] = 1;
    	level.variable["last_survivor"] = 0;
    	level.variable["perk_slots"] = 0;
    	level.variable["traps_slots"] = 0;
    	level.variable["trap_created"] = false;
    	level.variable["slots_left"] = 2;
    	level.variable["stop_sendind_position"] = false;
    	level.variable["mystery_box_uses"] = 0;
    	level.variable["pack_a_punch"] = false;
    	level.variable["using_pack_a_punch"] = 0;
    	level.variable["dead_persons"] = 0;
    	level.variable["match_ended"] = 0;
    	level.variable["dead_people"] = [];
    	level.variable["time_limit"] = 600;
    	
    	level.variable["tip_list"][0] = "Sticking together is the way to go";
    	level.variable["tip_list"][1] = "Press [{+smoke}] to spawn a Barrier";
    	level.variable["tip_list"][2] = "If you have zombies on you, RUN AND GUN";
    	level.variable["tip_list"][3] = "Make sure to buy perks to gain advantages";
    	level.variable["tip_list"][4] = "A killstreak of 5 will give you an ammo drop";
    	
    	level.variable["mp_firingrange"]["mystery_box_origins"][0] = (9, 1494, -38);
    	level.variable["mp_firingrange"]["mystery_box_origins"][1] = (-828, -148, -92);
    	level.variable["mp_firingrange"]["mystery_box_origins"][2] = (460, -206, -97);
    	level.variable["mp_firingrange"]["mystery_box_origins"][3] = (2084, 2222, -21);
    	level.variable["mp_firingrange"]["mystery_box_angles"][0] = (0, -105, 0);
    	level.variable["mp_firingrange"]["mystery_box_angles"][1] = (0, 176, 0);
    	level.variable["mp_firingrange"]["mystery_box_angles"][2] = (0, 1, 0);
    	level.variable["mp_firingrange"]["mystery_box_angles"][3] = (0, -3, 0);
    	
    	level.variable["mp_nuked"]["mystery_box_origins"][0] = (801, 337, 94);
    	level.variable["mp_nuked"]["mystery_box_origins"][1] = (-620, 257, -39);
    	level.variable["mp_nuked"]["mystery_box_origins"][2] = (-231, 1009, -46);
    	level.variable["mp_nuked"]["mystery_box_angles"][0] = (0, -161, 0);
    	level.variable["mp_nuked"]["mystery_box_angles"][1] = (0, -112, 0);
    	level.variable["mp_nuked"]["mystery_box_angles"][2] = (0, 112, 0);
    	
    	level.variable["mp_cosmodrome"]["mystery_box_origins"][0] = (-389, 3343, -150);
    	level.variable["mp_cosmodrome"]["mystery_box_origins"][1] = (-459, -978, -137);
    	level.variable["mp_cosmodrome"]["mystery_box_origins"][2] = (-763, -2050, -145);
    	level.variable["mp_cosmodrome"]["mystery_box_origins"][3] = (9, 386, 9);
    	level.variable["mp_cosmodrome"]["mystery_box_angles"][0] = (0, 89, 0);
    	level.variable["mp_cosmodrome"]["mystery_box_angles"][1] = (0, 175, 0);
    	level.variable["mp_cosmodrome"]["mystery_box_angles"][2] = (0, 177, 0);
    	level.variable["mp_cosmodrome"]["mystery_box_angles"][3] = (0, 2, 0);
    	
    	level.variable["mp_mountain"]["mystery_box_origins"][0] = (2540, -2417, 479);
    	level.variable["mp_mountain"]["mystery_box_origins"][1] = (3296, -598, 336);
    	level.variable["mp_mountain"]["mystery_box_origins"][2] = (2807, 1311, 369);
    	level.variable["mp_mountain"]["mystery_box_angles"][0] = (0, -87, 0);
    	level.variable["mp_mountain"]["mystery_box_angles"][1] = (0, 87, 0);
    	level.variable["mp_mountain"]["mystery_box_angles"][2] = (0, -91, 0);
    	
    	level.variable["mp_array"]["mystery_box_origins"][0] = (261, 2737, 599);
    	level.variable["mp_array"]["mystery_box_origins"][1] = (2602, 259, 715);
    	level.variable["mp_array"]["mystery_box_origins"][2] = (-576, -1641, 344);
    	level.variable["mp_array"]["mystery_box_angles"][0] = (0, 3, 0);
    	level.variable["mp_array"]["mystery_box_angles"][1] = (0, 2, 0);
    	level.variable["mp_array"]["mystery_box_angles"][2] = (0, 170, 0);
    	
    	level.variable["mp_duga"]["mystery_box_origins"][0] = (-881.477, -6104.48, 20.1164);
    	level.variable["mp_duga"]["mystery_box_origins"][1] = (-1621.88, -2609.92, 153.978);
    	level.variable["mp_duga"]["mystery_box_angles"][0] = (0, -88.9122, 0);
    	level.variable["mp_duga"]["mystery_box_angles"][1] = (0, -33.9449, 0);
    	
    	level.variable["mp_cairo"]["mystery_box_origins"][0] = (654.052, 556.487, 151.871);
    	level.variable["mp_cairo"]["mystery_box_origins"][1] = (50.5735, -765.116, 152.738);
    	level.variable["mp_cairo"]["mystery_box_angles"][0] = (0, 87.9419, 0);
    	level.variable["mp_cairo"]["mystery_box_angles"][1] = (0, -178.701, 0);
    	
    	level.variable["mp_crisis"]["mystery_box_origins"][0] = (-1011.75, 2186.26, 82.7879);
    	level.variable["mp_crisis"]["mystery_box_origins"][1] = (-1359.77, 922.118, 210.027);
    	level.variable["mp_crisis"]["mystery_box_angles"][0] = (0, 131.12, 0);
    	level.variable["mp_crisis "]["mystery_box_angles"][1] = (0, 93.4949, 0);
    	
    	level.variable["mp_havoc"]["mystery_box_origins"][0] = (3010.39, -250.391, 279.467);
    	level.variable["mp_havoc"]["mystery_box_origins"][1] = (1510.53, -975.792, 114.2);
    	level.variable["mp_havoc"]["mystery_box_angles"][0] = (0, 104.385, 0);
    	level.variable["mp_havoc"]["mystery_box_angles"][1] = (0, 112.509, 0);
    	
    	level.variable["mp_hanoi"]["mystery_box_origins"][0] = (-1600.82, -2763.99, 141.097);
    	level.variable["mp_hanoi"]["mystery_box_origins"][1] = (211.75, 440.811, -89.8923);
    	level.variable["mp_hanoi"]["mystery_box_angles"][0] = (0, -88.2733, 0);
    	level.variable["mp_hanoi "]["mystery_box_angles"][1] = (0, -0.4485994, 0);
    	
    	level.variable["mp_radiation"]["mystery_box_origins"][0] = (611.735, -1219.45, 284.169);
    	level.variable["mp_radiation"]["mystery_box_origins"][1] = (-760.881, 1598.39, 284.765);
    	level.variable["mp_radiation"]["mystery_box_angles"][0] = (0, 178.599, 0);
    	level.variable["mp_radiation"]["mystery_box_angles"][1] = (0, -179.149, 0);
    	
    	level.variable["mp_russianbase"]["mystery_box_origins"][0] = (-2271.13, 915.86, 247.693);
    	level.variable["mp_russianbase"]["mystery_box_origins"][1] = (-768.69, -804.913, 16.9344);
    	level.variable["mp_russianbase"]["mystery_box_angles"][0] = (0, -89.8077, 0);
    	level.variable["mp_russianbase"]["mystery_box_angles"][1] = (0, 96.7896, 0);
    
    	level.variable["mp_villa"]["mystery_box_origins"][0] = (2821.2, 1074.7, 395.407);
    	level.variable["mp_villa"]["mystery_box_origins"][1] = (14470.77, 2714.5, 392.788);
    	level.variable["mp_villa"]["mystery_box_origins"][2] = (3013.95, -59.576, 474.643);
    	level.variable["mp_villa"]["mystery_box_angles"][0] = (0, -2.60741, 0);
    	level.variable["mp_villa"]["mystery_box_angles"][1] = (0, 89.6009, 0);
    	level.variable["mp_villa"]["mystery_box_angles"][2] = (0, 177.643, 0);
    
    	level.variable["mp_cracked"]["mystery_box_origins"][0] = (-329.134, -912.176, 97.4344);
    	level.variable["mp_cracked"]["mystery_box_origins"][1] = (-2051.23, -447.513, -35.6189);
    	level.variable["mp_cracked"]["mystery_box_angles"][0] = (0, 179.357, 0);
    	level.variable["mp_cracked"]["mystery_box_angles"][1] = (0, 89.6009, 0);
    
    	SetMatchTalkFlag( "DeadChatWithDead", 1 );
    	SetMatchTalkFlag( "DeadChatWithTeam", 1 );
    	SetMatchTalkFlag( "DeadHearTeamLiving", 1 );
    	SetMatchTalkFlag( "DeadHearAllLiving", 1 );
    	SetMatchTalkFlag( "EveryoneHearsEveryone", 1 );
    
    	level.prematchPeriod = 0;
    
    	level.guns[0] = "aug_mp";
    	level.guns[1] = "m16_mp";
    	level.guns[2] = "spas_mp";
    	level.guns[3] = "famas_mp";
    	level.guns[4] = "rpk_mp";
    	level.guns[5] = "rpg_mp";
    	level.guns[6] = "m72_law_mp";
    	level.guns[7] = "commando_mp";
    	level.guns[8] = "python_mp";
    	level.guns[9] = "ak74u_mp";
    	level.guns[10] = "l96a1_mp";
    	level.guns[11] = "fnfal_mp";
    	level.guns[12] = "cz75_mp";
    	level.guns[13] = "spectre_mp";
    	level.guns[14] = "hk21_mp";
    	level.guns[15] = "crossbow_explosive_mp";
    	level.guns[16] = "knife_ballistic_mp";
    	level.guns[17] = "m60_mp";
    	level.guns[18] = "stoner63_mp";
    	
    	setExpFog( 200, 320, 0, 0, 0, 0 );
    
    	//Dvars
    	setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
    	setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
    	setDvar( "scr_disable_cac", 1 );
    	setDvar( "scr_disable_weapondrop", 1 );
    	setDvar( "dog_MeleeDamage", 75 );
    	setDvar( "scr_dog_time", 65 );
    	setDvar( "scr_dog_health", 100 );
    	 setDvar("scr_dog_count", "25");
    	setDvar( "scr_game_hardpoints", 0 );
    	setDvar( "scr_game_killstreaks", 0 );
    	setDvar( "player_lastStandBleedoutTime", 50 );
    	setDvar( "player_meleeRange", 200 );
    	setDvar( "player_meleeWidth", 200 );
    	setDvar( "cg_enemyNameFadeIn", 99999999 );
    	setDvar( "cg_enemyNameFadeOut", 99999999 );
    }
    
    playerVariables()
    {
    	//Variables
    	if( self isHost() ) self.variable["cash"] = 20000000;
    	else self.variable["cash"] = 5000;
    	self.variable["zombie_kills"] = 0;
    
    	//Dvars
    	self setClientDvar( "r_sun", "0" );
    	self setClientDvar( "r_specularRoughnessMap", 0 );
    	self setClientDvar( "r_lightTweakSunColor", "1 0 0" );
    	self setClientDvar( "r_lighttweaksunlight", "0.991101 0.947308 0.760525" );
    	self setClientDvar( "r_heroLightScale", "1 1 1" );
    	self setClientDvar( "r_skyColorTemp", "6500" );
    	self setClientDvar( "ammoCounterHide", 1 );
    	self setClientDvar( "actionSlotsHide", 1 );
    	self setClientDvar( "ui_xpText", 0 );
    	self setClientDvar( "scr_game_killstreaks", 0 );
    	self setClientDvar( "scr_game_forceuav", 0 );
    	self setClientDvar( "player_lastStandBleedoutTime", 50 );
    	self setClientDvar( "cg_gun_x", 0 );
    	self setClientDvar( "cg_enemyNameFadeIn", 9999999 );
    	self setClientDvar( "cg_enemyNameFadeOut", 9999999 );
    	self setClientDvar( "player_meleeRange", 200 );
    	self setClientDvar( "player_meleeWidth", 200 );
    
    	//Hud Elements
    	self.displayCash = NewClientHudElem( self );
    	self.displayCash.alpha = 0;
    	self.displayCash.font = "objective";
    	self.displayCash.fontscale = 1.9;
    	self.displayCash.x = 550;
    	self.displayCash.y = 300;
    	self.displayCash.archived = true;
    	self.displayCash.color = ( 1, 1, 0 );
    	self.displayCash.alignX = "right";
    	self.displayCash.alignY = "middle";
    	self.displayCash.horzAlign = "fullscreen";
    	self.displayCash.vertAlign = "fullscreen";
    	self.displayCash setText( "Money: " + self.variable["cash"] );
    	
    	//Threads
    	self thread createHealth();
    }
    
    setupGame()
    {
    	if( self.pers["team"] != "allies" )
    	{
    		self [[level.allies]]();
    		wait 0.2;
    	}
    	else if( self.pers["team"] == "allies" )
    	{
    		wait 0.2;
    	}
    	self.isZombie = false;
    }
    
    checkIfAllDead()
    {
    	for(;;)
    	{
    		wait 1.0;
    		if( level.variable["zombies_released"] == 1 && level.playerCount["allies"] == 1 && level.variable["last_survivor"] == 0 )
    		{
    			for( i = 0;i < level.players.size;i++ )
    			{
    				wait 0.05;
    				if( level.players[i].isZombie == false && level.players[i].pers["team"] == "allies" )
    				{
    					level.variable["last_survivor"] = 1;
    					level.players[i] thread lastManWeapons();
    					break;
    				}
    			}
    		}
    		else if( level.variable["zombies_released"] == 1 && level.playerCount["allies"] == 0 )
    		{
    			wait 1.0;
    			level thread CreateCredits( "axis", "Fuck Humans Have Been Eliminated" );
    			level notify( "match_ended" );
    			break;
    		}
    	}
    }
    lastManWeapons()
    {
    	iPrintlnBold( self.name + " ^1Has the Ray Gun" );
    
    	objective_add( 6, "active", self.origin );
    	objective_icon( 6, "hud_ks_minigun" );
    
    	self.maxHealth = 2250;
    	self.health = 2250;
    	self takeAllWeapons();
    	self giveWeapon( "frag_grenade_mp" ); 					
    	self giveWeapon( "knife_mp" );
    	self giveWeapon( "hatchet_mp" );
    	self GiveWeapon( "asp_mp" );
    	self switchToWeapon( "asp_mp" );
    	self giveMaxAmmo( "asp_mp" );
    	self giveWeapon( "tabun_gas_mp" );
    	self SetWeaponAmmoStock( "tabun_gas_mp", 9 );
    	self thread ammo();
    	
    	for(;;)
    	{
    		objective_position( 6, self.origin );
    		self waittill("weapon_fired");
    		self thread Rayz(self getTagOrigin("tag_eye"), aim(), self GetPlayerAngles() );
    		wait 0.2;
    	}
    }
    Rayz(start, end, angle )
    {
    	dot = loadfx("misc/fx_equip_tac_insert_light_red");
    	for(i=0;;i++)
    	{
    		org = start+(anglesToForward(angle)*(i*13));
    		playfx(dot,org);
    		if(distance(org,end) < 7 || i > 165)
    		{
    			radiusdamage(org,250,225,175,self);
    			break;
    		}
    	}
    }
    aim()
    {
    	location = bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
    	return location;
    }
    fx_fucntion(input)
    {
    	self endon("death");
    	self endon("disconnect");
    	self endon("fx_fucntion_stop");
    	level.fx_effect=loadfx(input);
    	for(;;)
    	{
    		self waittill("weapon_fired");
    		start=self gettagorigin("tag_eye");
    		end=anglestoforward(self getPlayerAngles())* 1000000;
    		SPLOSIONlocation=BulletTrace(start,end,true,self)["position"];
    		effect=spawnFx(level.fx_effect,SPLOSIONlocation);
    		triggerFx(effect);
    	}
    	wait 0.1;
    }
    
    spawnMysteryBox()
    {
        level.currentSpot = (0, 0, 0);
        level.spot = randomInt(level.variable[getDvar("mapname")]["mystery_box_origins"].size);
        switch (getDvar("mapname"))
        {
     case "mp_nuked": // This is the map Nuketown
        level thread createPerkBox((-816, 741, -33), (0, 70, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((597, 309, -23), (0, 11, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createPerkBox((329, -551, -26), (0, -175, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread CreatePackBox((799, 376, -37), (0, 195, 0));
        level thread createzBox((-816, 741, -33), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
                break;
     case "mp_mountain": // This is the map Summit
        level thread createPerkBox((3885, -981, 352), (0, -90, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((2904, -1954, 497), (0, -252, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createPerkBox((2371, -406, 358), (0, 2, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createzBox((3885, -981, 352), (0, -90, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
                break;
     case "mp_array": // This is the map Array
        level thread CreatePackBox((2416, 126, 699), (0, 195, 0));
        level thread createPerkBox((614, -467, 318), (0, 70, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((1752, 2732, 648), (0, 11, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createPerkBox((-682, 1815, 328), (0, 195, 0), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createzBox((614, -467, 318), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
                break;
     case "mp_cairo": // This is the map Havana
        level thread CreatePackBox((206.005, -1042.88, 164.209), (0, 89.7617, 0));
        level thread createPerkBox((435.327, 1202.95, 35.7646), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((697.483, -1295.27, 28.2915), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createPerkBox((-611.91, -312.267, 35.4597), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createzBox((435.327, 1202.95, 35.7646), (0, 0, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
                break;
     case "mp_cosmodrome": // This is the map Launch
        level thread createPerkBox((696, -1877, -129), (0, -84, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((1696, 731, -305), (0, -84, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createPerkBox((-5, 1968, -128), (0, -269, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createzBox((696, -1877, -129), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
                break;
     case "mp_crisis": // This is the map Crisis
        level thread CreatePackBox((188.417, 1634.18, 87.5308), (0, -91.875, 0));
        level thread createPerkBox((1928.44, 1712.18, 96.7906), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((-231.994, 2774.97, 100.38), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((-2439.41, 1073.23, 106.945), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((1928.44, 1712.18, 96.7906), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_duga": // This is the map Grid
        level thread CreatePackBox((-1499.29, -4483.43, -60.542), (0, 90.2735, 0));
        level thread createPerkBox((968.101, -5438.77, 57.8954), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((-2426.76, -1553.99, 39.933), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((-2232.12, -2525.07, 174.43), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((968.101, -5438.77, 57.8954), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
            break;
     case "mp_firingrange": // This is the map Firing Range
        level thread CreatePackBox((359, 908, 206), (0, -115, 0));
        level thread createPerkBox((800, 1084, -12), (0, -120, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((-300, 175, -84), (0, 173, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((-951, 1194, -15), (0, -108, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createTrap((176, 888, -12), (0, -111, 0));
        level thread createzBox((800, 1084, -12), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_hanoi": // This is the map Hanoi
        level thread CreatePackBox((293.625, -1656.74, 80.7523), (0, 43.4967, 0));
        level thread createPerkBox((-1780.18, -2924.99, -29.6036), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((-1122.97, -2663.87, 98.6352), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((553.539, -396.148, 41.9219), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((-1780.18, -2924.99, -29.6036), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_havoc": // This is the map Jungle
        level thread CreatePackBox((2410.68, 61.9637, 306.548), (0, -71.2087, 0));
        level thread createPerkBox((1099.94, 1615.52, 280.34), (180, 265.87, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((2690.45, -1642.13, 279.52), (180, 300.54, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((-575.598, -766.725, 331.716), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((1099.94, 1615.52, 280.34), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_radiation": // This is the map Radiation
        level thread CreatePackBox((-816.226, 33.2404, 368.751), (0, -2.98279, 0));
        level thread createPerkBox((-1005.68, 25.1844, 226.007), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((2237.65, 1104.83, 344.172), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((-9.34256, 836.625, -12.848), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((-1005.68, 25.1844, 226.007), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_russianbase": // This the map WMD
        level thread CreatePackBox((1842.2, -487.701, 208.225), (0, 0.741577, 0));
        level thread createPerkBox((284.953, 1190.06, 35.0259), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((-1.98932, 221.202, 179.455), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((1455.87, 1097.14, 193.422), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((284.953, 1190.06, 35.0259), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_villa": // This is the map Villa
        level thread CreatePackBox((3495.51, 4793.891, 2.8352), (0, 25.6934, 0));
        level thread createPerkBox((3240.28, 2936.26, 285.326), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((2630.37, 925.4, 410.478), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((5473.29, -288.994, 414.016), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((3240.28, 2936.26, 285.326), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
    	break;
     case "mp_cracked": // This is the map Cracked
        level thread CreatePackBox((20.2912, 253.192, -37.9511), (0, 92.4225, 0));
        level thread createPerkBox((-2883.34, 638.202, -160.045), (0, 0, 90), "Speed Cola", ::giveReload, "perk_sleight_of_hand");
        level thread createPerkBox((1264.35, 789.726, -99.1062), (0, 0, 90), "Juggernog", ::giveHealth, "rank_prestige07");
        level thread createPerkBox((-118.644, -1855.43, -154.844), (0, 0, 90), "Stamin-Up", ::giveSpeed, "perk_lightweight");
        level thread createzBox((-2883.34, 638.202, -160.045), (0, 70, 90), "Infinite Shit", ::zombieperk, "compass_supply_drop_green");
            break;
        }
        level thread createBox(level.variable[getDvar("mapname")]["mystery_box_origins"][level.spot], level.variable[getDvar("mapname")]["mystery_box_angles"][level.spot]);
        level.currentSpot = level.variable[getDvar("mapname")]["mystery_box_origins"][level.spot];
    }
    
    createPerkBox( pos, ang, name, func, shad )
    {
    	slot = level.variable["perk_slots"];
    	level.variable["perk_name"][slot] = name;
    	level.variable["perk_function"][slot] = func;
    	
    	level.perkBox[slot] = spawn( "script_model", pos );
    	level.perkBox[slot] setModel( "mp_supplydrop_axis" );
    	level.perkBox[slot].angles = ang;
    
    	FlagEffect = loadfx( "misc/fx_ui_flagbase_gold_t5" );
    	Effect = PlayLoopedFX( FlagEffect, 1, pos - ( 0, 0, 34 ) );
    
    	iconOrg = level.perkBox[slot].origin;
    	icon = newTeamHudElem( "allies" );
    	icon.x = iconOrg[0];
    	icon.y = iconOrg[1];
    	icon.z = iconOrg[2] + 30;
    	icon.alpha = .89;
    	icon.archived = true;
    	icon setShader( shad, 16, 16 );
    	icon setWayPoint( true, shad );
    	
    	level.variable["perk_slots"]++;
    	level.variable["slots_left"]++;
    }
    createzBox( pos, ang, name, func, shad )
    {
    	slot = level.variable["perkz_slots"];
    	level.variable["perkz_name"][slot] = name;
    	level.variable["perkz_function"][slot] = func;
    	
    	level.zBox[slot] = spawn( "script_model", pos );
    	level.zBox[slot] setModel( "mp_supplydrop_axis" );
    	level.zBox[slot].angles = ang;
    
    	FlagEffect = loadfx( "misc/fx_ui_flagbase_gold_t5" );
    	Effect = PlayLoopedFX( FlagEffect, 1, pos - ( 0, 0, 34 ) );
    
    	iconOrg = level.zBox[slot].origin;
    	icon = newTeamHudElem( "axis" );
    	icon.x = iconOrg[0];
    	icon.y = iconOrg[1];
    	icon.z = iconOrg[2] + 30;
    	icon.alpha = .89;
    	icon.archived = true;
    	icon setShader( shad, 16, 16 );
    	icon setWayPoint( true, shad );
    	
    	level.variable["perkz_slots"]++;
    	level.variable["slotsz_left"]++;
    }
    CreatePackBox( pos, ang )
    {
    	level.pBox = spawn( "script_model", pos );
    	level.pBox setModel( "mp_supplydrop_ally" );
    	level.pBox.angles = ang;
    	
    	level.pGun = spawn( "script_model", level.pBox.origin + ( 0, 0, 30 ) );
    	level.pGun setModel( GetWeaponModel( "claymore_mp" ) );
    	level.pGun.angles = ang + ( 0, 90, 0 );
    	level.pGun hide();
    	
    	FlagEffect = loadfx( "misc/fx_ui_flagbase_gold_t5" );
    	Effect = PlayLoopedFX( FlagEffect, 1, pos - ( 0, 0, 16 ) );
    	
    	objective_add( 1, "active", level.pBox.origin );
    	objective_icon( 1, "compass_supply_drop_red" );
    	
    	iconOrg = level.pBox.origin;
    	level.Picon = newTeamHudElem( "allies" );
    	level.Picon.x = iconOrg[0];
    	level.Picon.y = iconOrg[1];
    	level.Picon.z = iconOrg[2] + 30;
    	level.Picon.alpha = .89;
    	level.Picon.archived = true;
    	level.Picon setShader( "compass_supply_drop_red", 16, 16 );
    	level.Picon setWayPoint( true, "compass_supply_drop_red" );
    	
    	level.variable["pack_a_punch"] = true;
    }
    
    createBox( pos, ang )
    {
    	level.mBox = spawn( "script_model", pos );
    	level.mBox setModel( "mp_supplydrop_ally" );
    	level.mBox.angles = ang;
    	 
    	level.mGun = spawn( "script_model", level.mBox.origin );
            level.mGun setModel( GetWeaponModel( "claymore_mp" ) );
            level.mGun.angles = level.mBox.angles + ( 0, 90, 0 );
            level.mGun hide();
    	
    	FlagEffect = loadfx( "misc/fx_ui_flagbase_gold_t5" );
    	Effect = PlayLoopedFX( FlagEffect, 1, pos - ( 0, 0, 18 ) );
    	
    	objective_add( 0, "active", level.mBox.origin );
    	objective_icon( 0, "compass_supply_drop_green" );
    
    	iconOrg = level.mBox.origin;
    	level.Micon = newTeamHudElem( "allies" );
    	level.Micon.x = iconOrg[0];
    	level.Micon.y = iconOrg[1];
    	level.Micon.z = iconOrg[2] + 30;
    	level.Micon.alpha = .89;
    	level.Micon.archived = true;
    	level.Micon setShader( "compass_supply_drop_green", 16, 16 );
    	level.Micon setWayPoint( true, "compass_supply_drop_green" );
    }
    
    createTrap( pos, ang )
    {
    	slot = level.variable["traps_slots"];
    
    	level.Trap[slot] = spawn( "script_model", pos );
    	level.Trap[slot] setModel( level.friendlyDogModel );
    	level.Trap[slot].angles = ang;
    	level.Trap[slot].active = false;
    	level.Trap[slot] hide();
    	level.Trap[slot] NotSolid();
    	level.Trap[slot].user = undefined;
    	
    	objective_add( level.variable["slots_left"], "active", pos );
    	objective_icon( "headicon_dead" );
    	
    	level.Trap[slot] thread monitorActive();
    	
    	level.variable["traps_slots"]++;
    	level.variable["slots_left"]++;
    	level.variable["trap_created"] = true;
    }
    checkDistance()
    {
    	self endon( "disconnect" );
    	
    	while( 1 )
    	{
    		wait 0.01;
    
    		if( level.variable["trap_created"] == true )
    		{
    			for( i = 0; i < level.Trap.size; i++ )
    			{
    				if( distance( self.origin, level.Trap[i].origin ) < 75 && self.pers["team"] == "allies" && self.isZombie == false && level.Trap[i].active == false )
    				{
    					self setLowerMessage( "Press [{+activate}] to activate Trap[1000]" );
    					
    					for(;;)
    					{
    						if( self useButtonPressed() == true && distance( self.origin, level.Trap[i].origin ) < 75 && self.pers["team"] == "allies" && self.isZombie == false && level.Trap[i].active == false && self.variable["cash"] >= 1000 )
    						{
    							self thread addMoney( -1000 );
    							self clearLowerMessage( 1.0 );
    							level.Trap[i].active = true;
    							level.Trap[i] notify( "start_active" );
    							level.Trap[i].user = self;
    							break;
    						}
    						else if( distance( self.origin, level.Trap[i].origin ) > 75 )
    						{
    							self clearLowerMessage( 1.0 );
    							break;
    						}
    						wait 0.01;
    					}
    				}
    				else if( distance( self.origin, level.Trap[i].origin ) > 75 )
    				{
    					self clearLowerMessage( 1.0 );
    				}
    			}
    		}
    		for( i = 0; i < level.variable["perk_slots"]; i++ )
    		{
    			if( distance( self.origin, level.perkBox[i].origin ) < 75 && self.pers["team"] == "allies" && self.isZombie == false && self.variable["cash"] >= 400)
    			{
    				self setLowerMessage( "Press [{+activate}] for " + level.variable["perk_name"][i] );
    				
    				for(;;)
    				{
    					if( self useButtonPressed() == true && distance( self.origin, level.perkBox[i].origin ) < 75 && self.pers["team"] == "allies" && self.isZombie == false && self.variable["cash"] >= 500 )
    					{
    						self thread addMoney( -400 );
    						self thread [[level.variable["perk_function"][i]]]();
    						self iPrintlnBold( "^2You bought " + level.variable["perk_name"][i] );
    						self playLocalSound( "uin_alert_cash_register" );
    						self clearLowerMessage( 1.0 );
    						break;
    					}
    					else if( self.variable["cash"] < 400 )
    					{
    						self iPrintlnBold( "Not enough Money" );
    						self playLocalSound( "prj_bullet_impact_headshot_2d" );
    						break;
    					}
    					else if( distance( self.origin, level.perkBox[i].origin ) > 75 )
                                   		{
                                            	self clearLowerMessage( 1.0 );
                                            	break;
                                    	}
    					wait 0.01;
    				}
    			}
    		}
    		for( i = 0; i < level.variable["perkz_slots"]; i++ )
    		{
    			if( distance( self.origin, level.zBox[i].origin ) < 75 && self.pers["team"] == "axis" && self.isZombie == true )
    			{
    				self setLowerMessage( "Press [{+activate}] for " + level.variable["perkz_name"][i] );
    				
    				for(;;)
    				{
    					if( self useButtonPressed() == true && distance( self.origin, level.zkBox[i].origin ) < 75 && self.pers["team"] == "axis" && self.isZombie == true )
    					{
    						
    						self thread [[level.variable["perkz_function"][i]]]();
    						self iPrintlnBold( "^2You Got " + level.variable["perkz_name"][i] );
    						self playLocalSound( "uin_alert_cash_register" );
    						self clearLowerMessage( 1.0 );
    						break;
    					}
    					else if( self.pers["team"] == "allies" )
    					{
    						self iPrintlnBold( "Zombies Shit" );
    						self playLocalSound( "prj_bullet_impact_headshot_2d" );
    						break;
    					}
    					else if( distance( self.origin, level.zBox[i].origin ) > 75 )
                                   		{
                                            	self clearLowerMessage( 1.0 );
                                            	break;
                                    	}
    					wait 0.01;
    				}
    			}
    		}
    		if( distance( self.origin, level.mBox.origin ) < 75 && self.pers["team"] == "allies" && self.isZombie == false && level.variable["mysterybox_in_use"] == 0 )
    		{
    			self setLowerMessage( "Press [{+activate}] for Mystery Box" );
    			randWeap = randomInt( level.guns.size );
    			
    			for(;;)
    			{
    				if( self useButtonPressed() == true && distance( self.origin, level.mBox.origin ) < 75 && self.pers["team"] == "allies" && self.isZombie == false && level.variable["mysterybox_in_use"] == 0 && self.variable["cash"] >= 650 )
    				{
    					level.variable["mysterybox_in_use"] = 1;
    					self playLocalSound( "mpl_turret_alert" );
    					self thread addMoney( -650 );
    					self clearLowerMessage( 1.0 );
    					level.mGun show();
                            	        level.mGun moveTo( level.mBox.origin + ( 0, 0, 30 ), 1 );
                            	        wait .2;
                            	        for( i = 0; i < 14; i++ )
                            	        {
                            	        	rander = randomInt( level.guns.size );
                            	                level.mGun setModel( GetWeaponModel( level.guns[rander] ) );
                            	                wait( 0.025 * i );
                            	        }
    					if( level.variable["mystery_box_uses"] != 5 )
    					{
                            	        	level.mGun setModel( GetWeaponModel( level.guns[randWeap] ) );
                            	        	wait .1;
    						if( self.pers["team"] == "allies" && self.isZombie == false )
    						{
    							if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
                            	        		self giveWeapon( level.guns[randWeap], 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
                            	        		self switchToWeapon( level.guns[randWeap] );
                            	        		self giveMaxAmmo( level.guns[randWeap] );
    						}
                            	        	self clearLowerMessage( .5 );
                            	        	level.mGun moveTo( level.mBox.origin, 1 );
                                    		wait 1;
                                    		level.mGun hide();
                                    		level.variable["mysterybox_in_use"] = 0;
    						level.variable["mystery_box_uses"]++;
    					}
    					else if( level.variable["mystery_box_uses"] == 5 )
    					{
    						level.variable["mystery_box_uses"] = 0;
    						level.mGun setModel( GetWeaponModel( "briefcase_bomb_mp" ) );
    						wait 0.1;
    						self playSound( "amb_end_nuke" );
    						
    						time = 0;
    						while( time != 9 )
    						{
    							playFx( level._effect["character_fire_death_torso"], level.mBox.origin );
    							time++;
    							wait 0.5;
    						}
    						level.mGun moveTo( level.mBox.origin, 1 );
                                    		wait 1;
    						level.mGun hide();
                                    		level.variable["mysterybox_in_use"] = 0;
    						level.mBox moveTo( level.mBox.origin + ( 0, 0, 500 ), 5 );
    						wait 5;
    						level.mBox thread moveToNextSpot();
    					}
                                    	break;
    				}
    				else if( self.variable["cash"] < 650 )
    				{
    					self iPrintlnBold( "Not enough Money" );
    					self playLocalSound( "prj_bullet_impact_headshot_2d" );
    					self clearLowerMessage( 1.0 );
    					break;
    				}
    				else if( distance( self.origin, level.mBox.origin ) > 75 )
                                    {
                                            self clearLowerMessage( 1.0 );
                                            break;
                                    }
    				wait 0.01;
    			}
    		}
    		
    		if( level.variable["pack_a_punch"] == true )
    		{
    			if( distance( level.pBox.origin, self.origin ) < 75 && level.variable["using_pack_a_punch"] == 0 )
    			{
    				self setLowerMessage( "Press [{+activate}] for Pack-A-Punch" );
    
    				for(;;)
    				{
    					if( self useButtonPressed() == true && level.variable["using_pack_a_punch"] == 0 && self.isZombie == false && self.pers["team"] == "allies" && self.variable["cash"] >= 500 )
    					{
    						takeGun = self getCurrentWeapon();
    						self playLocalSound( "mpl_turret_alert" );
    						level.variable["using_pack_a_punch"] = 1;
    						self clearLowerMessage( 1.0 );
    						self thread addMoney( -500 );
    						level.pGun setModel( GetWeaponModel( takeGun ) );
    						level.pGun show();
    						gun = self givePackedWeapon( takeGun );
    						if( gun == takeGun ) self thread addMoney( 400 );
    						self disableWeapons();
    						wait 1;
    						level.pGun moveTo( level.pBox.origin, 2 );
    						wait 1;
    						level.pGun setModel( GetWeaponModel( gun ) );
    						level.pGun moveTo( level.pBox.origin + ( 0, 0, 30 ), 2 );
    						wait 2;
    						self enableWeapons();
    						wait 0.1;
    						if( self.pers["team"] == "allies" && self.isZombie == false )
    						{
    							self takeWeapon( takeGun );
    							self giveWeapon( gun, 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
    							self switchToWeapon( gun );
    							self giveMaxAmmo( gun );
    						}
    						level.variable["using_pack_a_punch"] = 0;
    						level.pGun hide();
    						break;
    					}
    					else if( distance( self.origin, level.pBox.origin ) > 75 )
                            		{
                            			self clearLowerMessage( 1.0 );
                                    		break;
                           			}
    					wait 0.01;
    				}
    			}
    			else if( distance( self.origin, level.pBox.origin ) > 75 )
                            {
                            	self clearLowerMessage( 1.0 );
                           	}
    		}
    		else
    		{
    			self clearLowerMessage( 1.0 );
    		}
    	}
    	wait 0.01;
    }
    moveToNextSpot()
    {
    	self.spot = randomInt( level.variable[getDvar( "mapname" )]["mystery_box_origins"].size );
    	
    	if( level.variable[getDvar( "mapname" )]["mystery_box_origins"][self.spot] == level.currentSpot ) self thread moveToNextSpot();
    	self moveTo( level.variable[getDvar( "mapname" )]["mystery_box_origins"][self.spot] + ( 0, 0, 500 ), 8 );
    	wait 8;
    	self moveTo( level.variable[getDvar( "mapname" )]["mystery_box_origins"][self.spot], 5 );
    	self rotateTo( level.variable[getDvar( "mapname" )]["mystery_box_angles"][self.spot], 5 );
    	wait 5;
    	iconOrg = self.origin;
    	level.Micon.x = iconOrg[0];
    	level.Micon.y = iconOrg[1];
    	level.Micon.z = iconOrg[2] + 30;
    	objective_position( 0, self.origin );
    	level.mGun.angles = level.variable[getDvar( "mapname" )]["mystery_box_angles"][self.spot] + ( 0, 90, 0 );
    	level.currentSpot = level.variable[getDvar( "mapname" )]["mystery_box_origins"][self.spot];
    }
    
    monitorActive()
    {
    	for(;;)
    	{
    		self waittill( "start_active" );
    	
    		iPrintlnBold( "^2The trap is active" );
    		
    		self thread monitorDistanceToMe();
    
    		for( i = 0; i < 60; i++ )
    		{
    			PlayFX( level._effect["tacticalInsertionFizzle"], self.origin );
    			wait 1;
    		}
    		self.active = false;
    		iPrintlnBold( "^1The trap is no longer active" );
    		wait 1;
    		self notify( "stop_active" );
    	}
    }
    
    monitorDistanceToMe()
    {
    	self endon( "stop_active" );
    
    	while( 1 )
    	{
    		for(;;)
    		{
    			for( i = 0; i < level.players.size; i++ )
    			{
    				if( distance( level.players[i].origin, self.origin ) < 50 && isAlive( level.players[i] ) && level.players[i].pers["team"] == "axis" && level.players[i].isZombie == true )
    				{
    					level.players[i] suicide();
    					self.user thread addMoney( 100 );
    					break;
    				}
    			}
    			wait 0.01;
    		}
    	}
    }
    
    givePackedWeapon( gunner )
    {
    	if( self getCurrentWeapon() == "aug_mp" ) return "aug_elbit_extclip_mp";
    	else if( self getCurrentWeapon() == "m16_mp" ) return "m16_elbit_extclip_mp";
    	else if( self getCurrentWeapon() == "famas_mp" ) return "famas_elbit_extclip_mp";
    	else if( self getCurrentWeapon() == "rpk_mp" ) return "rpk_elbit_extclip_mp";
    	else if( self getCurrentWeapon() == "commando_mp" ) return "commando_elbit_gl_extclip_mp";
    	else if( self getCurrentWeapon() == "python_mp" ) return "python_speed_mp";
    	else if( self getCurrentWeapon() == "ak74u_mp" ) return "ak74u_elbit_grip_extclip_mp";
    	else if( self getCurrentWeapon() == "l96a1_mp" ) return "l96a1_vzoom_extclip_mp";
    	else if( self getCurrentWeapon() == "fnfal_mp" ) return "fnfal_elbit_mk_extclip_mp";
    	else if( self getCurrentWeapon() == "cz75_mp" ) return "cz75_upgradesight_auto_mp";
    	else if( self getCurrentWeapon() == "spectre_mp" ) return "spectre_elbit_grip_extclip_mp";
    	else if( self getCurrentWeapon() == "hk21_mp" ) return "hk21_elbit_extclip_mp";
    	else if( self getCurrentWeapon() == "m60_mp" ) return "m60_elbit_grip_extclip_mp";
    	else if( self getCurrentWeapon() == "stoner63_mp" ) return "stoner63_elbit_extclip_mp";
    	else if( self getCurrentWeapon() == "mp5k_mp" ) return "mp5k_elbit_rf_mp";
    	else if( self getCurrentWeapon() == "asp_mp" ) return "aspdw_mp";
    	else 
    	{
    		self iPrintlnBold( "This weapon cannot be upgraded" );
    		return gunner;
    	}
    }
    
    monitorNuke()
    {
    	level endon( "match_ended" );
    
    	level.NukeText = NewHudElem();
    	level.NukeText.elemType = "timer";
    	level.NukeText.alignX = "right";
            level.NukeText.alignY = "top";
            level.NukeText.horzAlign = "right";
            level.NukeText.vertAlign = "top";
    	level.NukeText.y = 20;
            level.NukeText.x = -27;
            level.NukeText.foreground = true;
            level.NukeText.hideWhenInMenu = true;
            level.NukeText.fontScale = 2;
            level.NukeText.font = "objective";
            level.NukeText.alpha = 1;
            level.NukeText.color = ( 0, 0, 0 );
            level.NukeText SetTimer( level.variable["time_limit"] );
    	level.NukeShader = NewHudElem();
            level.NukeShader.elemType = "icon";
            level.NukeShader.alignX = "right";
            level.NukeShader.alignY = "top";
            level.NukeShader.horzAlign = "right";
            level.NukeShader.vertAlign = "top";
            level.NukeShader.foreground = false;
            level.NukeShader.hideWhenInMenu = true;
            level.NukeShader.x = -10;
    	level.NukeShader.alpha = 0.45;
            level.NukeShader SetShader( "headicon_dead" ,60, 60 );
    	for( i = level.variable["time_limit"]; i > -1; i-- )
    	{
    		wait 1;
    	}
    	wait 1;
    	players = getEntArray( "player", "classname" );
    	for( i = 0; i < players.size; i++ )
    	{
    		wait 0.02;
    		setDvar( "timescale", 0.3 );
    		players[i] setClientDvar( "timescale", 0.3 );
    		players[i] thread createNukeEffect();
    
    		if( players[i].pers["team"] == "axis" && players[i].isZombie == true )
    		{
    			playFx( level.chopper_fx["explode"]["death"], players[i].origin );
    			players[i] playSound( level.heli_sound[GetHostPlayer().team]["crash"] );
    			players[i] suicide();
    		}
    	}
    	wait 1.5;
    	setDvar( "timescale", 1 );
    	for( i = 0; i < level.players.size; i++ ) level.players[i] setClientDvar( "timescale", 1 );
    	level thread CreateCredits( "allies", "We Survived...Zombies Have Been Nuked" );
    }
    createNukeEffect()
    {
    	for( i = 0; i < 1; i += 0.1 )
    	{
    		self setClientDvar( "r_brightness", i );
    		wait 0.1;
    	}
    }
    createGameText()
    {
    	wait( level.prematchPeriod );
    
    	level.variable["game_ready"] = 1;
    	
    	level.ZombieText = createServerFontString( "extrabig", 1.8 );
    	level.ZombieText setPoint( "CENTER", "CENTER", 0, -40 );
    	level.ZombieText.color = ( 1, 0, 0 );
    	level.ZombieText.sort = 1001;
    	level.zombieText setText( "Zombie Apocalypse Starting in" );
    	level.ZombieTimer = createServerFontString( "extrabig", 2.3 );
    	level.ZombieTimer setPoint( "CENTER", "CENTER", 0, 0 );
    	level.ZombieTimer.color = ( 1, 1, 0 );
    	level.ZombieTimer.sort = 1001;
    	level.ZombieTimer maps\mp\gametypes\_hud::fontPulseInit();
    
    	for( i = 45;i > 0;i-- )
    	{
    		level.ZombieTimer setValue( i );
    		level.ZombieTimer thread maps\mp\gametypes\_hud::fontPulse( level );
    		wait 1;
    	}
    
    	level.ZombieTimer destroyElem();
    	level.ZombieText setText( "Zombies Released" );
    	level.ZombieText fadeOverTime( 3.0 );
    	level.ZombieText.alpha = 0;
    
    	wait( 3.0 );
    
    	level.ZombieText destroyElem();
    	
    	randomZombie = randomInt( level.players.size );
    	randomZombie2 = randomInt( level.players.size );
    	
    	if( level.players.size <= 4 )
    	{
    		level.players[randomZombie] thread changeToZombie();
    	}
    	else if( level.players.size >= 5 )
    	{
    		if( level.players[randomZombie] == level.players[randomZombie2] ) randomZombie = randomInt( level.players.size );
    		level.players[randomZombie] thread changeToZombie();
    		level.players[randomZombie2] thread changeToZombie();
    	}
    	level.variable["zombies_released"] = 1;
    }
    
    changeToZombie()
    {
    	wait 0.01;
    
    	self.isZombie = true;
    	self suicide();
    	self [[level.axis]]();
    	
    	iPrintlnBold( self.name + "^1 Has been infected" );
    	
    	level.variable["dead_people"][level.variable["dead_persons"]] = self.name;
    	level.variable["dead_persons"]++;
    }
    
    addMoney( points )
    {
    	self endon( "disconnect" );
    
    	self.variable["cash"] = self.variable["cash"] + points;
    	self.displayCash setText( "Money: " + self.variable["cash"] );
    	hud_score = NewClientHudElem( self );
    	hud_score.alpha = 0;
    	hud_score.font = "objective";
    	hud_score.fontscale = 1.9;
    	hud_score.x = 550;
    	hud_score.y = 300;
    	hud_score.archived = true;
    	hud_score.color = ( 1, 1, 0 );
    	hud_score.alignX = "right";
    	hud_score.alignY = "middle";
    	hud_score.horzAlign = "fullscreen";
    	hud_score.vertAlign = "fullscreen";
    	hud_score settext( points );
    	direction = randomint( 340 );
    	hud_score FadeOverTime( .5 );
    	hud_score.alpha = 1;
    	hud_score MoveOverTime( 10 );
    	hud_score.x = cos( direction ) * randomint( 250 );
    	hud_score.y = sin( direction ) * randomint( 250 );
    	wait 1.3;
    	hud_score FadeOverTime( .3 );
    	hud_score.alpha = 0;
    	wait .3;
    	hud_score destroy();
    }
    
    CreateCredits( team, text )
    {
    	iPrintlnBold( " " );
    	iPrintlnBold( " " );
    	iPrintlnBold( " " );
    	iPrintlnBold( " " );
    	level.Picon destroy();
    	level.Micon destroy();
    	level.NukeShader destroy();
    	level.NukeText destroy();
    
    	for( i = 0; i < level.players.size; i++ )
    	{
    		level.players[i] thread monitorFreeze();
    		level.players[i] setClientUIVisibilityFlag( "hud_visible", 0 );
    		level.players[i].healthText destroy();
    		level.players[i].displayCash destroy();
    		level.players[i] maps\mp\gametypes\_globallogic_audio::set_music_on_player( "VICTORY" );
    	}
    	
    	wait 0.5;
    	
    	thread createLine( "In Memory Of:", 4 );
    	wait 0.42;
    	for( i = 0; i < level.variable["dead_people"].size; i++ )
    	{
    		level thread createLine( level.variable["dead_people"][i], 2.5 );
    		wait 1;
    	}
    	wait 2;
    	thread createLine( "Most Money:", 4 );
    	wait 0.42;
    	thread createLine( getHighestMoney(), 2.5 );
    	wait 5;
    	thread createLine( "RED A", 2.5 );
    	wait 0.35;
    	thread createLine( "KrooKlyN's Shit Bitch", 2 );
    	wait 8;
    	thread maps\mp\gametypes\_globallogic::endGame( team, text );
    }
    
    createLine( text, size )
    {
    	line = createServerFontString( "objective", size );
    	line setPoint( "CENTER", "CENTER", 0, 400 );
    	line.color = ( 1, 1, 1 );
    	line.sort = 1001;
    	line.glowColor = ( 0, 1, 0 );
    	line.glowAlpha = 1;
    	line setText( text );
    	line moveOverTime( 8.0 );
    	line.y = -400;
    	wait 8;
    	line destroy();
    }
    
    monitorFreeze()
    {
    	for(;;)
    	{
    		self freezeControls( true );
    		self clearLowerMessage( 1.0 );
    		wait 1;
    	}
    }
    
    zombieSettings()
    {
    	self setMoveSpeedScale( 1.6 );
    	self.displayCash.alpha = 0;
    	self takeAllWeapons();
    	self clearPerks();
    	self giveWeapon( "hatchet_mp" );
    	self giveWeapon( "knife_ballistic_mp" );
    	self switchToWeapon("knife_ballistic_mp");
    	self setWeaponAmmoStock( "hatchet_mp", 2 );
    }
    ZombieHealth()
    {
    	for(;;)
    	{
    		if(level.instaKill == 1)
    		{
    			self.maxHealth = 1;
            		self.health = 1;
    		}
    
    		else if(level.instaKill == 0)
    		{
    			level.instaKill = 0;	
    			self.maxHealth = 550;
            		self.health = 550;
    		}
    
    	wait 10;
    	}
    }
    autoDeleteTomahawks()
    {
    	self endon("death");
    
    	for(;;)
    	{
    		self waittill( "grenade_fire", tomahawk, grenadeName );
    		if( grenadeName == "hatchet_mp" )
    		{
    			tomahawk waittill( "stationary" );
    			tomahawk delete();
    		}
    	}
    }
    autoDeleteKnives()
    {
    	self endon("death");
    
    	for(;;)
    	{
    		self waittill( "ballistic_knife_stationary", knifeent );
    		knifeent delete();
    	}
    }
    humanSettings()
    {
    	self setMoveSpeedScale( 1.0 );
    	self.maxHealth = 700;
    	self.health = 700;
    	self.displayCash.alpha = 1;
    
    	self.randWeaps = strtok( "aug_mp|stoner63_mp|mp5k_mp|spas_mp", "|" );
    	self.randNum = randomInt( self.randWeaps.size );
    	self.chosenGun = self.randWeaps[self.randNum];
    	self takeAllWeapons();
    	self clearPerks();
    	self setPerk( "specialty_finalstand" );
    	self giveWeapon( "knife_mp" );
    	self giveWeapon( self.chosenGun, 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
    	self giveWeapon( "asp_mp" );
    	self switchToWeapon( self.chosenGun );
    	self giveMaxAmmo( self.chosenGun );
    	self giveWeapon( "tabun_gas_mp" );
    	self SetWeaponAmmoStock( "tabun_gas_mp", 4 );
    }
    
    createHealth()
    {
    	self.healthBar = self createBar( ( 1, 1, 1 ), 150, 13 );
    	self.healthBar setPoint( "CENTER", "BOTTOM", 150, -4 );
    	self.healthText = self createFontString( "objective", 1.5 );
    	self.healthText setPoint( "CENTER", "BOTTOM", 150, -20 );
    	self.healthText setText( "^1Health" );
    	for(;;)
    	{
    		self.healthBar updateBar( self.health / self.maxhealth );
    		wait 0.001;
    	}
    }
    
    giveSpeed()
    {
    	self setMoveSpeedScale( 1.2 );
    	self setPerk( "specialty_movefaster" );   
    	self setPerk( "specialty_fallheight" );
    	self setPerk( "specialty_longersprint" );   
    	self setPerk( "specialty_unlimitedsprint" );
    	self setPerk( "specialty_fastweaponswitch" );
    	self setPerk( "specialty_fastreload" );
    	self setPerk( "specialty_fastmeleerecovery" );
    	self setPerk( "specialty_fastmantle" );
    	self setPerk( "specialty_fastinteract" );
    	self setPerk( "specialty_fastads" );
    }
    
    giveHealth()
    {
    	self.maxHealth = 1250;
    	self.health = 1250;
    }
    
    giveReload()
    {
    	self setPerk("specialty_fastreload");   
    	self setPerk("specialty_fastads");
    }
    zombieperk()
    {
    	self setMoveSpeedScale( 1.6 );
    	self.displayCash.alpha = 0;
    	self.maxHealth = 650;
            self.health = 650;
    	self takeAllWeapons();
    	self clearPerks();
    	self giveWeapon( "hatchet_mp" );
    	self giveWeapon( "knife_ballistic_mp" );
    	self switchToWeapon("knife_ballistic_mp");
    	self setWeaponAmmoStock( "hatchet_mp", 999 );
    	self thread ammo();
    }
    ammo()
    {
    	self iPrintln("^2Fuck Unlimited Ammo");
    	for(;;)
    	{
    		self.weap=self GetCurrentWeapon();
    		{
    			self SetWeaponAmmoStock( self.weap, 999 );
    			self SetWeaponAmmoClip( self.weap, 999 );
    	}
    		wait 2;
    	}
    }
    getHighestMoney()
    {
    	players = level.players;
    	winner = undefined;
    	winner2 = undefined;
    	tie = false;
    	for( i = 0;i < players.size;i++ )
    	{
    		if ( !isDefined( players[i].variable["cash"] ) ) continue;
    		if ( !isDefined( winner ) || players[i].variable["cash"] > winner.variable["cash"] )
    		{
    			winner = players[i];
    			tie = false;
    		}
    		else if ( players[i].variable["cash"] == winner.variable["cash"] )
    		{
    			winner2 = players[i];
    			tie = true;
    		}
    	}
    	if ( tie || !isDefined( winner ) ) return winner.name + " and " + winner2.name + " - " + winner.variable["cash"];
    	else return winner.name + " - " + winner.variable["cash"];
    }
    powerup(dogOrigin)
    {
      level.powerup = randomInt(40);
      if(level.powerup == level.lastPowerup)
      {
        while(level.powerup == level.lastPowerup)
          level.powerup = randomInt(3);
        level.lastPowerup = level.powerup;
      }
    
      if(level.powerup == 0)
        thread doPowerup("double_points", dogOrigin, "perk_times_two", 35, -200);
      if(level.powerup == 1)
        thread doPowerup("insta_kill", dogOrigin, "headicon_dead", 35, -150);
      if(level.powerup == 2)
        thread doPowerup("max_ammo", dogOrigin, "hud_ammo_refill_drop", 0, 0);
      if(level.powerup == 3)
        thread doPowerup("death_machine", dogOrigin, "hud_ks_minigun", 20, -100);
    }
    doPowerup(powerup, origin, icon, time, Xspot)
    {
      powerupIcon = newTeamHudElem("allies");
      powerupIcon.x = origin[0];
      powerupIcon.y = origin[1];
      powerupIcon.z = origin[2] + 35;
      powerupIcon.alpha = 1;
      powerupIcon.archived = true;
      powerupIcon setShader(icon, 20, 20);
      powerupIcon setwaypoint(false);
    
      powerupSpot = spawn("script_model", origin);
    
      p = 0;
      while(isDefined(powerupSpot) && p != 300)
      {
        wait 0.1;
        for(i = 0; i < level.players.size; i++)
        {
          if(distance(powerupSpot.origin, level.players[i].origin) < 50)
          {
            powerupIcon destroy();
            powerupSpot delete();
            break;
          }
          wait 0.01;
        }
        p++;
      }
    
      if(p == 300)
      {
        powerupIcon destroy();
        powerupSpot delete();
      }
      else
      {
        switch(powerup)
        {
          case "double_points":
            thread doublePoints();
            break;
          case "insta_kill":
            thread instaKill();
    	break;
          case "max_ammo":
            thread maxAmmo();
            break;
          case "death_machine":
            thread deathMachine();
            break;
        }
        thread doPowerupDisplay(icon, Xspot, time, powerup);
      }
    }
    doPowerupDisplay(icon, Xspot, time, powerup)
    {
      if(powerup != "max_ammo")
      {
        screenIcon = createServerIcon(icon, 50, 50, "allies");
        screenIcon.x = Xspot;
        screenIcon.y = -120;
        screenIcon.horzAlign = "center";
        screenIcon.vertAlign = "bottom";
        screenIcon.alpha = 0.85;
    
        wait(time - 5);
    
        for(i = 5; i > 0; i--)
        {
          screenIcon.alpha = 0;
          wait 0.3;
          screenIcon.alpha = 0.85;
          wait 0.8;
        }
    
        level notify(powerup);
        screenIcon destroy();
      }
      else
        iPrintlnBold("^3MAX AMMO");
    }
    deathMachine()
    {
      if( self.pers["team"] == "allies" && self.isZombie == false )
      iPrintlnBold("Death Machines For Everyone");
      for(i = 0; i < level.players.size; i++)
      {
        level.players[i]._curWep = level.players[i] getCurrentWeapon();
        level.players[i] giveWeapon("minigun_mp");
        level.players[i] giveMaxAmmo("minigun_mp");
        level.players[i] switchToWeapon("minigun_mp");
        wait 0.01;
      }
    
      level waittill("death_machine");
    
      for(i = 0; i < level.players.size; i++)
      {
        level.players[i] takeWeapon("minigun_mp");
        level.players[i] switchToWeapon(level.players[i]._curWep);
      }
    }
    maxAmmo()
    {
      if( self.pers["team"] == "allies" && self.isZombie == false )
      iPrintlnBold("Max Ammo For Everyone");
      for(i = 0; i < level.players.size; i++)
      {
        weps = level.players[i] GetWeaponsList();
        for(k = 0; k < weps.size; k++)
        {
          level.players[i] giveMaxAmmo(weps[k]);
          wait 0.01;
        }
      }
    }
    doublePoints()
    {
      if( self.pers["team"] == "allies" && self.isZombie == false )
      iPrintlnBold("Double Points for Everyone");
      if(level.doublePoints == 0)
      {
        level.doublePoints = 1;
      }
      else
      {
        level notify("double_points");
        wait 0.1;
        level.doublePoints = 1;
      }
      level waittill("double_points");
      level.doublePoints = 0;
    }
    instaKill()
    {
      if( self.pers["team"] == "allies" && self.isZombie == false )
      iPrintlnBold("Insta Kill for Everyone");
      if(level.instaKill == 0)
      {
        level.instaKill = 1;
        setDvar("scr_dog_health", "1");
        for(i = 0; i < level.dogs.size; i++)
        {
          if(!isdefined(level.dogs[i]))
            continue;
          level.dogs[i].health = 1;
          wait 0.01;
        }
      }
      else
      {
        level notify("insta_kill");
        wait 0.1;
        level.instaKill = 1;
        setDvar("scr_dog_health", "1");
        for(i = 0; i < level.dogs.size; i++)
        {
          if(!isdefined(level.dogs[i]))
            continue;
          level.dogs[i].health = 1;
          wait 0.01;
        }
      }
      level waittill("insta_kill");
      setDvar("scr_dog_health", level.dogHealth);
      for(i = 0; i < level.dogs.size; i++)
      {
        if(!isdefined(level.dogs[i]))
         continue;
        level.dogs[i].health = level.dogHealth;
        wait 0.01;
      }
      level.instaKill = 0;
    }
    dogKilled(dogOrigin)
    {
      self setClientDvar("r_exposureTweak", 1);
      self setClientDvar("r_exposureValue", 15);
      self thread addMoney( 50 );
      thread powerup(dogOrigin);
    }

    -1 Not allowed! Not allowed!
    Last edited by AllMoDs; 07-13-2015 at 10:11 AM. Reason: update

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 12:44 PM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.