diff options
Diffstat (limited to 'mods')
-rwxr-xr-x | mods/all/modLoader.gsc | 32 | ||||
-rwxr-xr-x | mods/mysterybox/customBoxPrice.gsc | 44 | ||||
-rwxr-xr-x | mods/perks/noPerkLimit.gsc | 12 | ||||
-rwxr-xr-x | mods/perks/perkaholic.gsc (renamed from mods/perks/giveAllPerks.gsc) | 7 |
4 files changed, 80 insertions, 15 deletions
diff --git a/mods/all/modLoader.gsc b/mods/all/modLoader.gsc index ef52f71..fc9785b 100755 --- a/mods/all/modLoader.gsc +++ b/mods/all/modLoader.gsc @@ -11,7 +11,7 @@ modLoader(p, l)
{
// Preloads tombstone before black screen after loading the map
- activateTombstone(level);
+ //activateTombstone(l);
////////////////////////////////////////////////////////////////////////
// Waits for the black preload screen to pass so it can load the mods //
@@ -19,8 +19,11 @@ modLoader(p, l) flag_wait( "initial_blackscreen_passed" ); //
////////////////////////////////////////////////////////////////////////
- // Mod to Remove the Perk Limit
- thread removePerkLimit(l);
+ // Mod sets a custom Perk Limit
+ thread setPerkLimit(l, 12);
+
+ // Mod that sets the box price
+ //setBoxPrice(l, 950);
// Mod that adds a zombie counter to the bottom of the screen
// p thread zombieCounter(p, l, 0, 190);
@@ -31,7 +34,7 @@ modLoader(p, l) p thread healthCounter(p, -100, 190);
// Gives all the perks available in the map to the player
- giveAllPerks(p, l);
+ perkaholic(p, l);
}
init()
@@ -60,13 +63,14 @@ onPlayerSpawned() }
/*
- * Function that removes zombie limit
+ * Function that updates perk limit
*/
-removePerkLimit(l)
+setPerkLimit(l, numberOfPerks)
{
- l.perk_purchase_limit = 9;
+ l.perk_purchase_limit = numberOfPerks;
}
+
/*
* Function that draws a zombie counter
*/
@@ -140,7 +144,7 @@ activateTombstone(l) /*
* Function that gives the player all the perks available
*/
-giveAllPerks(p, l)
+perkaholic(p, l)
{
level waittill("start_of_round");
if (isDefined(l.zombiemode_using_juggernaut_perk) && l.zombiemode_using_juggernaut_perk)
@@ -169,6 +173,18 @@ giveAllPerks(p, l) p doGivePerk("specialty_scavenger");
}
+/*
+ * Function that 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;
+ }
+}
+
// Aux Functions
/*
diff --git a/mods/mysterybox/customBoxPrice.gsc b/mods/mysterybox/customBoxPrice.gsc new file mode 100755 index 0000000..8749f52 --- /dev/null +++ b/mods/mysterybox/customBoxPrice.gsc @@ -0,0 +1,44 @@ +#include common_scripts/utility;
+#include maps/mp/zombies/_zm_utility;
+
+init()
+{
+ level thread onPlayerConnect();
+}
+
+onPlayerConnect()
+{
+ while(1)
+ {
+ level waittill("connected", player);
+ player thread onPlayerSpawned();
+ }
+}
+
+onPlayerSpawned()
+{
+ self endon("disconnect");
+ level endon("game_ended");
+ while(1)
+ {
+ self waittill("spawned_player");
+
+ // Waits for the black preload screen to pass so it can load the mods
+ flag_wait( "initial_blackscreen_passed" );
+
+ // Mod that sets the box price
+ setBoxPrice(l, 950);
+ }
+}
+
+/*
+ * Function that 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;
+ }
+}
diff --git a/mods/perks/noPerkLimit.gsc b/mods/perks/noPerkLimit.gsc index 649df15..e6fbbab 100755 --- a/mods/perks/noPerkLimit.gsc +++ b/mods/perks/noPerkLimit.gsc @@ -26,7 +26,15 @@ onPlayerSpawned() // Waits for the black preload screen to pass so it can load the mods
flag_wait( "initial_blackscreen_passed" );
- // Mod to Remove the Perk Limit
- level.perk_purchase_limit = 9;
+ // Mod sets a custom Perk Limit
+ thread setPerkLimit(l, 12);
}
}
+
+/*
+ * Function that update zombie perk limit
+ */
+setPerkLimit(l, numberOfPerks)
+{
+ l.perk_purchase_limit = numberOfPerks;
+}
diff --git a/mods/perks/giveAllPerks.gsc b/mods/perks/perkaholic.gsc index 5f51192..1343476 100755 --- a/mods/perks/giveAllPerks.gsc +++ b/mods/perks/perkaholic.gsc @@ -27,18 +27,15 @@ onPlayerSpawned() // Waits for the black preload screen to pass so it can load the mods
flag_wait( "initial_blackscreen_passed" );
- // Mod to Remove the Perk Limit
- level.perk_purchase_limit = 9;
-
// Gives all the perks available in the map to the player
- giveAllPerks(self, level);
+ perkaholic(self, level);
}
}
/*
* Function that gives the player all the perks available
*/
-giveAllPerks(p, l)
+perkaholic(p, l)
{
level waittill("start_of_round");
if (isDefined(l.zombiemode_using_juggernaut_perk) && l.zombiemode_using_juggernaut_perk)
|