// ==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.0
// @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.0',
author: 'Jackson',
minGame: '2.03',
maxGame: Game.version.toString(),
website: 'https://gf.qytechs.cn/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'
};
var cssStyles = {
invWidth: '#windows .inventory { width: 565px!important;}',
filtersWidth: '#windows .inventory .filters { width: 516px!important;}',
bagWidth: '#bag{ width: 488px!important; height: 348px!important;}',
invBackgr: 'div.tw2gui_window.inventory div.tw2gui_inner_window_bg { background:url(https://westits.innogamescdn.com/images/tw2gui/window/window2_bg.jpg) center bottom no-repeat!important; margin-top: 5px!important;}',
invNavigation: '.inventory .bag_navigation {margin: 2px 50px 0;}',
invBagcontrol: '.inventory .bag_control {top: 25px;}'
}
$("<style type='text/css'>" + cssStyles.invWidth + cssStyles.filtersWidth + cssStyles.bagWidth + cssStyles.invBackgr + cssStyles.invNavigation + cssStyles.invBagcontrol + "</style>").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);
}
});
});