Here is a script I wrote for the GCZ Script Placer that gives you a fully functional Mule Kick! Just like in BO and BO2 it won't give you any dumb extra weapons but just increase your inventory size to 3.
This tutorial assumes you already have bam's perks installed! If you don't: http://www.zombiemodding.com/index.php?topic=10345.0 This is for stock maps only! If you want your Mule Kick fixed with a UGX Mod map: http://ugx-mods.com/forum/index.php?topic=1146.0 Ok so first off, you're gonna need the following files:
_laststand.gsc _zombiemode_perks_black_ops.gsc _zombiemode_weapons.gsc If any of the above mentioned files is not in your "root/mods/mapname/maps" folder then copy it from "root/raw/maps".
Now onto the fun part, scripting. :)
The first file we are going to edit is _laststand.gsc, open it with any text editor and search for this:
PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration ) { if( sMeansOfDeath == "MOD_CRUSH" ) // if getting run over by a tank then kill the guy even if in laststand { if( self player_is_in_laststand() ) { self mission_failed_during_laststand( self ); } return; } if( self player_is_in_laststand() ) { return; } //CODER_MOD: TOMMYK 06/26/2008 - For coop scoreboards self.downs++; //stat tracking self.stats["downs"] = self.downs; dvarName = "player" + self GetEntityNumber() + "downs"; setdvar( dvarName, self.downs ); //PI CHANGE: player shouldn't be able to jump while in last stand mode (only was a problem in water) - specifically disallow this if (IsDefined(level.script) && level.script == "nazi_zombie_sumpf") self AllowJump(false); //END PI CHANGE if( IsDefined( level.playerlaststand_func ) ) { [[level.playerlaststand_func]](); } //CODER_MOD: Jay (6/18/2008): callback to challenge system maps\_challenges_coop::doMissionCallback( "playerDied", self ); if ( !laststand_allowed( sWeapon, sMeansOfDeath, sHitLoc ) ) { self mission_failed_during_laststand( self ); return; } // check for all players being in last stand if ( player_all_players_in_laststand() ) { self mission_failed_during_laststand( self ); return; } // vision set self VisionSetLastStand( "laststand", 1 ); self.health = 1; self thread maps\_arcademode::arcadeMode_player_laststand(); // revive trigger self revive_trigger_spawn(); // laststand weapons self laststand_take_player_weapons(); self laststand_give_pistol(); self thread laststand_give_grenade(); // AI self.ignoreme = true; // bleed out timer self thread laststand_bleedout( GetDvarFloat( "player_lastStandBleedoutTime" ) ); self notify( "player_downed" ); }
Replace the whole function with this:
PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration ) { primaryWeapons = self GetWeaponsListPrimaries(); if(primaryWeapons.size == 3) // he has three weapons { current_weapon = self getCurrentWeapon(); // get his current weapon player_load = self GetWeaponsListPrimaries(); if (current_weapon == primaryWeapons[2]) { self.take_weapon = player_load[1]; self takeweapon(self.take_weapon); } else { self.take_weapon = player_load[2]; self takeweapon(self.take_weapon); } } if( sMeansOfDeath == "MOD_CRUSH" ) // if getting run over by a tank then kill the guy even if in laststand { if( self player_is_in_laststand() ) { self mission_failed_during_laststand( self ); } return; } if( self player_is_in_laststand() ) { return; } //CODER_MOD: TOMMYK 06/26/2008 - For coop scoreboards self.downs++; //stat tracking self.stats["downs"] = self.downs; dvarName = "player" + self GetEntityNumber() + "downs"; setdvar( dvarName, self.downs ); //PI CHANGE: player shouldn't be able to jump while in last stand mode (only was a problem in water) - specifically disallow this if (IsDefined(level.script) && level.script == "nazi_zombie_sumpf") self AllowJump(false); //END PI CHANGE if( IsDefined( level.playerlaststand_func ) ) { [[level.playerlaststand_func]](); } //CODER_MOD: Jay (6/18/2008): callback to challenge system maps\_challenges_coop::doMissionCallback( "playerDied", self ); if ( !laststand_allowed( sWeapon, sMeansOfDeath, sHitLoc ) ) { self mission_failed_during_laststand( self ); return; } // check for all players being in last stand if ( player_all_players_in_laststand() ) { self mission_failed_during_laststand( self ); return; } // vision set self VisionSetLastStand( "laststand", 1 ); self.health = 1; self thread maps\_arcademode::arcadeMode_player_laststand(); // revive trigger self revive_trigger_spawn(); // laststand weapons self laststand_take_player_weapons(); self laststand_give_pistol(); self thread laststand_give_grenade(); // AI self.ignoreme = true; // bleed out timer self thread laststand_bleedout( GetDvarFloat( "player_lastStandBleedoutTime" ) ); self notify( "player_downed" ); }
That's it for _laststand.gsc, now open up _zombiemode_perks_black_ops.gsc. Add this to the bottom of the file:
bo_perks_thread() { players = getplayers(); for(i=0;i<players.size;i++) { players[i] thread staminup(); players[i] thread deadshot(); players[i] thread mulekick(); } } staminup() { while(1) { if(self hasperk("specialty_longersprint")) self setmovespeedscale(1.15); else self setmovespeedscale(1); wait .5; } } deadshot() { while(1) { if(self hasperk("specialty_bulletaccuracy")) self setClientDvar( "cg_laserForceOn", 1 ); else self setClientDvar( "cg_laserForceOn", 0 ); wait .1; } } mulekick() { while(1) { if(self hasperk("specialty_extraammo")) self.inventorySize = 3; else self.inventorySize = 2; wait .1; } }
In _zombiemode_weapons.gsc, look for this:
treasure_chest_give_weapon( weapon_string ) { primaryWeapons = self GetWeaponsListPrimaries(); current_weapon = undefined; if( self HasWeapon( weapon_string ) ) { self GiveMaxAmmo( weapon_string ); self SwitchToWeapon( weapon_string ); return; } // This should never be true for the first time. if( primaryWeapons.size >= 2 ) // he has two weapons { current_weapon = self getCurrentWeapon(); // get hiss current weapon if ( current_weapon == "mine_bouncing_betty" ) { current_weapon = undefined; } if( isdefined( current_weapon ) ) { if( !( weapon_string == "fraggrenade" || weapon_string == "stielhandgranate" || weapon_string == "molotov" || weapon_string == "zombie_cymbal_monkey" ) ) { // PI_CHANGE_BEGIN // JMA - player dropped the tesla gun if( isDefined(level.script) && (level.script == "nazi_zombie_sumpf" || level.script == "nazi_zombie_factory") ) { if( current_weapon == "tesla_gun" ) { level.player_drops_tesla_gun = true; } } // PI_CHANGE_END self TakeWeapon( current_weapon ); } } } if( IsDefined( primaryWeapons ) && !isDefined( current_weapon ) ) { for( i = 0; i < primaryWeapons.size; i++ ) { if( primaryWeapons[i] == "zombie_colt" ) { continue; } if( weapon_string != "fraggrenade" && weapon_string != "stielhandgranate" && weapon_string != "molotov" && weapon_string != "zombie_cymbal_monkey" ) { // PI_CHANGE_BEGIN // JMA - player dropped the tesla gun if( isDefined(level.script) && (level.script == "nazi_zombie_sumpf" || level.script == "nazi_zombie_factory") ) { if( primaryWeapons[i] == "tesla_gun" ) { level.player_drops_tesla_gun = true; } } // PI_CHANGE_END self TakeWeapon( primaryWeapons[i] ); } } } self play_sound_on_ent( "purchase" ); if( weapon_string == "molotov" || weapon_string == "molotov_zombie" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "zombie_cymbal_monkey" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "zombie_cymbal_monkey" ); } // PI_CHANGE_END } if( weapon_string == "zombie_cymbal_monkey" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "molotov" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov" ); } if( isDefined(level.zombie_weapons) && isDefined(level.zombie_weapons["molotov_zombie"]) ) { has_weapon = self HasWeapon( "molotov_zombie" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov_zombie" ); } } // PI_CHANGE_END self maps\_zombiemode_cymbal_monkey::player_give_cymbal_monkey(); play_weapon_vo(weapon_string); return; } self GiveWeapon( weapon_string, 0 ); self GiveMaxAmmo( weapon_string ); self SwitchToWeapon( weapon_string ); play_weapon_vo(weapon_string); // self playsound (level.zombie_weapons[weapon_string].sound); }
And replace the whole function with:
treasure_chest_give_weapon( weapon_string ) { primaryWeapons = self GetWeaponsListPrimaries(); current_weapon = undefined; if( self HasWeapon( weapon_string ) ) { self GiveMaxAmmo( weapon_string ); self SwitchToWeapon( weapon_string ); return; } // This should never be true for the first time. if( (self.inventorySize == 2) && (primaryWeapons.size == 2) ) // he has two weapons { current_weapon = self getCurrentWeapon(); // get his current weapon if ( current_weapon == "mine_bouncing_betty" ) { current_weapon = undefined; } if( isdefined( current_weapon ) ) { if( !( weapon_string == "fraggrenade" || weapon_string == "stielhandgranate" || weapon_string == "molotov" || weapon_string == "zombie_cymbal_monkey" ) ) { // PI_CHANGE_BEGIN // JMA - player dropped the tesla gun if( isDefined(level.script) && (level.script == "nazi_zombie_sumpf" || level.script == "nazi_zombie_factory") ) { if( current_weapon == "tesla_gun" ) { level.player_drops_tesla_gun = true; } } // PI_CHANGE_END self TakeWeapon( current_weapon ); } } } if( (self.inventorySize == 3) && (primaryWeapons.size == 3) ) // he has three weapons { current_weapon = self getCurrentWeapon(); // get his current weapon if ( current_weapon == "mine_bouncing_betty" ) { current_weapon = undefined; } if( isdefined( current_weapon ) ) { if( !( weapon_string == "fraggrenade" || weapon_string == "stielhandgranate" || weapon_string == "molotov" || weapon_string == "zombie_cymbal_monkey" ) ) { // PI_CHANGE_BEGIN // JMA - player dropped the tesla gun if( isDefined(level.script) && (level.script == "nazi_zombie_sumpf" || level.script == "nazi_zombie_factory") ) { if( current_weapon == "tesla_gun" ) { level.player_drops_tesla_gun = true; } } // PI_CHANGE_END self TakeWeapon( current_weapon ); } } } self play_sound_on_ent( "purchase" ); if( weapon_string == "molotov" || weapon_string == "molotov_zombie" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "zombie_cymbal_monkey" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "zombie_cymbal_monkey" ); } // PI_CHANGE_END } if( weapon_string == "zombie_cymbal_monkey" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "molotov" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov" ); } if( isDefined(level.zombie_weapons) && isDefined(level.zombie_weapons["molotov_zombie"]) ) { has_weapon = self HasWeapon( "molotov_zombie" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov_zombie" ); } } // PI_CHANGE_END self maps\_zombiemode_cymbal_monkey::player_give_cymbal_monkey(); play_weapon_vo(weapon_string); return; } self GiveWeapon( weapon_string, 0 ); self GiveMaxAmmo( weapon_string ); self SwitchToWeapon( weapon_string ); play_weapon_vo(weapon_string); // self playsound (level.zombie_weapons[weapon_string].sound); }
In that same file, look for:
weapon_give( weapon, is_upgrade ) { primaryWeapons = self GetWeaponsListPrimaries(); current_weapon = undefined; //if is not an upgraded perk purchase if( !IsDefined( is_upgrade ) ) { is_upgrade = false; } // This should never be true for the first time. if( primaryWeapons.size >= 2 ) // he has two weapons { current_weapon = self getCurrentWeapon(); // get his current weapon if ( current_weapon == "mine_bouncing_betty" ) { current_weapon = undefined; } if( isdefined( current_weapon ) ) { if( !( weapon == "fraggrenade" || weapon == "stielhandgranate" || weapon == "molotov" || weapon == "zombie_cymbal_monkey" ) ) { self TakeWeapon( current_weapon ); } } } if( weapon == "zombie_cymbal_monkey" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "molotov" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov" ); } if( isDefined(level.zombie_weapons) && isDefined(level.zombie_weapons["molotov_zombie"]) ) { has_weapon = self HasWeapon( "molotov_zombie" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov_zombie" ); } } // PI_CHANGE_END self maps\_zombiemode_cymbal_monkey::player_give_cymbal_monkey(); play_weapon_vo( weapon ); return; } if( (weapon == "molotov" || weapon == "molotov_zombie") ) { self TakeWeapon( "zombie_cymbal_monkey" ); } self play_sound_on_ent( "purchase" ); self GiveWeapon( weapon, 0 ); self GiveMaxAmmo( weapon ); self SwitchToWeapon( weapon ); play_weapon_vo(weapon); }
And replace it with:
weapon_give( weapon, is_upgrade ) { primaryWeapons = self GetWeaponsListPrimaries(); current_weapon = undefined; //if is not an upgraded perk purchase if( !IsDefined( is_upgrade ) ) { is_upgrade = false; } // This should never be true for the first time. if( (self.inventorySize == 2) && (primaryWeapons.size == 2) ) // he has two weapons { current_weapon = self getCurrentWeapon(); // get his current weapon if ( current_weapon == "mine_bouncing_betty" ) { current_weapon = undefined; } if( isdefined( current_weapon ) ) { if( !( weapon == "fraggrenade" || weapon == "stielhandgranate" || weapon == "molotov" || weapon == "zombie_cymbal_monkey" ) ) { self TakeWeapon( current_weapon ); } } } if( (self.inventorySize == 3) && (primaryWeapons.size == 3) ) // he has three weapons { current_weapon = self getCurrentWeapon(); // get his current weapon if ( current_weapon == "mine_bouncing_betty" ) { current_weapon = undefined; } if( isdefined( current_weapon ) ) { if( !( weapon == "fraggrenade" || weapon == "stielhandgranate" || weapon == "molotov" || weapon == "zombie_cymbal_monkey" ) ) { self TakeWeapon( current_weapon ); } } } if( weapon == "zombie_cymbal_monkey" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "molotov" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov" ); } if( isDefined(level.zombie_weapons) && isDefined(level.zombie_weapons["molotov_zombie"]) ) { has_weapon = self HasWeapon( "molotov_zombie" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov_zombie" ); } } // PI_CHANGE_END self maps\_zombiemode_cymbal_monkey::player_give_cymbal_monkey(); play_weapon_vo( weapon ); return; } if( (weapon == "molotov" || weapon == "molotov_zombie") ) { self TakeWeapon( "zombie_cymbal_monkey" ); } self play_sound_on_ent( "purchase" ); self GiveWeapon( weapon, 0 ); self GiveMaxAmmo( weapon ); self SwitchToWeapon( weapon ); play_weapon_vo(weapon); }
Now for the last step, remove anything related to bam's perks from your mapname.gsc and add this line:
maps\_zombiemode_perks_black_ops::bo_perks_thread();
UNDER:
maps\_zombiemode::main();
So it looks like:
maps\_zombiemode::main(); maps\_zombiemode_perks_black_ops::bo_perks_thread();
That's it, have fun playing around with the working Mule Kick! :)