RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
648
Author
RedAlert
Contributors
N/A
Quickbar Entry
javascript:var config = {
webhookURL: "",
};$.getScript('https://twscripts.dev/scripts/discordSupportTool.js');
Public?
Public
discord-support-tool.jpg

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:

1656517801494.png
(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:

1656517891288.png

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

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
648
Hello @nanzer ,

Thank you for reporting this issue.

If possible, please provide me the exact BB code as it is on your forum post. I tried to replicate the issue but was unsuccessful.

Feel free to modify the troop accounts so you don't show private information, or if you want, you can reach out to me on Discord if you have to share private info and you can't make that public here on the forum for everyone to see.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
648
@nanzer ,

After many tests, I found what the issue was and fixed it.

Thank you for reporting the issue, it should be fixed now.

Let me know if you still encounter this issue, or any other issue while running this script.
 
Top