summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2022-02-26 00:38:28 +0000
committerrafa_99 <raroma09@gmail.com>2022-02-26 00:38:28 +0000
commitb0ae393bf1f4fc27aaa317fc7ae53b1745014aab (patch)
treef75b26fd39ebcaf63d77f8a27d132ccfb4ffc341
parent51041264e8636e7d616141bd0853a51019638169 (diff)
Added more mods
-rw-r--r--README.md8
-rw-r--r--modLoader/auxiliary.gsc75
-rw-r--r--modLoader/main.gsc22
-rw-r--r--modLoader/mods.gsc41
4 files changed, 141 insertions, 5 deletions
diff --git a/README.md b/README.md
index 2b24306..a3c1c6e 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,9 @@ When launching your server or a custom game, you will know if all has gone well
* GodMode;
* Infinite ammo;
-* Custom player Points;
-* Custom box Price;
-* Custom buyable Perk Limit;
+* Custom player points;
+* Custom box price;
+* Custom buyable perk limit;
* Perkaholic;
* Custom afterlife lifes;
* Infinite time in afterlife;
@@ -43,6 +43,8 @@ When launching your server or a custom game, you will know if all has gone well
* Late joined player bonus;
* Zombies counter;
* Health counter;
+* Night mode;
+* Custom alive zombies limit.
## Weapons List
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;
+}