From 4553de1a91c37d6f15fb5a835bd083323a33f9ec Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:36:13 -0400 Subject: [PATCH 1/7] readme bug fix --- how-to-make-a-plugin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/how-to-make-a-plugin.md b/how-to-make-a-plugin.md index dfa61a3..1218325 100644 --- a/how-to-make-a-plugin.md +++ b/how-to-make-a-plugin.md @@ -5,7 +5,7 @@ - Some basic JS/TS experience to learn how the language works - The definitions for autocomplete/checking -If you plan to debug using the Visual Studio workspace, click [here](https://.com/LatiteScripting/Scripts/blob/master/debugging.md) (you need to install VS first though). +If you plan to debug using the Visual Studio workspace, click [here](https://github.com/LatiteScripting/Scripts/blob/master/debugging.md) (you need to install VS first though). ### Useful info for JS/TS **Learn JS/TS** - these are just some websites, there are many more - [Exercism](https://exercism.org/) @@ -28,4 +28,4 @@ It's time to make some plugins! You can debug your code using the Visual Studio workspace. -See the [documentation](https://latitescripting.github.io/) for everything you can do with the scripting API \ No newline at end of file +See the [documentation](https://latitescripting.github.io/) for everything you can do with the scripting API From 95c8b3e07a32dcd1b88d86f698594d9437f5b94c Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:38:10 -0400 Subject: [PATCH 2/7] no hurt cam addition --- Plugins/plugins.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Plugins/plugins.json b/Plugins/plugins.json index bc476bc..318228e 100644 --- a/Plugins/plugins.json +++ b/Plugins/plugins.json @@ -34,6 +34,13 @@ "modWhereAmIHUD.js", "modAutoGG.js" ] + }, + { + "name": "NoHurtCam", + "files": [ + "main.js", + "plugin.json" + ] } ] } From 280c66b5fd7dd84de355e27dd1067c01d221d390 Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:38:53 -0400 Subject: [PATCH 3/7] Create plugin.json --- Plugins/NoHurtCam/plugin.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Plugins/NoHurtCam/plugin.json diff --git a/Plugins/NoHurtCam/plugin.json b/Plugins/NoHurtCam/plugin.json new file mode 100644 index 0000000..7e73f6c --- /dev/null +++ b/Plugins/NoHurtCam/plugin.json @@ -0,0 +1,6 @@ +{ + "name": "NoHurtCam Plugin", + "author": "chyves", + "version": "1.0.0", + "description": "No Hurt Cam" +} From 9b97df9a1c5c120e77ce761d88ad725dc7e416c2 Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:44:15 -0400 Subject: [PATCH 4/7] Rename plugin.json to plugin.json --- Plugins/{NoHurtCam => AutoGG}/plugin.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Plugins/{NoHurtCam => AutoGG}/plugin.json (100%) diff --git a/Plugins/NoHurtCam/plugin.json b/Plugins/AutoGG/plugin.json similarity index 100% rename from Plugins/NoHurtCam/plugin.json rename to Plugins/AutoGG/plugin.json From f3b1413949a506d50645f166e911047a539ec260 Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:44:33 -0400 Subject: [PATCH 5/7] Update plugin.json --- Plugins/AutoGG/plugin.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/AutoGG/plugin.json b/Plugins/AutoGG/plugin.json index 7e73f6c..2a12cfb 100644 --- a/Plugins/AutoGG/plugin.json +++ b/Plugins/AutoGG/plugin.json @@ -1,6 +1,6 @@ { - "name": "NoHurtCam Plugin", + "name": "AutoGG Plugin", "author": "chyves", "version": "1.0.0", - "description": "No Hurt Cam" + "description": "AutoGG" } From ac4f4b95fa4e513c2d76cdaf53cec1aedf58aa13 Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:44:46 -0400 Subject: [PATCH 6/7] Update plugins.json --- Plugins/plugins.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/plugins.json b/Plugins/plugins.json index 318228e..b6b2cd6 100644 --- a/Plugins/plugins.json +++ b/Plugins/plugins.json @@ -36,7 +36,7 @@ ] }, { - "name": "NoHurtCam", + "name": "AutoGG", "files": [ "main.js", "plugin.json" From 4dc7f6fe0bc4b126477b4c11bedfd950c1085a78 Mon Sep 17 00:00:00 2001 From: chyves <82107846+notchyves@users.noreply.github.com> Date: Sun, 5 May 2024 23:50:08 -0400 Subject: [PATCH 7/7] Create main.js --- Plugins/AutoGG/main.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Plugins/AutoGG/main.js diff --git a/Plugins/AutoGG/main.js b/Plugins/AutoGG/main.js new file mode 100644 index 0000000..d6f77c4 --- /dev/null +++ b/Plugins/AutoGG/main.js @@ -0,0 +1,20 @@ +let mod = new Module("AutoGG", "Auto GG", "Responds with \"gg\" in chat on victory.", 0); +client.getModuleManager().registerModule(mod); + +function sendGGChatMessage() { + game.sendChatMessage("gg"); +} + +client.on("title", title => { + let text = title.text; + + if (game.getFeaturedServer() == "Hive") + { + if (text.includes("Sweet Victory") || text.includes("Game Over")) + { + sendGGChatMessage(); + } + } + + // more soon +});