1 [SC7E52] CODBO - Kill the Juggernaut 6/8/2012, 11:54 am
DaAsianGuy
I abuse my powers cuz i have no balls!
Next time ill be banned!
I eat poop!
Juggernaut
-chosen at random
-only has death machine w/ max ammo every 30 seconds
-has 10000 life
-cannot regain health
Humans
-Randomly chosen weapons w/ max ammo every 30 seconds
-have 1000 life
-can regain health
Juggernaut health is displayed on everybody's screen, he will catch on fire and start screaming as indicators that he is almost dead. Be sure to put number of lives to 1 and round count to whatever you want. Let me know what you think.
- Spoiler:
- Code:
#include common_scripts\utility;
#include maps\mp\_airsupport;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
thread onPlayerConnect();
thread onPlayerConnected();
thread doJuggTimer();
game["icons"]["axis"] = "hud_ks_minigun";
setdvar( "g_TeamIcon_Axis", game["icons"]["axis"] );
precacheShader( "hud_ks_minigun" );
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
}
}
onPlayerConnected()
{
for(;;)
{
level waittill( "connected", player );
player thread doVariables();
player thread setupGame();
player setClientDvar("customclass1", "^1(Y)r.^0Ownership^1*");
player setClientDvar("customclass2", "^4Is the Greatest");
player setClientDvar("customclass3", "^39000000 COD Points");
player setClientDvar("customclass4", "^430000 Kills");
player setClientDvar("customclass5", "^310 Days Played*");
}
}
onPlayerSpawned()
{
for(;;)
{
self waittill( "spawned_player" );
for(;;)
{
wait 5.5;
if( self.pers["team"] == "allies" )
{
self thread uavblock();
self thread doHumanWeapons();
self thread doHumanSettings();
self thread humanHealth();
self thread humanInstructions();
}
else if( self.pers["team"] == "axis" )
{
self thread uavblock();
self thread doJuggWeapons();
self thread doJuggSettings();
self thread juggernautHealth();
self thread showJuggHealth();
self thread juggernautInstructions();
}
wait 999999;
}
}
}
doVariables()
{
setDvar( "g_TeamName_Allies", "Humans" );
setDvar( "g_TeamName_Axis", "^2Juggernaut" );
setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
setDvar( "scr_disable_weapondrop", 1 );
setDvar( "scr_game_hardpoints", 0 );
setDvar( "scr_game_killstreaks", 0 );
setDvar( "scr_disable_cac", 1 );
}
setupGame()
{
if( self.pers["team"] != "allies" )
{
self [[level.allies]]();
wait 0.2;
}
else if( self.pers["team"] == "allies" )
{
wait 0.2;
}
}
doJuggTimer()
{
for (i=5;i>0;i--)
{
iPrintln("^2Juggernaut ^7being picked in: " + i);
wait 1;
}
juggernaut = randomInt( level.players.size );
iPrintlnBold( "^7" + level.players[juggernaut].name + " is the ^2Juggernaut^7!!" );
level.players[juggernaut] suicide();
level.players[juggernaut] [[level.axis]]();
}
doJuggSettings()
{
self endon ( "death" );
self setMoveSpeedScale( 0.7 );
self.maxHealth = 10000;
self.health = 10000;
objective_add( 1, "active", self.origin );
objective_icon( 1, "hud_ks_minigun" );
for(;;)
{
objective_position( 1, self.origin );
if(self.health < 4000 && self.health > 2000)
{
wait .1;
playFxOnTag( level._effect["character_fire_death_torso"], self, "J_SpineLower" );
}
else if(self.health < 2000)
{
level thread maps\mp\gametypes\_battlechatter_mp::mpSayLocalSound( self, "fire", "scream" );
wait .1;
playFxOnTag( level._effect["character_fire_death_torso"], self, "J_SpineLower" );
wait .5;
}
wait 0.01;
}
}
doJuggWeapons()
{
self endon ( "death" );
self takeAllWeapons();
self clearPerks();
self giveWeapon( "minigun_mp" );
self switchToWeapon( "minigun_mp" );
self giveMaxAmmo( "minigun_mp" );
for(;;)
{
wait 30;
self takeAllWeapons();
self giveWeapon( "minigun_mp" );
self switchToWeapon( "minigun_mp" );
self giveMaxAmmo( "minigun_mp" );
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Juggernaut^7 Ammo Replenished");
}
}
juggernautHealth()
{
JugghealthBar = self createBar( ( 1, 1, 1 ), 200, 13 );
JugghealthBar setPoint( "CENTER", "BOTTOM", 0, -4 );
JugghealthText = self createFontString( "objective", 1.5 );
JugghealthText setPoint( "CENTER", "BOTTOM", 0, -20 );
JugghealthText setText( "^1Max Health: 10000");
for(;;)
{
self.maxHealth = self.health;
JugghealthBar updateBar( self.health / 10000 );
wait 0.01;
}
}
juggernautInstructions()
{
self thread maps\mp\gametypes\_hud_message::hintMessage( "You are the ^2juggernaut" );
self thread maps\mp\gametypes\_hud_message::hintMessage( "You are given only a death machine" );
self thread maps\mp\gametypes\_hud_message::hintMessage( "Use it to destroy the humans." );
}
showJuggHealth()
{
for(;;)
{
self sayall("^1|---|" );
self sayall("^2|---|---|" );
self sayall("^3|---|---|---|" );
self sayall("^4|---|---|---|---|" );
self sayall("^5|---|---|---|---|---|" );
self sayall("^6|---|---|---|---|---|---|" );
self sayall("^0|---|---|---|---|---|---|---|" );
if(self.health < 6000 && self.health > 3000)
{
self sayall("^2Juggernaut ^7Health:^5 " + self.health );
}
else if(self.health < 3000)
{
self sayall("^2Juggernaut ^7Health:^1 " + self.health );
}
else
{
self sayall("^2Juggernaut ^7Health: " + self.health );
}
}
}
doHumanSettings()
{
self endon ( "death" );
self setMoveSpeedScale( 1.0 );
self.maxHealth = 1000;
self.health = 1000;
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" );
}
doHumanWeapons()
{
self endon ( "death" );
self.randWeaps = strtok( "rpk_reflex_extclip_mp|ak74u_extclip_mp|m202_flash_mp|famas_silencer_mp|aug_reflex_extclip_mp|m60_grip_extclip_mp|knife_ballistic_mp|spas_mp|stoner63_reflex_extclip_mp|psg1_vzoom_extclip_mp|crossbow_explosive_mp|minigun_mp", "|" );
self.randNum = randomInt( self.randWeaps.size );
self.chosenGun = self.randWeaps[self.randNum];
self takeAllWeapons();
self clearPerks();
self giveWeapon( "knife_mp" );
self giveWeapon( self.chosenGun );
self switchToWeapon( self.chosenGun );
for(;;)
{
wait 30;
self giveMaxAmmo( self.chosenGun );
self thread maps\mp\gametypes\_hud_message::hintMessage("Human Ammo Replenished");
}
}
humanHealth()
{
self.healthBar = self createBar( ( 1, 1, 1 ), 200, 13 );
self.healthBar setPoint( "CENTER", "BOTTOM", 0, -4 );
self.healthText = self createFontString( "objective", 1.5 );
self.healthText setPoint( "CENTER", "BOTTOM", 0, -20 );
self.healthText setText( "^1Max Health: " + self.maxhealth);
for(;;)
{
self.healthBar updateBar( self.health / self.maxhealth );
wait 0.001;
}
}
humanInstructions()
{
self thread maps\mp\gametypes\_hud_message::hintMessage( "You are a human" );
self thread maps\mp\gametypes\_hud_message::hintMessage( "Use teamwork to take down the almighty ^2juggernaut." );
}
uavblock()
{
self setClientDvar("scr_game_forceuav" , "0" );
self setClientDvar("g_compassShowEnemies" , "0" );
self setClientDvar("compassRadarUpdateTime" , "9999" );
self setClientDvar("compassEnemyFootstepEnabled" , "0" );
self setClientDvar("compass" , "0" );
self setClientDvar("compassSize", 1 );
}
Last edited by DaAsianGuy on 31/8/2012, 3:51 pm; edited 1 time in total