Release Black Ops 2 GSC Custom Game mode - Secret Room Zombies Green Run By Loimonde51 #2 **Reupload**

Messages
12
Points
8
Hello Everyone is Loimonde51 !
Today, I Introduce You My New Mods: The Secret Room Zombies Green Run By Loimonde51.

Picture:

No Power On:



Power On:



Perks:



PowerUps:



WallBuy:



Mysterybox:



Pack-A-Punch:



Power:



Video:


Code:
[/CENTER]
[LEFT]/*
*    Secret Room Green Run By Loimonde51
*
*    Creator : Loimonde51
*    Project : Secret Room Green Run
*    Mode : Zombies
*
*/

#include maps/mp/_utility;
#include maps/mp/_visionset_mgr;
#include maps/mp/_music;
#include common_scripts/utility;
#include maps/mp/gametypes_zm/_hud_util;
#include maps/mp/gametypes_zm/_hud_message;
#include maps/mp/gametypes_zm/_gv_actions;
#include maps/mp/gametypes_zm/_damagefeedback;
#include maps/mp/zombies/_zm_magicbox;
#include maps/mp/zombies/_zm;
#include maps/mp/zombies/_zm_utility;
#include maps/mp/zombies/_zm_weapons;
#include maps/mp/zombies/_zm_audio;
#include maps/mp/animscripts/zm_combat;
#include maps/mp/animscripts/zm_utility;
#include maps/mp/animscripts/utility;
#include maps/mp/animscripts/shared;
#include maps/mp/zombies/_zm_game_module;
#include maps/mp/zombies/_zm_stats;
#include maps/mp/zombies/_zm_sidequests;

init()
{
    RoomInit();
    level thread onPlayerConnect();
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connected", player);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
    level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");
        self thread DoGiveMoney();
        wait 5;
        self thread InitialiseSecretRoomGreen_Run();
    }
}

//Give Money :

DoGiveMoney()
{
        self.score+=1000000;
}

// Secret Room Zombies Green Run By Loimonde51 *Start*

RoomInit()
{
        PrecacheModel("p6_anim_zm_magic_box");
        PrecacheModel("p6_anim_zm_buildable_pap_on");
        PrecacheModel("p6_zm_buildable_pswitch_body");
        PrecacheModel("zombie_vending_jugg");
        PrecacheModel("zm_collision_perks1");
        PrecacheModel("zombie_vending_sleight");
        PrecacheModel("zombie_vending_revive");
        PrecacheModel("zombie_vending_doubletap2");
        PrecacheModel("zombie_bomb");
        PrecacheModel("zombie_ammocan");
        PrecacheModel("zombie_x2_icon");
        PrecacheModel("zombie_skull");
        setdvar("ai_showFailedPaths",0);
        if(isDefined(level.player_out_of_playable_area_monitor))
        level.player_out_of_playable_area_monitor = false;
}

InitialiseSecretRoomGreen_Run()
{
        level.RoomTeleportBase = self.origin;
        self thread RoomTeleporter1Green_Run();
        self thread RoomTeleporter2Green_Run();
        self thread RoomPowerGreen_Run();
}

AllPowerUpsDesactived()
{
level.RoomBomb2 hide();
level.RoomAmmo2 hide();
level.RoomDoubleP2 hide();
level.RoomIntKills2 hide();
i.BombSend = true;
i.MaxAm = true;
i.MaxP = true;
i.IntKills = true;
wait(4);
level.RoomBomb2 show();
level.RoomAmmo2 show();
level.RoomDoubleP2 show();
level.RoomIntKills2 show();
i.BombSend = false;
i.MaxAm = false;
i.MaxP = false;
i.IntKills = false;
}

RoomNukeGreen_Run()
{
        level thread LowerMessage( "Room Nuke Bomb", "Hold [{+usereload}] For Send Nuke Bomb [Cost: 250]" );
        level.RoomBomb = spawn( "script_model", (13753, -629.845, -148.875));
        level.RoomBomb setModel("zombie_bomb");
        level.RoomBomb rotateTo((0, 0, 90), .1);
        playfx( loadfx( "misc/fx_zombie_powerup_on" ), (13753, -629.845, -148.875) );
        level.RoomBomb2 = spawn( "trigger_radius", (13753, -629.845, -148.875), 1, 50, 10 );
        level.RoomBomb2 SetCursorHint( "HINT_NOICON" );
        level.RoomBomb2 UseTriggerRequireLookAt();
        level.RoomBomb2 setLowerMessage( level.RoomBomb2, "Room Nuke Bomb" );
        for(;;)
        {
                level.RoomBomb2 waittill( "trigger", i );
                if( i UseButtonPressed()  && i.score >= 250 && i.BombSend == false)
                {
                        i.score -= 250;
                        i.BombSend = true;
                        self thread AllPowerUpsDesactived();
                        i doPNuke();
                        wait(4);
                        i.BombSend = false;
                   
                }
        }
}

RoomMaxAmmoGreen_Run()
{
        level thread LowerMessage( "Room Max Ammo", "Hold [{+usereload}] For Max Ammo [Cost: 250]" );
        level.RoomAmmo = spawn( "script_model", (13753, -549.845, -148.875));
        level.RoomAmmo setModel("zombie_ammocan");
        level.RoomAmmo rotateTo((0, 0, 0), .1);
        playfx( loadfx( "misc/fx_zombie_powerup_on" ), (13753, -549.845, -148.875) );
        level.RoomAmmo2 = spawn( "trigger_radius", (13753, -549.845, -148.875), 1, 50, 10 );
        level.RoomAmmo2 SetCursorHint( "HINT_NOICON" );
        level.RoomAmmo2 UseTriggerRequireLookAt();
        level.RoomAmmo2 setLowerMessage( level.RoomAmmo2, "Room Max Ammo" );
        for(;;)
        {
                level.RoomAmmo2 waittill( "trigger", i );
                if( i UseButtonPressed()  && i.score >= 250 && i.MaxAm == false)
                {
                        i.score -= 250;
                        i.MaxAm = true;
                        self thread AllPowerUpsDesactived();
                        i doPMAmmo();
                        wait(4);
                        i.MaxAm = false;
                   
                }
        }
}

RoomDoublePointsGreen_Run()
{
        level thread LowerMessage( "Room Double Points", "Hold [{+usereload}] For Double Points [Cost: 250]" );
        level.RoomDoubleP = spawn( "script_model", (13753, -499.845, -148.875));
        level.RoomDoubleP setModel("zombie_x2_icon");
        level.RoomDoubleP rotateTo((0, 0, 0), .1);
        playfx( loadfx( "misc/fx_zombie_powerup_on" ), (13753, -499.845, -148.875) );
        level.RoomDoubleP2 = spawn( "trigger_radius", (13753, -499.845, -148.875), 1, 50, 10 );
        level.RoomDoubleP2 SetCursorHint( "HINT_NOICON" );
        level.RoomDoubleP2 UseTriggerRequireLookAt();
        level.RoomDoubleP2 setLowerMessage( level.RoomDoubleP2, "Room Double Points" );
        for(;;)
        {
                level.RoomDoubleP2 waittill( "trigger", i );
                if( i UseButtonPressed()  && i.score >= 250 && i.MaxP == false)
                {
                        i.score -= 250;
                        i.MaxP = true;
                        self thread AllPowerUpsDesactived();
                        i doPDoublePoints();
                        wait(4);
                        i.MaxP = false;
                   
                }
        }
}

RoomInstantKillsGreen_Run()
{
        level thread LowerMessage( "Room Double Points", "Hold [{+usereload}] For Insta Kill [Cost: 250]" );
        level.RoomIntKills = spawn( "script_model", (13753, -439.845, -148.875));
        level.RoomIntKills setModel("zombie_skull");
        level.RoomIntKills rotateTo((0, 0, 0), .1);
        playfx( loadfx( "misc/fx_zombie_powerup_on" ), (13753, -439.845, -148.875) );
        level.RoomIntKills2 = spawn( "trigger_radius", (13753, -439.845, -148.875), 1, 50, 10 );
        level.RoomIntKills2 SetCursorHint( "HINT_NOICON" );
        level.RoomIntKills2 UseTriggerRequireLookAt();
        level.RoomIntKills2 setLowerMessage( level.RoomIntKills2, "Room Double Points" );
        for(;;)
        {
                level.RoomIntKills2 waittill( "trigger", i );
                if( i UseButtonPressed()  && i.score >= 250 && i.IntKills == false)
                {
                        i.score -= 250;
                        i.IntKills = true;
                        self thread AllPowerUpsDesactived();
                        i doPInstaKills();
                        wait(4);
                        i.IntKills = false;
                   
                }
        }
}

RoomTeleporter1Green_Run()
{
        level thread LowerMessage( "Room Teleporter 1", "Hold [{+usereload}] To Teleport To The Secret Room" );
        level.ModelTeleporter = spawn( "script_model", level.RoomTeleportBase);
        level.ModelTeleporter setModel("defaultactor");
        level.ModelTeleporter rotateTo((0, 90, 0), .1);
        level.RoomTeleporter1 = spawn( "trigger_radius", level.RoomTeleportBase, 1, 50, 10 );
        level.RoomTeleporter1 SetCursorHint( "HINT_NOICON" );
        level.RoomTeleporter1 UseTriggerRequireLookAt();
        level.RoomTeleporter1 setLowerMessage( level.RoomTeleporter1, "Room Teleporter 1" );
        self thread Teleporter1Fx();
        for(;;)
        {
                level.RoomTeleporter1 waittill( "trigger", i );
                if( i UseButtonPressed()  && i.TeleportNotPossible == false)
                {
                        i SetOrigin((13730.9, -956.575, -189.875));
                        i iprintln("Welcome ^2" + self.name + "^7 To ^1Secret Room^7 By ^5Loimonde51^7");
                        i.ignoreme=1;
                        i.TeleportNotPossible = true;
                        wait(4);
                        i.TeleportNotPossible = false;
                }
        }
}

RoomTeleporter2Green_Run()
{
        level thread LowerMessage( "Room Teleporter 2", "Hold [{+usereload}] For Exit The Secret Room" );
        level.ModelTeleporter2 = spawn( "script_model", (13730.9, -956.575, -189.875));
        level.ModelTeleporter2 setModel("defaultactor");
        level.ModelTeleporter2 rotateTo((0, 90, 0), .1);
        level.RoomTeleporter2 = spawn( "trigger_radius", (13730.9, -956.575, -189.875), 1, 50, 10 );
        level.RoomTeleporter2 SetCursorHint( "HINT_NOICON" );
        level.RoomTeleporter2 UseTriggerRequireLookAt();
        level.RoomTeleporter2 setLowerMessage( level.RoomTeleporter2, "Room Teleporter 2" );
        self thread Teleporter2Fx();
        for(;;)
        {
                level.RoomTeleporter2 waittill( "trigger", i );
                if( i UseButtonPressed()  && i.TeleportNotPossible == false)
                {
                        i SetOrigin(level.RoomTeleportBase);
                        i iprintln("You ^1Left^7 The ^2Secret Room^7 By ^5Loimonde51^7");
                        i.TeleportNotPossible = true;
                        i.ignoreme=0;
                        wait(4);
                        i.TeleportNotPossible = false;
                }
        }
}

RoomMagicBoxGreen_Run()
{
        level thread LowerMessage( "Gr3ZzBox", "Hold [{+usereload}] For Mystery Box [Cost: 750]" );
        level.MagicWeapons = spawn( "script_model", (13566.1, -840.069, -189.875));
        level.MagicBox = spawn( "script_model", (13566.1, -840.069, -189.875));
        level.MagicBox setModel("p6_anim_zm_magic_box");
        level.MagicBox2 = spawn( "trigger_radius", (13566.1, -840.069, -189.875), 1, 50, 10 );
        level.MagicBox2 SetCursorHint( "HINT_NOICON" );
        level.MagicBox2 UseTriggerRequireLookAt();
        level.MagicBox2 setLowerMessage( level.MagicBox2, "Gr3ZzBox" );
        level.MagicBox rotateTo((0, 90, 0), .1);
        level.MagicBox2 rotateTo((0, 90, 0), .1);
        level.MagicWeapons rotateTo((0, 90, 0), .1);
        for(;;)
        {
                level.MagicBox2 waittill( "trigger", i );
                if( i UseButtonPressed() && i.score >= 750 && level.MagicBoxOpended == false )
                {
                        i.WeaponsList = [];
                        i.WeaponsList[0] = "ak74u_zm";
                        i.WeaponsList[1] = "mp5k_zm";
                        i.WeaponsList[2] = "qcw05_zm";
                        i.WeaponsList[3] = "fnfal_zm";
                        i.WeaponsList[4] = "galil_zm";
                        i.WeaponsList[5] = "m14_zm";
                        i.WeaponsList[6] = "m16_zm";
                        i.WeaponsList[7] = "saritch_zm";
                        i.WeaponsList[8] = "tar21_zm";
                        i.WeaponsList[9] = "type95_zm";
                        i.WeaponsList[10] = "xm8_zm";
                        i.WeaponsList[11] = "870mcs_zm";
                        i.WeaponsList[12] = "rottweil72_zm";
                        i.WeaponsList[13] = "saiga12_zm";
                        i.WeaponsList[14] = "srm1216_zm";
                        i.WeaponsList[15] = "rpd_zm";
                        i.WeaponsList[16] = "hamr_zm";
                        i.WeaponsList[17] = "dsr50_zm";
                        i.WeaponsList[18] = "barretm82_zm";
                        i.WeaponsList[19] = "beretta93r_zm";
                        i.WeaponsList[20] = "fiveseven_zm";
                        i.WeaponsList[21] = "judge_zm";
                        i.WeaponsList[22] = "kard_zm";
                        i.WeaponsList[23] = "m1911_zm";
                        i.WeaponsList[24] = "usrpg_zm";
                        i.WeaponsList[25] = "m32_zm";
                        i.WeaponsList[26] = "knife_ballistic_zm";
                        i.WeaponsList[27] = "ray_gun_zm";
                        i.WeaponsList[28] = "raygun_mark2_zm";
                        i.WeaponsSelected = RandomInt( i.WeaponsList.size );
                        level.MagicBoxOpended = true;
                        level.MagicBox2 hide();
                        play_sound_at_pos( "open_chest", (13566.1, -840.069, -189.875) );
                        i.score -= 750;
                        play_sound_at_pos( "music_chest", (13566.1, -840.069, -189.875) );
                        MyWeapon = i getCurrentWeapon();
                        i giveWeapon( "zombie_knuckle_crack" );
                        i switchToWeapon( "zombie_knuckle_crack" );
                        level.MagicWeapons setModel(getWeaponModel(i.WeaponsList[i.WeaponsSelected]));
                        level.MagicWeapons MoveTo(level.MagicBox.origin + (0,0,35),1);
                        wait 2.8;
                        i takeWeapon( "zombie_knuckle_crack" );
                        i takeWeapon( MyWeapon );
                        level.MagicWeapons setModel("");
                        i giveweapon( "knife_zm" );
                        i giveweapon( i.WeaponsList[i.WeaponsSelected] );
                        i givemaxammo( i.WeaponsList[i.WeaponsSelected] );
                        i switchToWeapon( i.WeaponsList[i.WeaponsSelected] );
                        i play_weapon_vo( i.WeaponsList[i.WeaponsSelected] );
                        level.MagicWeapons MoveTo(level.MagicBox.origin,1);
                        level.MagicWeapons MoveTo(level.MagicBox.origin,1);
                        level.MagicBoxOpended = false;
                        level.MagicBox2 show();
                }
                wait .1;
        }
}

RoomPowerGreen_Run()
{
        level thread LowerMessage( "Power", "Hold [{+usereload}] To Enable The Power [Cost: 1000]" );
        level.Power = spawn( "script_model", (13825.0, -200.641, -188.875));
        level.Power setModel("p6_zm_buildable_pswitch_body");
        level.Power2 = spawn( "trigger_radius", (13825.0, -200.641, -188.875), 1, 50, 10 );
        level.Power2 SetCursorHint( "HINT_NOICON" );
        level.Power2 UseTriggerRequireLookAt();
        level.Power2 setLowerMessage( level.Power2, "Power" );
        level.Power rotateTo((0, 360, 0), .1);
        level.Power2 rotateTo((0, 360, 0), .1);
        for(;;)
        {
                level.Power2 waittill( "trigger", i );
                if( i UseButtonPressed() && i.score >= 1000 && level.PowerActived == false )
                {
                    level.PowerActived = true;
                    i.score -= 1000;
                    level.Power movez( -135, .5 );
                    level.Power2 hide();
                    playfx( level._effect[ "poltergeist" ], (13800.0, -215.641, -188.875) );
                    self thread TurnPowerOn();
                    self RoomsPerksGreen_Run();
                    self thread RommsSoundGreen_Run();
                    self thread RoomPackaPunchGreen_Run();
                    self RoomWeaponsGreen_Run();
                    self thread RoomMagicBoxGreen_Run();
                    self thread RoomNukeGreen_Run();
                    self thread RoomMaxAmmoGreen_Run();
                    self thread RoomDoublePointsGreen_Run();
                    self thread RoomInstantKillsGreen_Run();
                }
        }
}

RoomPackaPunchGreen_Run()
{
        level thread LowerMessage( "PackaPunch", "Hold [{+usereload}] For Pack-a-Punch [Cost: 3500]" );
        level.PackaPunch = spawn( "script_model", (13606.6, -210.641, -189.875));
        level.PackaPunch setModel("p6_anim_zm_buildable_pap_on");
        level.PackaPunch2 = spawn( "trigger_radius", (13606.6, -210.641, -189.875), 1, 50, 10 );
        level.PackaPunch2 SetCursorHint( "HINT_NOICON" );
        level.PackaPunch2 UseTriggerRequireLookAt();
        level.PackaPunch2 setLowerMessage( level.PackaPunch2, "PackaPunch" );
        level.PackaPunch rotateTo((0, 360, 0), .1);
        level.PackaPunch2 rotateTo((0, 360, 0), .1);
        for(;;)
        {
                level.PackaPunch2 waittill( "trigger", i );
                if( i UseButtonPressed() && i.score >= 3500 && level.PackaPunch == false )
                {
                    level.PackaPunch = true;
                    i.score -= 3500;
                    level.PackaPunch2 hide();
                    self thread packAPunchGreenRun();
                }
        }
}

RoomWeaponsGreen_Run()
{
        self thread WeaponsSystemGreen_Run("Hold [{+usereload}] For Ray Gun [Cost: 1250]", (13556.1, -746.737, -145.875), 1250, "ray_gun_zm");
        self thread WeaponsSystemGreen_Run("Hold [{+usereload}] For Ray Gun Mark 2 [Cost: 1500]", (13556.1, -706.737, -145.875), 1500, "raygun_mark2_zm");
        self thread WeaponsSystemMeleeGreen_Run("Hold [{+usereload}] For Tazer [Cost: 2000]", (13556.1, -676.737, -145.875), 2000, "tazer_knuckles_zm");
        self thread WeaponsSystemGreen_Run("Hold [{+usereload}] For RPD Upgraded [Cost: 2500]", (13556.1, -586.737, -145.875), 2500, "rpd_upgraded_zm");
        self thread WeaponsSystemGreen_Run("Hold [{+usereload}] For Jet Gun [Cost: 3000]", (13556.1, -526.737, -145.875), 3000, "jetgun_zm");
}


RoomsPerksGreen_Run()
{
        self thread PerksSystemGreen_Run( "zombie_perk_bottle_jugg", "zombie_vending_jugg", "Juggernaut", 500, (13678, -1232, -189), "specialty_armorvest", "mus_perks_jugganog_sting" );
        self thread PerksSystemGreen_Run( "zombie_perk_bottle_sleight", "zombie_vending_sleight", "Fast Reload", 500, (13678, -1152, -189), "specialty_fastreload", "mus_perks_speed_sting" );
        self thread PerksSystemGreen_Run( "zombie_perk_bottle_revive", "zombie_vending_revive", "Quick Revive", 500, (13556.1, -1419.23, -188.875), "specialty_quickrevive", "mus_perks_revive_sting" );
        self thread PerksSystemGreen_Run( "zombie_perk_bottle_doubletap", "zombie_vending_doubletap2", "Double Tap", 500, (13556.1, -1349.23, -189.875), "specialty_rof", "mus_perks_doubletap_sting" );
        self thread PerksSystemGreen_Run( "zombie_perk_bottle_marathon", "zombie_vending_marathon", "Stamin-Up", 500, (13556.1, -1602.47, -189.875), "specialty_longersprint", "mus_perks_stamin_sting" );
        self thread PerksSystemGreen_Run( "zombie_perk_bottle_tombstone", "zombie_vending_tombstone", "Tombstone", 500, (13556.1, -1038.32, -189.875), "specialty_scavenger", "mus_perks_tombstone_sting" );
}

RommsSoundGreen_Run()
{
SoundOnOrigin( "mus_perks_jugganog_jingle", (13678, -1232, -189));
wait 50;
SoundOnOrigin( "mus_perks_speed_jingle", (13678, -1152, -189));
wait 50;
SoundOnOrigin( "mus_perks_revive_jingle", (13566.1, -1419.23, -188.875));
wait 50;
SoundOnOrigin( "mus_perks_doubletap_jingle", (13566.1, -1349.23, -189.875));
wait 50;
SoundOnOrigin( "mus_perks_stamin_jingle", (13566.1, -1602.47, -189.875));
wait 80;
SoundOnOrigin( "mus_perks_tombstone_jingle", (13566.1, -1038.32, -189.875));
wait 90;
SoundOnOrigin( "mus_perks_packa_jingle", (13606.6, -210.641, -189.875));
wait 100;
self thread RommsSoundGreen_Run();
}

// Secret Room Zombies Green Run By Loimonde51 *End*

// Secret Room Green Run Utils *Start*

WeaponsSystemGreen_Run(string, origin, cost, weapon)
{
        level thread LowerMessage( "Secret Room Weapons", string );
        RWeapons = spawn( "script_model", origin);
        RWeapons setModel(getWeaponModel(weapon));
        RWeapons rotateTo((0, 90, 0), .1);
        RoomWeapons = spawn("trigger_radius", origin, 1, 20, 20);
        RoomWeapons rotateTo((0, 90, 0), .1);
        RoomWeapons SetCursorHint( "HINT_NOICON" );
        RoomWeapons setLowerMessage( RoomWeapons, "Secret Room Weapons" );
        for(;;)
        {
                RoomWeapons waittill("trigger", i);
                if(i useButtonPressed() && i.score >= cost)
                {
                        wait .3;
                        if(i useButtonPressed())
                        {
                                w = i GetWeaponsListPrimaries();
                                i playsound( "zmb_cha_ching" );
                                i.score -= cost;
                                playerCurrent = i getCurrentWeapon();
                                if(w.size > 1)i takeWeapon(playerCurrent);
                                i giveweapon( "knife_zm" );
                                i giveWeapon( weapon );
                                i givemaxammo( weapon );
                                i switchToWeapon( weapon );
                                i play_weapon_vo( weapon );
                                wait 1;
                        }
                }
        }
}

WeaponsSystemMeleeGreen_Run(string, origin, cost, weapon)
{
        level thread LowerMessage( "Secret Room Weapons", string );
        RWeapons = spawn( "script_model", origin);
        RWeapons setModel(getWeaponModel(weapon));
        RWeapons rotateTo((0, 90, 0), .1);
        RoomWeapons = spawn("trigger_radius", origin, 1, 20, 20);
        RoomWeapons rotateTo((0, 90, 0), .1);
        RoomWeapons SetCursorHint( "HINT_NOICON" );
        RoomWeapons setLowerMessage( RoomWeapons, "Secret Room Weapons" );
        for(;;)
        {
                RoomWeapons waittill("trigger", i);
                if(i useButtonPressed() && i.score >= cost)
                {
                        wait .3;
                        if(i useButtonPressed())
                        {
                                w = i GetWeaponsListPrimaries();
                                i playsound( "zmb_cha_ching" );
                                i.score -= cost;
                                playerCurrent = i getCurrentWeapon();
                                if(w.size > 1)i takeWeapon(playerCurrent);
                                self takeweapon( self get_player_melee_weapon() );
                                self giveweapon(weapon);
                                self switchtoweapon( self getcurrentweapon() );
                                self set_player_melee_weapon(weapon);
                                wait 1;
                        }
                }
        }
}

PerksSystemGreen_Run( botal, model, perkname, cost, origin, perk, music )
{
        RPerks = spawn( "script_model", origin );
        RPerks setModel( model );
        RPerks rotateTo((0, 90, 0), .1);
        level thread LowerMessage( "Secret Room Perks", "Hold [{+usereload}] For "+perkname+" [Cost: "+cost+"]" );
        trig = spawn("trigger_radius", origin, 1, 20, 20);
        trig SetCursorHint( "HINT_NOICON" );
        trig setLowerMessage( trig, "Secret Room Perks" );
        for(;;)
        {
                trig waittill("trigger", i);
                if(i useButtonPressed() && i.score >= cost)
                {
                        wait .3;
                        if(i useButtonPressed())
                        {
                                i playsound( "zmb_cha_ching" );
                                i.score -= cost;
                                i thread GivePerk( botal, perk, music );
                                wait 5;
                        }
                }
        }
}

GivePerk( model, perk, music )
{
        self DisableOffhandWeapons();
        self DisableWeaponCycling();
        weaponA = self getCurrentWeapon();
        weaponB = model;
        self SetPerk( perk );
        self GiveWeapon( weaponB );
        self SwitchToWeapon( weaponB );
        SoundOnOrigin( music, self.origin );
        self waittill( "weapon_change_complete" );
        self EnableOffhandWeapons();
        self EnableWeaponCycling();
        self TakeWeapon( weaponB );
        self SwitchToWeapon( weaponA );
        self maps/mp/zombies/_zm_perks::give_perk(perk);
}

SoundOnOrigin(alias,origin)
{
        soundPlayer = spawn( "script_origin", origin );
        soundPlayer playsound( alias );
}

doPNuke()
{
        foreach(player in level.players)
        {
                level thread maps\mp\zombies\_zm_powerups::nuke_powerup(self,player.team);
                player maps\mp\zombies\_zm_powerups::powerup_vo("nuke");
                zombies=getaiarray(level.zombie_team);
                player.zombie_nuked=arraysort(zombies,self.origin);
                player notify("nuke_triggered");
        }
}

doPMAmmo()
{
        foreach(player in level.players)
        {
                level thread maps\mp\zombies\_zm_powerups::full_ammo_powerup(self,player);
                player thread maps\mp\zombies\_zm_powerups::powerup_vo("full_ammo");
        }
}

doPDoublePoints()
{
        foreach(player in level.players)
        {
                level thread maps\mp\zombies\_zm_powerups::double_points_powerup(self,player);
                player thread maps\mp\zombies\_zm_powerups::powerup_vo("double_points");
        }
}

doPInstaKills()
{
        foreach(player in level.players)
        {
                level thread maps\mp\zombies\_zm_powerups::insta_kill_powerup(self,player);
                player thread maps\mp\zombies\_zm_powerups::powerup_vo("insta_kill");
        }
}

Teleporter1Fx()
{
    playfx( level._effect[ "lght_marker" ], level.RoomTeleportBase );
}

Teleporter2Fx()
{
    playfx( level._effect[ "lght_marker" ], (13730.9, -956.575, -189.875) );
}

TurnPowerOn()
{
    self thread _zm_arena_openalldoors();
    trig = getEnt("use_elec_switch", "targetname");
    powerSwitch = getEnt("elec_switch", "targetname");
    powerSwitch notSolid();
    trig setHintString(&"ZOMBIE_ELECTRIC_SWITCH");
    trig setVisibleToAll();
    trig notify("trigger", self);
    trig setInvisibleToAll();
    powerSwitch rotateRoll(-90,0,3);
    powerSwitch playSound("zmb_switch_flip");
    powerSwitch playSound("zmb_poweron");
    level thread maps/mp/zombies/_zm_perks::perk_unpause_all_perks();
    self maps\mp\zombies\_zm_game_module::turn_power_on_and_open_doors();
    powerSwitch waittill("rotatedone");
    playFx(level._effect["switch_sparks"], powerSwitch.origin+(0, 12, -60), anglesToForward(powerSwitch.angles));
    powerSwitch playSound("zmb_turn_on");
    level notify("electric_door");
    flag_set("power_on");
    level setClientField("zombie_power_on", 1);
    self.PowerOn = 1;
}

_zm_arena_openalldoors()
{
    setdvar( "zombie_unlock_all", 1 );
    flag_set( "power_on" );
    players = get_players();
    zombie_doors = getentarray( "zombie_door", "targetname" );
    i = 0;
    while ( i < zombie_doors.size )
    {
        zombie_doors[ i ] notify( "trigger" );
        if ( is_true( zombie_doors[ i ].power_door_ignore_flag_wait ) )
        {
            zombie_doors[ i ] notify( "power_on" );
        }
        wait 0.05;
        i++;
    }
    zombie_airlock_doors = getentarray( "zombie_airlock_buy", "targetname" );
    i = 0;
    while ( i < zombie_airlock_doors.size )
    {
        zombie_airlock_doors[ i ] notify( "trigger" );
        wait 0.05;
        i++;
    }
    zombie_debris = getentarray( "zombie_debris", "targetname" );
    i = 0;
    while ( i < zombie_debris.size )
    {
        zombie_debris[ i ] notify("trigger");
        wait 0.05;
        i++;
    }
    level notify( "open_sesame" );
    wait 1;
    setdvar( "zombie_unlock_all", 0 );
}

packAPunchGreenRun()
{
    weap = self getCurrentWeapon();
    weapon = get_upgraded(weap);
    papGun = "zombie_knuckle_crack";
    if(isDefined(weapon))
    {
        self TakeWeapon(weap);
        self GiveWeapon(papGun);
        self SwitchToWeapon(papGun);
        playFx( loadfx( "maps/zombie/fx_zombie_packapunch" ), (13606.6, -210.641, -177.875), (0, 90, 0) );
        SoundOnOrigin( "mus_perks_packa_sting", self.origin );
        wait 4;
        SoundOnOrigin( "zmb_perks_packa_ready", self.origin );
        self TakeWeapon(papGun);
        self GiveWeapon(weapon, 0, self maps\mp\zombies\_zm_weapons::get_pack_a_punch_weapon_options(weapon));
        self GiveStartAmmo(weapon);
        self SwitchToWeapon(weapon);
        self givemaxammo(weapon);
        self play_weapon_vo(weapon);
        wait 4;
        level.PackaPunch2 show();
        level.PackaPunch = false;
    }
}

get_upgraded( weaponname )
{
    if( IsDefined(level.zombie_weapons[weaponname]) && IsDefined(level.zombie_weapons[weaponname].upgrade_name) )
    {
        return maps\mp\zombies\_zm_weapons::get_upgrade_weapon( weaponname, false );
    }
    else
    {
        return maps\mp\zombies\_zm_weapons::get_upgrade_weapon( weaponname, true );
    }
}

LowerMessage( ref, text )
{
        if( !IsDefined( level.zombie_hints ) )
        {
                level.zombie_hints = [];
        }
        PrecacheString( text );
        level.zombie_hints[ref] = text;
}

setLowerMessage( ent, default_ref )
{
        if( IsDefined( ent.script_hint ) )
        {
                self SetHintString( get_zombie_hint( ent.script_hint ) );
        }
        else
        {
                self SetHintString( get_zombie_hint( default_ref ) );
        }
}

// Secret Room Green Run Utils *End*

[/LEFT]

Excuse Me For My Bad English I'm French
 

Top