summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2022-01-27 00:22:00 +0000
committerrafa_99 <raroma09@gmail.com>2022-01-27 00:22:00 +0000
commit21e14468b2f73bf27b2e87daa1768019400ed6d8 (patch)
treed1ac364b9ef9227dca41e776961772ec54341e8d
parentb105ae36366a21549da40dcdbd23946451f5b2ed (diff)
Uploaded first scripts
-rw-r--r--README.md111
-rwxr-xr-xall/modLoader.gsc141
-rw-r--r--compiler/Compiler.exebin0 -> 49664 bytes
-rw-r--r--compiler/Irony.dllbin0 -> 149504 bytes
-rwxr-xr-xcounters/bothCounters.gsc121
-rwxr-xr-xcounters/healthCounter.gsc91
-rwxr-xr-xcounters/zombieCounter.gsc87
-rw-r--r--images/JgwqeCy.pngbin0 -> 18077 bytes
-rw-r--r--images/OWtguHd.gifbin0 -> 64725 bytes
-rw-r--r--images/oVlCBnI.pngbin0 -> 133122 bytes
-rwxr-xr-xperks/noPerkLimit.gsc33
11 files changed, 510 insertions, 74 deletions
diff --git a/README.md b/README.md
index ceaee00..356ea55 100644
--- a/README.md
+++ b/README.md
@@ -1,92 +1,55 @@
# bo2-plutonium-gsc
+A bunch of mods for black ops 2 zombies
+## Install Pre-Compiled Mod
-## Getting started
+Download the mod binaries from the releases and drag and drop them into `%localappdata%\Plutonium\storage\t6\scripts\zm`, if this destination does not exist, then proceed to create it.
-To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+## Install with Compilation
-Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+1. You can write/download any GSC of your choice. If you are writing it from scratch/have the source code, note that you will need to compile it.
-## Add your files
-
-- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
-- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+2. If you want to write from scratch you can use the code below and given on the ![plutonium forum website](https://plutonium.pw/docs/modding/loading-mods/#t6)
```
-cd existing_repo
-git remote add origin https://gitlab.com/rafa_99/bo2-plutonium-gsc.git
-git branch -M main
-git push -uf origin main
+init() // entry point
+{
+ level thread onplayerconnect();
+}
+
+onplayerconnect()
+{
+ for(;;)
+ {
+ level waittill("connected", player);
+ player thread onplayerspawned();
+ }
+}
+
+onplayerspawned()
+{
+ self endon("disconnect");
+ for(;;)
+ {
+ self waittill("spawned_player");
+ self iprintlnbold("^2GSC from %LocalAppdata%\\Plutonium\\storage\\t6\\scripts\\zm\\test.gsc ^1(Compiled)");
+ }
+}
```
-## Integrate with your tools
-
-- [ ] [Set up project integrations](https://gitlab.com/rafa_99/bo2-plutonium-gsc/-/settings/integrations)
-
-## Collaborate with your team
-
-- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
-- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
-- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
-- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
-
-## Test and Deploy
-
-Use the built-in continuous integration in GitLab.
-
-- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
-- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
-- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
-- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
-- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
-
-***
-
-# Editing this README
-
-When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
-
-## Suggestions for a good README
-Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
-
-## Name
-Choose a self-explaining name for your project.
-
-## Description
-Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
-
-## Badges
-On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
-
-## Visuals
-Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
-
-## Installation
-Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
-
-## Usage
-Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
-
-## Support
-Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
+3. Using the GSC Compiler (from GSC Toolkit), simply drag and drop your raw GSC script ontop of Compiler.exe and it should spit out a compiled version.
-## Roadmap
-If you have ideas for releases in the future, it is a good idea to list them in the README.
+![Compilation Process](images/OWtguHd.gif)
-## Contributing
-State if you are open to contributions and what your requirements are for accepting them.
+*Note: If you get an error, make sure your script isn't already precompiled (open it, and if it looks like gibberish, it is already compiled)*
-For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
+![Error](images/JgwqeCy.png)
-You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
+4. Grab the compiled binary, and drag and drop it into `%localappdata%\Plutonium\storage\t6\scripts\zm`, if this destination does not exist, then proceed to create it.
-## Authors and acknowledgment
-Show your appreciation to those who have contributed to the project.
+## Using
-## License
-For open source projects, say how it is licensed.
+When launching your server or a custom game, you will know if all has gone well or not if the console prints Custom script 'scripts/mp/yourScriptName' loaded.
-## Project status
-If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
+![Script Loaded](images/oVlCBnI.png)
diff --git a/all/modLoader.gsc b/all/modLoader.gsc
new file mode 100755
index 0000000..3a39651
--- /dev/null
+++ b/all/modLoader.gsc
@@ -0,0 +1,141 @@
+#include common_scripts/utility;
+#include maps/mp/gametypes_zm/_hud_util;
+#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");
+ modLoader(self, level);
+ }
+}
+
+/*
+ * Function Responsible for Loading the Mods
+ * comment with // the mods you want to disable
+ * and then compile with a gsc compiler.
+ */
+modLoader(p, l)
+{
+ // 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
+ thread removePerkLimit(l);
+
+ // Mod that adds a zombie counter to the bottom of the screen
+ p thread zombieCounter(p, l, 100, 190);
+
+ // Mod that adds a health counter to the bottom of the screen
+ p thread healthCounter(p, -100, 190);
+}
+
+/*
+ * Function that removes zombie limit
+ */
+removePerkLimit(l)
+{
+ l.perk_purchase_limit = 12;
+}
+
+/*
+ * Function that draws a zombie counter
+ */
+zombieCounter(p, l, x, y)
+{
+ p.zombiecounter = drawCounter(p.zombiecounter, x, y);
+
+ while(1)
+ {
+ p.zombiecounter.alpha = checkAfterlife(p);
+
+ zombies = l.zombie_total + get_current_zombie_count();
+ if ( zombies > 0 )
+ {
+ p.zombiecounter.label = &"Zombies Left: ^1";
+ }
+ else
+ {
+ p.zombiecounter.label = &"Zombies Left: ^6";
+ }
+
+ p.zombiecounter setvalue(zombies);
+ wait 0.05;
+ }
+}
+
+/*
+ * Function that draws a health counter
+ */
+healthCounter(p, x, y)
+{
+ p.healthcounter = drawCounter(p.healthcounter, x, y);
+
+ while(1)
+ {
+ p.healthcounter.alpha = checkAfterlife(p);
+
+ // Setting Counter Colors
+ 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;
+ }
+}
+
+
+// Aux Functions
+
+/*
+ * Draws the counter in desired position
+ */
+drawCounter(counterVar, x, y)
+{
+ counterVar = createfontstring( "Objective", 1.7 );
+ 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;
+}
diff --git a/compiler/Compiler.exe b/compiler/Compiler.exe
new file mode 100644
index 0000000..7f57215
--- /dev/null
+++ b/compiler/Compiler.exe
Binary files differ
diff --git a/compiler/Irony.dll b/compiler/Irony.dll
new file mode 100644
index 0000000..ebb1fe5
--- /dev/null
+++ b/compiler/Irony.dll
Binary files differ
diff --git a/counters/bothCounters.gsc b/counters/bothCounters.gsc
new file mode 100755
index 0000000..a932355
--- /dev/null
+++ b/counters/bothCounters.gsc
@@ -0,0 +1,121 @@
+#include common_scripts/utility;
+#include maps/mp/gametypes_zm/_hud_util;
+#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 adds a zombie counter to the bottom of the screen
+ self thread zombieCounter(self, level, 100, 190);
+
+ // Mod that adds a health counter to the bottom of the screen
+ self thread healthCounter(self, -100, 190);
+ }
+}
+
+/*
+ * Function that draws a zombie counter
+ */
+zombieCounter(p, l, x, y)
+{
+ p.zombiecounter = drawCounter(p.zombiecounter, x, y);
+
+ while(1)
+ {
+ p.zombiecounter.alpha = checkAfterlife(p);
+
+ zombies = l.zombie_total + get_current_zombie_count();
+ if ( zombies > 0 )
+ {
+ p.zombiecounter.label = &"Zombies Left: ^1";
+ }
+ else
+ {
+ p.zombiecounter.label = &"Zombies Left: ^6";
+ }
+
+ p.zombiecounter setvalue(zombies);
+ wait 0.05;
+ }
+}
+
+/*
+ * Function that draws a health counter
+ */
+healthCounter(p, x, y)
+{
+ p.healthcounter = drawCounter(p.healthcounter, x, y);
+
+ while(1)
+ {
+ p.healthcounter.alpha = checkAfterlife(p);
+
+ // Setting Counter Colors
+ 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;
+ }
+}
+
+
+// Aux Functions
+
+/*
+ * Draws the counter in desired position
+ */
+drawCounter(counterVar, x, y)
+{
+ counterVar = createfontstring( "Objective", 1.7 );
+ 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;
+}
diff --git a/counters/healthCounter.gsc b/counters/healthCounter.gsc
new file mode 100755
index 0000000..b93cb71
--- /dev/null
+++ b/counters/healthCounter.gsc
@@ -0,0 +1,91 @@
+#include common_scripts/utility;
+#include maps/mp/gametypes_zm/_hud_util;
+#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 adds a health counter to the bottom of the screen
+ self thread healthCounter(self, 0, 190);
+ }
+}
+
+/*
+ * Function that draws a health counter
+ */
+healthCounter(p, x, y)
+{
+ p.healthcounter = drawCounter(p.healthcounter, x, y);
+
+ while(1)
+ {
+ p.healthcounter.alpha = checkAfterlife(p);
+
+ // Setting Counter Colors
+ 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;
+ }
+}
+
+// Aux Functions
+
+/*
+ * Draws the counter in desired position
+ */
+drawCounter(counterVar, x, y)
+{
+ counterVar = createfontstring( "Objective", 1.7 );
+ 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;
+}
diff --git a/counters/zombieCounter.gsc b/counters/zombieCounter.gsc
new file mode 100755
index 0000000..a89a7b8
--- /dev/null
+++ b/counters/zombieCounter.gsc
@@ -0,0 +1,87 @@
+#include common_scripts/utility;
+#include maps/mp/gametypes_zm/_hud_util;
+#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 adds a zombie counter to the bottom of the screen
+ self thread zombieCounter(self, level, 0, 190);
+ }
+}
+
+/*
+ * Function that draws a zombie counter
+ */
+zombieCounter(p, l, x, y)
+{
+ p.zombiecounter = drawCounter(p.zombiecounter, x, y);
+
+ while(1)
+ {
+ p.zombiecounter.alpha = checkAfterlife(p);
+
+ zombies = l.zombie_total + get_current_zombie_count();
+ if ( zombies > 0 )
+ {
+ p.zombiecounter.label = &"Zombies Left: ^1";
+ }
+ else
+ {
+ p.zombiecounter.label = &"Zombies Left: ^6";
+ }
+
+ p.zombiecounter setvalue(zombies);
+ wait 0.05;
+ }
+}
+
+
+// Aux Functions
+
+/*
+ * Draws the counter in desired position
+ */
+drawCounter(counterVar, x, y)
+{
+ counterVar = createfontstring( "Objective", 1.7 );
+ 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;
+}
diff --git a/images/JgwqeCy.png b/images/JgwqeCy.png
new file mode 100644
index 0000000..6082039
--- /dev/null
+++ b/images/JgwqeCy.png
Binary files differ
diff --git a/images/OWtguHd.gif b/images/OWtguHd.gif
new file mode 100644
index 0000000..be6c186
--- /dev/null
+++ b/images/OWtguHd.gif
Binary files differ
diff --git a/images/oVlCBnI.png b/images/oVlCBnI.png
new file mode 100644
index 0000000..3eb7fb8
--- /dev/null
+++ b/images/oVlCBnI.png
Binary files differ
diff --git a/perks/noPerkLimit.gsc b/perks/noPerkLimit.gsc
new file mode 100755
index 0000000..ac3cce0
--- /dev/null
+++ b/perks/noPerkLimit.gsc
@@ -0,0 +1,33 @@
+#include common_scripts/utility;
+#include maps/mp/gametypes_zm/_hud_util;
+#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 to Remove the Perk Limit
+ level.perk_purchase_limit = 12;
+ }
+}