NunoF-

Active Member
Reaction score
9
Author
NunoF-
Contributors
N/A
Quickbar Entry
javascript:$.getScript('https://nunoferr.github.io/TribalWars/Scripts/bbcodeSOSFormatter/bbcodeSOSFormatter.js');
Public?
Public
1728938451610.png

What does the script do?
This script transforms the BBCode generated from the SOS help request tool on TW, to a readable and easy-to-understand message for Discord.
Simply copy the entirety of your BBCode SOS help request, paste it in the script, and click the "Format" button. Everything else will be done for you.


From where did the need for the script appear?
A long time ago, I noticed that when under attack, my tribe kept having to etiher take screenshots of their incoming attacks, get the BBCode from the SOS tool, or even simply copy-pasting the text of the attack on Discord. And why on Discord? Because that is where players are communicating and the easiest way to reach out for help. If you need a snipe, that is the place that you will likely go, even more during a coordinated attack with a hundred or more Nobel Trains arriving.

This made things harder for everyone. The tribe members could not keep up with all the different formats, and therefore me and others had to either get the text out of screenshots and manually extract the data, remove the BBCode tags from the SOS requests, and try to make something understandable for Discord with that data and the copy and paste commands that we were being provided. This entire process was extremely inefficient and time-consuming.


When is this useful?
Under a coordinated attack, time is of the essence. Even when you are not under one, mistakes can be made when manually translating a Snipe request from TW to Discord. Therefore, a script that automates this entire process is not only extremely useful but also needed.

It is also worth mentioning that the script works with several help requests at the same time.


Where can this script be run?
Everywhere you want.


Does this script work in a world different than the one where the initial BBCode SOS help request was generated?
No. You must be in the world where the current BBCode SOS help request was generated to get accurate data.


Does this require a premium account?
No.


How does the script interact with TW?
It doesn't. It simply does some regex parsing, and to avoid spamming the server with requests, the script makes use of the TWSDK from @RedAlert to get the username of the player that is under attack (fetches all players, all villages, filters it by the village Id, and we got our village owner!), to avoid things such as snipes being sent to the enemy by mistake (trust me, it has happened more than you would think).


Honorable mentions
I would like to leave a special thanks to @RedAlert for making his SDK publicly and freely available, it helped a lot here.


Script
JavaScript:
javascript:$.getScript('https://nunoferr.github.io/TribalWars/Scripts/bbcodeSOSFormatter/bbcodeSOSFormatter.js');
 
Changelog
2024-10-24 22:47:19 - comments: Approval information added
Last edited:
Upvote 0
Top