GSC *UPDATED* Dumb Scripts, Mob of the Dead Scripts, anything dumb! Powerup magnet, fake shield, and zombie teleporter

Xeirh

Veteran
Messages
16
Reaction score
2
Points
793
#include maps\mp\zombies\_zm_spawner;
#include maps\mp\zombies\_zm_electric_cherry;
Code:
while( true ) {
    if( isdefined( self.lives ) && self.lives < 1 ) {
        self.lives = 1;
        self setclientfieldtoplayer( "player_lives", self.lives );
    }
    wait .05;
}
Code:
while( true ) {
    if( isdefined( self.manacur ) && self.manacur < 200 ) {
        self.manacur  = 200;
        n_mapped_mana = linear_map( self.manacur, 0, 200, 0, 1 );
        self setclientfieldtoplayer( "player_afterlife_mana", n_mapped_mana );
    }
    wait .05;
}
Code:
while( true ) {
    if( isdefined( self.consecutive_electric_cherry_attacks ) && self.consecutive_electric_cherry_attacks > 0 )
        self.consecutive_electric_cherry_attacks = 0;
    wait .05;
}
Code:
while( true ) {
    foreach( tomahawk in array( "bouncing_tomahawk_zm", "upgraded_tomahawk_zm" ) ) {
        if( self hasweapon( tomahawk ) )
            self setweaponammostock( tomahawk, 1 );
    }
    wait .05;
}
Code:
if( !isdefined( level.fake_shield ) ) { // thanks to ZECxR3ap3r for rotation of stow models and hints
    level.fake_shield = true;
    level.shield_hint = spawn( "trigger_radius", self.origin, 0, 35, 80 );
    level.shield_hint setcursorhint( "HINT_NOICON" );
    level.shield_hint sethintstring( &"MP_GENERIC_PICKUP" );
    if( level.script == "zm_transit" ) {
        level.shield_model = spawn( "script_model", self.origin + ( 0, 0, 25 ) );
        level.shield_model setmodel( "t6_wpn_zmb_shield_world" );
        level.shield_model.angles = self.angles;
    }
    if( level.script == "zm_prison" || level.script == "zm_tomb" ) {
        level.shield_model = spawn( "script_model", self.origin + ( 0, 0, 28 ) );
        level.script_model.angles = self.angles + vectorscale( ( 90, 1, 0 ), 90 );
        if( level.script == "zm_prison" )
            level.shield_model setmodel( "t6_wpn_zmb_shield_dlc2_dmg0_stow" );
        if( level.script == "zm_tomb" )
            level.shield_model setmodel( "t6_wpn_zmb_shield_dlc4_dmg0_stow" );
        level.shield_model rotatepitch( 270, .05 );
    }
}
else {
    level.fake_shield = undefined;
    level.shield_model delete();
    level.shield_hint delete();
}
Code:
while( true ) {
    if( isalive( self ) ) {
        foreach( powerup in level.active_powerups ) {
            if( distance( self.origin, powerup.origin ) < 400 )
                powerup moveto( self.origin, .5 );
        }
    }
}
Code:
zombie_teleporter() {
    if( !isdefined( level.zombie_teleporter ) ) {
        level.zombie_teleporter = true;
        level.teleport_model = spawn( "script_model", self.origin + ( 0, 0, 0 ) );
        level.teleport_model setmodel( "zombie_teddybear" );
        level.teleport_model.angles = self.angles;
        level thread teleport_zombies( level.teleport_model.origin );
    }
    else {
        level.zombie_teleporter = undefined;
        level.teleport_model delete();
        level notify( "zombie_teleporter" );
    }
}
teleport_zombies( location ) {
    level endon( "zombie_teleporter" );
    while( true ) {
        foreach( zombie in getaiarray( level.zombie_team ) ) {
            zombie forceteleport( location );
            zombie reset_attack_spot();
        }
        wait .05;
    }
}
 
Last edited:

Xeirh

Veteran
Messages
16
Reaction score
2
Points
793
Yes I cleaned it all up so it's not such a eye sore.
credits :
ZECxR3ap3r for help with fake shield.
candy for helping cleaning up my junk.
 
Top