summaryrefslogtreecommitdiff
path: root/mods/main.gsc
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2022-02-27 17:11:24 +0000
committerrafa_99 <raroma09@gmail.com>2022-02-27 17:11:24 +0000
commitf7027dd5e69ebe2ac073033e5328ba5c9bf51283 (patch)
tree59ed3111543d8412b47bdc3668e6b604ab63939a /mods/main.gsc
parentb0ae393bf1f4fc27aaa317fc7ae53b1745014aab (diff)
Added automatic mods installer script and updated paths
Diffstat (limited to 'mods/main.gsc')
-rw-r--r--mods/main.gsc190
1 files changed, 190 insertions, 0 deletions
diff --git a/mods/main.gsc b/mods/main.gsc
new file mode 100644
index 0000000..daa4cd9
--- /dev/null
+++ b/mods/main.gsc
@@ -0,0 +1,190 @@
+#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);
+ }
+}
+
+