Jiro

Modder
Messages
220
Points
403
How do you give yourself the gun?
self add_option( "Assault Rifles", "smg_standard", &func_giveWeapon, "smg_standard" );

Change smg_standard to the weapon that you want.

Code:
//Example
self func_giveWeapon("smg_standard");

function func_giveWeapon(weapon)
{
    self TakeWeapon(self GetCurrentWeapon());
    weapon = getWeapon(weapon);
    self GiveWeapon(weapon);
    self GiveMaxAmmo(weapon);
    self SwitchToWeapon(weapon);
    self iprintln(weapon+" ^2Given");
}
 
Last edited by a moderator:

Kyle Parkin

New Member
Messages
11
Points
3
I am trying to have random weapon be given. The above script for giving random weapon does not work. It freezes game. Can anyone help?
function func_giveRandomWeapon()
{
weaponsList_array = strTok("pistol_standard ar_standard sniper_fastbolt sniper_powerbolt ar_marksman lmg_heavy "," "); // fill this with random weapons from the game, I tried to search a array whichs stores all weapons from the game but I didn't find one!
for(;:wink:
{
weaponPick = array::random(weaponsList_array);
weaponPick = getWeapon(weaponPick);
if( self hasWeapon( weaponPick ) )
continue;
else if ( weapons::is_primary_weapon( weaponPick ) )
break;
else if ( weapons::is_side_arm( weaponPick ) )
break;
else
continue;
}
self iprintln(weaponPick.displayName);
self iprintln(weaponPick.name);
self TakeWeapon(self GetCurrentWeapon());
self giveWeapon(weaponPick);
self GiveMaxAmmo(weaponPick);
self SwitchToWeapon(weaponPick);
}
 

Kyle Parkin

New Member
Messages
11
Points
3
Can any one see what I am doing wrong here?

function func_giveRandomWeapon() // This function can be called to give player random weapon
{
weaponsList_array = StrTok("ray_gun","; "); // fill this with random weapons from the game, I tried to search a array whichs stores all weapons from the game but I didn't find one!
for(;:wink:
{
weaponPick = array::random(weaponsList_array);
weaponPick = getWeapon(weaponPick);
if( self hasWeapon( weaponPick ) )
continue;
else if ( weapons::is_primary_weapon( weaponPick ) )
break;
else if ( weapons::is_side_arm( weaponPick ) )
break;
else
continue;
}
self TakeWeapon(self GetCurrentWeapon());
Weapon = GetWeapon(weaponPick);
self GiveWeapon(weaponPick);
self GiveMaxAmmo(weaponPick);
self SwitchToWeapon(weaponPick);
self iprintln(weapon+" ^2Given");
}
 

koekjes_boy

Known Member
Messages
25
Points
118
Clone Player

Includes
Code:
#using scripts\shared\util_shared;
Spawn
Code:
function func_clonePlayer( player = self )
{
    if(isDefined(self.gamevars["Clone"]))
    {
        self iprintln("^1You already spawned a Clone, delete the current to spawn a new one.");
        return;
    }
    self.gamevars["Clone"] = player util::spawn_player_clone( player, "t7_loot_gesture_goodgame_salute" );
}
Play Animation
Code:
function func_clonePlayer_playAnimation(animname)
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        self iprintln("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, animname );
    self iprintln("Animation "+animname+" ^2Played");
}
Teleport Clone to you
Code:
function func_clonePlayer_teleportToYou()
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        self iprintln("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] SetOrigin(self.origin);
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.origin, self.angles, "pb_death_base_pose" );
    self iprintln("Clone ^2teleported");
}
Delete
Code:
function func_clonePlayer_delete()
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        self iprintln("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, "pb_death_headshot_back" );
    wait 2;
    self.gamevars["Clone"] delete();
    self.gamevars["Clone"] = undefined;
    self iprintln("Clone ^2deleted");
}


where can i get a list with all animations
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,589
Points
828
Can any one see what I am doing wrong here?

function func_giveRandomWeapon() // This function can be called to give player random weapon
{
weaponsList_array = StrTok("ray_gun","; "); // fill this with random weapons from the game, I tried to search a array whichs stores all weapons from the game but I didn't find one!
for(;:wink:
{
weaponPick = array::random(weaponsList_array);
weaponPick = getWeapon(weaponPick);
if( self hasWeapon( weaponPick ) )
continue;
else if ( weapons::is_primary_weapon( weaponPick ) )
break;
else if ( weapons::is_side_arm( weaponPick ) )
break;
else
continue;
}
self TakeWeapon(self GetCurrentWeapon());
Weapon = GetWeapon(weaponPick);
self GiveWeapon(weaponPick);
self GiveMaxAmmo(weaponPick);
self SwitchToWeapon(weaponPick);
self iprintln(weapon+" ^2Given");
}
I am trying to have random weapon be given. The above script for giving random weapon does not work. It freezes game. Can anyone help?
function func_giveRandomWeapon()
{
weaponsList_array = strTok("pistol_standard ar_standard sniper_fastbolt sniper_powerbolt ar_marksman lmg_heavy "," "); // fill this with random weapons from the game, I tried to search a array whichs stores all weapons from the game but I didn't find one!
for(;:wink:
{
weaponPick = array::random(weaponsList_array);
weaponPick = getWeapon(weaponPick);
if( self hasWeapon( weaponPick ) )
continue;
else if ( weapons::is_primary_weapon( weaponPick ) )
break;
else if ( weapons::is_side_arm( weaponPick ) )
break;
else
continue;
}
self iprintln(weaponPick.displayName);
self iprintln(weaponPick.name);
self TakeWeapon(self GetCurrentWeapon());
self giveWeapon(weaponPick);
self GiveMaxAmmo(weaponPick);
self SwitchToWeapon(weaponPick);
}
Hello,
thanks for messaging me about it. Could you please create a separated thread in this section about it: Call of Duty: Black Ops 3 Scripts Question | CabConModding Thank you!

Also if you are posting sources or codes be sure to use our CODE-Tag (more about tags and the code tag: BB Codes | CabConModding
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,589
Points
828
self add_option( "Assault Rifles", "M-TAR", ::giveplayerweapon, "tar21_mp" );

change tar21_mp to the weapon that you want


giveplayerweapon( weapon )
{
self takeweapon( self getcurrentweapon() );
self giveweapon( weapon );
self switchtoweapon( weapon );
self givemaxammo( weapon );
wait 1;
}
Thank you really much for your help! I appreciate that!
 

vampytwist

"Don't you trust me?"
Staff member
Messages
544
Points
558
Pretty easy/short script. But for those that don't know how to do it here is a function in zombies to give you a selected x2 pap effect on any gun even if the gun it self isn't upgraded

//Place this at the top of your gsc file
Code:
#using scripts\shared\aat_shared;
//Place this anywhere
Code:
function acquireaat(id) {
    weapon = self getCurrentWeapon();
    self thread aat::acquire(weapon, id);
}
//Example usage in my menu
Code:
      self addOpt(a, "Dead Wire", &acquireaat, "zm_aat_dead_wire");
//Ids
Code:
zm_aat_blast_furnace
zm_aat_dead_wire
zm_aat_fire_works
zm_aat_thunder_wall
zm_aat_turned
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,589
Points
828
Pretty easy/short script. But for those that don't know how to do it here is a function in zombies to give you a selected x2 pap effect on any gun even if the gun it self isn't upgraded

//Place this at the top of your gsc file
Code:
#using scripts\shared\aat_shared;
//Place this anywhere
Code:
function acquireaat(id) {
    weapon = self getCurrentWeapon();
    self thread aat::acquire(weapon, id);
}
//Example usage in my menu
Code:
      self addOpt(a, "Dead Wire", &acquireaat, "zm_aat_dead_wire");
//Ids
Code:
zm_aat_blast_furnace
zm_aat_dead_wire
zm_aat_fire_works
zm_aat_thunder_wall
zm_aat_turned
Awesome to see this script! I will add it to the main thread! Thank you really much! :smile:
 

JayCoder

Insane-Known Member
Staff member
Messages
350
Points
478
Tested Fully Working Informationbar

Code:
function Informationbar()
{
    self endon("disconnect");
    self endon("death");
    self.bar = self createNewsBar("CENTER","",0,215,2000,30,((255/255),(0/255),(0/255)), 3, .6, "white");
    self.bar.foreGround=false;
    self.bar.alpha=0.7;
    self.txt = hud::createFontString("objective", 1.5);
    self.txt.foreGround=true;
    self.txt setText("Test, Test, Test <> NewsBar BO3 Test! <> Made By: JayCoder! <> Thank's For Playing");
    self.txt elemcolor(1, (1, 1, 1));
    for(;;)
    {
            self.txt hud::setPoint("CENTER","",800,215);
            self.txt hud::setPoint("CENTER","",-800,215,30);
            wait 20;
    }   
}
 
function createNewsBar(align, relative, x, y, width, height, color, sort, alpha, shader)
{
    uiElement = newClientHudElem( self );
    uiElement.elemType = "bar";
    uiElement.width = width;
    uiElement.height = height;
    uiElement.xOffset = 0;
    uiElement.yOffset = 0;
    uiElement.hidewheninmenu = true;
    uiElement.children = [];
    uiElement.sort = sort;
    uiElement.color = color;
    uiElement.alpha = alpha;
    uiElement hud::setParent( level.uiParent );
    uiElement setShader( shader, width , height );
    uiElement.hidden = false;
    uiElement hud::setPoint(align,relative,x,y);
    return uiElement;
}

function elemcolor(time, color)
{
    self fadeovertime(time);
    self.color = color;
}
 

JayCoder

Insane-Known Member
Staff member
Messages
350
Points
478
hey cabcon look at this been trying to get this to work
Code:
void <player> SetDoubleJumpEnergy(<energy>)
[MANDATORY] <energy> % energy to set on the player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a double jump energy amount on the player
EXAMPLE: player SetDoubleJumpEnergy( <energy> )

//example of my idea
function UnlimitedJumpEnergy()
{
       SetDoubleJumpEnergy( 999999999 );

//I have also tried using "9999999" using quotes
}


Also the disco fog I have made

void SetExpFog(<startDist>,<halfwayDist>,<red>,<green>,<blue>,<transition time>)
[LIST=1]
[LIST]
[*][MANDATORY] <startDist> The distance, in world units, at which the fog begins.
[*][MANDATORY] <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
[*][MANDATORY] <red> The red component of the fog as a value between 0.0 and 1.0
[*][MANDATORY] <green> The red component of the fog as a value between 0.0 and 1.0
[*][MANDATORY] <blue> The red component of the fog as a value between 0.0 and 1.0
[*][MANDATORY] <transition time> transition time in seconds
[/LIST]
CATEGORY: 
CLIENT/SERVER: Server
SUMMARY: Creates an exponential fog.
EXAMPLE: SetExpFog(.0001144, 131/255, 116/255, 71/255, 0)
[/LIST]


function MakeDiscoFog() 
{

wait 5;
self iPrintlnBold("Disco Mode Activated");       
        while(1)
        {
         
        self SetExpFog(256, 512, 1, 0, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 1, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 0, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 1, 0.8, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.8, 0, 0.6, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 1, 0.6, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 1, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 0, 0.8, 0);
        wait .1; 
        self SetExpFog(256, 512, 0.2, 1, 0.8, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 0.4, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 0, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 0.2, 0.2, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 1, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.6, 0, 0.4, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 0, 0.8, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 1, 0, 0); 
        wait .1;   
        self SetExpFog(256, 512, 0.6, 1, 0.6, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 0, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 1, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 0, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 1, 0.8, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.8, 0, 0.6, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 1, 0.6, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 1, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 0, 0.8, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.2, 1, 0.8, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 0.4, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0, 0, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 0.2, 0.2, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.4, 1, 1, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.6, 0, 0.4, 0); 
        wait .1; 
        self SetExpFog(256, 512, 1, 0, 0.8, 0);
        wait .1; 
        self SetExpFog(256, 512, 1, 1, 0, 0); 
        wait .1; 
        self SetExpFog(256, 512, 0.6, 1, 0.6, 0);
         
        } 
}
no fog shows, no energy mods or working like wtf xD help
the codes aren't doing what they should
 
Last edited:

Cxwh

Insane-Known Member
Messages
64
Points
368
I don't know what the **** kind of toggle I just came up with, but yeah unlimited boost/thrust
Code:
function infiniteBoost()
{
    self endon("stop_boost");

    if(!isDefined(self.boost))
        self.boost = false;

    self.boost = !self.boost;
    while(isAlive(self) && self.boost)
    {
        self SetDoubleJumpEnergy(100);
        wait 0.15;
    }
    self.boost = false;
}
 
Last edited:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,589
Points
828
I don't know what the **** kind of toggle I just came up with, but yeah unlimited boost/thrust
Code:
function infiniteBoost()
{
    self endon("stop_boost");

    if(!isDefined(self.boost))
        self.boost = false;

    self.boost = !self.boost;
    while(isAlive(self))
    {
        self SetDoubleJumpEnergy(100);
        wait 0.15;
    }
    self.boost = false;
}
Thanks for sharing.
 

vampytwist

"Don't you trust me?"
Staff member
Messages
544
Points
558
Origin Mods:

Complete Challenges:
Code:
function dochallenges() {
        self thread devgui_award_challenge(1);
        self thread devgui_award_challenge(2);
        self thread devgui_award_challenge(3);
        self thread devgui_award_challenge(4);
}

function devgui_award_challenge( n_index )
{

    if ( n_index == 4 )
    {
        s_team_stats = level._challenges.s_team;
        s_team_stats.n_completed = 1;
        s_team_stats.n_medals_held = 1;
        a_keys = getarraykeys( level._challenges.s_team.a_stats );
        s_stat = level._challenges.s_team.a_stats[ a_keys[ 0 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
        s_stat.a_b_player_rewarded[ self.characterindex ] = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1061 = level.a_m_challenge_boards;
        _k1061 = getFirstArrayKey( _a1061 );
        while ( isDefined( _k1061 ) )
        {
            m_board = _a1061[ _k1061 ];
            m_board ShowPart( s_stat.str_glow_tag );
            _k1061 = getNextArrayKey( _a1061, _k1061 );
        }
    }
    else
    {
        a_keys = getarraykeys( level._challenges.a_players[ 0 ].a_stats );
        a_players = getPlayers();
        _a1071 = a_players;
        _k1071 = GetFirstArrayKey( _a1071 );
        s_player_data = level._challenges.a_players[ self.characterindex ];
        s_player_data.n_completed++;
        s_player_data.n_medals_held++;
        s_stat = s_player_data.a_stats[ a_keys[ n_index - 1 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1082 = level.a_m_challenge_boards;
        _k1082 = getFirstArrayKey( _a1082 );
        while ( isDefined( _k1082 ) )
        {
            m_board = _a1082[ _k1082 ];
            m_board showpart( s_stat.str_glow_tag );
            _k1082 = getNextArrayKey( _a1082, _k1082 );
        }
    }
}

Remove mud:
Code:
function removeMud(){
    level.a_e_slow_areas = undefined;
}

Spawn Soldat:
Code:
function spawnsoldat(){
        level.mechz_left_to_spawn++;
        level notify( "spawn_mechz" );
}

Infinite Gramophone:
Code:
function toggleinfGramophone() {
    if (!isDefined(self.gramophone)) {
        self.gramophone = true;
        self InfiniteGramophone();
    } else {
        self.gramophone = undefined;
        self notify("gramophone_sthap");
    }
}

function InfiniteGramophone() {
    self endon("gramophone_sthap");
    while(isDefined(self.gramophone))
    {
        flag::clear( "gramophone_placed" );
        CodeSetClientField(level, "piece_record_zm_player", 1 );
        level notify("gramophone_vinyl_player_picked_up");
        wait 1;
    }
}

Infinite Rewards
Code:
function toggleinfreward() {
    if (!isDefined(self.rewardbox)) {
        self.rewardbox = true;
        self InfRewardBox();
    } else {
        self.rewardbox = undefined;
        self notify("rewardbox_sthap");
    }
}

function InfRewardBox()
{
     self endon("rewardbox_sthap");
    while(isDefined(self.rewardbox))
    {
        foreach( player in level.players)
        {
            player thread devgui_award_challenge(1);
            player thread devgui_award_challenge(2);
            player thread devgui_award_challenge(3);
            player thread devgui_award_challenge(4);
        }
        wait 5;
    }
}

function devgui_award_challenge( n_index )
{

    if ( n_index == 4 )
    {
        s_team_stats = level._challenges.s_team;
        s_team_stats.n_completed = 1;
        s_team_stats.n_medals_held = 1;
        a_keys = getarraykeys( level._challenges.s_team.a_stats );
        s_stat = level._challenges.s_team.a_stats[ a_keys[ 0 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
        s_stat.a_b_player_rewarded[ self.characterindex ] = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1061 = level.a_m_challenge_boards;
        _k1061 = getFirstArrayKey( _a1061 );
        while ( isDefined( _k1061 ) )
        {
            m_board = _a1061[ _k1061 ];
            m_board ShowPart( s_stat.str_glow_tag );
            _k1061 = getNextArrayKey( _a1061, _k1061 );
        }
    }
    else
    {
        a_keys = getarraykeys( level._challenges.a_players[ 0 ].a_stats );
        a_players = getPlayers();
        _a1071 = a_players;
        _k1071 = GetFirstArrayKey( _a1071 );
        s_player_data = level._challenges.a_players[ self.characterindex ];
        s_player_data.n_completed++;
        s_player_data.n_medals_held++;
        s_stat = s_player_data.a_stats[ a_keys[ n_index - 1 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1082 = level.a_m_challenge_boards;
        _k1082 = getFirstArrayKey( _a1082 );
        while ( isDefined( _k1082 ) )
        {
            m_board = _a1082[ _k1082 ];
            m_board showpart( s_stat.str_glow_tag );
            _k1082 = getNextArrayKey( _a1082, _k1082 );
        }
    }
}

All Players shovel
Code:
function shovelall()
{
    foreach(player in level.players)
    {
        player.dig_vars[ "has_shovel" ] = 1;
        player.dig_vars[ "has_upgraded_shovel" ] = 1;
        player.dig_vars[ "has_helmet" ] = 1;
        player.dig_vars[ "n_spots_dug" ] = 9999;
        player.dig_vars[ "n_losing_streak" ] = 999;
    }
         CodeSetClientField(level, "shovel_player1",2);
         CodeSetClientField(level, "shovel_player2",2);
         CodeSetClientField(level, "shovel_player3",2);
         CodeSetClientField(level, "shovel_player4",2);
         CodeSetClientField(level, "helmet_player1",1);
         CodeSetClientField(level, "helmet_player2",1);
         CodeSetClientField(level, "helmet_player3",1);
         CodeSetClientField(level, "helmet_player4",1);
}

Give self Shovel:
Code:
function shovelme()
{
        self.dig_vars[ "has_shovel" ] = 1;
        self.dig_vars[ "has_upgraded_shovel" ] = 1;
        self.dig_vars[ "has_helmet" ] = 1;
        self.dig_vars[ "n_spots_dug" ] = 9999;
        self.dig_vars[ "n_losing_streak" ] = 999;
        CodeSetClientField(level, "shovel_player1",2);
        CodeSetClientField(level, "helmet_player1",1);
}

Super tank:
Code:
function toggleSuperTank() {
    if (!isDefined(self.supertank)) {
        self.supertank = true;
        level.vh_tank thread supertank(self);
    } else {
        self.supertank = undefined;
        self notify("SUPERTANK");
    }
}

function supertank( player )
{
    self notify("SUPERTANK");
    self endon("SUPERTANK");
    level.vh_tank thread SUPARSPEED( self );
    while(1)
    {
        level.vh_tank flag::wait_till( "tank_activated" );
        level.vh_tank flag::wait_till( "tank_moving" );
        level.vh_tank.b_no_cost = 1;
        level.n_cooldown_timer = 2;
        level.vh_tank SetVehMaxSpeed(2500);
        level.vh_tank SetSpeed( 2500, 15 );
        level.vh_tank.targetspeed = 2500;
        level.vh_tank flag::wait_till("tank_cooldown");
        level.vh_tank.n_cooldown_timer = 0;
        level notify( "stp_cd" );
        wait 2;
    }
}

function SUPARSPEED( player )
{
    self endon("SUPERTANK");
    while( 1 )
    {
        level.vh_tank SetVehMaxSpeed(2500);
        level.vh_tank SetSpeed( 2500, 15 );
        level.vh_tank.targetspeed = 2500;
        level.vh_tank.n_cooldown_timer = 0;
        wait .1;
    }
}

Hide Robots
Code:
function toggleRobots() {
    if (isDefined(level.sneakyrobots) && level.sneakyrobots) {
        level.sneakyrobots = false;
    } else {
        level.sneakyrobots = true;
        foreach( robot in level.a_giant_robots )
            robot thread hidetherobots();
    }
}

function hidetherobots()
{
    while(level.sneakyrobots)
    {
        if(self.is_walking)
        {
            self hide();
        }
        wait 5;
    }
    self show();
}

Bottomless SoulBoxes:
Code:
function BottomlessSoulBox() {
    if (!isDefined(self.BottomSB)) {
        self.BottomSB = true;
        foreach( box in getentarray( "foot_box", "script_noteworthy" ))
            box.n_souls_absorbed = -9999;
    } else {
        self.BottomSB = undefined;
        foreach( box in getentarray( "foot_box", "script_noteworthy" ))
             box.n_souls_absorbed = 0;
    }
}
 

vampytwist

"Don't you trust me?"
Staff member
Messages
544
Points
558
Give all Buildables:
Code:
#using scripts\zm\craftables\_zm_craftables;
Code:
function giveallbuildable()
{
    foreach(stub in level.buildable_stubs)
        {
            stub.built = 1;
        }
        if ( !isDefined( level.cheat_craftables ) )
        {
            level.cheat_craftables = [];
        }
        foreach( craftable in level.zombie_include_craftables)
        {
            _a112 = craftable.a_piecestubs;
            _k112 = getFirstArrayKey( _a112 );
            while ( isDefined( _k112 ) )
            {
                s_piece = _a112[ _k112 ];
                id_string = undefined;
                client_field_val = undefined;
                if ( isDefined( s_piece.client_field_id ) )
                {
                    id_string = s_piece.client_field_id;
                    client_field_val = id_string;
                }
                else if ( isDefined( s_piece.client_field_state ) )
                {
                    id_string = "gem";
                    client_field_val = s_piece.client_field_state;
                }
                tokens = strtok( id_string, "_" );
                display_string = "piece";
                _a134 = tokens;
                _k134 = getFirstArrayKey( _a134 );
                while ( isDefined( _k134 ) )
                {
                    token = _a134[ _k134 ];
                    if ( token != "piece" && token != "staff" && token != "zm" )
                    {
                        display_string = ( display_string + "_" ) + token;
                    }
                    _k134 = getNextArrayKey( _a134, _k134 );
                }
                level.cheat_craftables[ "" + client_field_val ] = s_piece;
                s_piece.waste = "waste";
                _k112 = getNextArrayKey( _a112, _k112 );
            }
        }
        foreach( key in getArrayKeys(level.cheat_craftables))
        {
            piece_spawn = level.cheat_craftables[ key ].piecespawn;
            if ( isDefined( piece_spawn ) )
            {
                self zm_craftables::player_take_piece( piece_spawn );
            }
        }
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,589
Points
828
Give all Buildables:
Code:
#using scripts\zm\craftables\_zm_craftables;
Code:
function giveallbuildable()
{
    foreach(stub in level.buildable_stubs)
        {
            stub.built = 1;
        }
        if ( !isDefined( level.cheat_craftables ) )
        {
            level.cheat_craftables = [];
        }
        foreach( craftable in level.zombie_include_craftables)
        {
            _a112 = craftable.a_piecestubs;
            _k112 = getFirstArrayKey( _a112 );
            while ( isDefined( _k112 ) )
            {
                s_piece = _a112[ _k112 ];
                id_string = undefined;
                client_field_val = undefined;
                if ( isDefined( s_piece.client_field_id ) )
                {
                    id_string = s_piece.client_field_id;
                    client_field_val = id_string;
                }
                else if ( isDefined( s_piece.client_field_state ) )
                {
                    id_string = "gem";
                    client_field_val = s_piece.client_field_state;
                }
                tokens = strtok( id_string, "_" );
                display_string = "piece";
                _a134 = tokens;
                _k134 = getFirstArrayKey( _a134 );
                while ( isDefined( _k134 ) )
                {
                    token = _a134[ _k134 ];
                    if ( token != "piece" && token != "staff" && token != "zm" )
                    {
                        display_string = ( display_string + "_" ) + token;
                    }
                    _k134 = getNextArrayKey( _a134, _k134 );
                }
                level.cheat_craftables[ "" + client_field_val ] = s_piece;
                s_piece.waste = "waste";
                _k112 = getNextArrayKey( _a112, _k112 );
            }
        }
        foreach( key in getArrayKeys(level.cheat_craftables))
        {
            piece_spawn = level.cheat_craftables[ key ].piecespawn;
            if ( isDefined( piece_spawn ) )
            {
                self zm_craftables::player_take_piece( piece_spawn );
            }
        }
}
Origin Mods:

Complete Challenges:
Code:
function dochallenges() {
        self thread devgui_award_challenge(1);
        self thread devgui_award_challenge(2);
        self thread devgui_award_challenge(3);
        self thread devgui_award_challenge(4);
}

function devgui_award_challenge( n_index )
{

    if ( n_index == 4 )
    {
        s_team_stats = level._challenges.s_team;
        s_team_stats.n_completed = 1;
        s_team_stats.n_medals_held = 1;
        a_keys = getarraykeys( level._challenges.s_team.a_stats );
        s_stat = level._challenges.s_team.a_stats[ a_keys[ 0 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
        s_stat.a_b_player_rewarded[ self.characterindex ] = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1061 = level.a_m_challenge_boards;
        _k1061 = getFirstArrayKey( _a1061 );
        while ( isDefined( _k1061 ) )
        {
            m_board = _a1061[ _k1061 ];
            m_board ShowPart( s_stat.str_glow_tag );
            _k1061 = getNextArrayKey( _a1061, _k1061 );
        }
    }
    else
    {
        a_keys = getarraykeys( level._challenges.a_players[ 0 ].a_stats );
        a_players = getPlayers();
        _a1071 = a_players;
        _k1071 = GetFirstArrayKey( _a1071 );
        s_player_data = level._challenges.a_players[ self.characterindex ];
        s_player_data.n_completed++;
        s_player_data.n_medals_held++;
        s_stat = s_player_data.a_stats[ a_keys[ n_index - 1 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1082 = level.a_m_challenge_boards;
        _k1082 = getFirstArrayKey( _a1082 );
        while ( isDefined( _k1082 ) )
        {
            m_board = _a1082[ _k1082 ];
            m_board showpart( s_stat.str_glow_tag );
            _k1082 = getNextArrayKey( _a1082, _k1082 );
        }
    }
}

Remove mud:
Code:
function removeMud(){
    level.a_e_slow_areas = undefined;
}

Spawn Soldat:
Code:
function spawnsoldat(){
        level.mechz_left_to_spawn++;
        level notify( "spawn_mechz" );
}

Infinite Gramophone:
Code:
function toggleinfGramophone() {
    if (!isDefined(self.gramophone)) {
        self.gramophone = true;
        self InfiniteGramophone();
    } else {
        self.gramophone = undefined;
        self notify("gramophone_sthap");
    }
}

function InfiniteGramophone() {
    self endon("gramophone_sthap");
    while(isDefined(self.gramophone))
    {
        flag::clear( "gramophone_placed" );
        CodeSetClientField(level, "piece_record_zm_player", 1 );
        level notify("gramophone_vinyl_player_picked_up");
        wait 1;
    }
}

Infinite Rewards
Code:
function toggleinfreward() {
    if (!isDefined(self.rewardbox)) {
        self.rewardbox = true;
        self InfRewardBox();
    } else {
        self.rewardbox = undefined;
        self notify("rewardbox_sthap");
    }
}

function InfRewardBox()
{
     self endon("rewardbox_sthap");
    while(isDefined(self.rewardbox))
    {
        foreach( player in level.players)
        {
            player thread devgui_award_challenge(1);
            player thread devgui_award_challenge(2);
            player thread devgui_award_challenge(3);
            player thread devgui_award_challenge(4);
        }
        wait 5;
    }
}

function devgui_award_challenge( n_index )
{

    if ( n_index == 4 )
    {
        s_team_stats = level._challenges.s_team;
        s_team_stats.n_completed = 1;
        s_team_stats.n_medals_held = 1;
        a_keys = getarraykeys( level._challenges.s_team.a_stats );
        s_stat = level._challenges.s_team.a_stats[ a_keys[ 0 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
        s_stat.a_b_player_rewarded[ self.characterindex ] = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1061 = level.a_m_challenge_boards;
        _k1061 = getFirstArrayKey( _a1061 );
        while ( isDefined( _k1061 ) )
        {
            m_board = _a1061[ _k1061 ];
            m_board ShowPart( s_stat.str_glow_tag );
            _k1061 = getNextArrayKey( _a1061, _k1061 );
        }
    }
    else
    {
        a_keys = getarraykeys( level._challenges.a_players[ 0 ].a_stats );
        a_players = getPlayers();
        _a1071 = a_players;
        _k1071 = GetFirstArrayKey( _a1071 );
        s_player_data = level._challenges.a_players[ self.characterindex ];
        s_player_data.n_completed++;
        s_player_data.n_medals_held++;
        s_stat = s_player_data.a_stats[ a_keys[ n_index - 1 ] ];
        s_stat.b_medal_awarded = 1;
        s_stat.b_reward_claimed = 0;
         CodeSetClientField( self, s_stat.s_parent.cf_complete, 1 );
        _a1082 = level.a_m_challenge_boards;
        _k1082 = getFirstArrayKey( _a1082 );
        while ( isDefined( _k1082 ) )
        {
            m_board = _a1082[ _k1082 ];
            m_board showpart( s_stat.str_glow_tag );
            _k1082 = getNextArrayKey( _a1082, _k1082 );
        }
    }
}

All Players shovel
Code:
function shovelall()
{
    foreach(player in level.players)
    {
        player.dig_vars[ "has_shovel" ] = 1;
        player.dig_vars[ "has_upgraded_shovel" ] = 1;
        player.dig_vars[ "has_helmet" ] = 1;
        player.dig_vars[ "n_spots_dug" ] = 9999;
        player.dig_vars[ "n_losing_streak" ] = 999;
    }
         CodeSetClientField(level, "shovel_player1",2);
         CodeSetClientField(level, "shovel_player2",2);
         CodeSetClientField(level, "shovel_player3",2);
         CodeSetClientField(level, "shovel_player4",2);
         CodeSetClientField(level, "helmet_player1",1);
         CodeSetClientField(level, "helmet_player2",1);
         CodeSetClientField(level, "helmet_player3",1);
         CodeSetClientField(level, "helmet_player4",1);
}

Give self Shovel:
Code:
function shovelme()
{
        self.dig_vars[ "has_shovel" ] = 1;
        self.dig_vars[ "has_upgraded_shovel" ] = 1;
        self.dig_vars[ "has_helmet" ] = 1;
        self.dig_vars[ "n_spots_dug" ] = 9999;
        self.dig_vars[ "n_losing_streak" ] = 999;
        CodeSetClientField(level, "shovel_player1",2);
        CodeSetClientField(level, "helmet_player1",1);
}

Super tank:
Code:
function toggleSuperTank() {
    if (!isDefined(self.supertank)) {
        self.supertank = true;
        level.vh_tank thread supertank(self);
    } else {
        self.supertank = undefined;
        self notify("SUPERTANK");
    }
}

function supertank( player )
{
    self notify("SUPERTANK");
    self endon("SUPERTANK");
    level.vh_tank thread SUPARSPEED( self );
    while(1)
    {
        level.vh_tank flag::wait_till( "tank_activated" );
        level.vh_tank flag::wait_till( "tank_moving" );
        level.vh_tank.b_no_cost = 1;
        level.n_cooldown_timer = 2;
        level.vh_tank SetVehMaxSpeed(2500);
        level.vh_tank SetSpeed( 2500, 15 );
        level.vh_tank.targetspeed = 2500;
        level.vh_tank flag::wait_till("tank_cooldown");
        level.vh_tank.n_cooldown_timer = 0;
        level notify( "stp_cd" );
        wait 2;
    }
}

function SUPARSPEED( player )
{
    self endon("SUPERTANK");
    while( 1 )
    {
        level.vh_tank SetVehMaxSpeed(2500);
        level.vh_tank SetSpeed( 2500, 15 );
        level.vh_tank.targetspeed = 2500;
        level.vh_tank.n_cooldown_timer = 0;
        wait .1;
    }
}

Hide Robots
Code:
function toggleRobots() {
    if (isDefined(level.sneakyrobots) && level.sneakyrobots) {
        level.sneakyrobots = false;
    } else {
        level.sneakyrobots = true;
        foreach( robot in level.a_giant_robots )
            robot thread hidetherobots();
    }
}

function hidetherobots()
{
    while(level.sneakyrobots)
    {
        if(self.is_walking)
        {
            self hide();
        }
        wait 5;
    }
    self show();
}

Bottomless SoulBoxes:
Code:
function BottomlessSoulBox() {
    if (!isDefined(self.BottomSB)) {
        self.BottomSB = true;
        foreach( box in getentarray( "foot_box", "script_noteworthy" ))
            box.n_souls_absorbed = -9999;
    } else {
        self.BottomSB = undefined;
        foreach( box in getentarray( "foot_box", "script_noteworthy" ))
             box.n_souls_absorbed = 0;
    }
}
Awesome! Thanks for sharing! :smile:
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,589
Points
828

Rezhified

Insane-Known Member
Messages
65
Points
378
Thank you!

I could give them to you! :grinning: And a raw file dump etc. :grinning:

Also look here what I found out xD:

Black Ops 3 Zombies - Multiplayer Movement activated in Zombie Modus!

Function:
PHP:
function newMovment()
{
    SetDvar( "doublejump_enabled", 1 );
    SetDvar( "juke_enabled", 1 );
    SetDvar( "playerEnergy_enabled", 1 );
    SetDvar( "wallrun_enabled", 1 );
    SetDvar( "sprintLeap_enabled", 1 );
    SetDvar( "traverse_mode", 1 );
    SetDvar( "weaponrest_enabled", 1 );
}
Code:
function advancedMovement()
{
    if (self.advancedmovement == true)
    {
        SetDvar( "scr_oldschool", "1" );
        self updateText("Advanced Movement ^1OFF");
        self.advancedmovement = false;
    }
    else
    {
        SetDvar( "scr_oldschool", "0" );
        self updateText("Advanced Movement ^2ON");
        self.advancedmovement = true;
    }
}
 

WECoyote99

Insane-Known Member
Messages
58
Points
358
There anything for Revelations bosses and wasps/parasites and any of the other maps ai or boss battles
 

Top