Skip to content

Script for sending messages

Server Tribal Wars Forum Allowed Code
plemiona.pl https://forum.plemiona.pl/index.php?threads/auto-uzupe%C5%82nianie-wiadomo%C5%9Bci.128461/ YES Code on GitHub (v2.0)
other servers - NO (cannot be detected) Code on GitHub (v2.1)

Warning

Using on other language versions of the game where the script is not allowed is at your own risk. The script is allowed on the Polish language version and its operation is completely undetectable, but for other language versions of the game (e.g., Czech, global), they are always illegal.

Auto Message Completion Script
// ==UserScript==
// @name     GET message autocomplete
// @version  2.0
// @match    *://*.plemiona.pl/game.php*screen=mail*mode=new*
// ==/UserScript==
// By Rafsaf

const hash = window.location.hash.substr(1);
const result = hash.split('&').reduce(function (res, item) {
var parts = item.split('=');
res[parts[0]] = parts[1];
return res;
}, {});
if ("to" in result) {
document.getElementById('to').value = decodeURIComponent(result.to);
}
if ("subject" in result) {
document.getElementsByName('subject')[0].value = decodeURIComponent(result.subject);
}
if ("message" in result) {
document.getElementById('message').value = decodeURIComponent(result.message);
}
Auto Message Completion Script
// ==UserScript==
// @name         GET message autocomplete
// @version      2.1-global
// @author       RafaƂ Safin <rafal.safin@rafsaf.pl>
// @source       https://github.com/rafsaf/scripts_tribal_wars/blob/master/public/GET_message_autocomplete_v2.1_global.js
// @copyright    MIT
// @description  Autocomplete messages in tribal wars mail form with GET parameters of URL
// @grant        none
// @noframes
// @match        *://*.plemiona.pl/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.net/game.php*screen=mail*mode=new*
// @match        *://*.die-staemme.de/game.php*screen=mail*mode=new*
// @match        *://*.staemme.ch/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.nl/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.com.br/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.com.pt/game.php*screen=mail*mode=new*
// @match        *://*.divokekmeny.cz/game.php*screen=mail*mode=new*
// @match        *://*.triburile.ro/game.php*screen=mail*mode=new*
// @match        *://*.voyna-plemyon.ru/game.php*screen=mail*mode=new*
// @match        *://*.fyletikesmaxes.gr/game.php*screen=mail*mode=new*
// @match        *://*.divoke-kmene.sk/game.php*screen=mail*mode=new*
// @match        *://*.klanhaboru.hu/game.php*screen=mail*mode=new*
// @match        *://*.tribals.it/game.php*screen=mail*mode=new*
// @match        *://*.klanlar.org/game.php*screen=mail*mode=new*
// @match        *://*.guerretribale.fr/game.php*screen=mail*mode=new*
// @match        *://*.guerrastribales.es/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.ae/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.co.uk/game.php*screen=mail*mode=new*
// @match        *://*.tribalwars.us/game.php*screen=mail*mode=new*
// ==/UserScript==

const hash = window.location.hash.substring(1);
const result = hash.split("&").reduce(function (res, item) {
  var parts = item.split("=");
  res[parts[0]] = parts[1];
  return res;
}, {});
if ("to" in result) {
  document.getElementById("to").value = decodeURIComponent(result.to);
}
if ("subject" in result) {
  document.getElementsByName("subject")[0].value = decodeURIComponent(
    result.subject
  );
}
if ("message" in result) {
  document.getElementById("message").value = decodeURIComponent(result.message);
}

Installation

To use the scripts, you must first install the appropriate browser extension (monkey):

Then create a new user script and paste the code below.

Usage Instructions

  1. Go to the Results tab of the completed schedule, see this chapter on the results tab
  2. Click on Send to open new tabs in the game
  3. Send the message in the game
  4. On the page, the text will change to "Sent!", continue

Description

A simple and short browser script that fills in the "To", "Subject", and "Message content" fields in a new message if they are provided in the link. It automates sending messages to players after scheduling on the site, detecting the script and its execution only in the new message tab. An example of usage can be found below.

  • to - recipient
  • subject - subject
  • message - message

Example:

https://pl155.plemiona.pl/game.php?screen=mail&mode=new#to=JakisGracz&subject=Tytul&message=Zawartosc

Example message

Tampermonkey dashboard