Greasy Fork

The West - Quick items search

Find sets and buffs quick and easy!

目前为 2015-03-31 提交的版本。查看 最新版本

// ==UserScript==
// @name The West - Quick items search
// @namespace TomRobert
// @author neversleep1911 (modified by Darius II; updated by Tom Robert)
// @description Find sets and buffs quick and easy!
// @include http*://*.the-west.*/game.php*
// @version 1.1.3
// @grant none
// ==/UserScript==
(function (func) {
  var script = document.createElement('script');
  script.setAttribute('type', 'application/javascript');
  script.textContent = '(' + func.toString() + ')();';
  document.body.appendChild(script);
  document.body.removeChild(script);
}(function () {
  var quicksearch = {
    version: '1.1.3',
    name: 'Quick items search',
    author: 'neversleep1911 (modified by Darius II; updated by Tom Robert)',
    minGame: '2.05',
    maxGame: Game.version.toString(),
    website: 'https://greasyfork.org/scripts/7434',
    updateUrl: 'http://pastebin.com/raw.php?i=iqXWUDXw',
  };
  langs = {
    en_US: {
      language: 'None (English)',
      ApiGui: 'Searching for specific sets or buffs? Easy job using this script.<br>Just some clicks and the items, which you wanted to find, are showed in your inventory.',
      contact: 'Contact',
      adventure: '-Adventures',
      work: '-Work',
      duel: '-Duels',
      energy: '-Energy',
      skill: '-Skill points',
      fk: '-Fort battles',
      speed: '-Speed',
      lp: '-Health points',
      special: '-Premium/special',
      event: '-Events',
      chests: '-Open & unpack',
      gold: 'Golden set',
      greenhorn: 'Greenhorn set',
      holiday: 'Holiday set',
      dancer: 'Dancer\'s set',
      farmer: 'Farmer\'s set',
      gentleman: 'Gentleman\'s set',
      indian: 'Indian\'s set',
      mexican: 'Mexivan\'s set',
      pilgrimF: 'Pilgrim\'s dress set',
      pilgrimM: 'Pirlgrim\'s set',
      charlatan: 'Charlatan\'s set',
      sleepy: 'Sleepyhead',
      twtimes: 'TW-Times Set',
      collector: 'Collector\'s set',
      easterbunny: 'Easter bunny set',
      firefighter: 'Firefighter set',
      walker: 'Walker set',
      natty: 'Natty Bumppo\'s set',
      allan: 'Allan Quatermain\'s set',
      chingachgook: 'Chingachgook\'s set',
      cupid: 'Cupid\'s set',
      cartwright: 'Cartwright\'s set',
      doc: 'Doc\'s set',
      freeman: 'Freeman\'s set',
      party: 'Party set',
      fair: 'Fair set',
      soap: 'Soap opera set',
      christopher: 'Christopher\'s parade set',
      wood: 'Wood magician\'s set',
      will: 'Will Munny\'s set',
      jeremiah: 'Jeremiah Johnson\'s set',
      elfego: 'Elfego Baca\'s set',
      independence: 'Clothing of Independence',
      fire: 'Fire and Ice',
      eighthour: 'Eight-hour day supply',
      franke: 'Frank Eaton\'s set',
      george: 'George McJunkin\'s set',
      king: 'King Fisher\'s set',
      bavarian: 'Traditional Bavarian Outfit',
      prairie: 'Prairie Set',
      adventurer: 'Adventurer Set',
      duelset: 'Duel Set',
      worker: 'Worker Set',
      soldier: 'Soldier Set',
      thunder: 'Thunder and lightning',
      nightmare: 'Nightmare set',
      confederate: 'Confederate Set',
      noname: 'The Set with no name',
      winter: 'Winter Set',
      valentine: 'Valentin\'s set',
      lover: 'Lover\'s set',
      stpatrick: 'St. Patrick\'s Set',
      lonerider: 'Lone Rider',
      cullen: 'Cullen Baker\'s set',
      bass: 'Bass Reeve\'s set',
      pat: 'Pat Desmond\'s set',
      easter: 'Easter Showdown set',
      steam: 'Steam and Punk',
      blackbart: 'Black Bart\'s set',
      bob: 'Bob Dalton\'s set',
      jesse: 'Jesse Chisholm\'s set',
      thomas: 'Thomas Jefferson\'s Independence set',
      nihon: 'Nihon no Buki',
      outlaw: 'The Outlaw\'s gear',
      bill: 'Bill Doolin\'s set',
      deadwood: 'Deadwood Dick\'s set',
      frankj: 'Frank Jame\'s set',
      ludwig: 'Ludwig\'s Oktoberfest set',
      manitus: 'Manitu\'s weapons',
      gonzales: 'Gonzales\' Speedstar Set',
      catrina: 'La Catrina set',
      mariachi: 'El Mariachi set',
      nobleman: 'Nobleman\'s set',
      aztecan: 'Aztecan set',
      ghost: 'Ghosts of Christmas set',
      romeo: 'Romeo Oh Romeo',
      bartender: 'Bartender\'s Set',
      wyatt: 'Wyatt Earp\'s Set',
      flint: 'Flint Eastwood\'s Set',
      eric: 'Eric Pinter\'s Set',
      jerry: 'Jerry Easter\'s Set',
      steaming: 'Steaming weapons',
      nothingFoundTitle: 'Search cancelled',
      nothingFound: 'No items of this type found!',
      update: 'Update',
      updateAvailable: 'A new version of the script is available',
      cancel: 'Cancel',
    },
    de_DE: {
      language: 'German (Deutsch)',
      ApiGui: 'Schnelles Finden von Setgegenständen und Buffs im Inventar.',
      contact: 'Kontakt',
      adventure: '-Abenteuer-Buffs',
      work: '-Arbeiten-Buffs',
      duel: '-Duell-Buffs',
      energy: '-Erholungs-Buffs',
      skill: '-Fertigkeiten-Buffs',
      fk: '-Fortkampf-Buffs',
      speed: '-Geschwindigkeits-Buffs',
      lp: '-Lebenspunkte-Buffs',
      special: '-Premium/Special',
      event: '-Events',
      chests: '-Öffnen & Auspacken',
      gold: 'Goldenes Set',
      greenhorn: 'Greenhorset',
      holiday: 'Feiertagsset',
      dancer: 'Set der Tänzerin',
      farmer: 'Farmerset',
      gentleman: 'Set des Gentleman',
      indian: 'Indianerset',
      mexican: 'Mexikanerset',
      pilgrimF: 'Pilgerinset',
      pilgrimM: 'Pilgerset',
      charlatan: 'Quacksalberset',
      sleepy: 'Morgenmuffelset',
      twtimes: 'TWTimes-Set',
      collector: 'Sammlerset',
      easterbunny: 'Gewand des Osterhasen',
      firefighter: 'Feuerwehrset',
      walker: 'Walker Set',
      natty: 'Natty Bumppos Set',
      allan: 'Allan Quatermains Set',
      chingachgook: 'Chingachgooks Set',
      cupid: 'Amors Verkleidung',
      cartwright: 'Cartwrights Set',
      doc: 'Docs Set',
      freeman: 'Freemans Set',
      party: 'Party-Set',
      fair: 'Jahrmarktsset',
      soap: 'Seifenoperset',
      christopher: 'Christophers Paradeset',
      wood: 'Set des Holzmagiers',
      will: 'Will Munnys Set',
      jeremiah: 'Jeremiah Johnsons Set',
      elfego: 'Elfego Bacas Set',
      independence: 'Kleider der Unabhängigkeit',
      fire: 'Feuer und Eis',
      eighthour: '8-Stunden-Arbeitstag',
      franke: 'Frank Eatons Set',
      george: 'George McJunkins Set',
      king: 'King Fishers Set',
      bavarian: 'Bayrisches Outfit',
      prairie: 'Prärie-Set',
      adventurer: 'Abenteurerset',
      duelset: 'Duellantenset',
      worker: 'Arbeiterset',
      soldier: 'Soldatenset',
      thunder: 'Blitz und Donner',
      nightmare: 'Albtraumset',
      confederate: 'Konföderierten-Set',
      noname: 'Das Set ohne Namen',
      winter: 'Winterset',
      valentine: 'Valentins Set',
      lover: 'Set des Liebhabers',
      stpatrick: 'St. Patrick\'s Set',
      lonerider: 'Lone Rider',
      cullen: 'Cullen Bakers Set',
      bass: 'Bass Reeves Set',
      pat: 'Pat Desmonds Set',
      easter: 'Ostershowdown-Set',
      steam: 'Steam und Punk',
      blackbart: 'Black Barts Set',
      bob: 'Bob Daltons Set',
      jesse: 'Jesse Chisholms Set',
      thomas: 'Thomas Jeffersons Unabhängigkeitsset',
      nihon: 'Nihon no Buki',
      outlaw: 'Banditenausrüstung',
      bill: 'Bill Doolins Set',
      deadwood: 'Deadwood Dicks Set',
      frankj: 'Frank James Set',
      ludwig: 'Ludwigs Oktoberfest Set',
      manitus: 'Manitus Waffen',
      gonzales: 'Gonzales\' Speedstar Set',
      catrina: 'La-Catrina-Set',
      mariachi: 'El-Mariachi-Set',
      nobleman: 'Set des Adeligen',
      aztecan: 'Aztekenset',
      ghost: 'Set der Geister der Weihnacht',
      romeo: 'Romeo Oh Romeo',
      bartender: 'Set des Barkeepers',
      wyatt: 'Wyatt Earp Set',
      flint: 'Flint Eastwood Set',
      eric: 'Eric Pinter Set',
      jerry: 'Jerry Easter Set',
      steaming: 'Dampfwaffen',
      nothingFoundTitle: 'Suche abgebrochen',
      nothingFound: 'Keine Gegenstände dieser Art gefunden!',
      update: 'Update',
      updateAvailable: 'Für das Script ist eine neue Version erhältlich',
      cancel: 'Abbrechen',
    },
    es_ES: {
      language: 'Spanish (español)',
      ApiGui: 'Este script nos ayuda a que, con solo 2 clicks, poder ver todos los tipos de buff o conjuntos que tenemos para una cosa específica.<br>Le damos al boton de la derecha con forma de "B" y elegimos el tipo de buff que queramos y nos saldra en el inventario.',
      contact: 'Contacto',
      adventure: '-Buffs de Aventuras',
      work: '-Buffs de Trabajo',
      duel: '-Buffs de Duelo',
      energy: '-Buffs Energia',
      skill: '-Buffs de Habilidades',
      fk: '-Buffs de Batalla',
      speed: '-Buffs de Velocidad',
      lp: '-Buffs de Salud',
      special: '-Premio/especial',
      event: '-Eventos',
      chests: '-Cajas y cofres',
      gold: 'Equipo de oro',
      greenhorn: 'Kit de novato',
      holiday: 'Kit festivo',
      dancer: 'Conjunto de la bailarina',
      farmer: 'Conjunto del campesino',
      gentleman: 'Conjunto del caballero',
      indian: 'Conjunto del indio',
      mexican: 'Conjunto del mexicano',
      pilgrimF: 'Conjunto de la peregrina',
      pilgrimM: 'Conjunto del peregrino',
      charlatan: 'Conjunto del matasanos',
      sleepy: 'Gruñón mañanero',
      twtimes: 'TW Times set',
      collector: 'Conjunto de Coleccionista',
      easterbunny: 'Conjunto de conejo de Pascua',
      firefighter: 'Equipo para bombero',
      walker: 'Conjunto de Walker',
      natty: 'Set de Natty Bumppo',
      allan: 'Set de Allain Quatermain',
      chingachgook: 'Set de Chingachgook',
      cupid: 'Set de Cupido',
      cartwright: 'Set de Cartwright',
      doc: 'Set de Doc',
      freeman: 'Set de Freeman',
      party: 'Conjunto de fiesta',
      fair: 'Set de feriante',
      soap: 'Set de famosa',
      christopher: 'Set de cabalgata de Christopher',
      wood: 'Conjunto de madera de mago',
      will: 'Set de Will Munny',
      jeremiah: 'Set de Jeremiah Johnson',
      elfego: 'Set de Elfego Baca',
      independence: 'Ropa de la Independencia',
      fire: 'Hielo y fuego',
      eighthour: 'Suministra heno ocho horas',
      franke: 'Set de Frank Eaton',
      george: 'Set de George Mcjunkin',
      king: 'Set de King Fisher',
      bavarian: 'Equipo tradicional de Baviera',
      prairie: 'Conjunto de la pradera',
      adventurer: 'Conjunto de Aventurero',
      duelset: 'Conjunto de duelo',
      worker: 'Conjunto de trabajador',
      soldier: 'Conjunto de Soldado',
      thunder: 'Rayos y luces',
      nightmare: 'Set de pesadilla',
      confederate: 'Set confederado',
      noname: 'El set sin nombre',
      winter: 'Set del invierno',
      valentine: 'Herramienta de San Valentin',
      lover: 'Conjunto del Lover',
      stpatrick: 'Conjunto de St. Patrick',
      lonerider: 'Llanero solitario',
      cullen: 'Set de Cullen Baker',
      bass: 'Set de Bass Reeves',
      pat: 'Set de Pat Desmond',
      easter: 'Set de Pascua',
      steam: 'Vapor y punk',
      blackbart: 'Set de Black Bart',
      bob: 'Set de Bob Dalton',
      jesse: 'Set de Jesse Chisholm',
      thomas: 'Conjunto de la independencia de Thomas Jefferson',
      nihon: 'Nihon no Buki',
      outlaw: 'Equipo de forajido',
      bill: 'Set de Bill Doolin',
      deadwood: 'Set de Deadwood Dick',
      frankj: 'Set de Frank James',
      ludwig: 'Conjunto de Ludwif Oktoberfest',
      manitus: 'Armas de Manitu',
      gonzales: 'Conjunto de la estrella de la velocidad Gonzales',
      catrina: 'Conjunto de Catrina',
      mariachi: 'Conjunto Mariachi',
      nobleman: 'Set de Noble',
      aztecan: 'Set Azteca',
      ghost: 'Conjunto del fantasma de la navidad',
      romeo: 'Romeo oh Romeo',
      bartender: 'Conjunto de Barman',
      wyatt: 'Conjunto de Wyatt Earp',
      flint: 'Conjunto de Flint Westwood',
      eric: 'Conjunto de Eric Pinter',
      jerry: 'Conjunto de Jerry Easter',
      steaming: 'Armas de Humo',
      nothingFoundTitle: 'Búsqueda cancelado',
      nothingFound: 'No tienes de este tipo!',
      update: 'Actualización',
      updateAvailable: 'Una nueva versión está disponible',
      cancel: 'Cancelar',
    },
    pl_PL: {
      language: 'Polish (polski)',
      ApiGui: 'Wyszukiwarka wzmocnień, przedmiotów i zestawy.<br>Skrypt szuka w plecaku zestawy oraz inne przedmioty danego typu.',
      contact: 'Kontakt',
      adventure: '-Przygody',
      work: '-Punkty pracy',
      duel: '-Pojedynki',
      energy: '-Energia',
      skill: '-Umiejętności',
      fk: '-Bitwy fortowe',
      speed: '-Prędkość',
      lp: '-HP',
      special: '-Premia/specjalny',
      event: '-Eventy',
      chests: '-Przedmioty - Skrzynie',
      gold: 'Złoty komplet',
      greenhorn: 'Zestaw nowicjusza',
      holiday: 'Zestaw świąteczny',
      dancer: 'Komplet Tancerki',
      farmer: 'Komplet Farmera',
      gentleman: 'Komplet Dżentelmena',
      indian: 'Komplet Dżentelmena',
      mexican: 'Komplet Meksykanina',
      pilgrimF: 'Komplet Pielgrzyma(damski)',
      pilgrimM: 'Komplet Pielgrzyma',
      charlatan: 'Komplet Konowała',
      sleepy: 'Śpioszek',
      twtimes: 'Zestaw "Echo The West"',
      collector: 'Zestaw kolekcjonera',
      easterbunny: 'Zestaw zajączka wielkanocnego',
      firefighter: 'Komplet strażaka',
      walker: 'Zestaw Walkera',
      natty: 'Zestaw Nathaniela Bumppo',
      allan: 'Zestaw Allana Quatermaina',
      chingachgook: 'Zestaw Chingachgooka',
      cupid: 'Zestaw kupidyna',
      cartwright: 'Zestaw Cartwrighta',
      doc: 'Zestaw Doca',
      freeman: 'Zestaw Freemana',
      party: 'Zestaw imprezowy',
      fair: 'Zestaw cyrkowy',
      soap: 'Zestaw opery mydlanej',
      christopher: 'Zestaw paradny Christophera',
      wood: 'Zestaw leśnego maga',
      will: 'Zestaw Willa Munnyego',
      jeremiah: 'Zestaw Jeremiaha Johnsona',
      elfego: 'Zestaw Elfego Baca',
      independence: 'Zestaw Niepodległości',
      fire: 'Ogień i lód',
      eighthour: 'Zestaw Ośmiogodzinny',
      franke: 'Zestaw Franka Eatona',
      george: 'Zestaw Georga McJunkina',
      king: 'Zestaw Kinga Fishera',
      bavarian: 'Tradycyjny strój bawarski',
      prairie: 'Zestaw preriowy',
      adventurer: 'Zestaw poszukiwacza przygód',
      duelset: 'Zestaw zawadiaki',
      worker: 'Zestaw robotnika',
      soldier: 'Zestaw żołnierza',
      thunder: 'Grzmot i piorun',
      nightmare: 'Zestaw koszmaru',
      confederate: 'Zestaw konfederatów',
      noname: 'Nienazwany zestaw',
      winter: 'Zimowe zestaw',
      valentine: 'Walentynkowa zestaw',
      lover: 'Uroczy zestaw',
      stpatrick: 'Zestaw św. Patryka',
      lonerider: 'Samotny strażnik',
      cullen: 'Zestaw Cullena Bakera',
      bass: 'Zestaw Bassa Reevesa',
      pat: 'Zestaw Pata Desmonda',
      easter: 'Zestaw wielkanocnej rozgrywki',
      steam: 'Para i Punk',
      blackbart: 'Zestaw Black Barta',
      bob: 'Zestaw Boba Daltona',
      jesse: 'Zestaw Jessego Chisholma',
      thomas: 'Zestaw Niepodległości Jeffersona',
      nihon: 'Nihon no Buki',
      outlaw: 'Sprzęt wyjętego spod prawa',
      bill: 'Zestaw Billa Doolinsa',
      deadwood: 'Zestaw Deadwooda Dicksa',
      frankj: 'Zestaw Franka Jamesa',
      ludwig: 'Zestaw Ludwika Oktoberfest',
      manitus: 'Bronie Manitu',
      gonzales: 'Zestaw Speedy Gonzales',
      catrina: 'Komplet La Catriny',
      mariachi: 'Komplet Mariachi',
      nobleman: 'Komplet Szlachcica',
      aztecan: 'Aztecki komplet',
      ghost: 'Zestaw Ducha świąt Bożego Narodzenia',
      romeo: 'Romeo oh Romeo',
      bartender: 'Zestaw Barmana',
      wyatt: 'Zestaw Wyatta Earpa',
      flint: 'Zestaw Flinta Eastwooda',
      eric: 'Zestaw Erica Pintera',
      jerry: 'Zestaw Jerry\'ego Wielkanocnego',
      steaming: 'Bronie parowe',
      nothingFoundTitle: 'Szukam...',
      nothingFound: 'Nie posiadasz żadnych przedmiotów tego typu!',
      update: 'Aktualizacja',
      updateAvailable: 'Nowa wersja skryptu jest dostępna',
      cancel: 'Anuluj',
    },
    it_IT: {
      language: 'Italian (italiano)',
      ApiGui: 'Searching for specific sets or buffs? Easy job using this script.<br>Just some clicks and the items, which you wanted to find, are showed in your inventory.',
      contact: 'Contatto',
      adventure: '-Avventure',
      work: '-Bonus Lavoro',
      duel: '-Bonus Duello',
      energy: '-Bonus Energia',
      skill: '-Bonus Abilità',
      fk: '-Bonus Forte',
      speed: '-Bonus Velocità',
      lp: '-Bonus Punti Vita',
      special: '-Premio/speciale',
      event: '-Eventi',
      chests: '-Aprire e decomprimere',
      gold: 'Abito dorato',
      greenhorn: 'Set del novizio',
      holiday: 'Set vacanze',
      dancer: 'Abito della ballerina',
      farmer: 'Abito del contadino',
      gentleman: 'Abito da gentiluomo',
      indian: 'Abito da Indiano',
      mexican: 'Abito da Messicano',
      pilgrimF: 'Vestito da pellegrino',
      pilgrimM: 'Abito da Pellegrino',
      charlatan: 'Abito da ciarlatano',
      sleepy: 'Dormiglione',
      twtimes: 'Set del giornalaio',
      collector: 'Set del Collezionista',
      easterbunny: 'Set del coniglio pasquale',
      firefighter: 'Abito da pompiere',
      walker: 'Set di Walker',
      natty: 'Set di Natty Bumppo',
      allan: 'Set di Allan Quatermain',
      chingachgook: 'Set di Chingachgook',
      cupid: 'Set di Cupido',
      cartwright: 'Set di Cartwright',
      doc: 'Set di Doc',
      freeman: 'Set di Freeman',
      party: 'Abito della festa',
      fair: 'Set della fiera',
      soap: 'Set della Soap Opera',
      christopher: 'Set da parata di Christopher',
      wood: 'Set mago del legno',
      will: 'Set di Will Munny',
      jeremiah: 'Set di Jeremiah Johnson',
      elfego: 'Set di Elfego Baca',
      independence: 'Abiti dell\'indipendenza',
      fire: 'Fuoco e Ghiaccio',
      eighthour: 'Fornitura di fieno per otto ore',
      franke: 'Set di Frank Eaton',
      george: 'Set di George McJunkin',
      king: 'Set di King Fisher',
      bavarian: 'Abiti tradizionali bavaresi',
      prairie: 'Set della prateria',
      adventurer: 'Set dell\'avventuriero',
      duelset: 'Set del duellante',
      worker: 'Set del lavoratore',
      soldier: 'Set del soldato',
      thunder: 'Tuono e fulmine',
      nightmare: 'Set dell\'incubo',
      confederate: 'Set confederato',
      noname: 'Il set senza nome',
      winter: 'Set inverno',
      valentine: 'Set di San Valentino',
      lover: 'Set dell\'amore',
      stpatrick: 'Set di San Patrizio',
      lonerider: 'Lone Rider',
      cullen: 'Set di Cullen Baker',
      bass: 'Set di Bass Reeves',
      pat: 'Set di Pat Desmond',
      easter: 'Set del regolamento dei conti di Pasqua',
      steam: 'Steam and Punk',
      blackbart: 'Set di Black Bart',
      bob: 'Set di Bob Dalton',
      jesse: 'Set di Jesse Chisholm',
      thomas: 'Set dell\'Indipendenza di Thomas Jefferson',
      nihon: 'Nihon no Buki',
      outlaw: 'Attrezzatura del Fuorilegge',
      bill: 'Set di Bill Doolin',
      deadwood: 'Set di Deadwood Dick',
      frankj: 'Set di Frank James',
      ludwig: 'Set dell\'Oktoberfest di Ludwig',
      manitus: 'Armi di Manitu',
      gonzales: 'Set del velocista Gonzales',
      catrina: 'Set di La Catrina',
      mariachi: 'Set di El Mariachi',
      nobleman: 'Set di Nobleman',
      aztecan: 'Set azteco',
      ghost: 'Set degli spiriti di Natale',
      romeo: 'Romeo Oh Romeo',
      bartender: 'Set del barista',
      wyatt: 'Set di Wyatt Earp',
      flint: 'Set di Flint Westwood',
      eric: 'Set di Eric Pinter',
      jerry: 'Set di Jerry Easter',
      steaming: 'Armi a vapore',
      nothingFoundTitle: 'Ricerca di articoli',
      nothingFound: 'Non è stato trovato nulla!',
      update: 'Atualizar',
      updateAvailable: 'Script aggiornamento disponibile',
      cancel: 'Cancelar',
    },
    pt_PT: {
      language: 'Portuguese (português)',
      ApiGui: 'Searching for specific sets or buffs? Easy job using this script.<br>Just some clicks and the items, which you wanted to find, are showed in your inventory.',
      contact: 'Contato',
      adventure: '-Aventuras',
      work: '-Buffs Trabalho',
      duel: '-Buffs Duelo',
      energy: '-Buffs Energia',
      skill: '-Buffs Habilidade',
      fk: '-Buffs Batalha',
      speed: '-Buffs Velocidade',
      lp: '-Buffs Saúde',
      special: '-Prêmio/especial',
      event: '-Eventos',
      chests: '-Abrir e desempacotar',
      gold: 'Conjunto dourado',
      greenhorn: 'Conjunto de novato',
      holiday: 'Conjunto festivo',
      dancer: 'Conjunto de dançarina',
      farmer: 'Conjunto de agricultor',
      gentleman: 'Conjunto de cavalheiro',
      indian: 'Conjunto de índio',
      mexican: 'Conjunto de mexicano',
      pilgrimF: 'Conjunto de peregrina',
      pilgrimM: 'Conjunto de peregrino',
      charlatan: 'Conjunto de charlatão',
      sleepy: 'Distraído',
      twtimes: 'Conjunto Estrela d\'Oeste',
      collector: 'Conjunto de colecionador',
      easterbunny: 'Conjunto de Coelho da Páscoa',
      firefighter: 'Conjunto de bombeiro',
      walker: 'Conjunto do Walker',
      natty: 'Conjunto do Natty Bumppo',
      allan: 'Conjunto do Allain Quatermain',
      chingachgook: 'Conjunto do Chingachgooks',
      cupid: 'Conjunto de Cupido',
      cartwright: 'Conjunto do Cartwright',
      doc: 'Conjunto do Doc',
      freeman: 'Conjunto do Freeman',
      party: 'Conjunto de festa',
      fair: 'Conjunto de feira',
      soap: 'Conjunto de Novela',
      christopher: 'Conjunto de desfile do Christopher',
      wood: 'Conjunto do mágico da madeira',
      will: 'Conjunto do Will Munny',
      jeremiah: 'Conjunto do Jeremiah Johnson',
      elfego: 'Conjunto do Elfego Baca',
      independence: 'Conjunto da Independência',
      fire: 'Fogo e Gelo',
      eighthour: 'Fornecimento de feno para 8 horas',
      franke: 'Conjunto do Frank Eaton',
      george: 'Conjunto do George McJunkin',
      king: 'Conjunto do King Fisher',
      bavarian: 'Traje Tradicional Bávaro',
      prairie: 'Conjunto da Pradaria',
      adventurer: 'Conjunto de Aventureiro',
      duelset: 'Conjunto de Duelo',
      worker: 'Conjunto de Trabalhador',
      soldier: 'Conjunto de Soldado',
      thunder: 'Relâmpagos e Trovões',
      nightmare: 'Conjunto Assustador',
      confederate: 'Conjunto da confederação',
      noname: 'Conjunto sem nome',
      winter: 'Conjunto de inverno',
      valentine: 'Conjunto de Dia dos Namorados',
      lover: 'Conjunto dos apaixonados',
      stpatrick: 'Conjunto de St. Patrick',
      lonerider: 'O ranger solitário',
      cullen: 'Conjunto do Cullen Baker',
      bass: 'Conjunto do Bass Reeves',
      pat: 'Conjunto do Pat Desmond',
      easter: 'Conjunto de Páscoa',
      steam: 'Poder do vapor',
      blackbart: 'Conjunto do Black Bart',
      bob: 'Conjunto do Bob Dalton',
      jesse: 'Conjunto do Jesse Chisholm',
      thomas: 'Conjunto da Independência do Thomas Jefferson',
      nihon: 'Nihon no Buki',
      outlaw: 'Equipamento do Bandido',
      bill: 'Conjunto do Bill Doolin',
      deadwood: 'Conjunto do Deadwood Dick',
      frankj: 'Conjunto do Frank James',
      ludwig: 'Conjunto Oktoberfest do Ludwig',
      manitus: 'Armas do Manitu',
      gonzales: 'Conjunto do Gonzales',
      catrina: 'Conjunto de La Catrina',
      mariachi: 'Conjunto de Mariachi',
      nobleman: 'Conjunto de Nobre',
      aztecan: 'Conjunto de Azteca',
      ghost: 'Conjunto do fantasma de Natal',
      romeo: 'Romeu Oh Romeu',
      bartender: 'Conjunto de Empregado de Mesa',
      wyatt: 'Conjunto do Wyatt Earp',
      flint: 'Conjunto do Flint Eastwood',
      eric: 'Conjunto do Eric Pinter',
      jerry: 'Conjunto Jerry de Páscoa',
      steaming: 'Armas de vapor',
      nothingFoundTitle: 'Search cancelled',
      nothingFound: 'No items of this type found!',
      update: 'Atualizar',
      updateAvailable: 'Uma nova versão do roteiro está disponível',
      cancel: 'Cancelar',
    },
    fr_FR: {
      language: 'French (français)',
      ApiGui: 'Avec cette script, il est très facile de trouver les sets ou les buffs qu\'on cherche.<br>Après qu\'on a cliqué une catégorie, les objets recherchés sont affichés dans l\'inventaire.',
      contact: 'Contact',
      adventure: '-Aventures',
      work: '-Travail',
      duel: '-Duels',
      energy: '-Bonus de repos',
      skill: '-Aptitudes',
      fk: '-Fort bataille',
      speed: '-Vitesse',
      lp: '-Points de vie bonus',
      special: '-Prime/spéciale',
      event: '-Événements',
      chests: '-Ouvrir et déballer',
      gold: 'Set en or',
      greenhorn: 'Set du blanc-bec',
      holiday: 'Set spécial pour les fêtes',
      dancer: 'Set de danseuse',
      farmer: 'Set de fermier',
      gentleman: 'Set du gentleman',
      indian: 'Set d\'Indien',
      mexican: 'Set de Mexicain',
      pilgrimF: 'Set de pèlerine',
      pilgrimM: 'Set de pèlerin',
      charlatan: 'Set de charlatan',
      sleepy: 'Grincheux',
      twtimes: 'Set TW-Times',
      collector: 'Set du collectionneur',
      easterbunny: 'Set du lapin de Pâques',
      firefighter: 'Set de pompier',
      walker: 'Set de Walker',
      natty: 'Set de Natty Bumppo',
      allan: 'Set d\'Allan Quatermain',
      chingachgook: 'Set de Chingachgook',
      cupid: 'Set de Cupidon',
      cartwright: 'Set de Cartwright',
      doc: 'Set de Doc',
      freeman: 'Set de Freeman',
      party: 'Set de fête',
      fair: 'Set du forain',
      soap: 'Set de Soap Opéra',
      christopher: 'Set de la parade de Christopher',
      wood: 'Set du magicien du bois',
      will: 'Set de Will Munny',
      jeremiah: 'Set de Jeremiah Johnson',
      elfego: 'Set d\'Elfego Baca',
      independence: 'Vêtements de l\'indépendance',
      fire: 'Feu et glace',
      eighthour: 'Journée de travail à 8h',
      franke: 'Set de Franck Eaton',
      george: 'Set de George McJunkin',
      king: 'Set de King Fisher',
      bavarian: 'Tenue traditionnelle bavaroise',
      prairie: 'Set de l\'ouest',
      adventurer: 'Set de l\'aventurier',
      duelset: 'Set du duelliste',
      worker: 'Set de l\'ouvrier',
      soldier: 'Set du soldat',
      thunder: 'Tonnerre et foudre',
      nightmare: 'Set du cauchemar',
      confederate: 'Set confédéré',
      noname: 'Set sans nom',
      winter: 'Set d\'hiver',
      valentine: 'Set de Valentin',
      lover: 'Set de l\'amoureux',
      stpatrick: 'Set de la Saint-Patrick',
      lonerider: 'Cavalier solitaire',
      cullen: 'Set de Cullen Baker',
      bass: 'Set de Bass Reeve',
      pat: 'Set de Pat Desmond',
      easter: 'Set de la confrontation de Pâques',
      steam: 'Vapeur & Punk',
      blackbart: 'Set de Black Bart',
      bob: 'Set de Bob Dalton',
      jesse: 'Set de Jesse Chisholm',
      thomas: 'Set de l\'indépendance de Thomas Jefferson',
      nihon: 'Nihon no Buki',
      outlaw: 'Équipement du hors-la-loi',
      bill: 'Set de Bill Doolin',
      deadwood: 'Set de Deadwood Dick',
      frankj: 'Set de Franck James',
      ludwig: 'Set de l\'Oktoberfest de Ludwig',
      manitus: 'Armes de Manitu',
      gonzales: 'Set de Gonzales Speedy',
      catrina: 'Set de La Catrina',
      mariachi: 'Set du Mariachi',
      nobleman: 'Set de l\'Aristocrate',
      aztecan: 'Set Aztèque',
      ghost: 'Set des fantômes de Noël',
      romeo: 'Roméo Oh Roméo ',
      bartender: 'Set du barman',
      wyatt: 'Set de Wyatt Earp',
      flint: 'Set de Flint Eastwood',
      eric: 'Set d\'Eric Pinter',
      jerry: 'Set de Jerry Easter',
      steaming: 'Armes à vapeur',
      nothingFoundTitle: 'Recherche arrêté',
      nothingFound: 'Pas d\'objets de cette sorte trouvé!',
      update: 'Mise à jour',
      updateAvailable: 'Une nouvelle version du script est disponible',
      cancel: 'Annuler',
    },
    sk_SK: {
      language: 'Slovak (slovenčina)',
      ApiGui: 'Searching for specific buffs? Easy job using this script.<br>Just some clicks and the buffs, which you wanted to find, are showed in your inventory.',
      contact: 'Kontakt',
      adventure: '-Dobrodružstvá',
      work: '-Práca',
      duel: '-Duely',
      energy: '-Energia',
      skill: '-Schopnosti',
      fk: '-Boje',
      speed: '-Cestovanie',
      lp: '-Zdravie',
      special: '-Prémia/špeciálne',
      event: '-Eventy',
      chests: '-Tašky a truhly',
      gold: 'Zlatá súprava',
      greenhorn: 'Zelenáčova súprava',
      holiday: 'Prázdninová súprava',
      dancer: 'Tanečná súprava',
      farmer: 'Farmárska súprava',
      gentleman: 'Gentlemanova súprava',
      indian: 'Indiánska súprava',
      mexican: 'Mexická súprava',
      pilgrimF: 'Pútničkina súprava',
      pilgrimM: 'Pútnikova súprava',
      charlatan: 'Mastičkárska súprava',
      sleepy: 'Sedmospáč',
      twtimes: 'Súprava West novín',
      collector: 'Zberateľská súprava',
      easterbunny: 'Súprava veľkonočného zajačika',
      firefighter: 'Požiarnicka súprava',
      walker: 'Walkerova súprava',
      natty: 'Súprava Nattyho Bumppoa',
      allan: 'Súprava Allana Quatermaina',
      chingachgook: 'Čingačgukova súprava',
      cupid: 'Amorove oblečenie',
      cartwright: 'Cartwrightova súprava',
      doc: 'Schultzova súprava',
      freeman: 'Freemanova súprava',
      party: 'Narodeninová súprava',
      fair: 'Cirkusová súprava',
      soap: 'Divadelná súprava',
      christopher: 'Christopherova slávnostná súprava',
      wood: 'Súprava dreveného kúzelníka',
      will: 'Munnyho súprava',
      jeremiah: 'Johnsonova súprava',
      elfego: 'Elfegova súprava',
      independence: 'Šaty nezávislosti',
      fire: 'Oheň a ľad',
      eighthour: 'Grilovacia súprava',
      franke: 'Súprava Franka Eatona',
      george: 'Súprava George McJunkinsa',
      king: 'Súprava King Fishera',
      bavarian: 'Tradičné bavorské šaty',
      prairie: 'Prérijná súprava',
      adventurer: 'Dobrodruhova súprava',
      duelset: 'Duelantova súprava',
      worker: 'Pracovníkova súprava',
      soldier: 'Vojakova súprava',
      thunder: 'Blesk a hrom',
      nightmare: 'Súprava nočnej mory',
      confederate: 'Konfederačná súprava',
      noname: 'Súprava bez mena',
      winter: 'Vianočná súprava',
      valentine: 'Valentínova súprava',
      lover: 'Milovníkova súprava',
      stpatrick: 'Súprava svätého Patrika',
      lonerider: 'Osamelý jazdec',
      cullen: 'Cullen Bakerova súprava',
      bass: 'Bass Reevesova súprava',
      pat: 'Pat Desmondova súprava',
      easter: 'Súprava veľkonočného zúčtovania',
      steam: 'Steampunk',
      blackbart: 'Black Bartova súprava',
      bob: 'Bob Daltonova súprava',
      jesse: 'Jesse Chisholmova súprava',
      thomas: 'Thomas Jeffersonova súprava nezávislosti',
      nihon: 'Nihon no Buki',
      outlaw: 'Odpadlíkova súprava',
      bill: 'Bill Doolinova súprava',
      deadwood: 'Deadwood Dickova súprava',
      frankj: 'Frank Jamesova súprava',
      ludwig: 'Ludwigova súprava',
      manitus: 'Manituove zbrane',
      gonzales: 'Gonzalesova súprava',
      catrina: 'La Catrina súprava',
      mariachi: 'El Mariachiho súprava',
      nobleman: 'Šľachticova súprava',
      aztecan: 'Aztécka súprava',
      ghost: 'Súprava duchov Vianoc',
      romeo: 'Rómeova súprava',
      bartender: 'Barmanova súprava',
      wyatt: 'Wyatt Earpova súprava',
      flint: 'Flint Westwoodova súprava',
      eric: 'Eric Pinterova súprava',
      jerry: 'Jerryho veľkonočná súprava',
      steaming: 'Parné zbrane',
      nothingFoundTitle: 'Hľadám posilnenie',
      nothingFound: 'Nemáte tento typ!',
      update: 'Aktualizovať',
      updateAvailable: 'Aktualizácie skriptu je k dispozícii',
      cancel: 'Zavrieť',
    },
    /*en_US: {
      language: 'None (English)',
      ApiGui: 'Searching for specific sets or buffs? Easy job using this script.<br>Just some clicks and the items, which you wanted to find, are showed in your inventory.',
      contact: 'Contact',
      adventure: '-Adventures',
      work: '-Work',
      duel: '-Duels',
      energy: '-Energy',
      skill: '-Skill points',
      fk: '-Fort battles',
      speed: '-Speed',
      lp: '-Health points',
      special: '-Premium/special',
      event: '-Events',
      chests: '-Open & unpack',
	  gold: '',
	  greenhorn: '',
	  holiday: '',
	  dancer: '',
	  farmer: '',
	  gentleman: '',
	  indian: '',
	  mexican: '',
	  pilgrimF: '',
	  pilgrimM: '',
	  charlatan: '',
	  sleepy: '',
	  twtimes: '',
	  collector: '',
	  easterbunny: '',
	  firefighter: '',
	  walker: '',
	  natty: '',
	  allan: '',
	  chingachgook: '',
	  cupid: '',
	  cartwright: '',
	  doc: '',
	  freeman: '',
	  party: '',
	  fair: '',
	  soap: '',
	  christopher: '',
	  wood: '',
	  will: '',
	  jeremiah: '',
	  elfego: '',
	  independence: '',
	  fire: '',
	  eighthour: '',
	  franke: '',
	  george: '',
	  king: '',
	  bavarian: '',
	  prairie: '',
	  adventurer: '',
	  duelset: '',
	  worker: '',
	  soldier: '',
	  thunder: '',
	  nightmare: '',
	  confederate: '',
	  noname: '',
	  winter: '',
	  valentine: '',
	  lover: '',
	  stpatrick: '',
	  lonerider: '',
	  cullen: '',
	  bass: '',
	  pat: '',
	  easter: '',
	  steam: '',
	  blackbart: '',
	  bob: '',
	  jesse: '',
	  thomas: '',
	  nihon: '',
	  outlaw: '',
	  bill: '',
	  deadwood: '',
	  frankj: '',
	  ludwig: '',
	  manitus: '',
	  gonzales: '',
	  catrina: '',
	  mariachi: '',
	  nobleman: '',
	  aztecan: '',
	  ghost: '',
	  romeo: '',
	  bartender: '',
	  wyatt: '',
	  flint: '',
	  eric: '',
	  jerry: '',
	  steaming: '',
	  nothingFoundTitle: 'Search cancelled',
      nothingFound: 'No items of this type found!',
	  update: 'Update',
      updateAvailable: 'A new version of the script is available',
      cancel: 'Cancel',*/
  };
  QISlang = langs.hasOwnProperty(Game.locale) ? langs[Game.locale] : langs.en_US;
  var quicksearchApi = TheWestApi.register('QuickSearch', quicksearch.name, quicksearch.minGame, quicksearch.maxGame, quicksearch.author, quicksearch.website);
  quicksearchApi.setGui('<br><i>Language detected: </i>' + QISlang.language + '<br><br>' + QISlang.ApiGui + '<br><br><i>' + quicksearch.name + ' v' + quicksearch.version +
  '</i><br><br><br><b>' + QISlang.contact + ':</b><ul style="margin-left:15px;"><li>Send a message to <a target=\'_blanck\' href="http://om.the-west.de/west/de/player/?ref=west_invite_linkrl&player_id=647936&world_id=13&hash=7dda">Tom Robert on German world Arizona</a></li>' +
  '<li>Contact me on <a target=\'_blanck\' href="https://greasyfork.org/forum/messages/add/Tom Robert">Greasy Fork</a></li>' +
  '<li>Message me on one of these The West Forum:<br>/ <a target=\'_blanck\' href="http://forum.the-west.de/private.php?do=newpm&u=24502">deutsches Forum</a> / ' +
  '<a target=\'_blanck\' href="http://forum.the-west.net/private.php?do=newpm&u=37219">English forum</a> / <a target=\'_blanck\' href="http://forum.the-west.pl/private.php?do=newpm&u=32083">forum polski</a> / ' +
  '<a target=\'_blanck\' href="http://forum.the-west.es/private.php?do=newpm&u=13770">foro español</a> /<br>/ <a target=\'_blanck\' href="http://forum.the-west.ru/private.php?do=newpm&u=27430">России форум</a> / ' +
  '<a target=\'_blanck\' href="http://forum.the-west.fr/private.php?do=newpm&u=17783">forum français</a> / <a target=\'_blanck\' href="http://forum.the-west.it/private.php?do=newpm&u=14287">forum italiano</a> / ' +
  '<a target=\'_blanck\' href="http://forum.beta.the-west.net/private.php?do=newpm&u=4072">beta forum</a> /<br>I will get an e-mail when you sent me the message <img src="../images/chat/emoticons/smile.png"></li></ul>');
  var TW_Widgets = new Object();
  TW_Widgets.MenuButton = function (image, title, onclick) {
    var self = this;
    this.isHovered = false;
    this.onClick = onclick;
    var clicked = function (e) {
      if (self.onClick) {
        self.onClick(self, e);
      }
    };
    var repaint = function () {
      var x = !self.isHovered ? 0 : - 25;
      self.obj.css('background-position', x + 'px 0px');
    };
    var mouseIn = function () {
      self.isHovered = true;
      repaint();
    };
    var mouseOut = function () {
      self.isHovered = false;
      repaint();
    };
    this.obj = $('<div class=\'menulink\' title=\'' + title + '\' />').css('background-image', 'url(' + image + ')');
    this.obj.hover(mouseIn, mouseOut);
    this.obj.click(clicked);
    $('div#ui_menubar').append($('<div class=\'ui_menucontainer\' />').append(this.obj).append('<div class=\'menucontainer_bottom\' />'));
  };
  var TW_Sets = [
    {
      name: QISlang.adventure,
      items: [
        1879000,
        1909000,
        1910000,
        1991000,
        2110000,
        2111000,
        2112000,
        2113000,
        2114000,
        2115000,
        2121000,
        2122000,
        2285000,
        2286000,
        2287000,
        2288000,
        2289000,
      ]
    },
    {
      name: QISlang.work,
      items: [
        1879000,
        1891000,
        1928000,
        1934000,
        1939000,
        1940000,
        1981000,
        1982000,
        1984000,
        1997000,
        1998000,
        2100000,
        2101000,
        2102000,
        2103000,
        2104000,
        2105000,
        2118000,
        2126000,
        2128000,
        2129000,
        2130000,
        2164000,
        2206000,
        2207000,
        2208000,
        2209000,
        2210000,
        2211000,
        2212000,
        2213000,
        2214000,
        2215000,
        2216000,
        2217000,
        2218000,
        2219000,
        2220000,
        2221000,
        2222000,
        2225000,
        2247000,
        2248000,
        2249000,
        2250000,
        2251000,
        2268000,
        2270000,
        2285000,
        2286000,
        2287000,
        2288000,
        2289000,
        2290000,
        2291000,
        2302000,
        2313000,
        2314000,
        2317000,
        2318000,
        2321000,
        2322000,
        2325000,
        2326000,
        2353000,
        2391000,
        2465000,
        2466000,
        2467000,
        2468000,
        2484000,
        2491000,
        2493000,
        2495000,
        2497000,
        2516000,
        2525000,
        2528000,
        2531000,
        2576000,
        2667000,
        2696000,
        2706000,
        2707000,
        12701000,
        13701000,
        17028000,
        21342000,
        21343000,
        185200000,
        253800000,
      ]
    },
    {
      name: QISlang.duel,
      items: [
        1863000,
        1864000,
        1871000,
        1872000,
        1882000,
        1901000,
        1908000,
        1916000,
        1934000,
        1938000,
        1939000,
        1946000,
        1952000,
        1981000,
        1982000,
        1984000,
        1985000,
        1988000,
        2128000,
        2129000,
        2130000,
        2268000,
        2285000,
        2286000,
        2287000,
        2288000,
        2289000,
        2293000,
        2355000,
        2391000,
        2467000,
        2468000,
        2484000,
        2516000,
        2529000,
        2576000,
        2669000,
        2695000,
        12703000,
        13703000,
        17028000,
        185202000,
      ]
    },
    {
      name: QISlang.energy,
      items: [
        1890000,
        1892000,
        1898000,
        1928000,
        1937000,
        1943000,
        1969000,
        1970000,
        1971000,
        1985000,
        1997000,
        2128000,
        2129000,
        2130000,
        2235000,
        2294000,
        2296000,
        2312000,
        2316000,
        2320000,
        2324000,
        2356000,
        2358000,
        2485000,
        2486000,
        2491000,
        2493000,
        2495000,
        2497000,
        2525000,
        2670000,
        2672000,
        12704000,
        12706000,
        13704000,
        13706000,
        16100000,
        17028000,
        21341000,
        21345000,
        185203000,
        185205000,
      ]
    },
    {
      name: QISlang.skill,
      items: [
        1863000,
        1864000,
        1871000,
        1872000,
        1873000,
        1879000,
        1946000,
        1977000,
        1978000,
        1979000,
        1981000,
        1982000,
        1984000,
        1988000,
        2285000,
        2286000,
        2287000,
        2288000,
        2289000,
        2516000,
        2525000,
        2528000,
        2529000,
        2530000,
        2531000,
        253800000,
      ]
    },
    {
      name: QISlang.fk,
      items: [
        1872000,
        1873000,
        1900000,
        1909000,
        1910000,
        1946000,
        1949000,
        1982000,
        1990000,
        1991000,
        2106000,
        2107000,
        2108000,
        2109000,
        2110000,
        2111000,
        2112000,
        2113000,
        2114000,
        2115000,
        2119000,
        2120000,
        2121000,
        2122000,
        2123000,
        2124000,
        2125000,
        2127000,
        2258000,
        2259000,
        2260000,
        2261000,
        2269000,
        2285000,
        2286000,
        2287000,
        2288000,
        2289000,
        2467000,
        2516000,
        2522000,
        2525000,
        2529000,
        2530000,
        2576000,
        253800000,
      ]
    },
    {
      name: QISlang.speed,
      items: [
        1918000,
        1919000,
        1926000,
        1927000,
        1934000,
        1937000,
        1952000,
        1968000,
        1987000,
        2135000,
        2229000,
        2262000,
        2263000,
        2264000,
        2284000,
        2292000,
        2354000,
        2470000,
        2473000,
        2476000,
        2479000,
        2491000,
        2493000,
        2495000,
        2497000,
        2519000,
        2668000,
        12702000,
        13702000,
        185201000,
      ]
    },
    {
      name: QISlang.lp,
      items: [
        1883000,
        1892000,
        1898000,
        1946000,
        1974000,
        1991000,
        2116000,
        2117000,
        2235000,
        2253000,
        2254000,
        2255000,
        2256000,
        2257000,
        2295000,
        2296000,
        2357000,
        2358000,
        2486000,
        2525000,
        2671000,
        2672000,
        12705000,
        12706000,
        13705000,
        13706000,
        16100000,
        17028000,
        185204000,
        185205000,
      ]
    },
    {
      name: QISlang.special,
      items: [
        1977000,
        1978000,
        1979000,
        2196000,
        2197000,
        2198000,
        2199000,
        2200000,
        2201000,
        2202000,
        2203000,
        2204000,
        2205000,
        2247000,
        2248000,
        2249000,
        2250000,
        2251000,
        2270000,
        2302000,
        2311000,
        2312000,
        2313000,
        2314000,
        2315000,
        2316000,
        2317000,
        2318000,
        2319000,
        2320000,
        2321000,
        2322000,
        2323000,
        2324000,
        2325000,
        2326000,
        2421000,
        2465000,
        2466000,
        2467000,
        2468000,
        2470000,
        2472000,
        2473000,
        2475000,
        2476000,
        2478000,
        2479000,
        2481000,
        2482000,
        2484000,
        2485000,
        2486000,
        2491000,
        2493000,
        2495000,
        2497000,
        2559000,
        2560000,
        2576000,
        2695000,
        2696000,
        21340000,
        21341000,
        21342000,
        21343000,
      ]
    },
    {
      name: QISlang.event,
      items: [
        55000,
        2557000,
        2558000,
        2561000,
        2562000,
        2563000,
        2564000,
        2564000,
        2566000,
        2567000,
        2590000,
        2591000,
        2592000,
        2593000,
        2594000,
        2619000,
        2620000,
        2621000,
        2622000,
        2623000,
        2665000,
        2666000,
        2675000,
        2676000,
        2677000,
        2678000,
        2679000,
        2680000,
        2692000,
        2693000,
        2698000,
        12700000,
      ]
    },
    {
      name: QISlang.chests,
      items: [
        1868000,
        1869000,
        1878000,
        1887000,
        1888000,
        1897000,
        1905000,
        1906000,
        1915000,
        1923000,
        1924000,
        1933000,
        1960000,
        1961000,
        1964000,
        1967000,
        1975000,
        1976000,
        2131000,
        2132000,
        2133000,
        2134000,
        2136000,
        2137000,
        2138000,
        2139000,
        2144000,
        2152000,
        2172000,
        2173000,
        2174000,
        2175000,
        2176000,
        2187000,
        2192000,
        2193000,
        2194000,
        2195000,
        2196000,
        2197000,
        2198000,
        2199000,
        2200000,
        2201000,
        2202000,
        2203000,
        2204000,
        2205000,
        2226000,
        2227000,
        2297000,
        2298000,
        2299000,
        2300000,
        2305000,
        2329000,
        2330000,
        2331000,
        2332000,
        2333000,
        2334000,
        2335000,
        2336000,
        2337000,
        2338000,
        2345000,
        2359000,
        2360000,
        2361000,
        2362000,
        2379000,
        2380000,
        2381000,
        2382000,
        2383000,
        2384000,
        2385000,
        2393000,
        2394000,
        2395000,
        2396000,
        2397000,
        2421000,
        2460000,
        2461000,
        2462000,
        2487000,
        2488000,
        2489000,
        2490000,
        2499000,
        2507000,
        2518000,
        2521000,
        2524000,
        2527000,
        2533000,
        2534000,
        2535000,
        2536000,
        2537000,
        2538000,
        2540000,
        2542000,
        2556000,
        2557000,
        2558000,
        2559000,
        2560000,
        2561000,
        2562000,
        2563000,
        2564000,
        2564000,
        2566000,
        2567000,
        2579000,
        2580000,
        2581000,
        2585000,
        2586000,
        2587000,
        2588000,
        2589000,
        2590000,
        2591000,
        2592000,
        2593000,
        2594000,
        2602000,
        2603000,
        2604000,
        2605000,
        2606000,
        2614000,
        2615000,
        2616000,
        2617000,
        2618000,
        2619000,
        2620000,
        2621000,
        2622000,
        2623000,
        2624000,
        2626000,
        2627000,
        2628000,
        2629000,
        2630000,
        2645000,
        2646000,
        2647000,
        2648000,
        2650000,
        2665000,
        2666000,
        2673000,
        2674000,
        2675000,
        2676000,
        2677000,
        2678000,
        2679000,
        2680000,
        2685000,
        2687000,
        2688000,
        2689000,
        2690000,
        2692000,
        2693000,
        2694000,
        2698000,
        2699000,
        2700000,
        2701000,
        2702000,
        2703000,
        2704000,
        2705000,
        12700000,
        12709000,
        12710000,
        12711000,
        13711000,
        17000000,
        17001000,
        17002000,
        17003000,
        17004000,
        17005000,
        17006000,
        17007000,
        17008000,
      ]
    },
    {
      name: QISlang.gold,
      itemsk: [
        50000,
        136000,
        858000,
      ]
    },
    {
      name: QISlang.greenhorn,
      itemsk: [
        52000,
        262000,
        438000,
        569000,
        607000,
        859000,
        10148000,
        11118000,
        40000000,
      ]
    },
    {
      name: QISlang.holiday,
      itemsk: [
        137000,
        258000,
        437000,
        567000,
        609000,
        856000,
        1759000,
        10181000,
        40200000,
      ]
    },
    {
      name: QISlang.dancer,
      itemsk: [
        259000,
        368000,
        433000,
        566000,
        665000,
        1772000,
        10149000,
        11138000,
      ]
    },
    {
      name: QISlang.farmer,
      itemsk: [
        219000,
        321000,
        409000,
        797000,
        10025000,
        11005000,
        41045000,
      ]
    },
    {
      name: QISlang.gentleman,
      itemsk: [
        235000,
        354000,
        427000,
        537000,
        664000,
        1715000,
        10075000,
        11077000,
      ]
    },
    {
      name: QISlang.indian,
      itemsk: [
        96000,
        253000,
        369000,
        429000,
        512000,
        602000,
        904000,
        10094000,
        11137000,
      ]
    },
    {
      name: QISlang.mexican,
      itemsk: [
        95000,
        254000,
        312000,
        428000,
        561000,
        600000,
        792000,
        903000,
        10054000,
      ]
    },
    {
      name: QISlang.pilgrimF,
      itemsk: [
        256000,
        372000,
        431000,
        528000,
        723000,
        10218000,
        11035000,
      ]
    },
    {
      name: QISlang.pilgrimM,
      itemsk: [
        257000,
        373000,
        432000,
        529000,
        768000,
        10219000,
        11034000,
      ]
    },
    {
      name: QISlang.charlatan,
      itemsk: [
        224000,
        340000,
        435000,
        527000,
        794000,
        854000,
        10085000,
        11085000,
        44020000,
      ]
    },
    {
      name: QISlang.sleepy,
      itemsk: [
        47000,
        132000,
        261000,
        375000,
        436000,
        1717000,
        11207000,
        41203000,
      ]
    },
    {
      name: QISlang.twtimes,
      itemsk: [
        40031000,
        41206000,
        42253000,
        185145000,
        185146000,
      ]
    },
    {
      name: QISlang.collector,
      itemsk: [
        58000,
        140000,
        264000,
        439000,
        575000,
        611000,
        863000,
        2409000,
        10150000,
        11139000,
        40002000,
      ]
    },
    {
      name: QISlang.easterbunny,
      itemsk: [
        63000,
        265000,
        440000,
        11140000,
        40003000,
      ]
    },
    {
      name: QISlang.firefighter,
      itemsk: [
        1762000,
      ]
    },
    {
      name: QISlang.walker,
      itemsk: [
        154000,
        279000,
        454000,
        592000,
        10164000,
        11154000,
        40019000,
      ]
    },
    {
      name: QISlang.natty,
      itemsk: [
        68000,
        152000,
        277000,
        452000,
        590000,
        879000,
        10162000,
        11152000,
        40017000,
      ]
    },
    {
      name: QISlang.allan,
      itemsk: [
        69000,
        153000,
        278000,
        453000,
        591000,
        880000,
        10163000,
        11153000,
        40018000,
      ]
    },
    {
      name: QISlang.chingachgook,
      itemsk: [
        67000,
        151000,
        276000,
        451000,
        589000,
        878000,
        10161000,
        11151000,
        40016000,
      ]
    },
    {
      name: QISlang.cupid,
      itemsk: [
        165000,
        290000,
        465000,
        637000,
        887000,
        10175000,
        11165000,
        40030000,
        41003000,
      ]
    },
    {
      name: QISlang.cartwright,
      itemsk: [
        293000,
        468000,
        640000,
        2191000,
        10178000,
        11168000,
        40034000,
        41006000,
      ]
    },
    {
      name: QISlang.doc,
      itemsk: [
        292000,
        467000,
        639000,
        2190000,
        10177000,
        11167000,
        40033000,
        41005000,
      ]
    },
    {
      name: QISlang.freeman,
      itemsk: [
        291000,
        466000,
        638000,
        2189000,
        10176000,
        11166000,
        40032000,
        41004000,
      ]
    },
    {
      name: QISlang.party,
      itemsk: [
        295000,
        470000,
        10180000,
        11170000,
        40036000,
        41008000,
      ]
    },
    {
      name: QISlang.fair,
      itemsk: [
        294000,
        469000,
        642000,
        2223000,
        10179000,
        11169000,
        40035000,
        41007000,
      ]
    },
    {
      name: QISlang.soap,
      itemsk: [
        481000,
        10192000,
        11181000,
        40048000,
        41019000,
        42007000,
      ]
    },
    {
      name: QISlang.christopher,
      itemsk: [
        482000,
        10193000,
        11182000,
        40049000,
        41020000,
        42008000,
      ]
    },
    {
      name: QISlang.wood,
      itemsk: [
        185147000,
        185148000,
        185149000,
        185150000,
        185151000,
        185152000,
      ]
    },
    {
      name: QISlang.will,
      itemsk: [
        87000,
        183000,
        490000,
        895000,
        10201000,
        11190000,
        40057000,
        41028000,
        42016000,
      ]
    },
    {
      name: QISlang.jeremiah,
      itemsk: [
        88000,
        184000,
        491000,
        896000,
        10202000,
        11191000,
        40058000,
        41029000,
        42017000,
      ]
    },
    {
      name: QISlang.elfego,
      itemsk: [
        89000,
        185000,
        492000,
        897000,
        10203000,
        11192000,
        40059000,
        41030000,
        42018000,
      ]
    },
    {
      name: QISlang.independence,
      itemsk: [
        494000,
        661000,
        2301000,
        10205000,
        11193000,
        40061000,
        41032000,
        42020000,
      ]
    },
    {
      name: QISlang.fire,
      itemsk: [
        90000,
        186000,
        898000,
      ]
    },
    {
      name: QISlang.eighthour,
      itemsk: [
        2352000,
        40062000,
      ]
    },
    {
      name: QISlang.franke,
      itemsk: [
        91000,
        187000,
        495000,
        899000,
        10206000,
        11195000,
        40063000,
        41033000,
        42021000,
      ]
    },
    {
      name: QISlang.george,
      itemsk: [
        92000,
        188000,
        496000,
        900000,
        10207000,
        11196000,
        40064000,
        41034000,
        42022000,
      ]
    },
    {
      name: QISlang.king,
      itemsk: [
        93000,
        189000,
        497000,
        901000,
        10208000,
        11197000,
        40065000,
        41035000,
        42023000,
      ]
    },
    {
      name: QISlang.bavarian,
      itemsk: [
        498000,
        663000,
        2363000,
        10209000,
        11198000,
        40066000,
        41036000,
        42024000,
      ]
    },
    {
      name: QISlang.prairie,
      itemsk: [
        499000,
        11199000,
        10210000,
        40067000,
        41037000,
        42025000,
      ]
    },
    {
      name: QISlang.adventurer,
      itemsk: [
        10213000,
        11202000,
        40070000,
        41040000,
        42028000,
        43002000,
      ]
    },
    {
      name: QISlang.duelset,
      itemsk: [
        10214000,
        11203000,
        40071000,
        41041000,
        42029000,
        43003000,
      ]
    },
    {
      name: QISlang.worker,
      itemsk: [
        10215000,
        11204000,
        40072000,
        41042000,
        42030000,
        43004000,
      ]
    },
    {
      name: QISlang.soldier,
      itemsk: [
        10216000,
        11205000,
        40073000,
        41043000,
        42031000,
        43005000,
      ]
    },
    {
      name: QISlang.thunder,
      itemsk: [
        94000,
        190000,
        902000,
      ]
    },
    {
      name: QISlang.nightmare,
      itemsk: [
        10217000,
        11206000,
        40074000,
        41044000,
        42032000,
        43006000,
      ]
    },
    {
      name: QISlang.confederate,
      itemsk: [
        10211000,
        11200000,
        40068000,
        41038000,
        42026000,
        43000000,
      ]
    },
    {
      name: QISlang.noname,
      itemsk: [
        10212000,
        11201000,
        41039000,
        40069000,
        42027000,
        43001000,
      ]
    },
    {
      name: QISlang.winter,
      itemsk: [
        97000,
        191000,
        667000,
        905000,
        2539000,
        10261000,
        11273000,
        40202000,
        41200000,
        42201000,
        43200000,
      ]
    },
    {
      name: QISlang.valentine,
      itemsk: [
        682000,
        932000,
        2555000,
        10302000,
        11276000,
        40205000,
        41204000,
        42204000,
        43203000,
        44032000,
        45018000,
      ]
    },
    {
      name: QISlang.lover,
      itemsk: [
        10303000,
        11277000,
        40206000,
        41205000,
        42205000,
        43204000,
      ]
    },
    {
      name: QISlang.stpatrick,
      itemsk: [
        684000,
        933000,
        2577000,
        10304000,
        11278000,
        40207000,
        41207000,
        42206000,
        43205000,
        44033000,
        45019000,
      ]
    },
    {
      name: QISlang.lonerider,
      itemsk: [
        687000,
      ]
    },
    {
      name: QISlang.cullen,
      itemsk: [
        934000,
        10305000,
        11279000,
        40208000,
        41208000,
        42207000,
        43206000,
        44034000,
        45020000,
      ]
    },
    {
      name: QISlang.bass,
      itemsk: [
        935000,
        10306000,
        11280000,
        41209000,
        40209000,
        42208000,
        43207000,
        44035000,
        45021000,
      ]
    },
    {
      name: QISlang.pat,
      itemsk: [
        936000,
        10307000,
        11281000,
        40210000,
        41210000,
        42209000,
        43208000,
        44036000,
        45022000,
      ]
    },
    {
      name: QISlang.easter,
      itemsk: [
        937000,
        685000,
        2583000,
        10308000,
        11282000,
        40211000,
        41211000,
        42210000,
        43209000,
        44037000,
        45023000,
      ]
    },
    {
      name: QISlang.steam,
      itemsk: [
        938000,
        44038000,
        45024000,
      ]
    },
    {
      name: QISlang.blackbart,
      itemsk: [
        691000,
        2610000,
        10325000,
        11300000,
        40230000,
        41225000,
        42225000,
        43225000,
      ]
    },
    {
      name: QISlang.bob,
      itemsk: [
        692000,
        2611000,
        10326000,
        11301000,
        40231000,
        41226000,
        42226000,
        43226000,
      ]
    },
    {
      name: QISlang.jesse,
      itemsk: [
        693000,
        2612000,
        10327000,
        11302000,
        41227000,
        40232000,
        42227000,
        43227000,
      ]
    },
    {
      name: QISlang.thomas,
      itemsk: [
        694000,
        940000,
        2613000,
        10328000,
        11303000,
        40233000,
        41228000,
        42228000,
        44051000,
        43228000,
        45031000,
      ]
    },
    {
      name: QISlang.nihon,
      itemsk: [
        941000,
        44052000,
        45032000,
      ]
    },
    {
      name: QISlang.outlaw,
      itemsk: [
        696000,
        950000,
        2640000,
        10340000,
        11310000,
        40240000,
        41240000,
        42240000,
        43240000,
        44060000,
        45040000,
      ]
    },
    {
      name: QISlang.bill,
      itemsk: [
        2641000,
        10341000,
        11311000,
        40241000,
        41241000,
        42241000,
        43241000,
        48000000,
      ]
    },
    {
      name: QISlang.deadwood,
      itemsk: [
        2642000,
        10342000,
        11312000,
        40242000,
        41242000,
        42242000,
        43242000,
        48001000,
      ]
    },
    {
      name: QISlang.frankj,
      itemsk: [
        2643000,
        10343000,
        11313000,
        40243000,
        41243000,
        42243000,
        43243000,
        48002000,
      ]
    },
    {
      name: QISlang.ludwig,
      itemsk: [
        951000,
        2644000,
        10344000,
        11314000,
        41244000,
        40244000,
        42244000,
        43244000,
        44061000,
        45041000,
        48003000,
      ]
    },
    {
      name: QISlang.manitus,
      itemsk: [
        952000,
        44062000,
        45042000,
      ]
    },
    {
      name: QISlang.gonzales,
      itemsk: [
        953000,
        2649000,
        10345000,
        11315000,
        40245000,
        41245000,
        42245000,
        43245000,
        44063000,
        45043000,
        48004000,
      ]
    },
    {
      name: QISlang.catrina,
      itemsk: [
        954000,
        2660000,
        10346000,
        11316000,
        40246000,
        41246000,
        42246000,
        43246000,
        44070000,
        45044000,
        48005000,
      ]
    },
    {
      name: QISlang.mariachi,
      itemsk: [
        955000,
        2661000,
        10347000,
        11317000,
        41247000,
        40247000,
        42247000,
        43247000,
        44071000,
        45045000,
        48006000,
      ]
    },
    {
      name: QISlang.nobleman,
      itemsk: [
        956000,
        2662000,
        10348000,
        11318000,
        40248000,
        41248000,
        42248000,
        43248000,
        44072000,
        45046000,
        48007000,
      ]
    },
    {
      name: QISlang.aztecan,
      itemsk: [
        957000,
        2663000,
        10349000,
        11319000,
        40249000,
        41249000,
        42249000,
        43249000,
        44073000,
        45047000,
        48008000,
      ]
    },
    {
      name: QISlang.ghost,
      itemsk: [
        958000,
        2684000,
        10350000,
        11320000,
        40250000,
        41250000,
        42250000,
        43250000,
        44074000,
        45048000,
        48010000,
      ]
    },
    {
      name: QISlang.romeo,
      itemsk: [
        959000,
        2691000,
        10351000,
        11321000,
        40251000,
        41251000,
        42251000,
        43251000,
        44075000,
        45049000,
        48011000,
      ]
    },
    {
      name: QISlang.bartender,
      itemsk: [
        10352000,
        11322000,
        40252000,
        41252000,
        42252000,
        43252000,
      ]
    },
    {
      name: QISlang.wyatt,
      itemsk: [
        960000,
        10353000,
        11323000,
        40253000,
        41253000,
        42254000,
        43253000,
        44076000,
        45050000,
      ]
    },
    {
      name: QISlang.flint,
      itemsk: [
        961000,
        10354000,
        11324000,
        40254000,
        41254000,
        42255000,
        43254000,
        44077000,
        45051000,
      ]
    },
    {
      name: QISlang.eric,
      itemsk: [
        962000,
        10355000,
        11325000,
        40255000,
        41255000,
        42256000,
        43255000,
        44078000,
        45052000,
      ]
    },
    {
      name: QISlang.jerry,
      itemsk: [
        963000,
        2697000,
        10356000,
        11326000,
        40256000,
        41256000,
        42257000,
        43256000,
        44079000,
        45053000,
        48015000,
      ]
    },
    {
      name: QISlang.steaming,
      itemsk: [
        964000,
        44080000,
        45054000,
      ]
    },
  ];
  TW_Sets.sort(function (a, b) {
    var a1 = a.name.toUpperCase(),
    b1 = b.name.toUpperCase();
    if (a1 == b1) return 0;
    return a1 > b1 ? 1 : - 1;
  });
  var TW_QuickSearch = new Object();
  TW_QuickSearch.gui = {
  };
  TW_QuickSearch.gui.popupMenu = null;
  TW_QuickSearch.init = function () {
    TW_QuickSearch.gui.menuButton = new TW_Widgets.MenuButton('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAZCAYAAABzVH1EAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QoTBiYArTu6FwAADftJREFUWMMl1tmz3mdBwPHv8zy/fXm3s+ecLE3aLG0a0sWQ2jKlRaotSFspm7JUOoIMoxfi6IXjyI0jN3ojDDoOiozgKFzIoBSxA21ppaG1LU1CkyY5Jyc9+3nPu/7e9/2tz+MF/8N3PvMVf/7Jd5jNjTat2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dDHnjobpKLr3L2zAm0d4qv/OM3uZEZ6o6H6w/wdIjOM2yvSZHusZkZFmOP4ajARHWivAQnZ9DW2FMxjbrNymqbum24vJdx6uwiT56aY319FfGXHztjalJyeXubzaRkcX6OzjBjszsiGY0gH9GcmcYXmhoQ2eC4ilrgEjQVngOj1OC35hi3O7QHQ7TZ4733HcGperx+vUmRWNQtuN4ruLG7xb59i4xyw/pOh35Rkg06tDwfuxnRSgRzdYuRmrAQ+lihotZQCMAA0lqi117F3ulz0701qmiK1Rtr/D8jNuvkHjCe6wAAAABJRU5ErkJggg==', quicksearch.name, TW_QuickSearch.popup
    );
  };
  TW_QuickSearch.popup = function (button, e) {
    if (!TW_QuickSearch.gui.popupMenu) {
      TW_QuickSearch.gui.popupMenu = new west.gui.Selectbox().setWidth(250);
      TW_QuickSearch.gui.popupMenu.addListener(TW_QuickSearch.findSet);
      TW_QuickSearch.gui.popupMenu.addClass('TW_QS_ZiB');
      for (var i = 0; i < TW_Sets.length; i++)
      TW_QuickSearch.gui.popupMenu.addItem(i, TW_Sets[i].name);
    }
    TW_QuickSearch.gui.popupMenu.show(e);
    $('.TW_QS_ZiB ul').css({
      'overflow-x': 'hidden',
      'overflow-y': 'auto'
    });
  };
  TW_QuickSearch.findSet = function (id) {
    var items,
    base = TW_Sets[id].items,
    upgrade = TW_Sets[id].itemsk,
    invItems = [
    ];
    if (base) {
      items = base;
    } else {
      items = [
      ];
      for (var g = 0; g < upgrade.length; g++) {
        for (var h = 0; h < 6; h++) {
          items.push(upgrade[g] + h);
        }
      }
    }
    for (var i = 0; i < items.length; i++) {
      var invItem = Bag.getItemByItemId(items[i]);
      if (invItem)
      invItems.push(invItem);
    }
    if (invItems.length > 0) {
      if (!Bag.loaded) {
        var f = function (res) {
          EventHandler.listen('inventory_loaded', function () {
            Wear.open();
            Inventory.showSearchResult(res);
            return EventHandler.ONE_TIME_EVENT;
          });
          return Bag.loadItems();
        }(invItems);
      } else {
        Wear.open();
        Inventory.showSearchResult(invItems);
      }
    } else {
      new west.gui.Dialog(QISlang.nothingFoundTitle, QISlang.nothingFound, west.gui.Dialog.SYS_WARNING).addButton('ok').show();
    }
  };
  quicksearch.Updater = function () {
    $.getScript(quicksearch.updateUrl);
  };
  QIScompareVersions = function (actualVersion) {
    if (actualVersion > quicksearch.version) {
      var updateMessage = new west.gui.Dialog(QISlang.update + ': ' + quicksearch.name, QISlang.updateAvailable + ': v' + actualVersion, west.gui.Dialog.SYS_WARNING).addButton(QISlang.update, function () {
        updateMessage.hide();
        location.href = quicksearch.website + '/code.user.js';
      }).addButton(QISlang.cancel, function () {
      }).show();
    }
  };
  quicksearch.Updater();
  TW_QuickSearch.init();
}));