diff options
Diffstat (limited to 'modLoader')
-rw-r--r-- | modLoader/auxiliary.gsc | 75 | ||||
-rw-r--r-- | modLoader/main.gsc | 22 | ||||
-rw-r--r-- | modLoader/mods.gsc | 41 |
3 files changed, 136 insertions, 2 deletions
diff --git a/modLoader/auxiliary.gsc b/modLoader/auxiliary.gsc index cbe0f81..7b9da43 100644 --- a/modLoader/auxiliary.gsc +++ b/modLoader/auxiliary.gsc @@ -76,7 +76,10 @@ doGivePerk(perk, animation) }
else
{
- self give_perk(perk);
+ if (!(self hasperk(perk) || (self maps/mp/zombies/_zm_perks::has_perk_paused(perk))))
+ {
+ self give_perk(perk);
+ }
}
}
@@ -138,3 +141,73 @@ waitMotd(p, l) 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/modLoader/main.gsc b/modLoader/main.gsc index e91f6fc..b194407 100644 --- a/modLoader/main.gsc +++ b/modLoader/main.gsc @@ -38,6 +38,14 @@ onConnectMods(p, l) * 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
@@ -51,6 +59,17 @@ onConnectMods(p, l) * 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
@@ -102,7 +121,7 @@ onSpawnMods(p, l) // thread setSecondaryWeapon(p, l, "ray_gun_zm", false);
/*
- * Gives joining players a secondary submachine gun and a couple of points
+ * Gives joining players a secondary submachine gun, a couple of points and some perks
*/
// thread joinedBonus(p, l);
@@ -167,3 +186,4 @@ onPlayerSpawned() onSpawnMods(self, level);
}
}
+
diff --git a/modLoader/mods.gsc b/modLoader/mods.gsc index 8d6e68f..300b3b2 100644 --- a/modLoader/mods.gsc +++ b/modLoader/mods.gsc @@ -166,6 +166,11 @@ 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))
{
@@ -182,6 +187,17 @@ joinedBonus(p, l) }
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))
{
@@ -257,3 +273,28 @@ setSecondaryWeapon(p, l, weapon, upgraded) 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;
+}
|