TW Big Inventory

This script, just make inventory biggest!

当前为 2017-07-21 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name TW Big Inventory
// @namespace TW_Jack
// @author Jackson
// @description This script, just make inventory biggest!
// @include https://*.the-west.*/game.php*
// @version 1.1
// @website https://liberstudio.top
// @icon https://www.liberstudio.top/wp-content/uploads/biginv.ico
// @grant none
// ==/UserScript==
(function(fn) {
    var script = document.createElement('script');
    script.setAttribute('type', 'application/javascript');
    script.textContent = '(' + fn + ')();';
    document.body.appendChild(script);
    document.body.removeChild(script);
})(function() {
    var bigInventor = {
        version: '1.1',
        author: 'Jackson',
        minGame: '2.03',
        maxGame: Game.version.toString(),
        website: 'https://greasyfork.org/ru/scripts/31626-tw-big-inventory',
        updateUrl: 'https://raw.githack.com/Vartanov/Tre-Pulsanti/master/agg.js',
        images: {}
    };
    Inventory.uid = "inventory";
    Inventory.size = 48;
    Inventory.sizeSearch = 36;
    Inventory.sizeCustom = 36;
    Inventory.width = 608;
    Inventory.availableCategories = ['new', 'belt', 'body', 'foot', 'head', 'neck', 'pants', 'animal', 'right_arm', 'left_arm', 'yield', 'upgradeable'];
    Inventory.defaultCategory = 'new';
    Inventory.latestSize = 48;
    Inventory.context = null;
    Inventory.categoryDesc = {
        belt: "Cinture",
        body: "Abiti",
        foot: "Scarpe",
        head: "Copricapi",
        neck: "Collane",
        pants: "Pantaloni",
        animal: "Animale",
        right_arm: "Armi da duello",
        left_arm: "Fucili",
        yield: "Prodotti",
        'new': "Ultimi oggetti modificati",
        'upgradeable': "Migliorabile",
        set: "Cerca",
        'buffs': 'Potenziamenti',
        'potions': 'Pozioni',
        'misc': 'Varie',
        'crafting': 'Professioni'
    };
    $("<link href='https://www.liberstudio.top/wp-content/uploads/1/inv.css' rel='stylesheet' type='text/css'>").appendTo("head");
    var langs;
    langs = {
        it_IT: {
            lang_select: 'Lingua selezionata',
            language: 'Italiano',
            ApiGui: 'Questo script aumenta lo spazio nell inventario.',
            contact: 'Contatti',
            title: 'Big Inventory',
            update: 'Aggiorna',
            updateAvailable: 'Nuova versione dello script disponibile',
            name: 'Big Inventory',
            msgme: 'Mandami un messaggio in gioco',
            mailme: 'Mandami una mail'
        },
        en_US: {
            lang_select: 'Language selected',
            language: 'English',
            ApiGui: 'This script increases space in the inventory.',
            contact: 'Contact',
            title: 'Big Inventory',
            update: 'Update',
            updateAvailable: 'New version of the script are avialable.',
            name: 'Big Inventory',
            msgme: 'Message me in game',
            mailme: 'Send me a mail'
        },
        ru_RU: {
            lang_select: 'Выбранный язык',
            language: 'Русский',
            ApiGui: 'Этот скрипт, увеличивает пространство инвентаря!',
            contact: 'Контакты',
            title: 'Большой инвентарь',
            name: 'Большой инвентарь',
            update: 'Обновление',
            updateAvailable: 'Доступно обновление скрипта.',
            msgme: 'Напиши мне в игре',
            mailme: 'Почтовый ящик'

        },
        ro_RO: {
            lang_select: 'Limba selectionata',
            language: 'Romana',
            ApiGui: 'Acest script, mareste spatiul in inventar',
            contact: 'Contacte',
            title: 'Big Inventory',
            name: 'Big Inventory',
            update: 'Actualizare',
            updateAvailable: 'Disponibila o noua actualizare.',
            msgme: 'Trimitemi mesaj in joc',
            mailme: 'Trimitemi un mail'
        }
    };
    var MPlang = langs.hasOwnProperty(Game.locale) ? langs[Game.locale] : langs.it_IT;
    var bigInventorApi = TheWestApi.register('bigInventor', MPlang.title, bigInventor.minGame, bigInventor.maxGame, bigInventor.author, bigInventor.website);
    bigInventorApi.setGui('<br><i>' + MPlang.lang_select + ': </i>' + MPlang.language + '<br><br>' + MPlang.ApiGui + '<br><br><i>' + MPlang.name + ' v' + bigInventor.version +
        '</i><br><br>' + MPlang.contact + ':</b><ul style="margin-left:15px;"><li>' + MPlang.msgme + '<a  style="margin-left:15px;" href="javascript:void(PlayerProfileWindow.open(542314));">Jackson</a>' + '</li><li>' + MPlang.mailme + '<a  style="margin-left:15px;" href="mailto:[email protected]">[email protected]</a>' + '</li></ul>');


    bigInventor.gui = {};
    bigInventor.gui.init = function () {
        bigInventor.gui.makeButton = function (caption, callback) {
            return new west.gui.Button(caption, callback);
        };
    };
    bigInventor.Updater = function () {
        $.getScript(bigInventor.updateUrl, function () {
            if (aggiornaScript.bigInventor != bigInventor.version) {
                var updateMessage = new west.gui.Dialog(MPlang.update + ': ' + MPlang.name, '<span>' +
                    MPlang.updateAvailable + '<br><br><b>v' +
                    aggiornaScript.bigInventor + ':</b><br>' +
                    aggiornaScript.bigInventorNew + '</span>', west.gui.Dialog.SYS_WARNING).addButton(MPlang.update, function () {
                    updateMessage.hide();
                    location.href = bigInventor.website + '/code.user.js';
                }).addButton('cancel').show();
            }
        });
    };
    $(document).ready(function () {
        try {
            bigInventor.gui.init();
            setTimeout(bigInventor.Updater, 5000);
        } catch (e) {
            console.log(e.stack);
        }
    });
});