- Reaction score
- 696
- Author
- RedAlert
- Contributors
- N/A
- Quickbar Entry
-
javascript:var config = {
webhookURL: "",
};$.getScript('https://twscripts.dev/scripts/discordSupportTool.js');
- Public?
- Public
This script can only be run on a forum thread.
URL example:
/game.php?screen=forum&screenmode=view_thread&forum_id=XXX&thread_id=YYY
This script works only by selecting text which needs a support request format, as it's generated from the game. Example:
(if the support request is not of this format the script might not work)
This tool can only be used if the support request contains "Noble" on the incomings list.
What this script does is that it parser the support request. Gathers data for the village from the game and sends them over to a specified Discord channel via webhooks.
The output on discord will look something like this:
Data that the script collects automatically from the game are:
- village id, village name, village coords
- incomings info from the selected text in the forum
- wall level
- loyalty
- sigil
- flag
- defending troops currently stationed in the village under attack
The idea behind this script is to have an easy and fast way to share with your tribe mates noble train incoming on your villages, on the discord server of your tribe.
This script requires some configuration to work correctly. If you run this script without such configuration then the script will not work.
JavaScript:
var config = {
webhookURL: "",
};
webhookURL, this is where the data will be sent on Discord. Here is how to get a webhook URL for your #support or #snipes channel.
username defines the bot's name for discord since the message will appear like it's sent from a bot.
avatar defines the avatar of the bot.
colorCode represents the color of the left border that shows on messages.
Except for the webhook URL, all the other variables could have been made hardcoded. Still, it was my choice to make them editable by the player so the player can personalize the "bot's" appearance on every world if the player wishes so.
For any bugs, suggestions or if you need help with the script, let me know by replying to the thread.
Last edited:
Upvote
1