Skip to content

fix readme bug + start on auto-gg #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Plugins/AutoGG/main.js
Original file line number Diff line number Diff line change
@@ -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
});
6 changes: 6 additions & 0 deletions Plugins/AutoGG/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "AutoGG Plugin",
"author": "chyves",
"version": "1.0.0",
"description": "AutoGG"
}
7 changes: 7 additions & 0 deletions Plugins/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"modWhereAmIHUD.js",
"modAutoGG.js"
]
},
{
"name": "AutoGG",
"files": [
"main.js",
"plugin.json"
]
}
]
}
4 changes: 2 additions & 2 deletions how-to-make-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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
See the [documentation](https://latitescripting.github.io/) for everything you can do with the scripting API