// ==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 // @version 1.28.1 // @grant none // @downloadURL none // ==/UserScript== // translation: Tom Robert(German & English), Darius II/Wojcieszy(Polish), pepe100(Spanish), ruud99(Dutch) if (location.href.indexOf('index.php?page=logout') != - 1) { location.href = '/'; } if (location.href.indexOf('game.php') != - 1) { (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 () { TWLTstart = { version: '1.28.1', name: 'TWLeoTools', author: 'Leotas (updated by Tom Robert)', minGame: '2.04', maxGame: Game.version.toString(), website: 'https://greasyfork.org/scripts/7238', updateUrl: 'https://raw.githack.com/TomRobert/tw/master/sU.js', updateAd: 'http://adf.ly/1OMM8P', }; langs = { en_US: { language: 'None (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 ? '