// ==UserScript== // @name TWLeoTools // @namespace TomRobert // @author Leotas (updated by Tom Robert) // @description Useful tools for The West! // @include https://*.the-west.*/game.php* // @include https://*.the-west.*/index.php?page=logout // @include https://www.the-west.* // @include https://beta.the-west.net* // @version 1.30 // @grant none // @downloadURL none // ==/UserScript== // translation: Tom Robert(German & English), Darius II/Wojcieszy(Polish), pepe100(Spanish), ruud99(Dutch), Creature(Hungarian) (function (fn) { var script = document.createElement('script'); script.setAttribute('type', 'application/javascript'); script.textContent = '(' + fn.toString() + ')();'; document.body.appendChild(script); document.body.removeChild(script); }) (function () { if (location.href.indexOf('index.php?page=logout') != - 1) { location.href = '/'; } else if (location.href.indexOf('game.php') != - 1 || location.href.indexOf('https://www.the-west.') != - 1 || location.href.indexOf('https://beta.the-west.net') != - 1) { TWLTstart = { version: '1.30', langs: { en: { language: 'English', ApiGui1: 'This script contains many features to simplify your everyday life in The West:
BETA-SERVER: The stats of the set can change at any time!
BETA-SERVER: The stats of the sets can change at any time!
' : '')); var NAM; var type = { }; var SPEC = [ 'speed', 'luck', 'dollar', 'experience', 'regen', 'drop', ]; var lastBon; for (var i = 0; i < sets.length; i++) { for (var k in sets[i].bonus) { for (var l = 0; l < sets[i].bonus[k].length; l++) { var ID = sets[i].bonus[k][l]; if (ID.job) NAM = ID.job; else if (ID.name) NAM = ID.name; else if (ID.bonus) { if (ID.bonus.name) NAM = ID.bonus.name; else NAM = ID.bonus.type; } else NAM = ID.type; if (NAM == id[1]) { if (!type[i]) type[i] = 0; type[i] = (ID.value !== undefined) ? ID.value + type[i] : ID.bonus.value + type[i]; if (SPEC.indexOf(id[1]) == - 1) VAL = Math.round(type[i] * 100) / 100; else { var NUM = type[i] * 100; if (NUM > 0.2) VAL = Math.round(NUM); else VAL = NUM; } var DESC = (ID.desc) ? ID.desc.replace(/[0-9]|\+|\./g, '') : CharacterSkills.keyNames[NAM]; scrollpane.appendContent((sets[i] != lastBon ? '