TW Big Inventory

This script, just make inventory biggest!

目前為 2017-07-21 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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);
        }
    });
});