summaryrefslogtreecommitdiff
path: root/mods
diff options
context:
space:
mode:
Diffstat (limited to 'mods')
-rw-r--r--mods/auxiliary.gsc213
-rw-r--r--mods/main.gsc188
-rw-r--r--mods/mods.gsc300
3 files changed, 0 insertions, 701 deletions
diff --git a/mods/auxiliary.gsc b/mods/auxiliary.gsc
deleted file mode 100644
index 7b9da43..0000000
--- a/mods/auxiliary.gsc
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Draws the counter in desired position
- */
-drawCounter(counterVar, x, y, font, size)
-{
- counterVar = createfontstring( font, size );
- counterVar setpoint( "CENTER", "CENTER", x, y);
- counterVar.alpha = 1;
- counterVar.hidewheninmenu = 1;
- counterVar.hidewhendead = 1;
- return counterVar;
-}
-
-/*
- * Checks if the player has entered afterlife
- */
-checkAfterlife(p)
-{
- if(isDefined(p.afterlife) && p.afterlife)
- {
- return 0.2;
- }
- return 1;
-}
-
-/*
- * Function that gives the player all the perks if they are available in the current map
- */
-giveAllPerks(p, l, animation)
-{
- if (isDefined(l.zombiemode_using_juggernaut_perk) && l.zombiemode_using_juggernaut_perk)
- p doGivePerk("specialty_armorvest", animation);
- if (isDefined(l._custom_perks) && isDefined(l._custom_perks["specialty_nomotionsensor"]))
- p doGivePerk("specialty_nomotionsensor", animation);
- if (isDefined(l.zombiemode_using_doubletap_perk) && l.zombiemode_using_doubletap_perk)
- p doGivePerk("specialty_rof", animation);
- if (isDefined(l.zombiemode_using_marathon_perk) && l.zombiemode_using_marathon_perk)
- p doGivePerk("specialty_longersprint", animation);
- if (isDefined(l.zombiemode_using_sleightofhand_perk) && l.zombiemode_using_sleightofhand_perk)
- p doGivePerk("specialty_fastreload", animation);
- if(isDefined(l.zombiemode_using_additionalprimaryweapon_perk) && l.zombiemode_using_additionalprimaryweapon_perk)
- p doGivePerk("specialty_additionalprimaryweapon", animation);
- if (isDefined(l.zombiemode_using_revive_perk) && l.zombiemode_using_revive_perk)
- p doGivePerk("specialty_quickrevive", animation);
- if (isDefined(l.zombiemode_using_chugabud_perk) && l.zombiemode_using_chugabud_perk)
- p doGivePerk("specialty_finalstand", animation);
- if (isDefined(l._custom_perks) && isDefined(l._custom_perks["specialty_grenadepulldeath"]))
- p doGivePerk("specialty_grenadepulldeath", animation);
- if (isDefined(l._custom_perks) && isDefined(l._custom_perks["specialty_flakjacket"]) && (l.script != "zm_buried"))
- p doGivePerk("specialty_flakjacket", animation);
- if (isDefined(l.zombiemode_using_deadshot_perk) && l.zombiemode_using_deadshot_perk)
- p doGivePerk("specialty_deadshot", animation);
- if (isDefined(l.zombiemode_using_tombstone_perk) && l.zombiemode_using_tombstone_perk)
- p doGivePerk("specialty_scavenger", animation);
-}
-
-/*
- * Displays animation while giving perk
- */
-doGivePerk(perk, animation)
-{
- if ( animation )
- {
- self endon("perk_abort_drinking");
- if (!(self hasperk(perk) || (self maps/mp/zombies/_zm_perks::has_perk_paused(perk))))
- {
- gun = self maps/mp/zombies/_zm_perks::perk_give_bottle_begin(perk);
- evt = self waittill_any_return("fake_death", "death", "player_downed", "weapon_change_complete");
- if (evt == "weapon_change_complete")
- self thread maps/mp/zombies/_zm_perks::wait_give_perk(perk, 1);
- self maps/mp/zombies/_zm_perks::perk_give_bottle_end(gun, perk);
- if (self maps/mp/zombies/_zm_laststand::player_is_in_laststand() || isDefined(self.intermission) && self.intermission)
- return;
- self notify("burp");
- }
- }
- else
- {
- if (!(self hasperk(perk) || (self maps/mp/zombies/_zm_perks::has_perk_paused(perk))))
- {
- self give_perk(perk);
- }
- }
-}
-
-/*
- * Displays crosshair for third person
- */
-useCrosshairs(p)
-{
- p.dot = drawCounter(p.dot, 0, 0, "default", 1.7);
- p.dot.label = &"+";
-}
-
-/*
- * Gives the player a custom weapon
- */
-giveCustomWeapon(p, weapon)
-{
- if ( isDefined(weapon) )
- {
- p giveWeapon(weapon);
- p givemaxammo(weapon);
- }
-}
-
-
-/*
- * Receive a pack a punched weapon
- */
-givePaPWeapon(p, baseWeapon)
-{
- if ( isDefined(baseWeapon) )
- {
- weapon = get_upgrade_weapon(baseWeapon, 0 );
- if ( isDefined(weapon) )
- {
- p giveweapon(weapon, 0, p get_pack_a_punch_weapon_options(weapon));
- p givemaxammo(weapon);
- }
- }
-}
-
-/*
- * Checks if its the initial round
- */
-initialRound(l)
-{
- return (l.round_number == l.start_round);
-}
-
-/*
- * Wait for the player to be revived in the initial round if is playing MotD
- */
-waitMotd(p, l)
-{
- if(isDefined(p.afterlife) && initialRound(l))
- {
- p waittill("player_revived");
- }
-
- wait 1;
-}
-
-/*
- * Fixing some scenary lighting
- */
-visualFix(l)
-{
- if( l.script == "zm_buried" )
- {
- while( 1 )
- {
- self setclientdvar( "r_lightTweakSunLight", 1 );
- self setclientdvar( "r_sky_intensity_factor0", 0 );
- wait 0.05;
- }
- }
- else if( l.script == "zm_prison" || l.script == "zm_tomb" )
- {
- while( getDvar( "r_lightTweakSunLight" ) != 0 )
- {
- for( i = getDvar( "r_lightTweakSunLight" ); i >= 0; i = ( i - 0.05 ) )
- {
- self setclientdvar( "r_lightTweakSunLight", i );
- wait 0.05;
- }
- wait 0.05;
- }
- }
- else return;
-}
-
-/*
- * Tweaks some lighting setting and enables nightmode
- */
-enableNightMode(l)
-{
- if( !isDefined( l.default_r_exposureValue ) )
- l.default_r_exposureValue = getDvar( "r_exposureValue" );
- if( !isDefined( l.default_r_lightTweakSunLight ) )
- l.default_r_lightTweakSunLight = getDvar( "r_lightTweakSunLight" );
- if( !isDefined( l.default_r_sky_intensity_factor0 ) )
- l.default_r_sky_intensity_factor0 = getDvar( "r_sky_intensity_factor0" );
-
- self setclientdvar( "r_filmUseTweaks", 1 );
- self setclientdvar( "r_bloomTweaks", 1 );
- self setclientdvar( "r_exposureTweak", 1 );
- self setclientdvar( "vc_rgbh", "0.1 0 0.3 0" );
- self setclientdvar( "vc_yl", "0 0 0.25 0" );
- self setclientdvar( "vc_yh", "0.02 0 0.1 0" );
- self setclientdvar( "vc_rgbl", "0.02 0 0.1 0" );
- self setclientdvar( "r_exposureValue", 3.9 );
- self setclientdvar( "r_lightTweakSunLight", 1 );
- self setclientdvar( "r_sky_intensity_factor0", 0 );
-
- if( l.script == "zm_buried" )
- {
- self setclientdvar( "r_exposureValue", 3.5 );
- }
- else if( l.script == "zm_tomb" )
- {
- self setclientdvar( "r_exposureValue", 4 );
- }
- else if( l.script == "zm_nuked" )
- {
- self setclientdvar( "r_exposureValue", 5.6 );
- }
- else if( l.script == "zm_highrise" )
- {
- self setclientdvar( "r_exposureValue", 3.9 );
- }
-}
diff --git a/mods/main.gsc b/mods/main.gsc
deleted file mode 100644
index 1d4f300..0000000
--- a/mods/main.gsc
+++ /dev/null
@@ -1,188 +0,0 @@
-#include common_scripts/utility;
-#include maps/mp/gametypes_zm/_hud_util;
-#include maps/mp/zombies/_zm;
-#include maps/mp/zombies/_zm_utility;
-#include maps/mp/zombies/_zm_perks;
-#include maps/mp/zombies/_zm_afterlife;
-#include maps/mp/zombies/_zm_weapons;
-
-// Loads the mods once the player connects to the server
-onConnectMods(p, l)
-{
- /*
- * General Mods
- */
-
- /*
- * Player is invincible
- */
- // godMode(p);
-
- /*
- * Infinte ammo
- */
- // thread unlimitedAmmo(p);
-
- /*
- * Player initial points
- *
- * Customizable parameters:
- * points - Number of points the player will start the game (ex: 500)
- */
- // setPlayerPoints(p, 500);
-
- /*
- * Custom Mystery Box price
- *
- * Customizable parameters:
- * price - Ammount of points required to hit the box (ex: 950)
- */
- // setBoxPrice(l, 950);
-
- /*
- * Custom alive zombies limit
- *
- * Customizable parameters:
- * limit - Ammount of zombies alive at the same time (ex: 24)
- */
- // setZombieLimit(l, 24)
-
- /*
- * Custom buyable perk limit
- *
- * Customizable parameters:
- * numberOfPerks - Ammount of perks the player is allowed to purchase (ex: 9)
- */
- // setPerkLimit(l, 9);
-
- /*
- * Gives all the map available perks to the player
- */
- // thread perkaholic(p, l);
-
- /*
- * Enables night mode in all maps
- *
- * Visual Bug:
- * In MotD, while in afterlife, sparks are invisible when shot
- */
- // thread nightmode(p, l);
-
- /*
- * MotD Mods
- */
-
- /*
- * Custom number of afterlifes
- *
- * Customizable parameters:
- * lifes - Ammount of lifes available in afterlife (ex: 9)
- *
- * Visual Bug:
- * If lifes parameter above 3, the in-game after-life counter wont't show the number.
- */
- // catHas9Lifes(p, 9);
-
- /*
- * Allows infinte afterlife timer
- */
- // infinteAfterlifeTimer(p);
-
-}
-
-// Loads the mods once the player spawns inside the game
-onSpawnMods(p, l)
-{
- ////////////////////////////////////////////////////////////////////////
- // Waits for the black preload screen to pass so it can load the mods //
- // DO NOT TOUCH THIS LINE BELOW!! //
- flag_wait( "initial_blackscreen_passed" ); //
- ////////////////////////////////////////////////////////////////////////
-
- /*
- * Gives the player a custom primary weapon
- *
- * Customizable parameters:
- * weapon - Weapon name string available in the README.md file (ex: galil_zm (Galil))
- * upgraded - Toggle for pack-a-punched given weapon (ex: true)
- */
- // thread setPrimaryWeapon(p, l, "galil_zm", true);
-
- /*
- * Gives the player a custom secondary weapon
- *
- * Customizable parameters:
- * weapon - Weapon name string available in the README.md file (ex: ray_gun_zm (Ray Gun))
- * upgraded - Toggle for pack-a-punched given weapon (ex: false)
- */
- // thread setSecondaryWeapon(p, l, "ray_gun_zm", false);
-
- /*
- * Gives joining players a secondary submachine gun, a couple of points and some perks
- */
- // thread joinedBonus(p, l);
-
- /*
- * Sets the player camera to the third person
- *
- * Customizable parameters:
- * crosshair - Toggle crosshair for third person camera (ex: true)
- */
- // playThirdPerson(p, true);
-
- /*
- * Adds a zombie counter to the bottom of the screen
- *
- * Customizable parameters:
- * x - X coordinates distance (ex: 0)
- * y - Y coordinates distance (ex: 190)
- */
- // thread zombieCounter(p, l, 0, 190);
-
- /*
- * Adds a health counter to the bottom of the screen
- *
- * Customizable parameters:
- * x - X coordinates distance (ex: 0)
- * y - Y coordinates distance (ex: 190)
- */
- // thread healthCounter(p, 0, 190);
-
- /*
- * Adds a zombie and a health counter to the bottom of the screen
- *
- * Customizable parameters:
- * x - X coordinates distance (ex: 100 & -100)
- * y - Y coordinates distance (ex: 190)
- */
- // thread healthCounter(p, -100, 190);
- // thread zombieCounter(p, l, 100, 190);
-}
-
-init()
-{
- level thread onPlayerConnect();
-}
-
-onPlayerConnect()
-{
- while(1)
- {
- level waittill("connected", player);
- thread onConnectMods(player, level);
- player thread onPlayerSpawned();
- }
-}
-
-onPlayerSpawned()
-{
- self endon("disconnect");
- while(1)
- {
- self waittill("spawned_player");
- onSpawnMods(self, level);
- }
-}
-
-
-
diff --git a/mods/mods.gsc b/mods/mods.gsc
deleted file mode 100644
index 300b3b2..0000000
--- a/mods/mods.gsc
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Sets the new buyable perks limit
- */
-setPerkLimit(l, numberOfPerks)
-{
- l.perk_purchase_limit = numberOfPerks;
-}
-
-/*
- * Displays a zombie counter
- */
-zombieCounter(p, l, x, y)
-{
- p.zombiecounter = drawCounter(p.zombiecounter, x, y, "Objective", 1.7);
-
- while(1)
- {
- p.zombiecounter.alpha = checkAfterlife(p);
-
- zombies = l.zombie_total + get_current_zombie_count();
- if ( zombies > 0 )
- {
- p.zombiecounter.label = &"Zombies: ^1";
- }
- else
- {
- p.zombiecounter.label = &"Zombies: ^6";
- }
-
- p.zombiecounter setvalue(zombies);
- wait 0.05;
- }
-}
-
-/*
- * Displays a health counter
- */
-healthCounter(p, x, y)
-{
- p.healthcounter = drawCounter(p.healthcounter, x, y, "Objective", 1.7);
-
- while(1)
- {
- p.healthcounter.alpha = checkAfterlife(p);
-
- health = p.health;
- if( health <= 15 )
- {
- p.healthcounter.label = &"Health: ^1";
- }
- else if ( health <= 50 )
- {
- p.healthcounter.label = &"Health: ^3";
- }
- else
- {
- p.healthcounter.label = &"Health: ^2";
- }
-
- p.healthcounter setValue(health);
- wait 0.05;
- }
-}
-
-/*
- * Gives all the perks available to the player
- */
-perkaholic(p, l)
-{
- flag_wait( "initial_blackscreen_passed" );
- waitMotd(p, l);
-
- if (l.round_number == 1)
- {
- if (isDefined(p.customPrimary) && p.customPrimary)
- {
- p waittill("customPrimary");
- }
-
- giveAllPerks(p, l, true);
- }
- else
- {
- giveAllPerks(p, l, false);
- }
-}
-
-/*
- * Sets a custom box price
- */
-setBoxPrice(l, price)
-{
- for (i = 0; i < l.chests.size; i++)
- {
- level.chests[ i ].zombie_cost = price;
- level.chests[ i ].old_cost = price;
- }
-}
-
-/*
- * Sets the player initial points
- */
-setPlayerPoints(p, points)
-{
- p.score = points;
-}
-
-/*
- * Sets the afterlife counter
- */
-catHas9Lifes(p, lifes)
-{
- if(isDefined(p.afterlife))
- {
- p.lives = lifes;
- }
-}
-
-/*
- * Play in third person
- */
-playThirdPerson(p, crosshair)
-{
- p setClientThirdPerson(1);
-
- if (crosshair)
- {
- thread useCrosshairs(p);
- }
-}
-
-/*
- * Toggle god mode on
- */
-godMode(p)
-{
- p enableInvulnerability();
-}
-
-/*
- * Toggle unlimited ammo on
- */
-unlimitedAmmo(p)
-{
- for(;;)
- {
- wait 0.05;
-
- currentWeapon = p getcurrentweapon();
- if ( currentWeapon != "none" )
- {
- p setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
- p givemaxammo( currentWeapon );
- }
-
- currentoffhand = p getcurrentoffhand();
- if ( currentoffhand != "none" )
- p givemaxammo( currentoffhand );
- }
-}
-
-/*
- * Gives later joined players, some bonuses
- */
-joinedBonus(p, l)
-{
- if ((l.round_number - l.start_round) >= 5 && (l.round_number - l.start_round) < 15)
- {
- if (isDefined(l.zombiemode_using_juggernaut_perk) && l.zombiemode_using_juggernaut_perk)
- {
- p doGivePerk("specialty_armorvest", false);
- }
-
- p.score += 2500;
- if (!isDefined(p.customSecondary))
- {
- if (l.script == "zm_tomb")
- {
- setSecondaryWeapon(p, l, "mp40_zm", false);
- }
- else
- {
- setSecondaryWeapon(p, l, "mp5k_zm", false);
- }
- }
-
- }
- else if ((l.round_number - l.start_round) >= 15)
- {
- if (isDefined(l.zombiemode_using_juggernaut_perk) && l.zombiemode_using_juggernaut_perk)
- {
- p doGivePerk("specialty_armorvest", false);
- }
-
-
- if (isDefined(l.zombiemode_using_doubletap_perk) && l.zombiemode_using_doubletap_perk)
- {
- p doGivePerk("specialty_rof", false);
- }
-
- p.score += 7500;
- if (!isDefined(p.customSecondary))
- {
- if (l.script == "zm_tomb")
- {
- setSecondaryWeapon(p, l, "mp40_zm", true);
- }
- else
- {
- setSecondaryWeapon(p, l, "mp5k_zm", true);
- }
- }
- }
-}
-
-/*
- * Allows Infinite Afterlife Timer
- */
-infinteAfterlifeTimer(p)
-{
- p.infinite_mana = 1;
-}
-
-/*
- * Sets player primary weapon
- */
-setPrimaryWeapon(p, l, weapon, upgraded)
-{
- p.customPrimary = true;
-
- waitMotd(p, l);
- currentWeapon = p getcurrentweapon();
-
- if ( currentWeapon != "none" )
- {
- p takeweapon(currentWeapon);
- }
-
- if ( upgraded )
- {
- givePaPWeapon(p, weapon);
- }
- else
- {
- giveCustomWeapon(p, weapon);
- }
-
- p waittill("weapon_change_complete");
- p notify("customPrimary");
-}
-
-/*
- * Sets player primary weapon
- */
-setSecondaryWeapon(p, l, weapon, upgraded)
-{
- p.customSecondary = true;
-
- waitMotd(p, l);
- offHandWeapon = p getcurrentoffhand();
-
- if ( offHandWeapon != "none" )
- {
- p takeweapon(offHandWeapon);
- }
-
- if ( upgraded )
- {
- givePaPWeapon(p, weapon);
- }
- else
- {
- giveCustomWeapon(p, weapon);
- }
-}
-
-/*
- * Enables night mode maps
- */
-nightmode(p, l)
-{
- p setclientdvar( "r_dof_enable", 0 );
- p setclientdvar( "r_lodBiasRigid", -1000 );
- p setclientdvar( "r_lodBiasSkinned", -1000 );
- p setclientdvar( "r_enablePlayerShadow", 1 );
- p setclientdvar( "r_skyTransition", 1 );
- p setclientdvar( "sm_sunquality", 2 );
- p setclientdvar( "vc_fbm", "0 0 0 0" );
- p setclientdvar( "vc_fsm", "1 1 1 1" );
- p thread visualFix(l);
- p thread enableNightMode(l);
-}
-
-/*
- * Sets the max zombies to a custom value
- */
-setZombieLimit(l, limit)
-{
- l.zombie_ai_limit = limit;
-}