Greasy Fork镜像 支持简体中文。

TWLeoTools

Useful tools for The West!

  1. // ==UserScript==
  2. // @name TWLeoTools
  3. // @namespace TomRobert
  4. // @author Leotas (updated by Tom Robert)
  5. // @description Useful tools for The West!
  6. // @include https://*.the-west.*/game.php*
  7. // @include https://*.the-west.*/index.php?page=logout
  8. // @include https://www.the-west.*
  9. // @include https://beta.the-west.net*
  10. // @include http*://tw-db.info/*?strana=invent&x=*
  11. // @exclude https://classic.the-west.net*
  12. // @version 1.45.5
  13. // @grant none
  14. // ==/UserScript==
  15. // translation:Tom Robert(German&English),Darius II/Wojcieszy(Polish),pepe100(Spanish),ruud99(Dutch),Creature/krcsirke(Hungarian),Timemod Herkumo(Greek),Elly Siranno/Raymond Reddington(Portuguese),Billy-AR(Italian)
  16. (function (fn) {
  17. var script = document.createElement('script');
  18. script.setAttribute('type', 'application/javascript');
  19. script.textContent = '(' + fn.toString() + ')();';
  20. document.body.appendChild(script);
  21. document.body.removeChild(script);
  22. })(function () {
  23. if (location.href.includes('index.php?page=logout')) {
  24. location.href = '/';
  25. } else {
  26. LTstart = {
  27. version: '1.45.5',
  28. langs: {
  29. en: {
  30. language: 'English',
  31. ApiGui1: 'This script contains many features to simplify your everyday life in The West.<br><br>More Informations: ',
  32. ApiGui2: 'Open script page',
  33. FeatLogout: 'Add a logout button on the right side',
  34. FeatStatusbar: 'Remove the taskbar',
  35. FeatShowAP: 'Show your actual skill points in job windows',
  36. FeatChangeCity: 'Switch title and player name in the town hall',
  37. FeatDuellMap: 'Add Duelmap tab in duel window',
  38. FeatMarkDaily: 'Highlight daily login bonus on day 5 to not miss it',
  39. FeatMarketTown: 'Show town name in market window',
  40. FeatMarketMessage: 'Get a message when there are items or money to pick up on actual market',
  41. FeatAchievHide: 'Hide completed achievements in achievements window',
  42. FeatRecipeMarket: 'Improve the purchase of recipes on market',
  43. FeatMoveJobs: 'Move the queued jobs a bit to the left',
  44. FeatBlinkEvents: 'Stop the blinking of the event, County Fair buttons on the left side',
  45. FeatFortTracker: 'Turn off fort battle reminder',
  46. FeatFriendsPop: 'Hide "Friend online" pop-ups',
  47. FeatInstantQuest: 'Complete the quest instantly if all requirements are done',
  48. FeatQuestWiki: 'Add a link in the quest window to show the quest on the wiki page',
  49. FeatCityTravel: 'Show the travel time to the towns in the blackboard',
  50. FeatBetterSheriff: 'Add a new tab in the sheriff window to see all possible bounties',
  51. FeatChatProfessions: 'Show the crafting profession of the players in the chat list',
  52. FeatQuestBookSearch: 'Search for solved quests in the quest book',
  53. FeatMarketRights: 'Show if market offers are public or only for alliance/town members',
  54. FeatEquipManagerPlus: 'Improve the equipment manager in the inventory',
  55. FeatShortPopups: 'Make the item pop-ups shorter',
  56. FeatHideNotis: 'Add a button to hide the job notifications on the left side',
  57. FeatJobProducts: 'Show in the job pop-up how many products you already have in your inventory',
  58. FeatMapDistance: ' Show the number of miles next to the travel time',
  59. FeatTraderSell: 'Sell multiple items at once to the trader',
  60. FeatTouchControl: 'Enable touch control on your mobile browser',
  61. settings1: 'Open settings',
  62. settings2: 'Open settings and information window',
  63. ghosttown1: 'Go to ghost town ',
  64. ghosttown2: 'Open ghost town',
  65. ghosttown3: 'Open ghost town and center it on map',
  66. indiantown1: 'Go to Indian village ',
  67. indiantown2: 'Open Indian village',
  68. indiantown3: 'Open Indian village and center it on map',
  69. openmarket: 'Open market',
  70. forum: 'Open town forum',
  71. newsets: 'New sets are added to the script',
  72. chooseItems: 'Choose the items',
  73. remindHover: 'You get a notification when an item can be used again. Here you can choose these items.',
  74. remindReady: 'Ready to collect',
  75. skipHover: 'Skip the confirmation and result messages when you open some bags. Here you can choose these bags',
  76. skipDone: 'You get',
  77. info: 'Info',
  78. contact: 'Contact',
  79. chooseLang: 'Choose language',
  80. features: 'Features',
  81. name: 'Name',
  82. author: 'Author',
  83. version: 'Version',
  84. gameversion: 'Gameversions',
  85. website: 'Website',
  86. weblink: 'Weblink',
  87. save: 'Save',
  88. saveMessage: 'Settings saved. Some changes need a refresh of the game window.',
  89. setbonus2: 'Informations about the set bonuses',
  90. frame2: 'Helpful web pages',
  91. choose: 'Click on the hat to get started',
  92. items: 'items',
  93. parts: 'parts',
  94. showItems: 'Show the set items in your Bag',
  95. noItems: 'No items in your inventory found. Click again with CTRL to show it on TW-Calc.',
  96. ownSets: 'Only own sets',
  97. switchWeapon: 'Switch between firearm and melee weapon',
  98. selectBonus: 'Select bonuses',
  99. resetB: 'Reset',
  100. body: 'Clothing',
  101. right_arm: 'Weapons',
  102. animal: 'Horse & Yield',
  103. rest: 'Other',
  104. buff: 'Buffs',
  105. refresh: 'Refresh',
  106. noFriends: 'No Friends',
  107. reward: 'Reward',
  108. allprofessions: 'All Professions',
  109. market1: 'Items on market',
  110. market2: 'There are items/money on this market. What do you want to pick up?',
  111. all: 'All',
  112. onlyBids: 'Only bids',
  113. nothing: 'Nothing',
  114. worldwide: 'Worldwide',
  115. alliance: 'Alliance',
  116. town: 'Town',
  117. level: 'Level',
  118. duelLevel: 'Duelling level',
  119. exp: 'Exp',
  120. distance: 'Distance',
  121. startduel: 'Start Duel',
  122. centerMap: 'Center map',
  123. popup: 'The opponent\'s skill bonus',
  124. damage: 'Damage',
  125. duelmap: 'Duelmap',
  126. duelradius: 'Duel radius',
  127. minutes: 'minutes',
  128. hour: '1 hour',
  129. hours: 'hours',
  130. searchOpp: 'Search for opponents',
  131. amount: 'Dead',
  132. not_dead_amount: 'Alive',
  133. duellevel: 'Lvl',
  134. status: 'Status',
  135. sortBy: 'Sort by',
  136. tooLow: 'Too low duelling level of opponent',
  137. tooHigh: 'Too high duelling level of opponent',
  138. ownTown: 'Member of your town',
  139. attackable: 'Show only attackable players',
  140. logout: 'Logout',
  141. accNfin: 'Accept & complete quest',
  142. onWiki: 'Show the quest on the wiki',
  143. longerName: 'Name must be longer than 2 characters',
  144. loading: 'Loading...',
  145. rename: 'Rename',
  146. newName: 'Choose a new set name',
  147. used: 'Used',
  148. renameWarning: 'When you rename a set, you will wear it and undress it again.<br>You may loose health points during the process!',
  149. sellItems: 'Sell items to the trader?',
  150. removeWorkNotis: 'Hide all job notifications',
  151. compInv: 'Click on "cancel" to just show only auctionable items\n or\nEnter other inventory URL to compare',
  152. loginAll1: 'Login all worlds',
  153. loginAll2: 'Load all your active worlds with one click',
  154. custom1: 'Custom',
  155. custom2: 'Your custom login list',
  156. edit: 'Edit',
  157. saveMessage2: 'Saved successfully',
  158. },
  159. de: {
  160. language: 'German (Deutsch)',
  161. ApiGui1: 'Das Script beinhaltet verschiedene Funktionen um den Alltag bei The West zu vereinfachen.<br><br>Weitere Informationen: ',
  162. ApiGui2: 'Skriptfenster öffnen',
  163. FeatLogout: 'Erstellt einen Logout-Button rechts in der Menüleiste',
  164. FeatStatusbar: 'Entfernt die Fensterleiste mit den verschiedenen Tabs im unteren Teil',
  165. FeatShowAP: 'Zeige die Arbeitspunkte im Job-Fenster',
  166. FeatChangeCity: 'Tausche Titel und Spielername in der Stadthalle',
  167. FeatDuellMap: 'Füge im Duellfenster einen Tab hinzu, der eine Duellkarte zeigt',
  168. FeatMarkDaily: 'Markiere Täglicher Loginbonus am Tag 5 besonders, um ihn nicht zu übersehen',
  169. FeatMarketTown: 'Zeige im Marktfenster, zu welcher Stadt es gehört',
  170. FeatMarketMessage: 'Wenn du an einem Markt stehst, wo etwas abgeholt werden kann, erscheint eine Meldung',
  171. FeatAchievHide: 'Verstecke alle abgeschlossenen Erfolge im Erfolgsfenster für eine bessere Übersicht',
  172. FeatRecipeMarket: 'Verbessert den Kauf von Rezepten im Markt',
  173. FeatMoveJobs: 'Verschiebe eingestellte Arbeiten ein wenig nach links',
  174. FeatBlinkEvents: 'Das Blinken der Event-, Wanderzirkus-Buttons usw. am linken Rand entfernen',
  175. FeatFortTracker: 'Fortkampftracker abschalten',
  176. FeatFriendsPop: '"Freund online" Pop-ups deaktivieren',
  177. FeatInstantQuest: 'Schliesse die Quest sofort ab, wenn die Voraussetzungen bereits erfüllt sind',
  178. FeatQuestWiki: 'Füge im Questfenster einen Link hinzu, der die Quest im Wiki zeigt',
  179. FeatCityTravel: 'Zeige die Reisezeit zu den Städten im Blackboard-Fenster',
  180. FeatBetterSheriff: 'Erweitere den Sheriff um einen Tab, welcher alle Kopfgelder auflistet',
  181. FeatChatProfessions: 'Zeige den Handwerksberuf der Spieler in der Chatliste',
  182. FeatQuestBookSearch: 'Suche im Questbuch nach abgeschlossenen Quests',
  183. FeatMarketRights: 'Zeige ob Marktangebote öffenltich oder nur für Allianz-/Stadtmitglieder sind',
  184. FeatEquipManagerPlus: 'Erweitere den Ausrüstungsmanager im Inventar',
  185. FeatShortPopups: 'Mache die Item-Popups kompakter',
  186. FeatHideNotis: 'Blende Arbeits-Benachrichtigungen am linken Rand mit einem Klick aus',
  187. FeatJobProducts: 'Zeige bei den Arbeiten, wie viele Produkte du bereits besitzt',
  188. FeatMapDistance: 'Zeige die Entfernung in Meilen neben der Reisezeit',
  189. FeatTraderSell: 'Ermöglicht dem Fahrenden Händler mehrere Gegenstände auf einmal zu verkaufen',
  190. FeatTouchControl: 'Aktiviere Touchsteuerung im mobilen Browser',
  191. settings1: 'Einstellungen öffnen',
  192. settings2: 'Öffnet das Informations- und Einstellungsfenster',
  193. ghosttown1: 'Gehe zur Geisterstadt ',
  194. ghosttown2: 'Öffne Geisterstadt',
  195. ghosttown3: 'Öffnet das Fenster der Geisterstadt und zentriert es auf der Map',
  196. indiantown1: 'Gehe zum Indianerdorf ',
  197. indiantown2: 'Öffne Indianerdorf',
  198. indiantown3: 'Öffnet das Fenster des Indianerdorfes und zentriert es auf der Map',
  199. openmarket: 'Öffne Marktfenster',
  200. forum: 'Öffne Stadtforum',
  201. newsets: 'Dem Script wurden neue Sets hinzugefügt',
  202. chooseItems: 'Wähle die Gegenstände aus',
  203. remindHover: 'Wenn die Gegenstände bereit zum Einsammeln sind, bekommst du einen Hinweis. Hier kannst du diese Items auswählen.',
  204. remindReady: 'Bereit zum Einsammeln',
  205. skipHover: 'Überspringe die Bestätigungs- und Resultatsmeldung beim Öffnen bestimmter Taschen. Hier kannst du diese Taschen auswählen.',
  206. skipDone: 'Du bekommst',
  207. info: 'Info',
  208. contact: 'Kontakt',
  209. chooseLang: 'Sprache auswählen',
  210. features: 'Features',
  211. name: 'Name',
  212. author: 'Autor',
  213. version: 'Version',
  214. gameversion: 'Gameversionen',
  215. website: 'Webseite',
  216. weblink: 'Link',
  217. save: 'Speichern',
  218. saveMessage: 'Einstellungen gespeichert. Manche Änderungen werden erst nach Neuladen des Spiels sichtbar.',
  219. setbonus2: 'Lass dir die Boni aller Sets anzeigen',
  220. frame2: 'Hilfreiche Webseiten',
  221. choose: 'Klicke auf den Hut und wähle aus',
  222. items: 'Gegenstände',
  223. parts: 'Teile',
  224. showItems: 'Zeige die Setgegenstände in deinem Inventar',
  225. noItems: 'Keine Gegenstände im Inventar gefunden. Klicke erneut mit CTRL um sie auf TW-Calc anzuzeigen.',
  226. ownSets: 'Nur eigene Sets',
  227. switchWeapon: 'Wähle Schuss- oder Schlagwaffe',
  228. selectBonus: 'Boni auswählen',
  229. resetB: 'Zurücksetzen',
  230. body: 'Kleidung',
  231. right_arm: 'Waffen',
  232. animal: 'Pferd & Produkt',
  233. rest: 'Andere',
  234. buff: 'Buffs',
  235. refresh: 'Aktualisieren',
  236. noFriends: 'Keine Freunde',
  237. reward: 'Belohnung',
  238. allprofessions: 'Alle Berufe',
  239. market1: 'Gegenstände auf dem Markt',
  240. market2: 'Es sind noch Gegenstände/Geld auf diesem Markt. Was soll abgeholt werden?',
  241. all: 'Alles',
  242. onlyBids: 'Nur Gebote',
  243. nothing: 'Nichts',
  244. worldwide: 'Weltweit',
  245. alliance: 'Allianz',
  246. town: 'Stadt',
  247. level: 'Stufe',
  248. duelLevel: 'Duellstufe',
  249. exp: 'EP',
  250. distance: 'Distanz',
  251. startduel: 'Starte Duell',
  252. centerMap: 'Zentriere Map',
  253. popup: 'Fertigkeitenbonus des Gegners',
  254. damage: 'Schaden',
  255. duelmap: 'Duellkarte',
  256. duelradius: 'Duellradius',
  257. minutes: 'Minuten',
  258. hour: '1 Stunde',
  259. hours: 'Stunden',
  260. searchOpp: 'Duellgegner suchen',
  261. amount: 'Tot',
  262. not_dead_amount: 'Lebendig',
  263. duellevel: 'Lvl',
  264. status: 'Status',
  265. sortBy: 'Sortiere nach',
  266. tooLow: 'Zu tiefe Duellstufe des Gegners',
  267. tooHigh: 'Zu hohe Duellstufe des Gegners',
  268. ownTown: 'Mitbürger deiner Stadt',
  269. attackable: 'Zeige nur duellierbare Spieler',
  270. logout: 'Logout',
  271. accNfin: 'Quest annehmen & abschließen',
  272. onWiki: 'Zeige die Quest im Wiki',
  273. longerName: 'Name muss länger als 2 Zeichen sein',
  274. loading: 'Lädt...',
  275. rename: 'Umbenennen',
  276. newName: 'Neuer Set-Name',
  277. used: 'Benutzt',
  278. renameWarning: 'Du ziehst das Set beim Umbenennen an und wieder aus.<br>Möglicherweise verlierst du deswegen Lebenspunkte!',
  279. sellItems: 'Items dem Händler verkaufen?',
  280. removeWorkNotis: 'Entferne die Arbeits-Benachrichtigungen',
  281. compInv: 'Klicke auf "Abbrechen, um nur auktionierbare Items anzuzeigen\n oder\nFüge andere Inventar-URL ein, um zu vergleichen',
  282. loginAll1: 'Alle einloggen',
  283. loginAll2: 'Lade all deine aktiven Welten mit einem Klick',
  284. custom1: 'Eigene',
  285. custom2: 'Deine eigene Login-Liste',
  286. edit: 'Bearbeiten',
  287. saveMessage2: 'Speichern erfolgreich',
  288. },
  289. pl: {
  290. language: 'Polish (polski)',
  291. ApiGui1: 'Skrypt ten zawiera wiele funkcji, aby uprościć codzienne życie na Zachodzie.<br><br>Więcej informacji: ',
  292. ApiGui2: 'Otwórz w nowej karcie',
  293. FeatLogout: 'Dodanie przycisku po prawej stronie, wyloguj się.',
  294. FeatStatusbar: 'Usuwa pasek z oknami w dolnej części gry.',
  295. FeatShowAP: 'Pokazuje Punkty Pracy (PP) w oknie danej pracy.',
  296. FeatChangeCity: 'Zamienia tytuł gracza na początku, w karcie graczy w ratuszu.',
  297. FeatDuellMap: 'Dodaje dodatkową zakładkę pojedynków, w pojedynkach.',
  298. FeatMarkDaily: 'Oznacza dodatkową ramką 5 dzień logowania.',
  299. FeatMarketTown: 'Dodaje nazwę miasta w karcie targu.',
  300. FeatMarketMessage: 'Jeżeli znajdujesz się w mieście gdzie coś jest do odebrania. Pojawia się komunikat.',
  301. FeatAchievHide: 'Ukrywa zaliczone osiągnięcia.',
  302. FeatRecipeMarket: 'Dodaje dodatkowe przyciski z receptami w karcie targ.',
  303. FeatMoveJobs: 'Przenieś zadania w kolejce trochę na lewo',
  304. FeatBlinkEvents: 'Zatrzymaj pulsowanie przycisków (zdarzenie, pomoce, ostrzeżenia itp) po lewej stronie',
  305. FeatFortTracker: 'Wyłącz przypomnienie o bitwie',
  306. FeatFriendsPop: 'Ukryj "Przyjaciel on-line" pop-ups',
  307. FeatInstantQuest: 'Wykonaj zadanie natychmiast, gdyby wszystkie wymagania zostały wykonane',
  308. FeatQuestWiki: 'Add a link in the quest window to show the quest on the wiki page',
  309. FeatCityTravel: 'Show the travel time to the towns in the blackboard',
  310. FeatBetterSheriff: 'Add a new tab in the sheriff window to see all possible bounties',
  311. FeatChatProfessions: 'Show the crafting profession of the players in the chat list',
  312. FeatQuestBookSearch: 'Search for solved quests in the quest book',
  313. FeatMarketRights: 'Show if market offers are public or only for alliance/town members',
  314. FeatEquipManagerPlus: 'Improve the equipment manager in the inventory',
  315. FeatShortPopups: 'Make the item pop-ups shorter',
  316. FeatHideNotis: 'Add a button to hide the job notifications on the left side',
  317. FeatJobProducts: 'Show in the job pop-up how many products you already have in your inventory',
  318. FeatMapDistance: ' Show the number of miles next to the travel time',
  319. FeatTraderSell: 'Sell multiple items at once to the trader',
  320. FeatTouchControl: 'Enable touch control for map and scrollbar on your mobile',
  321. settings1: 'Otwórz ustawienia',
  322. settings2: 'Otwiera okno ustawień oraz informacji o skrypcie.',
  323. ghosttown1: 'Idź do Miasta Widmo, dojście ',
  324. ghosttown2: 'Otwórz zadania w Mieście Widmo',
  325. ghosttown3: 'Otwiera okno z zadaniami w Mieście Widmo',
  326. indiantown1: 'Idź do Wioski Indiańskiej, dojście ',
  327. indiantown2: 'Otwórz zadania w Wiosce Indiańskiej',
  328. indiantown3: 'Otwiera okno z zadaniami w Wiosce Indiańskiej.',
  329. openmarket: 'Otwórz targ',
  330. forum: 'Otwórz forum',
  331. newsets: 'Nowe zestawy są dodawane do skryptu',
  332. chooseItems: 'Choose the items',
  333. remindHover: 'You get a notification when an item can be used again. Here you can choose these items.',
  334. remindReady: 'Ready to collect',
  335. skipHover: 'Skip the confirmation and result messages when you open some bags. Here you can choose these bags',
  336. skipDone: 'You get',
  337. info: 'Informacja',
  338. contact: 'Kontakt',
  339. chooseLang: 'Wybierz język',
  340. features: 'Ustawienia',
  341. name: 'Nazwa',
  342. author: 'Autor',
  343. version: 'Wersja',
  344. gameversion: 'Wersja gry',
  345. website: 'Strona',
  346. weblink: 'Dyskusja',
  347. save: 'Zapisz',
  348. saveMessage: 'Ustawienia zapisane. Niektóre zmiany potrzebują odświeżenia okna gry.',
  349. setbonus2: 'Informacje o ustawionych premie',
  350. frame2: 'Pomocna stron internetowych',
  351. choose: 'Kliknij na kapelusz i wybierz',
  352. items: 'przedmioty',
  353. parts: 'parts',
  354. showItems: 'Show the set items in your Bag',
  355. noItems: 'No items in your inventory found. Click again with CTRL to show it on TW-Calc.',
  356. ownSets: 'Only own sets',
  357. switchWeapon: 'Switch between firearm and melee weapon',
  358. selectBonus: 'Select bonuses',
  359. resetB: 'Reset',
  360. body: 'Clothing',
  361. right_arm: 'Weapons',
  362. animal: 'Horse & Yield',
  363. rest: 'Other',
  364. buff: 'Buffs',
  365. refresh: 'Odświeżać',
  366. noFriends: 'Brak przyjaciół',
  367. reward: 'Nagroda',
  368. allprofessions: 'Wszystko',
  369. market1: 'Przedmioty na targu',
  370. market2: 'Na tym targu znajdują się przedmioty/kasa, odebrać?',
  371. all: 'Wszystko',
  372. onlyBids: 'Tylko oferty',
  373. nothing: 'Nic',
  374. worldwide: 'Worldwide',
  375. alliance: 'Alliance',
  376. town: 'Miasto',
  377. level: 'Poziom',
  378. duelLevel: 'Poziom pojedynków',
  379. exp: 'Exp',
  380. distance: 'Odległość',
  381. startduel: 'Akcja',
  382. centerMap: 'Wyśrodkowanie',
  383. popup: 'Bonusy umiejętności przeciwnika',
  384. damage: 'Obrażenia',
  385. duelmap: 'Mapa pojedynków',
  386. duelradius: 'Zasięg',
  387. minutes: 'Minut',
  388. hour: '1 Godzina',
  389. hours: 'Godzin',
  390. searchOpp: 'Szukaj przeciwników',
  391. amount: 'Dead',
  392. not_dead_amount: 'Alive',
  393. duellevel: 'Lvl',
  394. status: 'Status',
  395. sortBy: 'Sort by',
  396. tooLow: 'Too low duelling level of opponent',
  397. tooHigh: 'Too high duelling level of opponent',
  398. ownTown: 'Member of your town',
  399. attackable: 'Show only attackable players',
  400. logout: 'Logout',
  401. accNfin: 'Przyjmij & zakończ zadanie',
  402. onWiki: 'Show the quest on the wiki',
  403. longerName: 'Name must be longer than 2 characters',
  404. loading: 'Loading...',
  405. rename: 'Rename',
  406. newName: 'Choose a new set name',
  407. used: 'Used',
  408. renameWarning: 'When you rename a set, you will wear it and undress it again.<br>You may loose health points during the process!',
  409. sellItems: 'Sell items to the trader?',
  410. removeWorkNotis: 'Hide all job notifications',
  411. compInv: 'Click on "cancel" to just show only auctionable items\n or\nEnter other inventory URL to compare',
  412. loginAll1: 'Login all worlds',
  413. loginAll2: 'Załaduj wszystkie aktywne światów za pomocą jednego kliknięcia',
  414. custom1: 'Custom',
  415. custom2: 'Your custom login list',
  416. edit: 'Edit',
  417. saveMessage2: 'Saved successfully',
  418. },
  419. es: {
  420. language: 'Spanish (español)',
  421. ApiGui1: 'El script incluye varias funciones que simplifican la vida cotidiana en The West.<br><br>Más información: ',
  422. ApiGui2: 'Abrir ventana del script',
  423. FeatLogout: 'Crea un botón de cierre de sesión a la derecha en la barra de menús',
  424. FeatStatusbar: 'Oculta la barra inferior de las ventanas',
  425. FeatShowAP: 'Ver los puntos de trabajo en la ventana de trabajo',
  426. FeatChangeCity: 'Cambiar título y nombre del jugador en el ayuntamiento',
  427. FeatDuellMap: 'Completar la ventana de duelos con una pestaña que muestra el mapa de duelos',
  428. FeatMarkDaily: 'Marcar el Bonus-Conexión-5 Días especialmente para que no te lo pierdas',
  429. FeatMarketTown: 'Mostrar en la ventana de mercado, la ciudad al que pertenece',
  430. FeatMarketMessage: 'Si llegas a un mercado donde tienes algo que puede ser recogido, aparece un mensaj',
  431. FeatAchievHide: 'Ocultar logros completados en la ventana de logros para una mejor visión',
  432. FeatRecipeMarket: 'Mejorar la compra de recetas en el mercado',
  433. FeatMoveJobs: 'Mover los trabajos en cola un poco a la izquierda',
  434. FeatBlinkEvents: 'Detener el parpadeo de los botones de Evento y Feria de Condado en el lado izquierdo',
  435. FeatFortTracker: 'Apagar el recordatorio de Batalla de fuerte',
  436. FeatFriendsPop: 'Esconder ventana emergente de "Amigo conectado"',
  437. FeatInstantQuest: 'Completar la misión al instante si se cumplen todos los requisitos',
  438. FeatQuestWiki: 'Agregar un enlace en la ventana de búsqueda para mostrar la búsqueda en la Wiki',
  439. FeatCityTravel: 'Mostrar el tiempo de viaje a las ciudades en la pizarra',
  440. FeatBetterSheriff: 'Añadir una nueva pestaña en la ventana del sheriff para ver todas las recompensas posibles',
  441. FeatChatProfessions: 'Mostrar el oficio de los jugadores en la lista del chat',
  442. FeatQuestBookSearch: 'Buscar misiones terminadas en libro de misiones',
  443. FeatMarketRights: 'Mostrar si las ofertas de mercado son públicas o solo para los miembros de la Alianza/Ciudad',
  444. FeatEquipManagerPlus: 'Mejorar el administrador de equipos en el inventario',
  445. FeatShortPopups: 'Hacer los pop-ups de articulos más cortos',
  446. FeatHideNotis: 'Agregar un botón para ocultar las notificaciones de trabajo en el lado izquierdo',
  447. FeatJobProducts: 'Mostrar en la ventana emergente de trabajo cuántos productos tienes en tu inventario',
  448. FeatMapDistance: 'Mostrar la cantidad de millas al lado del tiempo de viaje',
  449. FeatTraderSell: 'Vender varios artículos a la vez al comerciante',
  450. FeatTouchControl: 'Habilitar el control táctil para el mapa y la barra de desplazamiento en su dispositivo móvil',
  451. settings1: 'Abrir preferencias',
  452. settings2: 'Abrir la ventana de información y ajustes',
  453. ghosttown1: 'Ir a la Ciudad Fantasma ',
  454. ghosttown2: 'Abrir Ciudad Fantasma',
  455. ghosttown3: 'Abrir la ventana de la Ciudad Fantasma y centrarla en el mapa',
  456. indiantown1: 'Ir al Pueblo Indio Waupee ',
  457. indiantown2: 'Abrir Pueblo Indio Waupee',
  458. indiantown3: 'Abrir la ventana del Pueblo Indio Waupee y centrarla en el mapa',
  459. openmarket: 'Abrir Mercado',
  460. forum: 'Abrir el foro de la ciudad',
  461. newsets: 'Nuevos conjuntos añadidos al script',
  462. chooseItems: 'Elegir los artículos',
  463. remindHover: 'Recibir una notificación cuando un artículo puede volverse a usar. Aquí puedes elegir estos artículos.',
  464. remindReady: 'Listo para recoger',
  465. skipHover: 'Omitir los mensajes de confirmación y resultado cuando abres algunas bolsas. Aquí puedes elegir estas bolsas',
  466. skipDone: 'Obtienes',
  467. info: 'Información',
  468. contact: 'Contacto',
  469. chooseLang: 'Elige idioma',
  470. features: 'Funciones',
  471. name: 'Nombre',
  472. author: 'Autor',
  473. version: 'Versión',
  474. gameversion: 'Versión Juego',
  475. website: 'Web',
  476. weblink: 'Weblink',
  477. save: 'Guardar',
  478. saveMessage: 'Ajustes guardados. Algunos cambios necesitan una actualización de la ventana de juego.',
  479. setbonus2: 'Información acerca de los bonus de conjunto',
  480. frame2: 'Páginas web votos',
  481. choose: 'Haga clic en el sombrero y elegir',
  482. items: 'artículos',
  483. parts: 'partes',
  484. showItems: 'Mostrar los artículos del conjunto en tu bolsa',
  485. noItems: '¡No se han encontrado artículos de este conjunto!',
  486. ownSets: 'Solo conjuntos propios',
  487. switchWeapon: 'Cambiar entre arma de fuego y arma contundente',
  488. selectBonus: 'Seleccionas bonus',
  489. resetB: 'Reiniciar',
  490. body: 'Ropa',
  491. right_arm: 'Armas',
  492. animal: 'Montura y Producto',
  493. rest: 'Otros',
  494. refresh: 'Actualizar',
  495. noFriends: 'Sin Amigos',
  496. reward: 'Recompensa',
  497. allprofessions: 'Todos Oficios',
  498. market1: 'Productos en el Mercado',
  499. market2: 'Todavía hay productos/dinero en el Mercado. ¿Desea recogerlos?',
  500. all: 'Todos',
  501. onlyBids: 'Solo Ofertas',
  502. nothing: 'Ninguno',
  503. worldwide: 'Mundo',
  504. alliance: 'Alianza',
  505. town: 'Ciudad',
  506. level: 'Nivel',
  507. duelLevel: 'Nivel Duelo',
  508. exp: 'Exp',
  509. distance: 'Distancia',
  510. startduel: 'Iniciar Duelo',
  511. centerMap: 'Centrar Mapa',
  512. popup: 'El bonus de habilidad del oponente',
  513. damage: 'Daño',
  514. duelmap: 'Mapa Duelos',
  515. duelradius: 'Radio duelos',
  516. minutes: 'Minutos',
  517. hour: '1 Hora',
  518. hours: 'Horas',
  519. searchOpp: 'Buscar Duelo',
  520. amount: 'Muerto',
  521. not_dead_amount: 'Vivo',
  522. duellevel: 'Niv',
  523. status: 'Estado',
  524. sortBy: 'Ordenar por',
  525. tooLow: 'Nivel de duelo del oponente demasiado bajo',
  526. tooHigh: 'Nivel de duelo del oponente demasiado alto',
  527. ownTown: 'Miembro de tu ciudad',
  528. attackable: 'Mostrar solo jugadores atacables',
  529. logout: 'Cerrar sesión',
  530. accNfin: 'Aceptar & concluir búsqueda',
  531. onWiki: 'Mostrar la búsqueda en la Wiki',
  532. longerName: 'El nombre debe tener más de 2 caracteres',
  533. loading: 'Cargando...',
  534. rename: 'Renombrar',
  535. newName: 'Elige un nuevo nombre de conjunto',
  536. used: 'Usado',
  537. renameWarning: 'Cuando renombre un conjunto, se lo pondrá y se lo quitará de nuevo.<br>¡Puede perder puntos de vida durante el proceso!',
  538. sellItems: '¿Vender artículos al comerciante?',
  539. removeWorkNotis: 'Ocultar todas las notificaciones de trabajo',
  540. compInv: 'Haga clic en "cancelar" para mostrar solo los artículos subastables \n o \n Ingrese otra URL de inventario para comparar',
  541. loginAll1: 'Conectarse a todos los mundos',
  542. loginAll2: 'Cargar todos los mundos activos con un solo click',
  543. custom1: 'Personalizar',
  544. custom2: 'Tu lista de conexión personalizada',
  545. edit: 'Editar',
  546. saveMessage2: 'Grabado con éxito',
  547. },
  548. nl: {
  549. language: 'Dutch (Nederlands)',
  550. ApiGui1: 'Dit script bevat veel mogelijkheden om het dagelijks leven in The West te vergemakkelijken.<br><br>Voor meer informatie: ',
  551. ApiGui2: 'Open script pagina',
  552. FeatLogout: 'Voeg een afmeldknop toe aan de rechterzijde van het scherm',
  553. FeatStatusbar: 'Verwijder het dagelijkse taken icoon',
  554. FeatShowAP: 'Toon je vaardigheidspunten in werkzaamheidsscherm windows',
  555. FeatChangeCity: 'Verwissel de titel en de spelersnaam in het stadhuis',
  556. FeatDuellMap: 'Voeg een duelkaart toe aan de duel tab',
  557. FeatMarkDaily: 'Markeer de dagelijkse inlogbonus op de 5e dag zodat je hem niet mist',
  558. FeatMarketTown: 'Toon stadsnaam in marktscherm',
  559. FeatMarketMessage: 'Krijg een bericht wanneer er voorwerpen of geld beschikbaar zijn om op te halen',
  560. FeatAchievHide: 'Verberg voltooide prestaties in prestatiescherm',
  561. FeatRecipeMarket: 'Verbeter overzicht voor recepten kopen.',
  562. FeatMoveJobs: 'Verschuif de werkzaamheden in de wachtrij een stukje naar links',
  563. FeatBlinkEvents: 'Stop het knipperen van event of circus knop aan linkerkant',
  564. FeatFortTracker: 'Schakel de fortgevecht herinnering uit',
  565. FeatFriendsPop: 'Verberg “uw vriend logt in” pop-ups',
  566. FeatInstantQuest: 'Voltooi de quest direct als aan alle vereisten is gedaan',
  567. FeatQuestWiki: 'Add a link in the quest window to show the quest on the wiki page',
  568. FeatCityTravel: 'Show the travel time to the towns in the blackboard',
  569. FeatBetterSheriff: 'Add a new tab in the sheriff window to see all possible bounties',
  570. FeatChatProfessions: 'Show the crafting profession of the players in the chat list',
  571. FeatQuestBookSearch: 'Search for solved quests in the quest book',
  572. FeatMarketRights: 'Show if market offers are public or only for alliance/town members',
  573. FeatEquipManagerPlus: 'Improve the equipment manager in the inventory',
  574. FeatShortPopups: 'Make the item pop-ups shorter',
  575. FeatHideNotis: 'Add a button to hide the job notifications on the left side',
  576. FeatJobProducts: 'Show in the job pop-up how many products you already have in your inventory',
  577. FeatMapDistance: ' Show the number of miles next to the travel time',
  578. FeatTraderSell: 'Sell multiple items at once to the trader',
  579. FeatTouchControl: 'Enable touch control for map and scrollbar on your mobile',
  580. settings1: 'Instellingen openen',
  581. settings2: 'Instellingen en informatiescherm openen',
  582. ghosttown1: 'Ga naar de Spookstad ',
  583. ghosttown2: 'Open Spookstad',
  584. ghosttown3: 'Open Spookstad en centreer het op de kaart',
  585. indiantown1: 'Ga naar Waupees indianendorp ',
  586. indiantown2: 'Open Waupees indianendorp',
  587. indiantown3: 'Open Waupees indianendorp en centreer het op de kaart',
  588. openmarket: 'Open markt',
  589. forum: 'Open stadsforum',
  590. newsets: 'Nieuwe sets worden toegevoegd aan het script',
  591. chooseItems: 'Choose the items',
  592. remindHover: 'You get a notification when an item can be used again. Here you can choose these items.',
  593. remindReady: 'Ready to collect',
  594. skipHover: 'Skip the confirmation and result messages when you open some bags. Here you can choose these bags',
  595. skipDone: 'You get',
  596. info: 'Informatie',
  597. contact: 'Contact',
  598. chooseLang: 'Kies een taal',
  599. features: 'Features',
  600. name: 'Naam',
  601. author: 'Auteur',
  602. version: 'Versie',
  603. gameversion: 'Spelversies',
  604. website: 'Website',
  605. weblink: 'Link',
  606. save: 'Opslaan',
  607. saveMessage: 'Instellingen toegevoegd. Sommige veranderingen hebben behoefte aan een refresh van het spel venster.',
  608. setbonus2: 'Informatie over de set bonusen',
  609. frame2: 'Nuttige websites',
  610. choose: 'Klik op de hoed en kies',
  611. items: 'Voorwerpen',
  612. parts: 'parts',
  613. showItems: 'Show the set items in your Bag',
  614. noItems: 'No items in your inventory found. Click again with CTRL to show it on TW-Calc.',
  615. ownSets: 'Only own sets',
  616. switchWeapon: 'Switch between firearm and melee weapon',
  617. selectBonus: 'Select bonuses',
  618. resetB: 'Reset',
  619. body: 'Clothing',
  620. right_arm: 'Weapons',
  621. animal: 'Horse & Yield',
  622. rest: 'Other',
  623. buff: 'Buffs',
  624. refresh: 'Verversen',
  625. noFriends: 'Geen vrienden',
  626. reward: 'Beloning',
  627. allprofessions: 'Alle Beroepen',
  628. market1: 'Voorwerpen op de markt',
  629. market2: 'Er zijn voorpen/geld op de markt. Wat wil je eraf halen?',
  630. all: 'Alles',
  631. onlyBids: 'Alleen biedingen',
  632. nothing: 'Niets',
  633. worldwide: 'Worldwide',
  634. alliance: 'Alliance',
  635. town: 'Stad',
  636. level: 'Level',
  637. duelLevel: 'Duel level',
  638. exp: 'Ervaring',
  639. distance: 'Afstand',
  640. startduel: 'Duelleren',
  641. centerMap: 'Centreer kaart',
  642. popup: 'Vaardigheden-Bonus van de tegenstander',
  643. damage: 'Schade',
  644. duelmap: 'Duelkaart',
  645. duelradius: 'Duel radius',
  646. minutes: 'minuten',
  647. hour: '1 uur',
  648. hours: 'uren',
  649. searchOpp: 'Zoek naar tegenstanders',
  650. amount: 'Dead',
  651. not_dead_amount: 'Alive',
  652. duellevel: 'Lvl',
  653. status: 'Status',
  654. sortBy: 'Sort by',
  655. tooLow: 'Too low duelling level of opponent',
  656. tooHigh: 'Too high duelling level of opponent',
  657. ownTown: 'Member of your town',
  658. attackable: 'Show only attackable players',
  659. logout: 'Afmelden',
  660. accNfin: 'Opdracht aannemen & afsluiten',
  661. onWiki: 'Show the quest on the wiki',
  662. longerName: 'Name must be longer than 2 characters',
  663. loading: 'Loading...',
  664. rename: 'Rename',
  665. newName: 'Choose a new set name',
  666. used: 'Used',
  667. renameWarning: 'When you rename a set, you will wear it and undress it again.<br>You may loose health points during the process!',
  668. sellItems: 'Sell items to the trader?',
  669. removeWorkNotis: 'Hide all job notifications',
  670. compInv: 'Click on "cancel" to just show only auctionable items\n or\nEnter other inventory URL to compare',
  671. loginAll1: 'Login all worlds',
  672. loginAll2: 'Laad al uw actieve werelden met één klik',
  673. custom1: 'Custom',
  674. custom2: 'Your custom login list',
  675. edit: 'Edit',
  676. saveMessage2: 'Saved successfully',
  677. },
  678. hu: {
  679. language: 'Hungarian (Magyar)',
  680. ApiGui1: 'Ez a szkript több olyan funkciót tartalmaz ami megkönnyíti a mindennapjaidat a vadnyugaton.<br><br>Több információ: ',
  681. ApiGui2: 'Szkript oldalának megnyitása',
  682. FeatLogout: 'Kilépés gomb a jobb oldalra',
  683. FeatStatusbar: 'Tálca eltüntetése',
  684. FeatShowAP: 'Valódi képességpontok a munkaablakokban',
  685. FeatChangeCity: 'Cím és játékosnév felcserélése a városházánál',
  686. FeatDuellMap: 'Párbajtérkép a párbaj ablakban',
  687. FeatMarkDaily: 'Az 5. napi belépés bónusz bekeretezése, hogy nehogy kihagyd',
  688. FeatMarketTown: 'Városnév megjelenítése a piac ablakban',
  689. FeatMarketMessage: 'Felugró ablak amikor tárgyak vagy pénz felvétele lehetséges az aktuális piacnál',
  690. FeatAchievHide: 'Befejezett események elrejtése az esemény ablakban',
  691. FeatRecipeMarket: 'Receptvásárlás megkönnyítése, rendezése a piacon',
  692. FeatMoveJobs: 'Mozgassa el a munka várólistát kissé balra hogy elférjenek az ikonok',
  693. FeatBlinkEvents: 'Események, eladás és piaci vásár gomb villogás kikapcsolása',
  694. FeatFortTracker: 'Kapcsolja ki az erődharc emlékeztetőt',
  695. FeatFriendsPop: 'Rejtse el a "barátod bejelentkezett" felugró ablakokat',
  696. FeatInstantQuest: 'Befejezni a küldetést, azonnal, ha minden feltétel kész',
  697. FeatQuestWiki: 'Link hozzáadása a kalandablakban, amin elérhető a kaland wikioldala',
  698. FeatCityTravel: 'Távolság a várostól mutatása a hirdetőtáblán',
  699. FeatBetterSheriff: 'Új lap hozzáadása a Seriff ablakban, láthatóvá téve az összes körözöttet',
  700. FeatChatProfessions: 'Mesterségek mutatása a játékosoknál a chat partnerlistánál',
  701. FeatQuestBookSearch: 'Keresés a befejezett kalandoknál a kalandkönyvben',
  702. FeatMarketRights: 'Piaci ajánlatoknál mutatása, hogy bárki számára elérhető vagy csak szövetség/város tagok számára',
  703. FeatEquipManagerPlus: 'Felszerelés kezelő ablak fejlesztése',
  704. FeatShortPopups: 'Tárgy felugró menüjének rövidítése',
  705. FeatHideNotis: 'Bal oldalon lévő munkaértesítéseket eltüntető gomb hozzáadása',
  706. FeatJobProducts: 'Munkáknál felugró menüben mutassa, mennyi terméked van már a felszerelésedben, ami az adott munkánál található',
  707. FeatMapDistance: ' Show the number of miles next to the travel time',
  708. FeatTraderSell: 'Sell multiple items at once to the trader',
  709. FeatTouchControl: 'Enable touch control for map and scrollbar on your mobile',
  710. settings1: 'Beállítások megnyitása',
  711. settings2: 'Beállítások és információk',
  712. ghosttown1: 'Menj el a Szellemvárosba ',
  713. ghosttown2: 'Szellemváros megnyitása',
  714. ghosttown3: 'Szellemváros megnyitása és ráközelítés térképen',
  715. indiantown1: 'Menj Waupee Indián falujába ',
  716. indiantown2: 'Indián falu megnyitása',
  717. indiantown3: 'Indián falu megnyitása és ráközelítés térképen',
  718. openmarket: 'Piac megnyitása',
  719. forum: 'Városfórum megnyitása',
  720. newsets: 'Új szett(ek) lettek hozzáadva a szkripthez',
  721. chooseItems: 'Válasz tárgyat',
  722. remindHover: 'Értesítést kapsz, amint egy tárgy ismét használható. Itt tudod kiválasztani melyik tárgyakról szeretnél értesítést kapni.',
  723. remindReady: 'Begyűjtésre készen áll',
  724. skipHover: 'Táskák nyitásánál megerősítő és jutalom üzenet figyelem kívül hagyása. Itt tudod kiválasztani melyik táska nyitásról ne kapj üzenetet.',
  725. skipDone: 'Ezt kapod',
  726. info: 'Információk',
  727. contact: 'Elérhetőségek',
  728. chooseLang: 'Válasszon nyelvet',
  729. features: 'Funkciók',
  730. name: 'Név',
  731. author: 'Szerző',
  732. version: 'Verzió',
  733. gameversion: 'Játékverzió',
  734. website: 'Weboldal',
  735. weblink: 'Webcím',
  736. save: 'Mentés',
  737. saveMessage: 'Beállítások elmentve. Néhány változás életbe lépéséhez frissítse a játék ablakát.',
  738. setbonus2: 'Információk a szettbónuszokról',
  739. frame2: 'Hasznos weboldalak',
  740. choose: 'Kattints a kalapra a kezdéshez, választáshoz',
  741. items: 'tárgyak',
  742. parts: 'darabok',
  743. showItems: 'Mutassa a szett tárgyakat a felszerelésedben',
  744. noItems: 'Nem található tárgy(ak) a felszerelésedben',
  745. ownSets: 'Csak a megszerzett szettek',
  746. switchWeapon: 'Váltás lőfegyver és ütőfegyver közt',
  747. selectBonus: 'Válasz bónuszt',
  748. resetB: 'Visszaállítás',
  749. body: 'Ruházat',
  750. right_arm: 'Párbajfegyver',
  751. animal: 'Állat',
  752. rest: 'Egyéb',
  753. buff: 'Buffs',
  754. refresh: 'Újratöltés',
  755. noFriends: 'Nincsenek barátok',
  756. reward: 'Díjak',
  757. allprofessions: 'Minden szakma',
  758. market1: 'Áruk a piacon',
  759. market2: 'Vannak Áruk/Pénz ezen a piacon. Mit szeretnél átvenni? ',
  760. all: 'Mindent',
  761. onlyBids: 'Árukat',
  762. nothing: 'Semmit',
  763. worldwide: 'Világ',
  764. alliance: 'Szövetség',
  765. town: 'Város',
  766. level: 'Szint',
  767. duelLevel: 'Párbajszint',
  768. exp: 'Tp',
  769. distance: 'Távolság',
  770. startduel: 'Párbaj kezdése',
  771. centerMap: 'Térkép közepére',
  772. popup: 'Az ellenfél bónusza',
  773. damage: 'Sebzés',
  774. duelmap: 'Párbajtérkép',
  775. duelradius: 'Párbaj sugár',
  776. minutes: 'perc',
  777. hour: '1 óra',
  778. hours: 'óra',
  779. searchOpp: 'Ellenfél keresése',
  780. amount: 'Halva',
  781. not_dead_amount: 'Élve',
  782. duellevel: 'Szint',
  783. status: 'Státusz',
  784. sortBy: 'Rendezés',
  785. tooLow: 'Túl alacsony a párbajszintje az ellenfélnek',
  786. tooHigh: 'Túl magas a párbajszintje az ellenfélnek',
  787. ownTown: 'Városod tagja',
  788. attackable: 'Csak a kihívható ellenfeleket mutassa',
  789. logout: 'Kijelentkezés',
  790. accNfin: 'Kaland elfogadása & lezárása',
  791. onWiki: 'Kaland mutatása a wikin',
  792. longerName: 'Névnek két karakternél hosszabbnak kell lennie',
  793. loading: 'Töltés...',
  794. rename: 'Átnevezés',
  795. newName: 'Válasz új nevet a szettnek',
  796. used: 'Használt',
  797. renameWarning: 'When you rename a set, you will wear it and undress it again.<br>You may loose health points during the process!',
  798. sellItems: 'Sell items to the trader?',
  799. removeWorkNotis: 'Összes munkaértesítés elrejtése',
  800. compInv: 'Kattints a "mégse" gombra hogy csak az árverezhető tárgyakat mutassa\n vagy\nHozzáadd egy másik táska URL címét összehasonlításként',
  801. loginAll1: 'Összes világba bejelentkezés',
  802. loginAll2: 'Betölti az összes aktív világok egyetlen kattintással',
  803. custom1: 'Egyedi',
  804. custom2: 'Egyedi bejelentkezési listád',
  805. edit: 'Szerkesztés',
  806. saveMessage2: 'Sikeres mentés',
  807. },
  808. el: {
  809. language: 'Greek (ελληνικά)',
  810. ApiGui1: 'Αυτό το script περιέχει πολλά χαρακτηριστικά για να απλοποιήσετε την ζωή σας στο The West.<br><br>Περισσότερες πληροφορίες: ',
  811. ApiGui2: 'Ρυθμίσεις του script',
  812. FeatLogout: 'Προσθέστε ένα κουμπί αποσύνδεσης στη δεξιά πλευρά',
  813. FeatStatusbar: 'Αφαιρέστε τη γραμμή εργασιών',
  814. FeatShowAP: 'Εμφάνιση των συνολικών πόντων εργασίας στα παράθυρα εργασίας',
  815. FeatChangeCity: 'Βάλτε τον τίτλο πριν από το όνομα του παίκτη στην καρτέλα του Δημαρχείου',
  816. FeatDuellMap: 'Προσθήκη καρτέλας Duelmap στην καρτέλα μονομαχιών',
  817. FeatMarkDaily: 'Επισημάνετε το καθημερινό μπόνους σύνδεσης την 5η ημέρα για να μην το χάσετε',
  818. FeatMarketTown: 'Εμφάνιση ονόματος πόλης στο παράθυρο της αγοράς',
  819. FeatMarketMessage: 'Εμφάνιση μηνύματος όταν υπάρχουν αντικείμενα ή χρήματα στην αγορά της πόλης που μόλις ταξιδέψατε',
  820. FeatAchievHide: 'Απόκρυψη ολοκληρωμένων επιτευγμάτων στο παράθυρο επιτευγμάτων',
  821. FeatRecipeMarket: 'Βελτιώστε την αγορά συνταγών στην αγορά',
  822. FeatMoveJobs: 'Μετακινήστε την καρτέλα των τρέχουσων εργασιών λίγο προς τα αριστερά',
  823. FeatBlinkEvents: 'Σταματήστε την αναλαμπή των Εκδηλώσεων και του Λούνα Παρκ στην αριστερή πλευρά',
  824. FeatFortTracker: 'Απενεργοποιήστε την υπενθύμιση μάχης οχυρού',
  825. FeatFriendsPop: 'Απόκρυψη αναδυόμενων παραθύρων "Συνδεδεμένοι φίλοι"',
  826. FeatInstantQuest: 'Ολοκληρώστε μια αποστολή αμέσως αν πληρούνται όλες οι απαιτήσεις',
  827. FeatQuestWiki: 'Προσθήκη ενός κουμπιού στις αποστολές για την εμφάνισή τους στην σελίδα "Βοήθειας"',
  828. FeatCityTravel: 'Εμφάνιση του χρόνου ταξιδιού στις πόλεις του μαυροπίνακα',
  829. FeatBetterSheriff: 'Προσθήκη μιας νέας καρτέλας στο παράθυρο του "Σερίφη" για να δείτε όλες τις πιθανές επικυρήξεις',
  830. FeatChatProfessions: 'Προσθήκη του εικονιδίου επαγγέλματος των παικτών στη λίστα συνομιλίας (τσατ)',
  831. FeatQuestBookSearch: 'Αναζήτηση για επιλυμένες αποστολές στο βιβλίο αποστολών',
  832. FeatMarketRights: 'Προσθήκη εικονιδίου για το εάν οι προσφορές της αγοράς είναι δημόσιες ή μόνο για μέλη της συμμαχίας / πόλης',
  833. FeatEquipManagerPlus: 'Βελτιώστε τον υπεύθυνο εξοπλισμού στα αποθέματα',
  834. FeatShortPopups: 'Εμφάνιση μικρότερης περιγραφής αντικειμένων στα αποθέματα',
  835. FeatHideNotis: 'Προσθήκη ενός κουμπιού για την απόκρυψη των ειδοποιήσεων εργασίας στην αριστερή πλευρά',
  836. FeatJobProducts: 'Εμφανίστε στο αναδυόμενο παράθυρο εργασίας πόσα προϊόντα έχετε ήδη στα αποθέματά σας',
  837. FeatMapDistance: 'Εμφάνιση της απόστασης του ταξιδιού σας σε Μίλια',
  838. FeatTraderSell: 'Πώληση πολλαπλών αντικειμένων στον Έμπορο',
  839. FeatTouchControl: 'Enable touch control for map and scrollbar on your mobile',
  840. settings1: 'Ρυθμίσεις',
  841. settings2: 'Ανοίξτε τις ρυθμίσεις και το παράθυρο πληροφοριών',
  842. ghosttown1: 'Προς την Πόλη Φάντασμα ➔ ',
  843. ghosttown2: 'Άνοιγμα της Πόλης Φάντασμα',
  844. ghosttown3: 'Άνοιγμα και κεντράρισμα του χάρτη στην Πόλη Φάντασμα',
  845. indiantown1: 'Προς το Ινδιάνικο χωριό ➔ ',
  846. indiantown2: 'Άνοιγμα του Ινδιάνικου χωριού',
  847. indiantown3: 'Άνοιγμα και κεντράρισμα του χάρτη στο Ινδιάνικο χωριό',
  848. openmarket: 'Άνοιγμα της Αγοράς',
  849. forum: 'Άνοιγμα του Φόρουμ Πόλης',
  850. newsets: 'Νέα Σετ προσθέθηκαν στο script',
  851. chooseItems: 'Επιλέξτε τα αντικείμενα',
  852. remindHover: 'Λαμβάνετε μια ειδοποίηση όταν ένα αντικείμενο μπορεί να χρησιμοποιηθεί ξανά. Εδώ μπορείτε να επιλέξετε αυτά τα αντικείμενα.',
  853. remindReady: 'Έτοιμο για συλλογή',
  854. skipHover: 'Απενεργοποιήστε τα μηνύματα επιβεβαίωσης και τα αποτελέσματα όταν ανοίγετε κάποιες τσάντες. Εδώ μπορείτε να επιλέξετε αυτές τις τσάντες',
  855. skipDone: 'Παίρνετε',
  856. info: 'Πληροφορίες',
  857. contact: 'Επικοινωνία',
  858. chooseLang: 'Επιλογή γλώσσας',
  859. features: 'Χαρακτηριστικά',
  860. name: ' Όνομα παίκτη',
  861. author: 'Συντάκτης',
  862. version: 'Έκδοση',
  863. gameversion: 'Έκδοση παιχνιδιού',
  864. website: 'Ιστοσελίδα',
  865. weblink: 'Σύνδεσμος',
  866. save: 'Αποθήκευση',
  867. saveMessage: 'Οι ρυθμίσεις αποθηκεύτηκαν. Ορισμένες αλλαγές χρειάζονται μια ανανέωση του παραθύρου του παιχνιδιού.',
  868. setbonus2: 'Πληροφορίες σχετικά με τα μπόνους των Σετ',
  869. frame2: 'Χρήσιμες ιστοσελίδες',
  870. choose: 'Κάντε κλικ στο καπέλο για να ξεκινήσετε',
  871. items: 'Αντικείμενα',
  872. parts: 'Τεμάχια',
  873. showItems: 'Εμφάνιση των αντικειμένων που υπάρχουν στα αποθέματά σας',
  874. noItems: 'Δεν βρέθηκαν αντικείμενα στα αποθέματά σας!',
  875. ownSets: 'Δικά σου Σετ',
  876. switchWeapon: 'Εναλλαγή μεταξύ πυροβόλου όπλου και ξίφους όπλου',
  877. selectBonus: 'Επιλέξτε Μπόνους',
  878. resetB: 'Επαναφορά',
  879. body: 'Ένδυση',
  880. right_arm: 'Όπλο μονομαχίας',
  881. animal: 'Άλογο & σέλα',
  882. rest: 'Άλλο',
  883. buff: 'Buffs',
  884. refresh: 'Ανανέωση',
  885. noFriends: 'Δεν υπάρχουν φίλοι',
  886. reward: 'Ανταμοιβή',
  887. allprofessions: 'Όλα τα επαγγέλματα',
  888. market1: 'Αντικείμενα στην Αγορά',
  889. market2: 'Υπάρχουν αντικείμενα / χρήματα σε αυτήν την αγορά. Τι θέλετε να σηκώσετε;',
  890. all: 'Όλα',
  891. onlyBids: 'Μόνο προσφορές',
  892. nothing: 'Τίποτα',
  893. worldwide: 'Οποιονδήποτε',
  894. alliance: 'Συμμαχία',
  895. town: 'Πόλη',
  896. level: 'Επίπεδο',
  897. duelLevel: ' Επίπεδο μονομαχίας ',
  898. exp: ' Εμπειρία ',
  899. distance: ' Απόσταση ',
  900. startduel: ' Μονομαχήστε ',
  901. centerMap: 'Κεντράρισμα στον χάρτη',
  902. popup: 'Το μπόνους δεξιοτήτων των αντιπάλων',
  903. damage: 'Ζημιά',
  904. duelmap: 'Χάρτης μονομαχιών',
  905. duelradius: 'Ακτίνα μονομαχιών',
  906. minutes: 'λεπτά',
  907. hour: '1 ώρα',
  908. hours: 'ώρες',
  909. searchOpp: 'Αναζήτηση για αντιπάλους',
  910. amount: 'Νεκρός/ή',
  911. not_dead_amount: 'Ζωντανός/ή',
  912. duellevel: 'Επίπεδο',
  913. status: 'Κατάσταση',
  914. sortBy: 'Ταξινόμηση κατά',
  915. tooLow: 'Χαμηλό επίπεδο μονομαχίας του αντιπάλου',
  916. tooHigh: 'Υψηλό επίπεδο μονομαχίας του αντιπάλου',
  917. ownTown: 'Μέλος της πόλης σου',
  918. attackable: 'Εμφάνιση μόνο παίκτες που μπορείτε να μονομαχήσετε',
  919. logout: 'Αποσύνδεση',
  920. accNfin: 'Αποδοχή & Ολοκλήρωση αποστολής',
  921. onWiki: 'Εμφάνισε την αποστολή στο Wiki',
  922. longerName: 'Το όνομα πρέπει να είναι μεγαλύτερο από 2 χαρακτήρες',
  923. loading: 'Φόρτωση...',
  924. rename: 'Μετονομασία',
  925. newName: 'Επιλέξτε ένα νέο όνομα Σετ',
  926. used: 'Χρησιμοποιείται',
  927. renameWarning: 'Όταν μετονομάζετε ένα Σετ, θα το φορέσετε και θα το ξαναβγάλετε.<br>Μπορεί να χάσετε κάποιους πόντους υγείας κατά τη διάρκεια της διαδικασίας!',
  928. sellItems: 'Πώληση αντικειμένων στον Έμπορο;',
  929. removeWorkNotis: 'Απόκρυψη όλων των ειδοποιήσεων εργασιών',
  930. compInv: 'Κάντε κλικ στην επιλογή "ακύρωση" για να προβάλλετε μόνο αντικείμενα που μπορούν να πουληθούν με πλειστηριασμό\n ή\nΠροσθέστε άλλη διεύθυνση URL αποθέματος για σύγκριση',
  931. loginAll1: 'Είσοδος σε όλους',
  932. loginAll2: 'Φορτώστε όλους τους ενεργούς κόσμους σας με ένα κλικ',
  933. custom1: 'Προσαρμοσμένο',
  934. custom2: 'Η προσαρμοσμένη λίστα σας σύνδεσης',
  935. edit: 'Επεξεργασία',
  936. saveMessage2: 'Αποθηκεύτηκε με επιτυχία',
  937. },
  938. pt: {
  939. language: 'Portuguese (português)',
  940. ApiGui1: 'Esse script foi feito para facilitar sua vida no Velho Oeste: ',
  941. ApiGui2: 'Abrir página do Script',
  942. FeatLogout: 'Adicionar botão de sair no fim dos scripts',
  943. FeatStatusbar: 'Remover a barra de tarefas',
  944. FeatShowAP: 'Mostrar seus pontos de habilidade na janela de trabalho.',
  945. FeatChangeCity: 'Mude o título e nome do jogador na cidade.',
  946. FeatDuellMap: 'Adicionar mapa de duelos na janela duelos.',
  947. FeatMarkDaily: 'Destacar bônus de login diário.',
  948. FeatMarketTown: 'Mostrar nome da cidade no mercado.',
  949. FeatMarketMessage: 'Receber notificação de itens comprados ou vendidos no mercado atual.',
  950. FeatAchievHide: 'Ocultar conquistas realizadas na janela de conquistas.',
  951. FeatRecipeMarket: 'Melhorar a compra de receitas no mercado.',
  952. FeatMoveJobs: 'Mover os trabalhos enfileirados a esquerda.',
  953. FeatBlinkEvents: 'Não piscar botões de evento ao lado esquerdo.',
  954. FeatFortTracker: 'Ocultar botão da batalha de forte.',
  955. FeatFriendsPop: 'Ocultar janela de amigos online.',
  956. FeatInstantQuest: 'Completar aventura instantâneamente quando tiver os requisitos.',
  957. FeatQuestWiki: 'Adicionar link para abrir a aventura no wiki.',
  958. FeatCityTravel: 'MOstrar o tempo de distância nas cidades do quadro.',
  959. FeatBetterSheriff: 'Adicionar aba no Xerife para ver todas as recompensas possíveis.',
  960. FeatChatProfessions: 'MOstrar a profissão dos jogadores na lista do chat.',
  961. FeatQuestBookSearch: 'Pesquisar por aventuras resolvidas no livro de aventuras',
  962. FeatMarketRights: 'Diferenciar itens no mercado entre cidade, aliança, e público.',
  963. FeatEquipManagerPlus: 'Mostre o gerenciamento de equipamento no inventário.',
  964. FeatShortPopups: 'Tornar janelas pop-up mais curtas.',
  965. FeatHideNotis: 'Adicionar botão para ocultar as notificações do trabalho ao lado esquerdo.',
  966. FeatJobProducts: 'Mostrar na janela de trabalho quantos produtos você já tem no inventário.',
  967. FeatMapDistance: ' Mostrar o número de milhas ao lado do tempo de viagem.',
  968. FeatTraderSell: 'Vender vários itens de uma só vez ao comerciante.',
  969. FeatTouchControl: 'Enable touch control for map and scrollbar on your mobile',
  970. settings1: 'Configurações',
  971. settings2: 'Configurações e Janela de Informações',
  972. ghosttown1: 'Ir para Cidade Fantasma ',
  973. ghosttown2: 'Abrir Cidade Fantasma',
  974. ghosttown3: 'Abrir Cidade Fantasma e Centralizar no Mapa',
  975. indiantown1: 'Ir para Vila Indígena ',
  976. indiantown2: 'Abrir Vila Ingígena',
  977. indiantown3: 'Abrir Vila Indígena e Centralizar no Mapa',
  978. openmarket: 'Mercado',
  979. forum: 'Fórum da Cidade',
  980. newsets: 'Novos Sets Adicionados ao Script',
  981. chooseItems: 'Escolha os Itens',
  982. remindHover: 'Receber notificação quando um item puder ser usado novamente.',
  983. remindReady: 'Pronto para recolher.',
  984. skipHover: 'Pular janelas de confirmação ao abrir algumas caixas e itens.',
  985. skipDone: 'Você ganhou:',
  986. info: 'Informação',
  987. contact: 'Contato:',
  988. chooseLang: 'Escolher Idioma',
  989. features: 'Características',
  990. name: 'Nome',
  991. author: 'Autor',
  992. version: 'Versão',
  993. gameversion: 'Versão do Game',
  994. website: 'Website',
  995. weblink: 'Weblink',
  996. save: 'Salvar',
  997. saveMessage: 'Configurações salvas. Algumas mudanças só apareceram quando atualizar a janela.',
  998. setbonus2: 'Informações sobre o bônus do set',
  999. frame2: 'Páginas da Web Úteis',
  1000. choose: 'Clique no Chapéu para começar.',
  1001. items: 'Itens',
  1002. parts: 'Partes',
  1003. showItems: 'Mostrar os itens definidos no seu saco.',
  1004. noItems: 'Nenhum item no seu inventário foi encontrado. Clique novamente com a tecla CTRL para mostrar no TW-Calc.',
  1005. ownSets: 'Apenas possui conjuntos.',
  1006. switchWeapon: 'Alternar entre arma de fogo e arma de vigor.',
  1007. selectBonus: 'Selecionar bônus',
  1008. resetB: 'Resetar',
  1009. body: 'Roupas',
  1010. right_arm: 'Armas',
  1011. animal: 'Cavalo & Sela',
  1012. rest: 'Outros',
  1013. buff: 'Buffs',
  1014. refresh: 'Atualizar',
  1015. noFriends: 'Sem Amigos',
  1016. reward: 'Recompensa',
  1017. allprofessions: 'Todas as Profissões',
  1018. market1: 'Itens no Mercado',
  1019. market2: 'Há itens e dinheiro no mercado, o que você quer recolher?',
  1020. all: 'Os dois',
  1021. onlyBids: 'Apenas Lance',
  1022. nothing: 'Nada',
  1023. worldwide: 'No mundo todo',
  1024. alliance: 'Aliança',
  1025. town: 'Cidade',
  1026. level: 'Nível',
  1027. duelLevel: 'Nivel de Duelo',
  1028. exp: 'Experiência',
  1029. distance: 'Distância',
  1030. startduel: 'Desafiar num Duelo',
  1031. centerMap: 'Centralizar Mapa',
  1032. popup: 'Bônus de Habilidade do Oponente',
  1033. damage: 'Danificar',
  1034. duelmap: 'Mapa de Duelo',
  1035. duelradius: 'Raio de Duelo',
  1036. minutes: 'Minutos',
  1037. hour: '1 hora',
  1038. hours: 'horas',
  1039. searchOpp: 'Pesquisar Oponentes',
  1040. amount: 'Morto',
  1041. not_dead_amount: 'Vivo',
  1042. duellevel: 'Nível',
  1043. status: 'Status',
  1044. sortBy: 'Ordenar por:',
  1045. tooLow: 'Nível de duelo muito baixo.',
  1046. tooHigh: 'Nível de duelo muito alto',
  1047. ownTown: 'Membro da sua Cidade',
  1048. attackable: 'Mostrar apenas jogadores atacáveis',
  1049. logout: 'Sair',
  1050. accNfin: 'Aceitar e completar quest.',
  1051. onWiki: 'Abrir quest na janela wi-ki',
  1052. longerName: 'O nome deve ter mais de 2 caracteres.',
  1053. loading: 'Carregando...',
  1054. rename: 'Renomear',
  1055. newName: 'Escolha um novo nome de conjunto',
  1056. used: 'Usado',
  1057. renameWarning: 'Quando você renomeia um conjunto, você vai usá-lo e despir-lo novamente.<br>Você pode perder pontos de saúde durante o processo!',
  1058. sellItems: 'Vender itens para o comerciante?',
  1059. removeWorkNotis: 'Ocultar todas as notificações de Jobs',
  1060. compInv: 'Clique em "cancelar" para mostrar apenas itens leiloáveis\n ou\nIntroduza outro URL de inventário para comparar',
  1061. loginAll1: 'Login em todos os mundos',
  1062. loginAll2: 'Carregue todos os seus mundos ativos em um clique',
  1063. custom1: 'Personalizado',
  1064. custom2: 'Sua lista de login persnalizada',
  1065. edit: 'Editar',
  1066. saveMessage2: 'Salvo com sucesso!',
  1067. },
  1068. it: {
  1069. language: 'Italian (italiano)',
  1070. ApiGui1: 'Questo script raccoglie molte funzionalità utili a semplificarti la vita in The West.<br><br>Ulteriori informazioni: ',
  1071. ApiGui2: 'Apri la pagina dello script',
  1072. FeatLogout: 'Aggiungi sul lato destro dello schermo un pulsante disconnetti',
  1073. FeatStatusbar: 'Nascondi la barra degli incarichi',
  1074. FeatShowAP: 'Mostra i tuoi attuali punti abilità nelle finestre dei lavori',
  1075. FeatChangeCity: 'Nel municipio, inverti il titolo e il nome del giocatore',
  1076. FeatDuellMap: 'Aggiungi la scheda Mappa duelli nella finestra Duelli',
  1077. FeatMarkDaily: 'Evidenzia il bonus login del 5° giorno per non dimenticarlo',
  1078. FeatMarketTown: 'Mostra il nome della città nella finestra del mercato',
  1079. FeatMarketMessage: 'Ricevi una notifica quando ci sono oggetti o soldi da ritirare al mercato della città dove ti trovi in quel momento',
  1080. FeatAchievHide: 'Nascondi i Successi completati nella rispettiva finestra di gioco',
  1081. FeatRecipeMarket: 'Migliora l\'organizzazione delle ricette al mercato',
  1082. FeatMoveJobs: 'Sposta la coda dei lavori leggermente più a sinistra',
  1083. FeatBlinkEvents: 'Termina il lampeggiamento delle icone degli eventi e della fiera nella barra delle notifiche',
  1084. FeatFortTracker: 'Disattiva l\'icona di notifica della battaglia al forte',
  1085. FeatFriendsPop: 'Nascondi i pop-up "Amico online"',
  1086. FeatInstantQuest: 'Se tutti i requisiti sono soddisfatti, permetti di concludere le missioni istantaneamente',
  1087. FeatQuestWiki: 'Aggiungi un link alla wiki italiana (ove disponibile) nelle finestre delle missioni',
  1088. FeatCityTravel: 'Mostra la distanza verso le città nella lavagna',
  1089. FeatBetterSheriff: 'Aggiungi una nuova scheda nella finestra dello sceriffo per vedere tutte le possibili taglie',
  1090. FeatChatProfessions: 'Mostra la professione a fianco del nome dei giocatori nella lista della chat',
  1091. FeatQuestBookSearch: 'Aggiungi una casella di ricerca nella scheda "Completate" del libro missioni',
  1092. FeatMarketRights: 'Mostra se le offerte del mercato sono pubbliche oppure per alleati\concittadini',
  1093. FeatEquipManagerPlus: 'Migliora la finestra "Gestione equipaggiamento" nell\'inventario',
  1094. FeatShortPopups: 'Rendi i tooltip degli oggetti più corti',
  1095. FeatHideNotis: 'Aggiungi un pulsante per nascondere le notifiche dei lavori nella relativa barra',
  1096. FeatJobProducts: 'Nel tooltip dei prodotti mostra quanti se ne possiede in inventario',
  1097. FeatMapDistance: 'Mostra la distanza in miglia accanto al tempo di viaggio',
  1098. FeatTraderSell: 'Consenti di vendere oggetti in quantità multipla ai negozi\mercante ambulante',
  1099. FeatTouchControl: 'Abilità il controllo touch nel browser mobile',
  1100. settings1: 'Apri le impostazioni',
  1101. settings2: 'Apri le impostazioni e la finestra di informazioni',
  1102. ghosttown1: 'Vai alla Città fantasma',
  1103. ghosttown2: 'Apri la Città Fantasma',
  1104. ghosttown3: 'Apri la Città Fantasma e centra la mappa',
  1105. indiantown1: 'Vai al Villaggio Indiano',
  1106. indiantown2: 'Apri il Villaggio Indiano',
  1107. indiantown3: 'Apri il Villaggio Indiano e centra la mappa',
  1108. openmarket: 'Apri il mercato',
  1109. forum: 'Apri il forum città',
  1110. newsets: 'Nuovi set sono stati aggiunti allo script',
  1111. chooseItems: 'Scegli gli oggetti',
  1112. remindHover: 'Ricevi una notifica quando un oggetto può essere di nuovo utilizzato. Scegli qui gli oggetti di interesse.',
  1113. remindReady: 'Pronto per essere collezionato',
  1114. skipHover: 'Salta i messaggi di conferma e risultato quando apri alcuni oggetti. Scegli qui gli oggetti di interesse',
  1115. skipDone: 'Ottieni',
  1116. info: 'Informazioni',
  1117. contact: 'Contatti',
  1118. chooseLang: 'Scegli lingua',
  1119. features: 'Caratteristiche',
  1120. name: 'Nome',
  1121. author: 'Autore',
  1122. version: 'Versione',
  1123. gameversion: 'Versione di gioco',
  1124. website: 'Sito internet',
  1125. weblink: 'Link al sito',
  1126. save: 'Salva',
  1127. saveMessage: 'Impostazioni salvate. Aggiorna la pagina per renderle effettive.',
  1128. setbonus2: 'Informazioni sui bonus set',
  1129. frame2: 'Pagine internet di aiuto',
  1130. choose: 'Clicca sul cappello per iniziare',
  1131. items: 'oggetti',
  1132. parts: 'parti',
  1133. showItems: 'Mostra i set oggetti nel tuo inventario',
  1134. noItems: 'Nessun oggetto trovato nel tuo inventario. Cliccaci nuovamente tenendo premuto CTRL per mostrarlo su TW-Calc.',
  1135. ownSets: 'Solo propri set',
  1136. switchWeapon: 'Inverti armi da fuoco e da contusione',
  1137. selectBonus: 'Scegli i bonus',
  1138. resetB: 'Reset',
  1139. body: 'Abiti',
  1140. right_arm: 'Armi',
  1141. animal: 'Cavallo e oggetto',
  1142. rest: 'Altro',
  1143. buff: 'Buffs',
  1144. refresh: 'Aggiorna',
  1145. noFriends: 'Nessun amico',
  1146. reward: 'Ricompensa',
  1147. allprofessions: 'Tutte le professioni',
  1148. market1: 'Oggetti al mercato',
  1149. market2: 'Ci sono oggetti/soldi da ritirare in questo mercato. Vuoi farlo?',
  1150. all: 'Tutto',
  1151. onlyBids: 'Solo aste',
  1152. nothing: 'Niente',
  1153. worldwide: 'Mondiale',
  1154. alliance: 'Alleanza',
  1155. town: 'Città',
  1156. level: 'Livello',
  1157. duelLevel: 'Livello duello',
  1158. exp: 'Esperienza',
  1159. distance: 'Distanza',
  1160. startduel: 'Inizia duello',
  1161. centerMap: 'Centra mappa',
  1162. popup: 'Abilità bonus dell\'avversario',
  1163. damage: 'Danno',
  1164. duelmap: 'Mappa duelli',
  1165. duelradius: 'Raggio duelli',
  1166. minutes: 'minuti',
  1167. hour: '1 ora',
  1168. hours: 'ore',
  1169. searchOpp: 'Cerca avversari',
  1170. amount: 'Morto',
  1171. not_dead_amount: 'Vivo',
  1172. duellevel: 'Liv',
  1173. status: 'Stato',
  1174. sortBy: 'Ordina per',
  1175. tooLow: 'Livello duello avversario troppo basso',
  1176. tooHigh: 'Livello duello avversario troppo alto',
  1177. ownTown: 'Membro della tua città',
  1178. attackable: 'Mostra solo i giocatori duellabili',
  1179. logout: 'Disconneti',
  1180. accNfin: 'Accetta e completa missione',
  1181. onWiki: 'Mostra la missione nella Wiki',
  1182. longerName: 'Il nome deve essere più lungo di 2 caratteri',
  1183. loading: 'Caricamento...',
  1184. rename: 'Rinomina',
  1185. newName: 'Scegli un nuovo nome set',
  1186. used: 'Usato',
  1187. renameWarning: 'Quando rinomini un set lo indosserai e svestirai di nuovo.<br>In questo processo potresti perdere dei punti vita!',
  1188. sellItems: 'Vuoi vendere questi oggetti?',
  1189. removeWorkNotis: 'Nascondi tutte le notifiche dei lavori',
  1190. compInv: 'Clicca su "cancella" per mostrare solo gli oggetti vendibili all\'asta\n oppure\nInserisci altro URL di inventari per confrontare',
  1191. loginAll1: 'Fai login in tutti i mondi',
  1192. loginAll2: 'Carica tutti i mondi in cui sei attivo con un clic',
  1193. custom1: 'Personalizza',
  1194. custom2: 'La tua lista login personalizzata',
  1195. edit: 'Modifica',
  1196. saveMessage2: 'Salvato con successo',
  1197. },
  1198. },
  1199. Images: function (img, file) {
  1200. return 'https://tomrobert.safe-ws.de/' + img + (file ? '.jpg' : '.png');
  1201. },
  1202. };
  1203. if (location.href.includes('game.php')) {
  1204. LT = {
  1205. name: 'TWLeoTools',
  1206. author: 'Leotas (updated by Tom Robert)',
  1207. minGame: '2.04',
  1208. maxGame: Game.version.toString(),
  1209. website: 'https://gf.qytechs.cn/scripts/7238',
  1210. SPEC: [
  1211. 'speed', 'luck', 'dollar', 'experience', 'regen', 'drop',
  1212. ],
  1213. list: null,
  1214. currSetBonus: 0,
  1215. currBonusSearch: '',
  1216. lvlToggle: 0,
  1217. setAbc: false,
  1218. onlyOwnSets: false,
  1219. chooseBonus: {
  1220. subWeapon: 'hand'
  1221. },
  1222. Data: {},
  1223. loaded: [],
  1224. Features: {
  1225. Logout: false,
  1226. Statusbar: false,
  1227. ShowAP: false,
  1228. ChangeCity: false,
  1229. DuellMap: true,
  1230. MarkDaily: true,
  1231. MarketMessage: true,
  1232. MarketTown: true,
  1233. AchievHide: true,
  1234. RecipeMarket: true,
  1235. MoveJobs: true,
  1236. BlinkEvents: false,
  1237. FortTracker: false,
  1238. FriendsPop: false,
  1239. InstantQuest: true,
  1240. QuestWiki: true,
  1241. CityTravel: true,
  1242. BetterSheriff: true,
  1243. ChatProfessions: true,
  1244. QuestBookSearch: true,
  1245. MarketRights: true,
  1246. EquipManagerPlus: true,
  1247. ShortPopups: true,
  1248. HideNotis: true,
  1249. JobProducts: true,
  1250. MapDistance: true,
  1251. TraderSell: true,
  1252. TouchControl: true,
  1253. },
  1254. cooldown: {
  1255. 2482: 1,
  1256. 2484: 1,
  1257. 2485: 1,
  1258. 2557: 1,
  1259. 2558: 1,
  1260. 2665: 1,
  1261. 2666: 1,
  1262. 2698: 1,
  1263. 50691: 1,
  1264. 51482: 1,
  1265. 51483: 1,
  1266. },
  1267. cooldownTimer: {},
  1268. cooldownSetTime: function (y, res, sec) {
  1269. LT.cooldownTimer[y] = setTimeout(function () {
  1270. var imgs = $('<span></span>');
  1271. for (var z = 0; z < res.length; z++) {
  1272. var itemDiv = new tw2widget.JobItem(res[z].obj).getMainDiv();
  1273. imgs.append(itemDiv);
  1274. }
  1275. var cooldownMsg = new west.gui.Dialog(LTlang.remindReady, imgs, 'ok').addButton('ok', function () {
  1276. Wear.open();
  1277. Inventory.showSearchResult(res);
  1278. cooldownMsg.hide();
  1279. LT.cooldownTimer[y] = 0;
  1280. }).addButton('cancel').show();
  1281. }, sec);
  1282. },
  1283. skipOpen: {
  1284. 1975: 1,
  1285. 2561: 0.5,
  1286. 2562: 0.5,
  1287. 2675: 0.5,
  1288. },
  1289. addStyle: function (css) {
  1290. var style = document.createElement('style');
  1291. style.type = 'text/css';
  1292. style.innerHTML = css;
  1293. document.body.appendChild(style);
  1294. },
  1295. updateLang: function () {
  1296. var lg = LTstart.langs;
  1297. LT.lang = lg[localStorage.getItem('scriptsLang')] ? localStorage.getItem('scriptsLang') : lg[Game.locale.substr(0, 2)] ? Game.locale.substr(0, 2) : 'en';
  1298. LTlang = lg[LT.lang];
  1299. },
  1300. };
  1301. LT.updateLang();
  1302. LT.Skript = {
  1303. init: function () {
  1304. TheWestApi.register('LeoTools', LT.name, LT.minGame, LT.maxGame, LT.author, LT.website).setGui('<br>' + LTlang.ApiGui1 + '<a href="javascript:LT.GUI.open(\'openKontakt\');LT.GUI.makeList();" title="' + LTlang.ApiGui2 + '">' + LTlang.ApiGui2 + '</a><br><br><i>' + LT.name + ' v' + LTstart.version + '</i>');
  1305. var menuContainer = $('<div id="LT-menu" class="menulink" onclick="LT.GUI.openSelectbox();" title="' + LT.name + '" />').css('background-image', 'url(' + LTstart.Images('LT_settings') + ')').css('background-position', '0px 0px').mouseenter(function () {
  1306. $(this).css('background-position', '-25px 0px');
  1307. }).mouseleave(function () {
  1308. $(this).css('background-position', '0px 0px');
  1309. });
  1310. $('#ui_menubar').append($('<div class="ui_menucontainer" />').append(menuContainer).append('<div class="menucontainer_bottom" />'));
  1311. LT.Skript.updateFeat();
  1312. LT.SkipOpen();
  1313. },
  1314. updateFeat: function () {
  1315. var saved = localStorage.getItem('TWLT');
  1316. LT.Data = saved && saved.indexOf('{') === 0 && JSON.parse(saved) || {};
  1317. for (var k in LT.Features) {
  1318. if (LT.Skript.getFeature(k) && !LT.loaded.includes(k)) {
  1319. try {
  1320. LT.loaded.push(k);
  1321. LT[k].init();
  1322. } catch (e) {}
  1323. }
  1324. }
  1325. LT.CollectReminder();
  1326. },
  1327. getFeature: function (name) {
  1328. return (LT.Data[name] !== undefined) ? LT.Data[name] : LT.Features[name];
  1329. },
  1330. };
  1331. Map.getLastQueuePosition = function () {
  1332. var posx = Character.position.x;
  1333. var posy = Character.position.y;
  1334. if (TaskQueue.queue.length >= 1) {
  1335. var data = TaskQueue.queue[TaskQueue.queue.length - 1].wayData;
  1336. if (data.x) {
  1337. posx = data.x;
  1338. posy = data.y;
  1339. }
  1340. }
  1341. return {
  1342. x: posx,
  1343. y: posy
  1344. };
  1345. };
  1346. var EvName = Object.keys(Game.sesData)[0],
  1347. set1 = west.storage.ItemSetManager._setList;
  1348. if (EvName)
  1349. var sendGift = Game.sesData[EvName].friendsbar;
  1350. LT.GUI = {
  1351. openSelectbox: function () {
  1352. LT.GUI.makeList();
  1353. var selectbox = new west.gui.Selectbox();
  1354. $(selectbox.getMainDiv()).append('<div class="LTselbox"/>');
  1355. selectbox.setHeader(LT.name);
  1356. selectbox.setWidth(300);
  1357. selectbox.addItem(0, LTlang.settings1, LTlang.settings2);
  1358. selectbox.addItem(1, 'SetBonus', LTlang.setbonus2);
  1359. selectbox.addItem(2, 'BonusSearch', LTlang.setbonus2);
  1360. selectbox.addItem(3, 'WebCenter', LTlang.frame2);
  1361. selectbox.addItem(4, LTlang.ghosttown1 + Map.calcWayTime(Map.getLastQueuePosition(), {
  1362. x: 1728,
  1363. y: 2081
  1364. }).formatDuration(), LTlang.ghosttown1);
  1365. selectbox.addItem(5, LTlang.ghosttown2, LTlang.ghosttown3);
  1366. selectbox.addItem(6, LTlang.indiantown1 + Map.calcWayTime(Map.getLastQueuePosition(), {
  1367. x: 28002,
  1368. y: 16658
  1369. }).formatDuration(), LTlang.indiantown1);
  1370. selectbox.addItem(7, LTlang.indiantown2, LTlang.indiantown3);
  1371. selectbox.addItem(8, LTlang.openmarket, LTlang.openmarket);
  1372. selectbox.addItem(9, LTlang.forum, LTlang.forum);
  1373. if (EvName) {
  1374. selectbox.addItem(10, '<div style="text-overflow:ellipsis; white-space:nowrap; overflow:hidden;"><b>' + sendGift.label + '</b></div>', sendGift.label);
  1375. }
  1376. selectbox.addListener(function (e) {
  1377. switch (e) {
  1378. case 0:
  1379. LT.GUI.open('openFeatures');
  1380. break;
  1381. case 1:
  1382. LT.GUI.open('openSetsWindow', 0, 'SetBonus');
  1383. break;
  1384. case 2:
  1385. LT.GUI.open('openSetsWindow', 0, 'BonusSearch');
  1386. break;
  1387. case 3:
  1388. LT.GUI.open('openFrame');
  1389. break;
  1390. case 4:
  1391. QuestEmployerWindow.startWalk({
  1392. key: 'ghosttown',
  1393. x: '1728',
  1394. y: '2081'
  1395. });
  1396. break;
  1397. case 5:
  1398. Map.center(1728, 2081);
  1399. QuestEmployerWindow.showEmployer('ghosttown', '1728', '2081');
  1400. break;
  1401. case 6:
  1402. QuestEmployerWindow.startWalk({
  1403. key: 'indianvillage',
  1404. x: '28002',
  1405. y: '16658'
  1406. });
  1407. break;
  1408. case 7:
  1409. Map.center(28002, 16658);
  1410. QuestEmployerWindow.showEmployer('indianvillage', '28002', '16658');
  1411. break;
  1412. case 8:
  1413. MarketWindow.open(Character.homeTown.town_id);
  1414. break;
  1415. case 9:
  1416. ForumWindow.open();
  1417. break;
  1418. case 10:
  1419. LT.GUI.open('openSender');
  1420. break;
  1421. }
  1422. });
  1423. var pos = $('div#LT-menu').offset();
  1424. pos = {
  1425. clientX: pos.left,
  1426. clientY: pos.top
  1427. };
  1428. selectbox.show(pos);
  1429. },
  1430. window: {},
  1431. checkbox: {},
  1432. open: function (tab, data, id) {
  1433. LT.GUI.window = wman.open('LT', 'TheWest - LeoTools', 'noreload').setMiniTitle(LT.name).setMaxSize(1268, 838).addTab(LTlang.info + ' & ' + LTlang.contact, 'LTContact', LT.GUI.openKontakt).addTab(LTlang.features, 'LTFeatures', LT.GUI.openFeatures).addTab('SetBonus', 'SetBonus', LT.GUI.openSetsWindow).addTab('BonusSearch', 'BonusSearch', LT.GUI.openSetsWindow).addTab('WebCenter', 'LTFrame', LT.GUI.openFrame);
  1434. if (EvName)
  1435. LT.GUI.window.addTab('Event', 'LTSender', LT.GUI.openSender);
  1436. LT.GUI[tab](data, id);
  1437. $('.tw2gui_window_inset', LT.GUI.window.getMainDiv()).css('background-image', 'url(' + LTstart.Images('LT_backGr', 1) + ')');
  1438. },
  1439. getDefault: function (tab) {
  1440. LT.GUI.window.setResizeable(false).setSize(748, 471).clearContentPane().removeClass('nocloseall').setTitle('TheWest - LeoTools');
  1441. LT.GUI.window.dontCloseAll = false;
  1442. $(LT.GUI.window.getContentPane()).css('margin-top', '0px');
  1443. var wnd = LT.GUI.window.getMainDiv();
  1444. $('.textart_title', wnd).css('display', '');
  1445. LT.GUI.window.activateTab(tab);
  1446. },
  1447. openKontakt: function () {
  1448. LT.GUI.getDefault('LTContact');
  1449. var fmfb = function (l) {
  1450. return 'https://forum.the-west.' + l + '/index.php?conversations/add&to=Tom Robert';
  1451. },
  1452. content = $('<br><h1>' + LTlang.info + '</h1><ul style="list-style-type:none;line-height:18px;margin-left:5px;"><li><b>' + LTlang.name + ': </b>' + LT.name + '</li><li><b>' + LTlang.author + ': </b>' + LT.author + '</li><li><b>' + LTlang.version + ': </b>' + LTstart.version + '</li><li><b>' + LTlang.gameversion + ': </b>' + LT.minGame + ' - ' + LT.maxGame + '</li><li><b>' + LTlang.website + ': </b>' + '<a href="' + LT.website + '" target="_blank">' + LTlang.weblink + '</a></li></ul>' +
  1453. '<br><h1>' + LTlang.contact + '</h1><ul style="margin-left:15px;line-height:18px;"><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>' +
  1454. '<li>Contact me on <a target=\'_blanck\' href="https://gf.qytechs.cn/forum/messages/add/Tom Robert">Greasy Fork镜像</a></li>' +
  1455. '<li>Message me on one of these The West Forum:<br>/ <a target=\'_blanck\' href="' + fmfb('de') + '">deutsches Forum</a> / ' +
  1456. '<a target=\'_blanck\' href="' + fmfb('net') + '">English forum</a> / <a target=\'_blanck\' href="' + fmfb('pl') + '">forum polski</a> / ' +
  1457. '<a target=\'_blanck\' href="' + fmfb('es') + '">foro español</a> /<br>/ <a target=\'_blanck\' href="' + fmfb('ru') + '">Русский форум</a> / ' +
  1458. '<a target=\'_blanck\' href="' + fmfb('fr') + '">forum français</a> / <a target=\'_blanck\' href="' + fmfb('it') + '">forum italiano</a> / ' +
  1459. '<a target=\'_blanck\' href="https://forum.beta.the-west.net/index.php?conversations/add&to=Tom Robert">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>');
  1460. LT.GUI.window.appendToContentPane(content);
  1461. },
  1462. openFeatures: function () {
  1463. LT.GUI.getDefault('LTFeatures');
  1464. var featScroll = new west.gui.Scrollpane().appendContent('<h2>' + LTlang.chooseLang + '</h2>'),
  1465. langBox = new west.gui.Combobox().appendTo(featScroll.getContentPane());
  1466. for (var j in LTstart.langs)
  1467. langBox.addItem(j, LTstart.langs[j].language);
  1468. langBox.select(LT.lang);
  1469. LT.cdTemp = LT.Data.cooldown ? $.extend({}, LT.Data.cooldown) : $.extend({}, LT.cooldown);
  1470. $('<span title="' + LTlang.remindHover + '" style="background-image: url(images/items/yield/low_heart_container.png); cursor: pointer; position: absolute; height: 73px; width: 73px; right: 0px; top: 0px;"/>').appendTo(featScroll.getContentPane()).click(function () {
  1471. var cont = $('<span>');
  1472. for (var x in LT.cooldown) {
  1473. var productDiv = new tw2widget.JobItem(ItemManager.getByBaseId(x)).getMainDiv();
  1474. $(productDiv).css('opacity', LT.cdTemp[x] || LT.cooldown[x]).attr('onclick', 'LT.cdTemp[' + x + ']=$(this).css("opacity")==1?0.5:1;$(this).css("opacity",LT.cdTemp[' + x + ']);');
  1475. cont.append(productDiv);
  1476. }
  1477. new west.gui.Dialog(LTlang.chooseItems, cont).addButton('ok').show();
  1478. });
  1479. LT.skipTemp = LT.Data.skipOpen ? $.extend({}, LT.Data.skipOpen) : $.extend({}, LT.skipOpen);
  1480. var openSkipList = function () {
  1481. var cont2 = $('<span></span>');
  1482. for (var x in LT.skipTemp) {
  1483. var productDiv2 = new tw2widget.JobItem(ItemManager.getByBaseId(x)).getMainDiv(),
  1484. productDel = new west.gui.Icon('abort ' + x).getMainDiv().click(function (e) {
  1485. e.stopPropagation();
  1486. e.target.parentElement.remove();
  1487. delete LT.skipTemp[e.target.classList[2]];
  1488. });
  1489. $(productDel).css({
  1490. 'display': 'inline-block',
  1491. 'position': 'absolute',
  1492. 'right': '0px'
  1493. });
  1494. $(productDiv2).css('opacity', LT.skipTemp[x]).attr('onclick', 'LT.skipTemp[' + x + ']=$(this).css("opacity")==1?0.5:1;$(this).css("opacity",LT.skipTemp[' + x + ']);').append(productDel);
  1495. cont2.append(productDiv2);
  1496. }
  1497. var itemPrew = $('<div id="LT_add_chest_prew" style="height:73px;width:73px;border:1px solid;border-radius:10px;float:left"/><br>');
  1498. var textFP = new west.gui.Textfield('add_skipOpen_chest').maxlength(6).setPlaceholder('item_base_id').addKeyUpListener(function (e) {
  1499. $('#LT_add_chest_prew').empty();
  1500. iconP.disable();
  1501. var val = e.target.value;
  1502. if (!isNaN(val) && val < forbid.maxID) {
  1503. var item = ItemManager.getByBaseId(val);
  1504. if (item) {
  1505. $('#LT_add_chest_prew').append(new tw2widget.JobItem(item).getMainDiv());
  1506. if (item.usebonus && item.usebonus.length == 1 && item.action.split(',')[2] == "'yield');" && !LT.skipTemp[val])
  1507. iconP.enable();
  1508. }
  1509. }
  1510. }),
  1511. iconP = new west.gui.Iconbutton(new west.gui.Icon('plus'), function () {
  1512. LT.skipTemp[textFP.getValue()] = 1;
  1513. skipList.hide();
  1514. openSkipList();
  1515. }).disable(),
  1516. iconA = new west.gui.Icon('abort').getMainDiv().click(function () {
  1517. textFP.setValue('');
  1518. $('#LT_add_chest_prew').empty();
  1519. iconP.disable();
  1520. });
  1521. cont2.append(itemPrew, textFP.getMainDiv(), iconP.getMainDiv(), iconA);
  1522. var skipList = new west.gui.Dialog(LTlang.chooseItems, cont2).setBlockGame(false).setDraggable(true).addButton('ok').show();
  1523. };
  1524. $('<span title="' + LTlang.skipHover + '" style="background-image: url(images/items/yield/productchest_1.png); cursor: pointer; position: absolute; height: 73px; width: 73px; right: 0px; top: 73px;"/>').appendTo(featScroll.getContentPane()).click(openSkipList);
  1525. featScroll.appendContent('<br><br><h2>' + LTlang.features + '</h2>');
  1526. for (var k in LT.Features) {
  1527. LT.GUI.checkbox[k] = new west.gui.Checkbox().setLabel(LTlang['Feat' + k]).setSelected(LT.Skript.getFeature(k)).appendTo(featScroll.getContentPane());
  1528. featScroll.appendContent('<br><div style="height:5px;" />');
  1529. }
  1530. featScroll.appendContent('<br>');
  1531. $(featScroll.getMainDiv()).css({
  1532. 'height': '330px',
  1533. 'margin-top': '10px'
  1534. });
  1535. var button = new west.gui.Button(LTlang.save, function () {
  1536. localStorage.setItem('scriptsLang', langBox.getValue());
  1537. LT.updateLang();
  1538. for (var k in LT.GUI.checkbox)
  1539. LT.Data[k] = LT.GUI.checkbox[k].isSelected();
  1540. LT.Data.cooldown = LT.cdTemp;
  1541. LT.Data.skipOpen = LT.skipTemp;
  1542. localStorage.setItem('TWLT', JSON.stringify(LT.Data));
  1543. LT.Skript.updateFeat();
  1544. new UserMessage(LTlang.saveMessage, 'success').show();
  1545. });
  1546. $(LT.GUI.window.getContentPane()).append(featScroll.getMainDiv()).append(button.getMainDiv());
  1547. },
  1548. makeList: function () {
  1549. if (!LT.list)
  1550. $.getScript('https://tomrobert.safe-ws.de/forbidN.js').done(function () {
  1551. LT.list = west.storage.ItemSetManager._setArray.slice(0);
  1552. LT.setListAll = {};
  1553. LT.setListOwn = {};
  1554. LT.itemListAll = {};
  1555. LT.itemListOwn = {};
  1556. var slot = {
  1557. 2: ['animal', 'yield'],
  1558. 3: ['right_arm', 'left_arm'],
  1559. 6: ['body', 'pants', 'neck', 'head', 'foot', 'belt']
  1560. };
  1561. var i = LT.list.length;
  1562. while (i--) {
  1563. var si = LT.list[i];
  1564. if (!forbid.sets.includes(si.key) && si.items[0] && !ItemManager.getByBaseId(si.items[0]).short.includes('friendset_') && !si.key.includes('friendship_set_'))
  1565. LT.setListAll[si.key] = si;
  1566. else
  1567. LT.list.splice(i, 1);
  1568. }
  1569. LT.setLength = Object.keys(LT.setListAll).length;
  1570. for (var j in LT.setListAll) {
  1571. var sa = LT.setListAll[j];
  1572. //sa.items.sort((a, b) => a - b);
  1573. var sil = sa.items.length;
  1574. sa.slots = slot[sil] && slot[sil].includes(ItemManager.getByBaseId(sa.items[1]).type) ? slot[sil][0] : 'rest';
  1575. var items = sa.getAvailableItems();
  1576. if (items.length) {
  1577. var bon = {},
  1578. oneType = [];
  1579. for (var o = 0; o < items.length; o++) {
  1580. var igt = ItemManager.get(items[o]);
  1581. items[o] = igt.item_base_id;
  1582. if (sa.bonus[o + 1] && !oneType.includes(igt.type))
  1583. bon[o + 1] = sa.bonus[o + 1];
  1584. oneType.push(igt.type);
  1585. }
  1586. LT.setListOwn[j] = {
  1587. items: items.reverse(),
  1588. bonus: bon,
  1589. name: sa.name,
  1590. slots: sa.slots,
  1591. };
  1592. }
  1593. }
  1594. var replUml = function (str) {
  1595. return str.toUpperCase().replace(/"/g, '').replace(/Á/g, 'A').replace(/É/g, 'E').replace(/Ő/g, 'O').replace(/Ú|Ü|Ű/g, 'U').replace(/Ś/g, 'S');
  1596. };
  1597. LT.list.sort(function (a, b) {
  1598. var a1 = replUml(a.name),
  1599. b1 = replUml(b.name);
  1600. return (a1 == b1) ? 0 : (a1 > b1) ? 1 : -1;
  1601. });
  1602. var buffDesc = function (umt) {
  1603. return umt.match(/[^%-:]+/)[0].trim();
  1604. },
  1605. useboni = {},
  1606. ammobelt = 2741,
  1607. ghostmusic = 2732,
  1608. lantern = 2734,
  1609. moneyboost = 2468,
  1610. ratatou = 51127,
  1611. cocktail = 51579,
  1612. getBuff = function (itm, num) {
  1613. return buffDesc(ItemManager.getByBaseId(itm).usebonus[num]);
  1614. };
  1615. useboni[getBuff(ammobelt, 2)] = 'offense';
  1616. useboni[getBuff(ammobelt, 1)] = 'defense';
  1617. useboni[getBuff(ghostmusic, 0)] = 'experience';
  1618. useboni[getBuff(moneyboost, 0)] = 'dollar';
  1619. useboni[getBuff(ratatou, 0)] = 'luck';
  1620. useboni[getBuff(ratatou, 1)] = 'drop';
  1621. useboni[getBuff(ghostmusic, 1)] = 'joball';
  1622. useboni[getBuff(lantern, 0)] = 'speed';
  1623. useboni[getBuff(cocktail, 0)] = 'regen';
  1624. for (var kn in CharacterSkills.keyNames)
  1625. useboni[CharacterSkills.keyNames[kn]] = kn;
  1626. var addItems = function (obj, state) {
  1627. var ob = obj.bonus,
  1628. boni = {
  1629. 1: ob.item.slice()
  1630. },
  1631. slot = 'item';
  1632. if (obj.usebonus) {
  1633. slot = 'buff';
  1634. for (var oub of obj.usebonus) {
  1635. if (!oub)
  1636. continue;
  1637. var desc = buffDesc(oub);
  1638. if (useboni[desc])
  1639. boni[1].push({
  1640. name: useboni[desc],
  1641. value: oub.match(/\d+/)[0],
  1642. });
  1643. }
  1644. } else
  1645. for (var cat in ob) {
  1646. if (cat == 'item')
  1647. continue;
  1648. for (var type in ob[cat]) {
  1649. var ct = ob[cat][type];
  1650. if (ct > 0) {
  1651. boni[1].push({
  1652. name: type,
  1653. value: ct,
  1654. isSector: cat == 'fortbattlesector',
  1655. leveled: obj.item_level > 0
  1656. });
  1657. }
  1658. }
  1659. }
  1660. LT['itemList' + state][obj.item_base_id] = {
  1661. bonus: boni,
  1662. name: obj.name,
  1663. slots: slot,
  1664. pos: obj.type,
  1665. item_level: obj.item_level,
  1666. };
  1667. };
  1668. var allItems = ItemManager.getAll();
  1669. for (var k in allItems)
  1670. if (k > 9 && k < forbid.maxID && !forbid.IDs.includes(k) && !(allItems[k].set && !LT.setListAll[allItems[k].set]))
  1671. addItems(allItems[k], 'All');
  1672. for (var l in Bag.items_by_id)
  1673. if (!forbid.IDs.includes(k))
  1674. addItems(Bag.items_by_id[l].obj, 'Own');
  1675. for (var m in Wear.wear)
  1676. addItems(Wear.wear[m].obj, 'Own');
  1677. var collect = set1.collector_set.bonus[9], //pray
  1678. pilg = set1.set_pilgrim_male.bonus[2], //build
  1679. lee = set1.set_oktoberfest_2016_1.bonus[6], //offenstrue
  1680. hero = set1.independance_event_set7.bonus[2], //drop
  1681. delChar = function (list) {
  1682. return list.desc.replace(/[0-9]|\+|\.|\%/g, '').substring(1);
  1683. };
  1684. LT.searchObj = {
  1685. offense: [delChar(collect[5]), 'fort/battle/button_attack'],
  1686. offensetrue: [delChar(lee[4]), 'fort/battle/help01'],
  1687. defense: [delChar(hero[13]), 'fort/battle/button_defend'],
  1688. defensetrue: [delChar(collect[6]), 'fort/battle/help02'],
  1689. resistance: [delChar(hero[15]), 'fort/battle/resistance'],
  1690. //damage: ['weapon damage', 'items/left_arm/golden_rifle'],
  1691. damagetrue: [delChar(collect[7]), 'items/left_arm/golden_rifle'],
  1692. experience: [delChar(hero[10]), 'items/yield/xp_boost', '<br>'],
  1693. dollar: [delChar(hero[11]), 'items/yield/dollar_boost'],
  1694. luck: [delChar(collect[2]), 'items/yield/luck_boost'],
  1695. drop: [delChar(hero[9]), 'items/yield/product_boost'],
  1696. joball: [delChar(collect[0]), 'window/job/jobstar_small_gold'],
  1697. speed: [delChar(collect[1]), 'jobs/walk'],
  1698. regen: [delChar(collect[3]), 'jobs/sleep'],
  1699. pray: [delChar(collect[4]), 'jobs/pray'],
  1700. job1000: [delChar(pilg[0]), 'jobs/build'],
  1701. };
  1702. for (var ca = 0; ca < CharacterSkills.allSkillKeys.length; ca++) {
  1703. if (ca % 5 === 0) {
  1704. var attr = CharacterSkills.allAttrKeys[ca / 5];
  1705. LT.searchObj[attr] = [CharacterSkills.keyNames[attr], 'window/skills/circle_' + attr, ca % 10 === 0 ? '<br>' : ''];
  1706. }
  1707. var skill = CharacterSkills.allSkillKeys[ca];
  1708. LT.searchObj[skill] = [CharacterSkills.keyNames[skill], 'window/skills/skillicon_' + skill];
  1709. }
  1710. if (!localStorage.getItem('TWLTdate') || Date.parse(forbid.date) > Date.parse(localStorage.getItem('TWLTdate'))) {
  1711. var setNames = '',
  1712. nSets = forbid.unlock;
  1713. for (var h of nSets)
  1714. setNames += LT.GUI.getSetOrItem(h, set1[h]) + '<br>';
  1715. new west.gui.Dialog(LT.name, '<span><b>' + forbid.date.toDateString() + '</b><br>' + LTlang.newsets + ':<br><br>' + setNames + '</span>', west.gui.Dialog.SYS_OK).setBlockGame(false).setDraggable(true).addButton('ok').show();
  1716. localStorage.setItem('TWLTdate', forbid.date);
  1717. }
  1718. });
  1719. },
  1720. itemsInInv: function (id) {
  1721. var upgrade = isNaN(id) ? LT.currList[id].items : [id],
  1722. items = [];
  1723. for (var g of upgrade) {
  1724. for (var h = 0; h <= 5; h++) {
  1725. items.push(g * 1000 + h);
  1726. }
  1727. }
  1728. var invItems = Bag.getItemsByItemIds(items);
  1729. if (invItems.length > 0) {
  1730. Wear.open();
  1731. Inventory.showCustomItems(invItems);
  1732. } else
  1733. new UserMessage(LTlang.noItems, 'hint').show();
  1734. },
  1735. getSetOrItem: function (id, obj, nolink) {
  1736. if (!obj)
  1737. return id;
  1738. var isItem = !isNaN(id),
  1739. nNew = window.forbid && (isItem && id >= forbid.unlockID || !isItem && forbid.unlock.includes(id)) ? '<img src="' + LTstart.Images('new') + '">' : '',
  1740. nLvl = obj.item_level ? '<img src="images/items/item_level.png"><span style="font-size: 11px;color:#ffffff;text-shadow:black -1px 0 1px,black 0 1px 1px,black 1px 0 1px,black 0 -1px 1px;">' + obj.item_level + '</span>' : '',
  1741. options = {
  1742. show_alreadyown: true
  1743. };
  1744. if (LT.lvlToggle)
  1745. options.character = {
  1746. level: LT.lvlToggle
  1747. };
  1748. var nPopup = 'data-setkey="' + id + '"',
  1749. click = 'onclick="LT.GUI.itemsInInv(\'' + id + '\')"',
  1750. img = '';
  1751. if (isItem) {
  1752. var itemId = id + '00' + obj.item_level,
  1753. item = ItemManager.get(itemId);
  1754. nPopup = 'data-itemid="' + itemId + '" title="' + (new ItemPopup(item, options).getXHTML().escapeHTML()) + '"';
  1755. img = '<img src="' + item.image + '" width="25">';
  1756. } else if (LT.GUI.window.currentActiveTabId == 'SetBonus')
  1757. nPopup += 'title="' + LTlang.showItems + '" style="color:#FFE7B1;"';
  1758. else
  1759. click = 'onclick="LT.GUI.open(\'openSetsWindow\',\'' + id + '\',\'SetBonus\')"';
  1760. if (nolink)
  1761. click = '';
  1762. return '<b><span class="linklike" ' + nPopup + click + '>' + nNew + img + nLvl + obj.name + '</span></b>';
  1763. },
  1764. newState: '',
  1765. html: {},
  1766. openSetsWindow: function (st, tab) {
  1767. LT.GUI.getDefault(tab);
  1768. LT.GUI.window.setTitle(tab);
  1769. var newSet = false;
  1770. if (typeof st === 'string') {
  1771. newSet = true;
  1772. LT['curr' + tab] = st;
  1773. }
  1774. var scrollpane = new west.gui.Scrollpane('LTSetsWindow');
  1775. $(scrollpane.getMainDiv()).css({
  1776. 'margin-left': '120px',
  1777. 'margin-top': '10px',
  1778. 'width': '578px'
  1779. });
  1780. var lvlUp = function (level, value) {
  1781. var ret = !level ? 0 : value < 1 ? Math.round(Math.max(1, value * 1000 * level)) / 10000 : Math.round(Math.max(1, value * 0.1 * level));
  1782. return value + ret;
  1783. },
  1784. charLvl = Character.level,
  1785. getBonImg = function (n, w) {
  1786. var son = LT.searchObj[n] || JobList.getJobById(n.slice(3));
  1787. return '<img src="images/' + (son[1] || 'jobs/' + son.shortname) + '.png" width="' + w + '" title="' + (son[0] || son.name) + '">';
  1788. },
  1789. types = {},
  1790. perL = set1.instance_set_1.bonus[2][0].desc.match(/\(.*?\)/)[0],
  1791. compare = function (sets, id) {
  1792. for (var i in sets) {
  1793. var si = sets[i];
  1794. for (var k in si.bonus)
  1795. for (var ID of si.bonus[k]) {
  1796. var ib = ID.bonus || ID;
  1797. var NAM = (ib.name || ib.type) + (ib.job || ib.isSector || '');
  1798. if (id[NAM]) {
  1799. if (!types[i]) {
  1800. types[i] = {
  1801. desc: (LT.SPEC.includes(NAM) ? '% ' : ' ') + (ID.key && !LT.lvlToggle ? perL : ''),
  1802. value: {},
  1803. values: {},
  1804. compVal: {
  1805. sum: 0
  1806. },
  1807. slots: si.slots,
  1808. name: si.name,
  1809. item_level: si.item_level,
  1810. items: si.items,
  1811. };
  1812. }
  1813. if (!types[i].value[NAM])
  1814. types[i].value[NAM] = 0;
  1815. types[i].value[NAM] += ib.value;
  1816. var NUM = types[i].value[NAM] * (LT.SPEC.includes(NAM) && types[i].slots != 'buff' ? 100 : 1);
  1817. var VAL = LT.lvlToggle && ID.key ? Math.ceil(NUM * LT.lvlToggle) : NUM;
  1818. var lvl = ib.leveled ? 0 : si.item_level;
  1819. var LVL = lvlUp(lvl, VAL) * id[NAM];
  1820. if (!types[i].values[k])
  1821. types[i].values[k] = $.extend({
  1822. sum: 0
  1823. }, types[i].values[k - 1]);
  1824. types[i].values[k][NAM] = Math.round(LVL * 1000) / 1000;
  1825. types[i].compVal[NAM] = !LT.lvlToggle && ID.key ? lvlUp(lvl, Math.ceil(NUM * Character.level)) * id[NAM] : LVL;
  1826. types[i].parts = k;
  1827. }
  1828. }
  1829. if (types[i]) {
  1830. for (var cv in types[i].compVal) {
  1831. types[i].compVal.sum += types[i].compVal[cv];
  1832. for (var nv in types[i].values)
  1833. types[i].values[nv].sum += types[i].values[nv][cv] || 0;
  1834. }
  1835. if (si.items) {
  1836. for (var is of si.items)
  1837. if (ItemManager.getByBaseId(is).sub_type != id.subWeapon)
  1838. types[i].compVal.sum += types[is] ? types[is].compVal.sum : 0;
  1839. }
  1840. }
  1841. }
  1842. },
  1843. reloadLvl = 0,
  1844. showbonus = {
  1845. 'SetBonus': function (id) {
  1846. LT.currSetBonus = id;
  1847. scrollpane.contentPane.empty();
  1848. var types = {},
  1849. sets = LT.currList[id];
  1850. if (!sets)
  1851. return;
  1852. LT.GUI.window.setTitle(LT.GUI.getSetOrItem(id, sets));
  1853. var spCont = '<span style="width:60%;position:absolute;">';
  1854. for (var k in sets.bonus) {
  1855. spCont += '<b>' + k + ' ' + LTlang.items + ':</b><br>';
  1856. for (var ID of sets.bonus[k]) {
  1857. var ib = ID.bonus || ID;
  1858. var NAM = (ib.name || ib.type) + (ib.job || ib.isSector || '');
  1859. if (!types[NAM]) {
  1860. var DESC = ID.desc && (LT.lvlToggle && ID.key && ID.desc.replace(/[0-9]|\+|\.|\([^)]+\)$/g, '') || ID.desc.replace(/[0-9]|\+|\./g, '')) || CharacterSkills.keyNames[NAM];
  1861. types[NAM] = {
  1862. key: (ID.key || 0),
  1863. desc: DESC,
  1864. value: 0
  1865. };
  1866. }
  1867. types[NAM].value += ib.value;
  1868. }
  1869. for (var m in types) {
  1870. var n = types[m];
  1871. var NUM = n.value * (LT.SPEC.includes(m) ? 100 : 1);
  1872. var VAL = LT.lvlToggle && n.key ? Math.ceil(NUM * LT.lvlToggle) : Math.round(NUM * 100) / 100;
  1873. spCont += getBonImg(m, 23) + ' + ' + VAL + ' ' + n.desc + '<br>';
  1874. }
  1875. }
  1876. spCont += '</span><span style="width:40%;left:60%;position:absolute;">';
  1877. for (var o of LT.currList[id].items)
  1878. spCont += LT.GUI.getSetOrItem(o, LT['itemList' + LT.currState][o]) + '<br>';
  1879. scrollpane.appendContent(spCont);
  1880. setTimeout(function () {
  1881. var cont = $('div.LTSetsWindow div.tw2gui_scrollpane_clipper_contentpane > span');
  1882. cont.parent().height(cont.height() + 10);
  1883. }, 100);
  1884. },
  1885. 'BonusSearch': function (idString) {
  1886. var id = JSON.parse(idString);
  1887. if (Object.keys(id).length > 2 && !LT.lvlToggle) {
  1888. if (!LT.currBonusSearch) {
  1889. LT.currBonusSearch = idString;
  1890. reloadLvl = 1;
  1891. }
  1892. return lvlBox.select(charLvl);
  1893. }
  1894. scrollpane.contentPane.empty();
  1895. types = {};
  1896. var title = '';
  1897. for (var oi in LT.searchObj)
  1898. if (id[oi])
  1899. title += getBonImg(oi, 35) + ' ';
  1900. LT.GUI.window.setTitle(title);
  1901. var ns = '' + LT.lvlToggle + LT.onlyOwnSets;
  1902. if (idString != LT.currBonusSearch || ns != LT.GUI.newState || reloadLvl) {
  1903. LT.currBonusSearch = idString;
  1904. LT.GUI.newState = ns;
  1905. reloadLvl = 0;
  1906. compare(LT['itemList' + LT.currState], id);
  1907. compare(LT.currList, id);
  1908. var types2 = Object.keys(types).sort(function (a, b) {
  1909. return types[b].compVal.sum / types[b].parts - types[a].compVal.sum / types[a].parts;
  1910. }),
  1911. ic = 0;
  1912. LT.GUI.html = {
  1913. body: '',
  1914. right_arm: '',
  1915. animal: '',
  1916. rest: '',
  1917. item: '',
  1918. buff: '',
  1919. };
  1920. for (var type of types2) {
  1921. var n = types[type],
  1922. nsi = n.slots == 'item';
  1923. if (nsi && ic++ > 200)
  1924. continue;
  1925. var setval = 0;
  1926. LT.GUI.html[n.slots] += '<br>' + LT.GUI.getSetOrItem(type, n) + '<br>';
  1927. for (var o in n.values) {
  1928. if (o == 'sum')
  1929. continue;
  1930. var pre = (nsi ? '' : o + ' ' + LTlang.parts + ':');
  1931. LT.GUI.html[n.slots] += pre + ' +' + n.values[o].sum + n.desc + '<br>';
  1932. setval = n.values[o].sum;
  1933. }
  1934. if (n.items) {
  1935. var ibs = 0;
  1936. for (var ib of n.items)
  1937. if (ItemManager.getByBaseId(ib).sub_type != id.subWeapon)
  1938. ibs += types[ib] ? types[ib].values[1].sum : 0;
  1939. LT.GUI.html[n.slots] += '& ' + LTlang.items + ': +' + (ibs + setval) + '<br>';
  1940. }
  1941. }
  1942. }
  1943. scrollpane.appendContent('<span class="LTBonusS body" style="width:16%;position:absolute;"><h4>' + LTlang.body + '</h4></span><span class="LTBonusS right_arm" style="width:16%;left:17%;position:absolute;"><h4>' + LTlang.right_arm + '</h4></span><span class="LTBonusS animal" style="width:16%;left:34%;position:absolute;"><h4>' + LTlang.animal + '</h4></span><span class="LTBonusS rest" style="width:16%;left:51%;position:absolute;"><h4>' + LTlang.rest + '</h4></span><span class="LTBonusS item" style="width:16%;left:68%;position:absolute;"><h4>' + LTlang.items + '</h4></span><span class="LTBonusS buff" style="width:16%;right:0;position:absolute;"><h4>' + LTlang.buff + '</h4></span>');
  1944. for (var hs in LT.GUI.html)
  1945. $('.LTBonusS.' + hs).append(LT.GUI.html[hs]);
  1946. setTimeout(function () {
  1947. var maxHeight = 0;
  1948. for (var h of $('div.LTSetsWindow span.LTBonusS'))
  1949. if (h.clientHeight > maxHeight)
  1950. maxHeight = h.clientHeight;
  1951. $('div.LTSetsWindow div.tw2gui_scrollpane_clipper_contentpane').height(maxHeight + 10);
  1952. }, 200);
  1953. },
  1954. },
  1955. loadResult = function () {
  1956. if (LT.setLength <= forbid.max || LT.onlyOwnSets || newSet) {
  1957. if (LT['curr' + tab])
  1958. showbonus[tab](LT['curr' + tab]);
  1959. newSet = false;
  1960. }
  1961. },
  1962. selbox,
  1963. loadSelbox = function () {
  1964. LT.currState = LT.onlyOwnSets ? 'Own' : 'All';
  1965. LT.currList = LT['setList' + LT.currState];
  1966. selbox = new west.gui.Selectbox().setWidth(250);
  1967. LT.GUI.window.setTitle(tab);
  1968. scrollpane.contentPane.empty();
  1969. if (LT.setLength <= forbid.max || LT.onlyOwnSets) {
  1970. if (tab == 'SetBonus') {
  1971. selbox.addListener(showbonus.SetBonus);
  1972. var sbaI = function (j) {
  1973. var sj = LT.currList[j];
  1974. selbox.addItem(j, '<img src=' + (forbid.unlock.includes(j) ? LTstart.Images('new') : ItemManager.getByBaseId(sj.items[0]).image) + ' height="20" width="20">' + '<div style="padding-right: 20px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden;">' + sj.name + '</div>', sj.name);
  1975. };
  1976. if (LT.setAbc) {
  1977. for (var h of LT.list)
  1978. if (LT.currList[h.key])
  1979. sbaI(h.key);
  1980. } else
  1981. for (var i in LT.currList)
  1982. sbaI(i);
  1983. }
  1984. scrollpane.appendContent('<h1>' + LTlang.choose + '!</h1>');
  1985. } else
  1986. scrollpane.appendContent('<p style="color: #a31919;">ERROR: There are new sets added to the game.<br>Please <a href="javascript:LT.GUI.open(\'openKontakt\');" title="Open contact tab">contact me</a> so I can add the sets to the script.</p>');
  1987. },
  1988. img = {
  1989. SetBonus: 'dayofthedead_2014_hat3',
  1990. BonusSearch: 'st_patrick_head',
  1991. shot: 'goldensable',
  1992. hand: 'golden_gun',
  1993. },
  1994. buttonLogic = function (ev, d, b) {
  1995. var butObj = b || ev.data.obj,
  1996. id = butObj.id,
  1997. val = 1;
  1998. if ($(ev.currentTarget).hasClass('butPlus') || d > 0) {
  1999. if (butObj.current_value + 1 > butObj.max_value)
  2000. return false;
  2001. } else {
  2002. if (butObj.current_value - 1 < butObj.min_value)
  2003. return false;
  2004. val = -1;
  2005. }
  2006. butObj.current_value += val;
  2007. if (CharacterSkills.skills[id]) {
  2008. var attr = CharacterSkills.skills[id].attr_key;
  2009. if (!LT.chooseBonus[attr])
  2010. LT.chooseBonus[attr] = 0;
  2011. LT.chooseBonus[attr] += val;
  2012. $('.chooseBonus #' + attr + ' span.displayValue').text(LT.chooseBonus[attr]);
  2013. if (LT.chooseBonus[attr] === 0)
  2014. delete LT.chooseBonus[attr];
  2015. }
  2016. if (butObj.current_value === 0)
  2017. delete LT.chooseBonus[id];
  2018. else
  2019. LT.chooseBonus[id] = butObj.current_value;
  2020. $('.chooseBonus #' + id + ' span.displayValue').text(butObj.current_value);
  2021. return true;
  2022. },
  2023. cont,
  2024. getCB = function (id) {
  2025. if (LT.searchObj[id][2])
  2026. cont.append(LT.searchObj[id][2]);
  2027. var div = $('<div class="chooseBonus" style="display:inline-block;">' + getBonImg(id, 45)).appendTo(cont);
  2028. new west.gui.Plusminusfield(id, LT.chooseBonus[id] || 0, -100, 100, 0, buttonLogic, buttonLogic, buttonLogic).setWidth(45).appendTo(div);
  2029. },
  2030. chooseWindow = function () {
  2031. cont = $('<span>').append('<div style="width:92px;display:inline-block;vertical-align:top;background-color:#A47F5B;border-radius:5px;">' +
  2032. '<img id="switchWeapon" style="cursor:pointer;" src="https://wiki.the-west.de/images/1/1a/Switch_weapons_icon.png" title="' + LTlang.switchWeapon + '" width="45">' +
  2033. '<img id="subWeapon" src="images/items/right_arm/' + img[LT.chooseBonus.subWeapon] + '.png" width="45"></div>');
  2034. for (var so in LT.searchObj) {
  2035. getCB(so);
  2036. }
  2037. new west.gui.Dialog(LTlang.selectBonus, cont).setBlockGame(false).setDraggable(true).addButton('ok', function () {
  2038. if (Object.keys(LT.chooseBonus).length > 1)
  2039. showbonus.BonusSearch(JSON.stringify(LT.chooseBonus));
  2040. else {
  2041. LT.currBonusSearch = '';
  2042. loadSelbox();
  2043. }
  2044. }).addButton(LTlang.resetB, function () {
  2045. LT.chooseBonus = {
  2046. subWeapon: 'hand'
  2047. };
  2048. chooseWindow();
  2049. }).addButton('cancel').show();
  2050. $('#switchWeapon').click(function () {
  2051. LT.chooseBonus.subWeapon = LT.chooseBonus.subWeapon == 'shot' ? 'hand' : 'shot';
  2052. $("#subWeapon").attr('src', 'images/items/right_arm/' + img[LT.chooseBonus.subWeapon] + '.png');
  2053. });
  2054. $('div.chooseBonus .tw2gui_plusminus').width('auto');
  2055. $('div.chooseBonus').css('margin-left', '2px');
  2056. };
  2057. setbutton = $('<span title="' + LTlang.choose + '" style="background-image:url(images/items/head/' + img[tab] + '.png); cursor:pointer; position:absolute; height:73px; width:73px; margin:4px;" />');
  2058. setbutton.click(function () {
  2059. if (tab == 'SetBonus') {
  2060. var pos = $(setbutton).offset();
  2061. selbox.setPosition(pos.left + 35, pos.top + 50);
  2062. selbox.show();
  2063. } else if (tab == 'BonusSearch' && (LT.setLength <= forbid.max || LT.onlyOwnSets))
  2064. chooseWindow();
  2065. });
  2066. var content = $('<div>');
  2067. content.css({
  2068. 'margin-top': '90px',
  2069. 'width': '110px',
  2070. 'position': 'absolute',
  2071. });
  2072. $(LT.GUI.window.getContentPane()).append(setbutton, content, scrollpane.getMainDiv());
  2073. var maxLvl = 150,
  2074. setsSort = tab == 'SetBonus' ? new west.gui.Checkbox('ABC', null, function (state) {
  2075. LT.setAbc = state;
  2076. loadSelbox();
  2077. }).setSelected(LT.setAbc, true).getMainDiv() : '',
  2078. lvlBox = new west.gui.Combobox().setWidth(77).addItem(0, '0').addItem(charLvl, '' + charLvl),
  2079. onlyOwn = new west.gui.Checkbox(LTlang.ownSets, null, function (state) {
  2080. LT.onlyOwnSets = state;
  2081. loadSelbox();
  2082. loadResult();
  2083. }).setSelected(LT.onlyOwnSets);
  2084. if (charLvl != maxLvl)
  2085. lvlBox.addItem(maxLvl, '' + maxLvl);
  2086. lvlBox.select(LT.lvlToggle).addListener(function (lvl) {
  2087. LT.lvlToggle = lvl;
  2088. loadResult();
  2089. });
  2090. content.append(setsSort, '<br><br><b>' + LTlang.level + ':</b>', lvlBox.getMainDiv(), onlyOwn.getMainDiv());
  2091. $('div.tw2gui_window.LT.active_tab_id_BonusSearch').width(1060);
  2092. $('div.tw2gui_window.LT.active_tab_id_BonusSearch div.tw2gui_scrollpane.LTSetsWindow').width(900);
  2093. },
  2094. openFrame: function (iframe, size) {
  2095. LT.GUI.window.setResizeable(true).addClass('nocloseall').clearContentPane().activateTab('LTFrame');
  2096. LT.GUI.window.dontCloseAll = true;
  2097. if (Array.isArray(size))
  2098. LT.GUI.window.setSize(size[0], size[1]);
  2099. var wnd = LT.GUI.window.getMainDiv();
  2100. $('.tw2gui_window_inset', wnd).css('background-image', 'url(' + LTstart.Images('LT_backGr', 1) + ')');
  2101. $('.textart_title', wnd).css('display', 'none');
  2102. var contPan = $(LT.GUI.window.getContentPane());
  2103. contPan.css('margin-top', '-30px');
  2104. new west.gui.Button('QuakeNet Webchat').appendTo(contPan).click(function () {
  2105. var iframe = 'https://webchat.quakenet.org';
  2106. LT.GUI.openFrame(iframe);
  2107. });
  2108. new west.gui.Button('Wiki The-West').appendTo(contPan).click(function () {
  2109. var iframe = Game.helpURL.replace('http:', 'https:');
  2110. LT.GUI.openFrame(iframe);
  2111. });
  2112. new west.gui.Button('TW-DB.info').appendTo(contPan).click(function () {
  2113. var iframe = 'https://tw-db.info';
  2114. LT.GUI.openFrame(iframe);
  2115. });
  2116. if (typeof iframe === 'string')
  2117. contPan.append($('<iframe src="' + iframe + '" style="width:100%; height:94%; border:0; margin-bottom:1px; ">'));
  2118. },
  2119. openSender: function () {
  2120. LT.GUI.getDefault('LTSender');
  2121. var EvImg = EvName == 'Octoberfest' ? 'window/events/octoberfest/pretzels_icon' : 'interface/friendsbar/events/' + EvName;
  2122. LT.GUI.window.setTitle(sendGift.label + ' <img src="images/' + EvImg + '.png">');
  2123. if (!isDefined(WestUi.FriendsBar.friendsBarUi)) {
  2124. WestUi.FriendsBar.toggle();
  2125. }
  2126. setTimeout((function () {
  2127. var e = [],
  2128. t = Chat.Friendslist.getFriends(),
  2129. r = WestUi.FriendsBar.friendsBarUi.friendsBar.eventActivations,
  2130. i,
  2131. s,
  2132. u,
  2133. a;
  2134. for (s = 0; s < t.length; s++) {
  2135. i = typeof r[t[s].playerId] !== 'undefined' && r[t[s].playerId][EvName] !== 'undefined' ? r[t[s].playerId][EvName] : 0;
  2136. e.push({
  2137. n: t[s].pname,
  2138. i: t[s].playerId,
  2139. t: i
  2140. });
  2141. }
  2142. e.sort(Sort.create('asc', function (e) {
  2143. return e.t;
  2144. }));
  2145. i = $('<table align="center" border="1" cellpadding="2px" border="1">');
  2146. for (s = 0; s < e.length; s++) {
  2147. u = e[s].t + parseInt(sendGift.cooldown, 10) - new ServerDate().getTime() / 1000;
  2148. if (u > 0) {
  2149. a = $('<td>(' + u.formatDurationBuffWay() + ')</td>');
  2150. } else {
  2151. a = $('<td><a href="#">' + sendGift.label + '</a></td>').click(e[s].i, function (e) {
  2152. $(this).parent().remove();
  2153. Ajax.remoteCall('friendsbar', 'event', {
  2154. player_id: e.handleObj.data,
  2155. event: EvName
  2156. }, function (t) {
  2157. if (t.error)
  2158. return MessageError(t.msg).show();
  2159. MessageSuccess(t.msg).show();
  2160. var n = e.handleObj.data;
  2161. r[n] = r[n] || {};
  2162. r[n][EvName] = t.activationTime;
  2163. });
  2164. });
  2165. }
  2166. i.append($('<tr>)').append($('<td>' + e[s].n + '</td>'), a));
  2167. }
  2168. var scrollpane = new west.gui.Scrollpane();
  2169. $(scrollpane.getMainDiv()).css({
  2170. 'margin-top': '10px',
  2171. 'width': '340px',
  2172. 'position': 'absolute',
  2173. });
  2174. scrollpane.appendContent(i);
  2175. if (t.length === 0)
  2176. scrollpane.appendContent('<h2 style="text-align: center; color: #a31919; margin-top: 50px;">' + LTlang.noFriends + '</h2>');
  2177. var scrollP = new west.gui.Scrollpane();
  2178. $(scrollP.getMainDiv()).css({
  2179. 'margin-top': '10px',
  2180. 'margin-left': '345px',
  2181. 'width': '353px', //698-345
  2182. });
  2183. if (EvName == 'Hearts' || EvName == 'DayOfDead') {
  2184. var name = '',
  2185. weMmd = west.events.Manager.model._data.events;
  2186. if (EvName == 'Hearts')
  2187. name = weMmd.valentine.model._data.name;
  2188. else
  2189. name = weMmd.DayOfDead.model._l10n.ui.mouseover + ' ' + new Date().getFullYear();
  2190. scrollP.appendContent('<h3>' + name + '</h3>');
  2191. //west.events.Manager.getRunningEvents()
  2192. var rew = Game.sesData[EvName].rewards;
  2193. for (var r in rew) {
  2194. var div = $('<div />');
  2195. div.append('<img src="images/' + EvImg + '.png"> <b>' + r + '</b><br>' + rew[r].desc + '<br>');
  2196. var id = rew[r].id;
  2197. if (isNaN(id)) {
  2198. div.append('<i>' + LTlang.reward + ': ' + id + '</i><br><br>');
  2199. } else {
  2200. var invItem = new tw2widget.JobItem(ItemManager.get(id));
  2201. div.append(invItem.getMainDiv()).append('<br><br><br><br><br>');
  2202. }
  2203. scrollP.appendContent(div);
  2204. }
  2205. }
  2206. $(LT.GUI.window.getContentPane()).append(scrollpane.getMainDiv()).append(scrollP.getMainDiv());
  2207. }), 500);
  2208. },
  2209. };
  2210. LT.RecipeMarket = {
  2211. init: function () {
  2212. var inject = function (category, data) {
  2213. $('.LTFind').remove();
  2214. var gLS4P = Game.InfoHandler.getLocalString4ProfessionId;
  2215. var buttons_recipe = $('<div class="LTFind"><a href=\'javascript:LT.RecipeMarket.filterRecipe(0);\'><img title="' + LTlang.allprofessions + '" alt="allprofessions" src="' + LTstart.Images('LT_recipes') + '" /></a><a href=\'javascript:LT.RecipeMarket.filterRecipe(1);\'><img title="' + gLS4P(1) + '" alt="fieldcook" style="width: 30px;" src="images/items/recipe/recipe_cook.png" /></a><a href=\'javascript:LT.RecipeMarket.filterRecipe(2);\'><img title="' + gLS4P(2) + '" alt="tonicpeddler" style="width: 30px;" src="images/items/recipe/recipe_quack.png" /></a><a href=\'javascript:LT.RecipeMarket.filterRecipe(3);\'><img title="' + gLS4P(3) + '" alt="blacksmith" style="width: 30px;" src="images/items/recipe/recipe_smith.png" /></a><a href=\'javascript:LT.RecipeMarket.filterRecipe(4);\'><img title="' + gLS4P(4) + '" alt="mastersaddler" style="width: 30px;" src="images/items/recipe/recipe_sattle.png" /></a></div>');
  2216. if (category == 'recipe') {
  2217. $('.searchbox').before(buttons_recipe);
  2218. $('.searchbox').css('margin-bottom', '0');
  2219. var items = [];
  2220. for (var i = 0; i < data.length; i++)
  2221. items[i] = ItemManager.get(data[i]);
  2222. items.sort(function (a, b) {
  2223. return a.min_level - b.min_level;
  2224. });
  2225. LT.RecipeMarket.Recipe = items;
  2226. for (var h = 0; h < items.length; h++)
  2227. data[h] = items[h].item_id;
  2228. return data;
  2229. }
  2230. $('.searchbox').css('margin-bottom', '18px');
  2231. return data;
  2232. };
  2233. MarketWindow.Buy.twlt_updateCategory = MarketWindow.Buy.updateCategory;
  2234. MarketWindow.Buy.updateCategory = function (category, data) {
  2235. data = inject(category, data);
  2236. MarketWindow.Buy.twlt_updateCategory.call(this, category, data);
  2237. };
  2238. MarketWindow.getClearName = function (obj) {
  2239. if (obj.type == 'recipe') {
  2240. var name = ItemManager.get(obj.craftitem).name;
  2241. return isDefined(name) ? name : obj.name;
  2242. }
  2243. return obj.name;
  2244. };
  2245. },
  2246. filterRecipe: function (profession_id) {
  2247. var data = $('#mpb_recipe_content p');
  2248. data.show();
  2249. if (profession_id === 0)
  2250. return;
  2251. for (var i = 0; i < LT.RecipeMarket.Recipe.length; i++)
  2252. if (profession_id != LT.RecipeMarket.Recipe[i].profession_id)
  2253. $(data[i]).hide();
  2254. }
  2255. };
  2256. LT.AchievHide = {
  2257. init: function () {
  2258. var hideUnErfolge = function () {
  2259. $('.playerachievement-' + Character.playerId + ' .achievement').hide();
  2260. $('.playerachievement-' + Character.playerId + ' .achievement .achievement_unachieved').parent().show();
  2261. };
  2262. AchievementExplorer.prototype.twlt_updateContent = AchievementExplorer.prototype.updateContent;
  2263. AchievementExplorer.prototype.updateContent = function (data) {
  2264. var tmp = AchievementExplorer.prototype.twlt_updateContent.call(this, data);
  2265. if (data.folder.id != 'overall' && data.folder.id != 'heroics')
  2266. hideUnErfolge();
  2267. return tmp;
  2268. };
  2269. }
  2270. };
  2271. LT.MarketMessage = {
  2272. Towns: {},
  2273. init: function () {
  2274. Ajax.get('map', 'get_minimap', {}, function (json) {
  2275. if (json.error)
  2276. return new UserMessage(json.msg).show();
  2277. LT.MarketMessage.Towns = json.towns;
  2278. EventHandler.listen('position_change', function () {
  2279. LT.MarketMessage.check();
  2280. });
  2281. var setVal2 = setInterval(function () {
  2282. if (Character.position.x) {
  2283. clearInterval(setVal2);
  2284. LT.MarketMessage.check();
  2285. }
  2286. }, 1000);
  2287. });
  2288. },
  2289. check: function () {
  2290. var town_id,
  2291. offers,
  2292. bids,
  2293. fetch = function (action) {
  2294. Ajax.remoteCall('building_market', action, {}, function (resp) {
  2295. if (resp.error)
  2296. return new UserMessage(resp.msg).show();
  2297. Character.setDeposit(resp.deposit);
  2298. Character.setMoney(resp.cash);
  2299. return new MessageSuccess(resp.msg).show();
  2300. });
  2301. };
  2302. var fetchAll = function (what) {
  2303. if (what == 1)
  2304. fetch('fetch_town_offers');
  2305. fetch('fetch_town_bids');
  2306. EventHandler.signal('inventory_changed');
  2307. };
  2308. var showDialog = function () {
  2309. new west.gui.Dialog(LTlang.market1, LTlang.market2, west.gui.Dialog.SYS_QUESTION).addButton(LTlang.all, function () {
  2310. fetchAll(1);
  2311. }).addButton(LTlang.onlyBids, function () {
  2312. fetchAll(0);
  2313. }).addButton(LTlang.nothing).show();
  2314. };
  2315. var checkItems = function () {
  2316. for (var g = 0; g < bids.length; g++) {
  2317. var bgs = bids[g];
  2318. if (bgs.market_town_id == town_id && (bgs.auction_ends_in < 0 || bgs.current_bid == bgs.max_price)) {
  2319. showDialog();
  2320. return;
  2321. }
  2322. }
  2323. for (var f = 0; f < offers.length; f++) {
  2324. var ofs = offers[f];
  2325. if (ofs.market_town_id == town_id && (ofs.auction_ends_in < 0 || ofs.current_bid == ofs.max_price)) {
  2326. showDialog();
  2327. return;
  2328. }
  2329. }
  2330. };
  2331. var get_offers = function () {
  2332. Ajax.remoteCall('building_market', 'fetch_offers', {
  2333. page: 0
  2334. }, function (json) {
  2335. offers = json.msg.search_result;
  2336. checkItems();
  2337. });
  2338. };
  2339. var get_bids = function () {
  2340. Ajax.remoteCall('building_market', 'fetch_bids', {}, function (json) {
  2341. bids = json.msg.search_result;
  2342. get_offers();
  2343. });
  2344. };
  2345. var towns = LT.MarketMessage.Towns;
  2346. for (var k in towns)
  2347. if (towns[k].x == Character.position.x && towns[k].y == Character.position.y) {
  2348. town_id = towns[k].town_id;
  2349. var wait = Character.health < 6 ? Character.playerId.toString().substr(-4) : 1;
  2350. setTimeout(function () {
  2351. get_bids();
  2352. }, wait);
  2353. }
  2354. }
  2355. };
  2356. LT.MarketTown = {
  2357. init: function () {
  2358. if (!LT.Skript.getFeature('MarketMessage'))
  2359. Ajax.get('map', 'get_minimap', {}, function (json) {
  2360. if (json.error)
  2361. return new UserMessage(json.msg).show();
  2362. LT.MarketMessage.Towns = json.towns;
  2363. });
  2364. MarketWindow.twlt_showTab = MarketWindow.showTab;
  2365. MarketWindow.showTab = function () {
  2366. MarketWindow.twlt_showTab.apply(this, arguments);
  2367. if (MarketWindow.townId > -1)
  2368. MarketWindow.window.setTitle(MarketWindow.window.titler.text + " - " + LT.MarketMessage.Towns[MarketWindow.townId].name);
  2369. };
  2370. }
  2371. };
  2372. LT.MarkDaily = {
  2373. init: function () {
  2374. var addBorder = function () {
  2375. var rows = $('.reward-row');
  2376. var row = $(rows[4]);
  2377. if (row.hasClass('today'))
  2378. row.css('border', '20px solid red');
  2379. };
  2380. west.player.LoginBonus.prototype.twlt_show = west.player.LoginBonus.prototype.show;
  2381. west.player.LoginBonus.prototype.show = function () {
  2382. var tmp = west.player.LoginBonus.prototype.twlt_show.call(this);
  2383. if (tmp !== undefined)
  2384. return tmp;
  2385. addBorder();
  2386. };
  2387. }
  2388. };
  2389. LT.DuellMap = {
  2390. init: function () {
  2391. var generateNpcPopup = function (data) {
  2392. var weapon = ItemManager.get(data.weaponId),
  2393. damage = weapon.getDamage(data),
  2394. npcData = data.bonus;
  2395. return '<table class="dln_npcskill_popup"><tr><td colspan="5" class="text_bold">' + LTlang.popup + '<br>&nbsp;</td></tr><tr><td><img src="/images/window/duels/npcskill_shot.jpg" /></td><td><img src="/images/window/duels/npcskill_punch.jpg" /></td><td><img src="/images/window/duels/npcskill_aim.jpg" /></td><td><img src="/images/window/duels/npcskill_appearance.jpg" /></td><td></td></tr><tr><td class="text_bold">' + (npcData.shot || 0) + '</td><td class="text_bold">' + (npcData.punch || 0) + '</td>' + '<td class="text_bold">' + (npcData.aim || 0) + '</td><td class="text_bold">' + (npcData.appearance || 0) + '</td><td></td></tr>' + '<tr><td><img src="/images/window/duels/npcskill_tactic.jpg" /></td><td><img src="/images/window/duels/npcskill_reflex.jpg" /></td><td><img src="/images/window/duels/npcskill_dodge.jpg" /></td><td><img src="/images/window/duels/npcskill_tough.jpg" /></td><td><img src="/images/window/duels/npcskill_health.jpg" /></td></tr><tr><td class="text_bold">' + (npcData.tactic || 0) + '</td><td class="text_bold">' + (npcData.reflex || 0) + '</td><td class="text_bold">' + (npcData.dodge || 0) + '</td><td class="text_bold">' + (npcData.tough || 0) + '</td><td class="text_bold">' + (npcData.health || 0) + '</td></tr><tr><td colspan="2" class="text_bold"><img src="' + weapon.image + '" /></td><td colspan="3" class="text_bold"><br>' + weapon.name + '<br>(' + LTlang.damage + ': ' + damage.min + ' - ' + damage.max + ')</td></tr></table>';
  2396. };
  2397. Ajax.remoteCallMode('character', 'get_info', {}, function (resp) {
  2398. Character.setDuelLevel(resp.duelLevel);
  2399. });
  2400. var progB = new west.gui.Progressbar(0, 100);
  2401. progB.setTextOnly(true);
  2402. $(progB.getMainDiv()).css('width', '772px');
  2403. var fillPage = function () {
  2404. $('#LTDuellMapTable').empty();
  2405. $('#LTDuellMapPlayers').empty();
  2406. $('#LTDuellMapTable').append('<tr><th>' + LTlang.name + '</th><th>' + LTlang.town + '</th><th>' + LTlang.level + '</th><th>' + LTlang.duelLevel + '</th><th>' + LTlang.exp + '</th><th>' + LTlang.distance + '</th><th>' + LTlang.startduel + '</th><th>' + LTlang.centerMap + '</th></tr>');
  2407. for (var k in LT.DuellMap.Player) {
  2408. var data = LT.DuellMap.Player[k];
  2409. var content = $('<tr></tr>');
  2410. content.append('<td><a href="javascript:void(PlayerProfileWindow.open(' + data.player_id + '));" title="' + (Character.charClass == 'duelist' ? generateNpcPopup(data).escapeHTML() : '') + '">' + data.player_name + '</a></td>',
  2411. '<td><a href="javascript:void(TownWindow.open(' + data.town_x + ',' + data.town_y + '));">' + data.town_name + '</a></td>',
  2412. '<td>' + data.level + '</td>',
  2413. '<td>' + data.duellevel + '</td>',
  2414. '<td>' + Math.round((7 * data.duellevel - 5 * Character.duelLevel + 5) * Character.duelMotivation * 3) + '</td>',
  2415. '<td>' + window.Map.calcWayTime(Map.getLastQueuePosition(), {
  2416. x: data.character_x,
  2417. y: data.character_y
  2418. }).formatDuration() + '</td>',
  2419. '<td><a href="#" onclick="SaloonWindow.startDuel(' + data.player_id + ', ' + data.alliance_id + ', false, DuelsWindow);">' + LTlang.startduel + '</a></td>',
  2420. '<td><a href="#" onclick="Map.center(' + data.character_x + ', ' + data.character_y + ');">' + LTlang.centerMap + '</a></td>');
  2421. $('#LTDuellMapTable').append(content);
  2422. content = $('<div style="position:absolute;border:1px solid black;background:#FF0000;width:4px;height:4px;left:' + (data.character_x / 46592 * 770 - 2) + 'px;top:' + (data.character_y / 20480 * 338 - 2) + 'px;" />');
  2423. eval('content.click(function () { SaloonWindow.startDuel(' + data.player_id + ', ' + data.alliance_id + ', false, DuelsWindow); });');
  2424. content.addMousePopup('<b>' + data.player_name + '</b> ' + window.Map.calcWayTime(Map.getLastQueuePosition(), {
  2425. x: data.character_x,
  2426. y: data.character_y
  2427. }).formatDuration());
  2428. $('#LTDuellMapPlayers').append(content);
  2429. }
  2430. $('<div style="position:absolute;border:1px solid black;background:#00CCFF;width:4px;height:4px;left:' + (Character.position.x / 46592 * 770 - 2) + 'px;top:' + (Character.position.y / 20480 * 338 - 2) + 'px;" />').addMousePopup('Deine Position').appendTo('#LTDuellMapPlayers');
  2431. };
  2432. var getPlayer = function (i, distance) {
  2433. if (i == -1) {
  2434. progB.setValue(0);
  2435. LT.DuellMap.Player = {};
  2436. i++;
  2437. }
  2438. Ajax.remoteCall('duel', 'search_op', {
  2439. next: true,
  2440. order_by: 'ASC',
  2441. sort: 'range',
  2442. page: i,
  2443. distance: distance * 60
  2444. }, function (json) {
  2445. var l = json.oplist.pclist.length;
  2446. for (var j = 0; j < l; j++) {
  2447. var plyr = json.oplist.pclist[j].player_name;
  2448. if (!LT.DuellMap.Player[plyr]) {
  2449. LT.DuellMap.Player[plyr] = json.oplist.pclist[j];
  2450. progB.increase(1);
  2451. }
  2452. }
  2453. if (json.oplist.next && i < 40) {
  2454. getPlayer(++i, distance);
  2455. return;
  2456. }
  2457. LT.DuellMap.progBVal = progB.getValue();
  2458. fillPage();
  2459. });
  2460. };
  2461. var showTab = function (win, id) {
  2462. DuelsWindow.window.setSize(840, 655).addClass('premium-buy');
  2463. DuelsWindow.window.activateTab(id).$('div.tw2gui_window_content_pane > *').each(function (i, e) {
  2464. if ($(e).hasClass('duels-' + id)) {
  2465. $(e).children().fadeIn();
  2466. $(e).show();
  2467. } else {
  2468. $(e).children().fadeOut();
  2469. $(e).hide();
  2470. }
  2471. });
  2472. DuelsWindow.window.setTitle(LTlang.duelmap);
  2473. if (Object.keys(LT.DuellMap.Player).length === 0) {
  2474. LT.DuellMap.progBVal = 0;
  2475. getPlayer(-1, 15);
  2476. } else
  2477. progB.setValue(LT.DuellMap.progBVal);
  2478. };
  2479. var initDuellmap = function () {
  2480. DuelsWindow.window.addTab(LTlang.duelmap, 'LTDuellmap', showTab);
  2481. LT.DuellMap.Player = {};
  2482. var area = $('<div class="duels-LTDuellmap" style="display:none;"></div>').appendTo(DuelsWindow.window.getContentPane()),
  2483. content = $('<div style="height:350px;top:10px;position:relative"></div>'),
  2484. left = 0,
  2485. top = 0;
  2486. for (var i = 1; i <= 15; i++) {
  2487. var img = $('<img style="position:absolute;border:1px solid #000;width:110px;height:169px;left:' + left + 'px;top:' + top + 'px;" src="images/map/minimap/county_' + i + '.jpg" />');
  2488. left += 110;
  2489. if (i === 7) {
  2490. left = 0;
  2491. top = 169;
  2492. }
  2493. if (i === 4 || i === 11) {
  2494. img.css('height', '114px');
  2495. }
  2496. if (i === 11) {
  2497. img.css('top', top + 55 + 'px');
  2498. }
  2499. if (i === 15) {
  2500. img.css({
  2501. height: '110px',
  2502. left: '330px',
  2503. top: '114px'
  2504. });
  2505. }
  2506. content.append(img);
  2507. }
  2508. content.append('<div id="LTDuellMapPlayers"></div>');
  2509. content.appendTo(area);
  2510. area.append(progB.getMainDiv());
  2511. var scrollpane = new west.gui.Scrollpane().appendTo(area);
  2512. $(scrollpane.getMainDiv()).css('height', '185px');
  2513. scrollpane.appendContent(LTlang.duelradius + ' ');
  2514. var combobox = new west.gui.Combobox().setWidth(120).addItem('15', '15 ' + LTlang.minutes).addItem('30', '30 ' + LTlang.minutes).addItem('60', LTlang.hour).addItem('120', '2 ' + LTlang.hours).addItem('240', '4 ' + LTlang.hours).addItem('360', '6 ' + LTlang.hours).select('15').appendTo(scrollpane.getContentPane());
  2515. new west.gui.Button(LTlang.searchOpp).appendTo(scrollpane.getContentPane()).click(function () {
  2516. getPlayer(-1, combobox.getValue());
  2517. });
  2518. scrollpane.appendContent('<table border="1" id="LTDuellMapTable"></table>');
  2519. };
  2520. DuelsWindow.twlt_open = DuelsWindow.open;
  2521. DuelsWindow.open = function () {
  2522. var tmp = DuelsWindow.twlt_open.call(this);
  2523. if (tmp !== undefined)
  2524. return tmp;
  2525. initDuellmap();
  2526. };
  2527. DuelsWindow.twlt_showTab = DuelsWindow.showTab;
  2528. DuelsWindow.showTab = function (id) {
  2529. var tmp = DuelsWindow.twlt_showTab.call(this, id);
  2530. if (tmp !== undefined)
  2531. return tmp;
  2532. DuelsWindow.window.removeClass('premium-buy').setSize(748, 472);
  2533. };
  2534. }
  2535. };
  2536. LT.ChangeCity = {
  2537. init: function () {
  2538. var swap = function (that) {
  2539. var rows = $('.' + that.window.id + ' .row .cell.cell_2.name,.' + that.window.id + ' .row .cell.cell_2.name_foreign');
  2540. rows.empty();
  2541. for (var i = 0; i <= that.data.length; i++) {
  2542. var player = that.data[i];
  2543. $(rows[i]).append('<span>&nbsp;' + (player.title !== undefined ? player.title : '') + '</span><a href="#" onClick="PlayerProfileWindow.open(' + player.player_id + ')">' + player.name + '</a>');
  2544. }
  2545. };
  2546. CityhallWindow.Residents.twlt_fillContent = CityhallWindow.Residents.fillContent;
  2547. CityhallWindow.Residents.fillContent = function () {
  2548. var tmp = CityhallWindow.Residents.twlt_fillContent.call(this);
  2549. if (tmp !== undefined)
  2550. return tmp;
  2551. swap(this);
  2552. };
  2553. }
  2554. };
  2555. LT.ShowAP = {
  2556. init: function () {
  2557. var addAP = function (that) {
  2558. var job = that.job;
  2559. var getJobFeaturedCls = function () {
  2560. if (LinearQuestHandler.hasTutorialQuest())
  2561. return '';
  2562. if (job.is_gold)
  2563. return 'gold';
  2564. if (job.is_silver)
  2565. return 'silver';
  2566. return '';
  2567. };
  2568. var aps = that.currSkillpoints - that.job.workpoints;
  2569. var jobicon = '<div class="job" title="' + job.get('description').escapeHTML().cutIt(150) + '"><div class="featured ' + getJobFeaturedCls() + '"></div>' + '<img src="images/jobs/' + job.get('shortname') + '.png" class="job_icon" /></div>';
  2570. that.window.setTitle(jobicon + '&nbsp;&nbsp;' + job.get('name').escapeHTML() + ' (' + aps + ' AP)');
  2571. };
  2572. JobWindow.twlt_initView = JobWindow.initView;
  2573. JobWindow.initView = function () {
  2574. var tmp = JobWindow.twlt_initView.call(this);
  2575. if (tmp !== undefined)
  2576. return tmp;
  2577. addAP(this);
  2578. };
  2579. }
  2580. };
  2581. LT.Statusbar = {
  2582. init: function () {
  2583. $('div#ui_windowbar').hide();
  2584. $('div#ui_windowbar_state').hide();
  2585. }
  2586. };
  2587. LT.Logout = {
  2588. init: function () {
  2589. var menu = $('<div class="menulink" onclick="LT.Logout.logout();" title="' + LTlang.logout + '" />').css('background-image', 'url(' + LTstart.Images('logout') + ')').css('background-position', '0px 0px').mouseenter(function () {
  2590. $(this).css('background-position', '-25px 0px');
  2591. }).mouseleave(function () {
  2592. $(this).css('background-position', '0px 0px');
  2593. });
  2594. $('#LT-menu').after(menu);
  2595. },
  2596. logout: function () {
  2597. location.href = 'game.php?window=logout&action=logout&h=' + Player.h;
  2598. },
  2599. };
  2600. LT.MoveJobs = {
  2601. init: function () {
  2602. var st = $('.menulink.lscript')[0].title;
  2603. $('div#ui_bottomright').css('right', '35px');
  2604. $('div.ui_menucontainer').css('margin-bottom', '7px');
  2605. $('div#ui_scripts').remove();
  2606. EscapeWindow.twlt_open = EscapeWindow.twlt_open || EscapeWindow.open;
  2607. EscapeWindow.open = function () {
  2608. EscapeWindow.twlt_open.apply(this, arguments);
  2609. wman.getById('escape').setSize(240, 326);
  2610. $('div.tw2gui_win2.escape div.content div.tw2gui_button')[3].after(new west.gui.Button(st, function () {
  2611. TheWestApi.open();
  2612. wman.getById('escape').destroy();
  2613. }).setMinWidth(175).getMainDiv());
  2614. };
  2615. }
  2616. };
  2617. LT.BlinkEvents = {
  2618. init: function () {
  2619. var setVal7 = setInterval(function () {
  2620. if ($('.border.highlight').length) {
  2621. clearInterval(setVal7);
  2622. $('.border.highlight').remove();
  2623. LT.addStyle('.border.highlight {display:none;}');
  2624. }
  2625. }, 3000);
  2626. }
  2627. };
  2628. LT.FortTracker = {
  2629. init: function () {
  2630. LT.addStyle('.fort_battle_notification {display:none!important;}');
  2631. }
  2632. };
  2633. LT.FriendsPop = {
  2634. init: function () {
  2635. west.notification.ToastOnlineNotification.prototype.show = function () {};
  2636. }
  2637. };
  2638. LT.InstantQuest = {
  2639. init: function () {
  2640. var setVal1 = setInterval(function () {
  2641. if (QuestEmployerView.showQuest) {
  2642. clearInterval(setVal1);
  2643. QuestEmployerView.twlt_showQuest = QuestEmployerView.showQuest;
  2644. QuestEmployerView.showQuest = function (e) {
  2645. QuestEmployerView.twlt_showQuest(e);
  2646. if (e.accepted === false) {
  2647. var req = e.requirements,
  2648. solvCnt = 0;
  2649. for (var f = 0; f < req.length; f++)
  2650. if (req[f].solved === true)
  2651. solvCnt += 1;
  2652. if (req.length == solvCnt)
  2653. $('div.quest_button_area_' + e.id + '').empty().append(new west.gui.Button(LTlang.accNfin, function () {
  2654. QuestWindow.acceptQuest(e.id);
  2655. var siVal = setInterval(function () {
  2656. if (QuestLog.quests[e.id]) {
  2657. clearInterval(siVal);
  2658. QuestWindow.finishQuest(e.id);
  2659. }
  2660. }, 200);
  2661. }).getMainDiv());
  2662. }
  2663. };
  2664. }
  2665. }, 2000);
  2666. }
  2667. };
  2668. LT.QuestWiki = {
  2669. init: function () {
  2670. $.getScript('https://tomrobert.safe-ws.de/repGroups.js').done(function () {
  2671. QuestLog.solvedGroups = {};
  2672. Ajax.remoteCallMode('building_quest', 'get_solved_groups', {}, function (json) {
  2673. for (var sg in json.solved)
  2674. QuestLog.solvedGroups[sg] = json.solved[sg].title;
  2675. QuestLog.twlt_addSolvedQuestGroup = QuestLog.addSolvedQuestGroup;
  2676. QuestLog.addSolvedQuestGroup = function (groupId, questGroup) {
  2677. QuestLog.twlt_addSolvedQuestGroup.apply(this, arguments);
  2678. QuestLog.solvedGroups[groupId] = questGroup.title;
  2679. };
  2680. var lang = Game.locale.substr(0, 2),
  2681. repText = {
  2682. de: ' (Wiederholbare Feiertagsquestreihe)',
  2683. hu: ' (Ismételhető)',
  2684. it: ' (Ripetibile)',
  2685. pt: ' repetível',
  2686. ru: ' - Снова праздник',
  2687. };
  2688. Quest.twlt_render = Quest.render;
  2689. Quest.render = function () {
  2690. Quest.twlt_render.apply(this, arguments);
  2691. var wiki = 'https://wiki.the' + Game.masterURL.match(/the(.*)/)[1] + '/wiki/',
  2692. gid = LT.repGroups[this.id],
  2693. qGroup = QuestLog.solvedGroups[gid] || lang == 'de' && isNaN(gid) && gid,
  2694. groupName = [69, 34].includes(this.group) && qGroup ? qGroup + repText[lang] || '' : this.groupTitle,
  2695. questName = encodeURIComponent((lang == 'pl' ? 'Zadania: ' : '') + groupName + '#' + (lang == 'de' ? this.id : this.soloTitle));
  2696. this.el.find('.quest_description_container .strong').append('<a class="questWiki" style="float:right;" title="' + LTlang.onWiki + '" href="' + wiki + questName + '" target="_blank"><img src="' + LTstart.Images('wiki') + '"/></a>');
  2697. };
  2698. });
  2699. });
  2700. }
  2701. };
  2702. LT.CityTravel = {
  2703. init: function () {
  2704. var setVal3 = setInterval(function () {
  2705. if (west.window.Blackboard.cities.show) {
  2706. clearInterval(setVal3);
  2707. var wwBc = west.window.Blackboard.cities;
  2708. wwBc.twlt_show = wwBc.show;
  2709. wwBc.show = function () {
  2710. for (var c = 0; c < this.cities_.length; c++)
  2711. this.cities_[c].member += '<br>' +
  2712. Map.calcWayTime(Map.getLastQueuePosition(), {
  2713. x: this.cities_[c].x,
  2714. y: this.cities_[c].y
  2715. }).formatDuration();
  2716. wwBc.twlt_show.apply(this, arguments);
  2717. $('.cities .city.inlineblock .popup-title').css('margin-top', '-10px');
  2718. };
  2719. }
  2720. }, 2000);
  2721. }
  2722. };
  2723. LT.BetterSheriff = {
  2724. onlyAttackable: false,
  2725. init: function () {
  2726. var columns = [
  2727. 'name" style="width:100px;',
  2728. 'distance" style="width:70px;',
  2729. 'amount" style="width:70px;',
  2730. 'not_dead_amount" style="width:70px;',
  2731. 'duellevel" style="width:50px;',
  2732. 'status" style="width:192px;'
  2733. ], //max 552px
  2734. wanted = [
  2735. 'Gesucht', 'Wanted', 'Poszukiwany', 'Gezocht', 'Efterlyst', 'Căutat', 'Procurado', 'Hledán', 'Buscado', 'В розыске', 'Aranıyor', 'Körözött', 'Καταζητείται', 'Eftersøgt', 'Odmena za ulovenie', 'Recherché', 'Ricercato',
  2736. ],
  2737. sortByObj,
  2738. myPos,
  2739. lvl,
  2740. players,
  2741. loadedIDs,
  2742. counter,
  2743. maxCount,
  2744. updateTable = function (data) {
  2745. LT.BetterSheriff.table.clearBody();
  2746. var tmpCells = {};
  2747. for (var i = 0; i < data.length; i++) {
  2748. var rd = data[i];
  2749. if (LT.BetterSheriff.onlyAttackable && !rd.status.includes('.startDuel'))
  2750. continue;
  2751. tmpCells[columns[0]] = '<a title="' + SheriffWindow.createWantedTooltip(rd).escapeHTML() + '" href="javascript:void(PlayerProfileWindow.open(' + rd.player_id + '));"> ' + rd.name + '</a>';
  2752. tmpCells[columns[1]] = rd.distance.formatDuration();
  2753. tmpCells[columns[2]] = format_number(rd.amount);
  2754. tmpCells[columns[3]] = format_number(rd.not_dead_amount);
  2755. tmpCells[columns[4]] = rd.duellevel;
  2756. tmpCells[columns[5]] = '<span title=\'' + rd.status + '\'>' + rd.status + '</span>';
  2757. LT.BetterSheriff.table.buildRow('" style="padding-left:5px;', tmpCells);
  2758. }
  2759. },
  2760. startSortDispatcher = function (ev) {
  2761. var sortBy = ev && (ev.target.tagName == 'SPAN' && ev.target.parentElement.classList[2] || ev.target.classList[2]) || 'distance';
  2762. if (sortByObj == sortBy)
  2763. players.reverse();
  2764. else {
  2765. sortByObj = sortBy;
  2766. switch (sortBy) {
  2767. case 'name':
  2768. case 'status':
  2769. players.sort(function (a, b) {
  2770. return a[sortBy].toUpperCase().replace(/^Ä/, 'A').replace(/^Ö/, 'O').replace(/^Ü/, 'U').replace(/^É/, 'E').replace(/\(.*?\)/, '') > b[sortBy].toUpperCase().replace(/^Ä/, 'A').replace(/^Ö/, 'O').replace(/^Ü/, 'U').replace(/^É/, 'E').replace(/\(.*?\)/, '') ? 1 : -1;
  2771. });
  2772. break;
  2773. case 'distance':
  2774. players.sort(function (a, b) {
  2775. return a[sortBy] - b[sortBy];
  2776. });
  2777. break;
  2778. default:
  2779. players.sort(function (a, b) {
  2780. return b[sortBy] - a[sortBy];
  2781. });
  2782. break;
  2783. }
  2784. }
  2785. updateTable(players);
  2786. },
  2787. setStatus = function (player, string) {
  2788. if (player) {
  2789. player.status = string;
  2790. players.push(player);
  2791. }
  2792. counter++;
  2793. LT.BetterSheriff.progB.increase(1);
  2794. if (counter == maxCount) {
  2795. startSortDispatcher();
  2796. $('div.sheriff-LTSheriff .fancytable .row_head').css('cursor', 'pointer').click(startSortDispatcher);
  2797. $('div.sheriff-LTSheriff', SheriffWindow.DOM).append(LT.BetterSheriff.checkB.getMainDiv());
  2798. }
  2799. },
  2800. loadPlayer = function (arr) {
  2801. if (loadedIDs[arr.player_id])
  2802. setStatus(arr, SaloonWindow.playerStat(loadedIDs[arr.player_id]));
  2803. else
  2804. Ajax.remoteCallMode('profile', 'init', {
  2805. playerId: arr.player_id
  2806. }, function (resp) {
  2807. if (resp.error)
  2808. return new UserMessage(resp.message).show();
  2809. if (!wanted.includes(resp.status))
  2810. setStatus(arr, resp.status);
  2811. else if (resp.town) {
  2812. if (resp.town.town_id == Character.homeTown.town_id)
  2813. setStatus(arr, LTlang.ownTown);
  2814. else
  2815. Ajax.remoteCallMode('building_saloon', 'get_data', {
  2816. town_id: resp.town.town_id
  2817. }, function (data) {
  2818. if (data.error)
  2819. return new UserMessage(data.msg).show();
  2820. for (var l = 0; l < data.players.length; l++)
  2821. loadedIDs[data.players[l].player_id] = data.players[l];
  2822. setStatus(arr, SaloonWindow.playerStat(loadedIDs[arr.player_id]));
  2823. });
  2824. } else
  2825. Ajax.remoteCall('task', 'add', {
  2826. 'tasks': {
  2827. '0': {
  2828. 'player_id': arr.player_id,
  2829. 'taskType': 'duel'
  2830. }
  2831. }
  2832. }, function (data) {
  2833. if (data.tasks[0].error)
  2834. setStatus(arr, data.tasks[0].msg);
  2835. else {
  2836. setStatus(arr, SaloonWindow.playerStat({
  2837. player_id: arr.player_id,
  2838. holiday_duel: true,
  2839. }));
  2840. Ajax.remoteCall('task', 'cancel', {
  2841. 'tasks': {
  2842. '0': {
  2843. 'queueId': data.tasks[0].task.queue_id,
  2844. 'type': 'duel'
  2845. }
  2846. }
  2847. });
  2848. }
  2849. });
  2850. });
  2851. },
  2852. initData = function (pg) {
  2853. Ajax.remoteCall('building_sheriff', 'load_page', {
  2854. page: pg,
  2855. }, function (json) {
  2856. if (json.error) {
  2857. new UserMessage(json.msg).show();
  2858. return null;
  2859. }
  2860. if (pg === 0) {
  2861. maxCount = json.count * 10;
  2862. LT.BetterSheriff.progB.setMaxValue(maxCount);
  2863. }
  2864. for (var j = 0; j < 10; j++) {
  2865. if (json.result[j]) {
  2866. var res = json.result[j];
  2867. res.distance = Map.calcWayTime(myPos, {
  2868. x: res.x,
  2869. y: res.y
  2870. });
  2871. res.not_dead_amount = res.not_dead_amount || 0;
  2872. if (lvl.min > res.duellevel)
  2873. setStatus(res, LTlang.tooLow);
  2874. else if (lvl.max < res.duellevel)
  2875. setStatus(res, LTlang.tooHigh);
  2876. else
  2877. loadPlayer(res);
  2878. } else {
  2879. setStatus();
  2880. }
  2881. }
  2882. if (pg < json.count - 1)
  2883. initData(++pg);
  2884. });
  2885. },
  2886. tabclick = function (win, id) {
  2887. if (!SheriffWindow.window)
  2888. return;
  2889. SheriffWindow.window.activateTab(id).setTitle('BetterSheriff').$('div.tw2gui_window_content_pane > *', SheriffWindow.DOM).each(function (i, e) {
  2890. if ($(e).hasClass('sheriff-' + id)) {
  2891. $(e).children().fadeIn();
  2892. $(e).show();
  2893. } else {
  2894. $(e).children().fadeOut();
  2895. $(e).hide();
  2896. }
  2897. });
  2898. if (LT.loadedSheriff)
  2899. return;
  2900. LT.loadedSheriff = true;
  2901. myPos = Map.getLastQueuePosition();
  2902. lvl = {
  2903. min: Math.ceil(Character.duelLevel / 1.4),
  2904. max: Math.floor(Character.duelLevel * 1.4 - 0.01)
  2905. };
  2906. players = [];
  2907. loadedIDs = {};
  2908. counter = 0;
  2909. sortByObj = '';
  2910. initData(0);
  2911. },
  2912. initBetterSheriff = function () {
  2913. LT.loadedSheriff = false;
  2914. SheriffWindow.window.addTab('BetterSheriff', 'LTSheriff', tabclick).appendToContentPane($('<div class="sheriff-LTSheriff" style="display:none;width:590px;position:relative;left:50px;"/>'));
  2915. LT.BetterSheriff.table = new west.gui.Table().removeFooter();
  2916. for (var k = 0; k < columns.length; k++)
  2917. LT.BetterSheriff.table.addColumn(columns[k]).appendToThCell('head', columns[k], LTlang.sortBy + ' ' + LTlang[columns[k].split('"')[0]], LTlang[columns[k].split('"')[0]]);
  2918. LT.BetterSheriff.progB = new west.gui.Progressbar(0, null);
  2919. $(LT.BetterSheriff.progB.getMainDiv()).css('width', '587px');
  2920. LT.BetterSheriff.checkB = new west.gui.Checkbox().setLabel('<img src="/images/window/dailyactivity/tasks_icon.png">').setTooltip(LTlang.attackable).setCallback(function (state) {
  2921. LT.BetterSheriff.onlyAttackable = state;
  2922. updateTable(players);
  2923. }).setSelected(LT.BetterSheriff.onlyAttackable, true);
  2924. $(LT.BetterSheriff.checkB.getMainDiv()).css({
  2925. 'position': 'absolute',
  2926. 'top': '35px',
  2927. 'right': '-65px'
  2928. });
  2929. $('div.sheriff-LTSheriff', SheriffWindow.DOM).empty().append(LT.BetterSheriff.table.getMainDiv()).append(LT.BetterSheriff.progB.getMainDiv());
  2930. $('div.sheriff-LTSheriff .fancytable .tw2gui_scrollpane').css('height', '293px');
  2931. Ajax.remoteCallMode('building_saloon', 'get_data', {
  2932. town_id: Character.homeTown.town_id
  2933. }, function (data) {
  2934. if (data.error)
  2935. return new UserMessage(data.msg).show();
  2936. SaloonWindow.self = data.self;
  2937. });
  2938. };
  2939. SheriffWindow.twlt_open = SheriffWindow.open;
  2940. SheriffWindow.open = function (townId, tabId, wanted) {
  2941. SheriffWindow.twlt_open.call(this, townId, tabId, wanted);
  2942. if (townId === Character.homeTown.town_id) {
  2943. initBetterSheriff();
  2944. }
  2945. };
  2946. }
  2947. };
  2948. LT.ChatProfessions = {
  2949. init: function () {
  2950. Chat.Formatter.twlt_formatContactClient = Chat.Formatter.formatContactClient;
  2951. Chat.Formatter.formatContactClient = function (client, room) {
  2952. var cClient = Chat.Formatter.twlt_formatContactClient.call(this, client, room);
  2953. if (client.professionId > -1)
  2954. $(cClient[0].lastChild).prepend($(Chat.Formatter.getProfessionImage(client.professionId)).css('background-color', '#D5C6A2')[0]);
  2955. return cClient;
  2956. };
  2957. }
  2958. };
  2959. LT.QuestBookSearch = {
  2960. init: function () {
  2961. QuestWindowView.clearSearch = function () {
  2962. $('.window-quest_solved .employer_description .questlog_entrie').show();
  2963. $('.window-quest_solved .solved_container .tw2gui_scrollpane_clipper_contentpane').empty();
  2964. };
  2965. QuestWindowView.searchQuest = function (txt) {
  2966. if (txt) {
  2967. txt = txt.toLowerCase();
  2968. var questGroup = new QuestGroup('searchResult', {});
  2969. for (var q in QuestLog.solved_group) {
  2970. var Qq = QuestLog.solved_group[q];
  2971. if (Qq.title.toLowerCase().includes(txt))
  2972. $('#solved_questgroup_' + q).show();
  2973. else
  2974. $('#solved_questgroup_' + q).hide();
  2975. for (var r in Qq.quests)
  2976. if (Qq.quests.hasOwnProperty(r)) {
  2977. var Qr = Qq.quests[r],
  2978. idMatch = r == txt;
  2979. if (Qr.toLowerCase().includes(txt) || idMatch)
  2980. questGroup.el.append($('<div>').prop({
  2981. id: 'solved_questgroup_quest_' + r,
  2982. className: 'questlog_entrie finish'
  2983. }).append($('<a>').attr({
  2984. href: '#',
  2985. className: 'shorten',
  2986. onclick: s('QuestGroupWindow.open(%1, %2);', q, r)
  2987. }).text((idMatch ? '#ID ' : '') + Qr)));
  2988. }
  2989. }
  2990. QuestWindowView.showSolvedGroup(questGroup);
  2991. } else
  2992. QuestWindowView.clearSearch();
  2993. };
  2994. QuestWindowView.twlt_renderGroupSolved = QuestWindowView.renderGroupSolved;
  2995. QuestWindowView.renderGroupSolved = function () {
  2996. QuestWindowView.twlt_renderGroupSolved.apply(this, arguments);
  2997. var textF = new west.gui.Textfield('questbook_search').addListener(QuestWindowView.searchQuest),
  2998. iconB = new west.gui.Iconbutton(new west.gui.Icon('search'), function () {
  2999. QuestWindowView.searchQuest(textF.getValue());
  3000. }),
  3001. icon = new west.gui.Icon('abort').getMainDiv().click(function () {
  3002. textF.setValue('');
  3003. QuestWindowView.clearSearch();
  3004. });
  3005. $('.window-quest_solved .employer_description .quest_splitter').after($('<div id=QuestBookSearch>').append(textF.getMainDiv(), iconB.getMainDiv(), icon));
  3006. };
  3007. }
  3008. };
  3009. LT.MarketRights = {
  3010. init: function () {
  3011. MarketWindow.sellRights = [{
  3012. i: 'town_new',
  3013. t: LTlang.town
  3014. }, {
  3015. i: 'friends',
  3016. t: LTlang.alliance
  3017. }, {
  3018. i: 'welt',
  3019. t: LTlang.worldwide
  3020. }
  3021. ];
  3022. MarketWindow.Sell.twlt_updateTable = MarketWindow.Sell.updateTable;
  3023. MarketWindow.Sell.updateTable = function () {
  3024. MarketWindow.Sell.twlt_updateTable.apply(this, arguments);
  3025. if (Character.homeTown.town_id)
  3026. Ajax.remoteCall('building_market', 'search', {
  3027. visibility: 0
  3028. }, function (json) {
  3029. for (var i = 0; i < json.msg.search_result.length; i++) {
  3030. var jsr = json.msg.search_result[i];
  3031. if (jsr.seller_name == Character.name)
  3032. $('.marketSellsData_' + jsr.market_offer_id + ' .mps_pickup').prepend('<img src="images/icons/' + MarketWindow.sellRights[jsr.sell_rights].i + '.png" title="' + MarketWindow.sellRights[jsr.sell_rights].t + '">');
  3033. }
  3034. });
  3035. };
  3036. MarketWindow.Buy.twlt_updateTable = MarketWindow.Buy.updateTable;
  3037. MarketWindow.Buy.updateTable = function (data) {
  3038. MarketWindow.Buy.twlt_updateTable.call(this, data);
  3039. if (Character.homeTown.town_id)
  3040. for (var i = 0; i < data.length; i++)
  3041. $('#mpb_vendor_' + data[i].market_offer_id).before('<img src="images/icons/' + MarketWindow.sellRights[data[i].sell_rights].i + '.png" title="' + MarketWindow.sellRights[data[i].sell_rights].t + '">');
  3042. };
  3043. }
  3044. };
  3045. LT.EquipManagerPlus = {
  3046. init: function () {
  3047. var current = {};
  3048. var changeSlot = function (slot) {
  3049. var ws = Wear.slots;
  3050. if (slot == ws.length) {
  3051. $('#equip_manager_list').html(EquipManager.buildEquipList());
  3052. new UserMessage(LTlang.saveMessage2, 'success').show();
  3053. } else if (current[ws[slot]])
  3054. Ajax.remoteCall('inventory', 'carry', {
  3055. item_id: current[ws[slot]].obj.item_id,
  3056. last_inv_id: Bag.getLastInvId()
  3057. }, function () {
  3058. changeSlot(++slot);
  3059. });
  3060. else
  3061. Ajax.remoteCall('inventory', 'uncarry', {
  3062. last_inv_id: Bag.getLastInvId(),
  3063. type: ws[slot]
  3064. }, function () {
  3065. changeSlot(++slot);
  3066. });
  3067. };
  3068. var rename = function (equipId, nr, name) {
  3069. if (name.length < 3)
  3070. return new UserMessage(LTlang.longerName).show();
  3071. new UserMessage(LTlang.loading, 'hint').show();
  3072. current = $.extend({}, Wear.wear);
  3073. Ajax.remoteCall('inventory', 'switch_equip', {
  3074. id: equipId,
  3075. last_inv_id: Bag.getLastInvId()
  3076. }, function () {
  3077. Ajax.remoteCall('inventory', 'delete_equip', {
  3078. id: equipId
  3079. }, function () {
  3080. EquipManager.list.splice(nr, 1);
  3081. Ajax.remoteCall('inventory', 'save_equip', {
  3082. name: name
  3083. }, function (data) {
  3084. if (data.error)
  3085. new UserMessage(data.msg).show();
  3086. else
  3087. EquipManager.list.unshift(data.data);
  3088. changeSlot(0);
  3089. });
  3090. });
  3091. });
  3092. };
  3093. EquipManager.renameEquip = function (equipId, nr) {
  3094. var cont = $('<span>');
  3095. var textF = new west.gui.Textfield('equip_rename').maxlength(25).setValue(EquipManager.list[nr].name).getMainDiv();
  3096. cont.append(LTlang.newName + ': ', textF, '<p style="margin-top:10px;color:red;">' + LTlang.renameWarning + '</p>');
  3097. new west.gui.Dialog(LTlang.rename + ': ' + EquipManager.list[nr].name, cont).addButton('ok', function () {
  3098. rename(equipId, nr, $('#equip_rename').val());
  3099. }).addButton('cancel').show();
  3100. };
  3101. EquipManager.twlt_showPopup = EquipManager.showPopup;
  3102. EquipManager.showPopup = function () {
  3103. EquipManager.twlt_showPopup.apply(this, arguments);
  3104. setTimeout(function () {
  3105. $('#max_equip_count').append(' | ' + LTlang.used + ': <span id="equip_used">' + EquipManager.list.length);
  3106. }, 100);
  3107. };
  3108. EquipManager.twlt_buildEquipList = EquipManager.buildEquipList;
  3109. EquipManager.buildEquipList = function () {
  3110. if ($('#equip_used').length > 0)
  3111. $('#equip_used')[0].innerHTML = EquipManager.list.length;
  3112. EquipManager.list.sort(function (a, b) {
  3113. var a1 = a.name.toUpperCase(),
  3114. b1 = b.name.toUpperCase();
  3115. return (a1 == b1) ? 0 : (a1 > b1) ? 1 : -1;
  3116. });
  3117. var html = EquipManager.twlt_buildEquipList().replace(/60%/g, '40%').replace(/20%/g, '15%');
  3118. for (var i = 0; EquipManager.list.length > i; i++) {
  3119. var id = EquipManager.list[i].equip_manager_id;
  3120. html = html.replace('deleteEquip(' + id, 'renameEquip(' + id + ',' + i + ');\'>' + LTlang.rename + '&emsp;</a></td><td width=\'15%\'><a href=\'javascript:EquipManager.deleteEquip(' + id);
  3121. }
  3122. return html;
  3123. };
  3124. }
  3125. };
  3126. LT.ShortPopups = {
  3127. init: function () {
  3128. ItemPopup.twlt_getXHTML = ItemPopup.twlt_getXHTML || ItemPopup.getXHTML;
  3129. ItemPopup.getXHTML = function () {
  3130. var end = '';
  3131. var html = ItemPopup.twlt_getXHTML.call(this).replace(/<br><span class="inventory_popup_requirement_text(.*?)>$/, function (str) {
  3132. end = str;
  3133. return '';
  3134. }).replace('<div class="invPopup_body">', '').replace('inventory_popup"', 'invPopup_body $& style="max-width:385px;"><table><td').replace(/bonus_attr tw_green"/g, '$& style="white-space:nowrap;"').replace('<br><br><div class="item_set_bonus">', end + '</td><td style="padding-left:5px;">');
  3135. if (!html.includes(end))
  3136. html += end;
  3137. return html;
  3138. };
  3139. }
  3140. };
  3141. LT.HideNotis = {
  3142. init: function () {
  3143. var setVal5 = setInterval(function () {
  3144. var WNw = WestUi.NotiBar.work;
  3145. if (WNw) {
  3146. clearInterval(setVal5);
  3147. WNw.setMaxSize(999);
  3148. $('<div class="tw2gui_window_buttons_close" style="position:absolute;left:40px;z-index:2;" title="' + LTlang.removeWorkNotis + '" />').prependTo(WNw.element).click(function () {
  3149. var l = WNw.list.length;
  3150. while (l--)
  3151. if (WNw.list[l].tooltip.includes('job/danger.png'))
  3152. WNw.removeEntry(WNw.list[l]);
  3153. });
  3154. }
  3155. }, 1000);
  3156. }
  3157. };
  3158. LT.JobProducts = {
  3159. init: function () {
  3160. Map.PopupHandler.twlt_getJobPopup = Map.PopupHandler.twlt_getJobPopup || Map.PopupHandler.getJobPopup;
  3161. Map.PopupHandler.getJobPopup = function (d) {
  3162. var html = Map.PopupHandler.twlt_getJobPopup.apply(this, arguments);
  3163. for (var i in d.yields) {
  3164. var m = ItemManager.get(i);
  3165. html = html.replace('<img src="' + Game.cdnURL + '/images/items/yield/' + m['short'] + '.', '<div class="item"><span class="count" style="display:block;top:29px;left:0px">' + Bag.getItemCount(i) + '</span></div>$&');
  3166. }
  3167. return html;
  3168. };
  3169. }
  3170. };
  3171. LT.MapDistance = {
  3172. init: function () {
  3173. LT.addStyle('div.job_way {left:61px;width:170px;}\n .mpb_distance, .wih_distance, .mpo_distance, .mpw_distance, .mps_distance {width:45px;}\n div.tw2gui_window.marketplace div.fancytable .row > div {text-overflow:unset;}');
  3174. Map.twlt_calcWayTime = Map.twlt_calcWayTime || Map.calcWayTime;
  3175. Map.calcWayTime = function () {
  3176. var time = Map.twlt_calcWayTime.apply(this, arguments);
  3177. this.newDist = time / Game.travelSpeed / Character.speed;
  3178. return time;
  3179. };
  3180. Number.prototype.twlt_formatDuration = Number.prototype.twlt_formatDuration || Number.prototype.formatDuration;
  3181. Number.prototype.formatDuration = function () {
  3182. var dist = '';
  3183. if (Map.newDist)
  3184. dist = ' <small>' + (Math.floor(Map.newDist) / 1000).toFixed(3) + 'mi</small>';
  3185. Map.newDist = 0;
  3186. return Number.prototype.twlt_formatDuration.apply(this, arguments) + dist;
  3187. };
  3188. String.prototype.replaceAll = function () {
  3189. return this.replace(/\D/g, '');
  3190. };
  3191. }
  3192. };
  3193. LT.TraderSell = {
  3194. init: function () {
  3195. var setVal8 = setInterval(function () {
  3196. var wws = west.window.shop;
  3197. if (wws) {
  3198. clearInterval(setVal8);
  3199. LT.addStyle('.focused_new_item_shop .sellIt, .focused_marketplace .auctIt {filter: grayscale(90%)}\n .focused_tailor .not_sellable::after, .focused_gunsmith .not_sellable::after, .focused_general .not_sellable::after, .focused_marketplace .not_auctionable::after {content:"";position:absolute;width:28px;height:28px;right:0;background:url("images/window/shop/shop_icons_sprite.png")no-repeat -167px 0;} .focused_tailor .not_sellable, .focused_gunsmith .not_sellable, .focused_general .not_sellable, .focused_marketplace .not_auctionable {opacity:0.5}');
  3200. var mt = -1,
  3201. itemsToSell = [null, null],
  3202. attr = ['sellable', 'auctionable'],
  3203. className = ['sellIt', 'auctIt'],
  3204. sellItem = function (item) {
  3205. if (!item.obj[attr[mt]])
  3206. return this;
  3207. var inv_id = item.inv_id;
  3208. if (!itemsToSell[mt][inv_id]) {
  3209. itemsToSell[mt][inv_id] = item.count;
  3210. item.divMain[0].classList.add(className[mt]);
  3211. } else {
  3212. delete itemsToSell[mt][inv_id];
  3213. item.divMain[0].classList.remove(className[mt]);
  3214. }
  3215. },
  3216. setClickH = function () {
  3217. Inventory.setClickHandler({
  3218. callback: mt ? MarketWindow.onInventoryClick : wws.handleInventoryClick,
  3219. context: mt ? MarketWindow : wws,
  3220. window: mt ? MarketWindow.window : wws.getWindow()
  3221. });
  3222. },
  3223. exitSell = function (destroy) {
  3224. if (mt)
  3225. MarketWindow.onInventoryClick = MarketWindow.twlt_onInventoryClick || MarketWindow.onInventoryClick;
  3226. else
  3227. wws.handleInventoryClick = wws.twlt_handleInventoryClick || wws.handleInventoryClick;
  3228. $.each(itemsToSell[mt], function (invId) {
  3229. var bgbi = Bag.getItemIdByInvId(invId);
  3230. if (!bgbi)
  3231. return delete itemsToSell[mt][invId];
  3232. Bag.getItemByItemId(bgbi).divMain[0].classList.remove(className[mt]);
  3233. });
  3234. itemsToSell[mt] = null;
  3235. if (destroy)
  3236. return;
  3237. setClickH();
  3238. $(sellButton[mt]).css('filter', 'grayscale(90%)');
  3239. },
  3240. repItems = [
  3241. 3, 201, 302, 325, 603, 802, 10003, 11003,
  3242. ],
  3243. initSell = function () {
  3244. if (!itemsToSell[mt]) {
  3245. if (mt) {
  3246. MarketWindow.twlt_onInventoryClick = MarketWindow.twlt_onInventoryClick || MarketWindow.onInventoryClick;
  3247. MarketWindow.onInventoryClick = function (item) {
  3248. if (this.window.currentActiveTabId != 'sell')
  3249. return false;
  3250. sellItem(item);
  3251. return true;
  3252. };
  3253. } else {
  3254. wws.twlt_handleInventoryClick = wws.twlt_handleInventoryClick || wws.handleInventoryClick;
  3255. wws.handleInventoryClick = function (item) {
  3256. sellItem(item);
  3257. return true;
  3258. };
  3259. }
  3260. setClickH();
  3261. $(sellButton[mt]).css('filter', 'grayscale(0%)');
  3262. itemsToSell[mt] = {};
  3263. } else {
  3264. if (Object.keys(itemsToSell[mt]).length) {
  3265. var cont = '<div>',
  3266. money = 0;
  3267. $.each(itemsToSell[mt], function (invId, count) {
  3268. var bgbi = Bag.getItemIdByInvId(invId);
  3269. if (!bgbi)
  3270. return delete itemsToSell[mt][invId];
  3271. var bgo = Bag.getItemByItemId(bgbi).obj,
  3272. bi = bgo.item_base_id;
  3273. cont += count + 'x ' + LT.GUI.getSetOrItem(bi, bgo, true) + (repItems.includes(bi) ? ' (repeatable quest!)' : '') + '<br>';
  3274. money += bgo.sell_price * count;
  3275. });
  3276. cont += '<br><span class="invPopup_sellicon"/> $' + money + '</span></div>';
  3277. new west.gui.Dialog(LTlang.sellItems, cont).setDraggable(true).addButton('yes', function () {
  3278. $.each(itemsToSell[mt], function (inv_id, amount) {
  3279. if (mt) {
  3280. var item = Bag.getItemByInvId(inv_id).obj;
  3281. var params = MarketWindow.Offer.getOfferObject(item.item_id, 0, (item.sell_price || Math.round(item.price / 2)) * amount, amount, 1, 0, 3, '');
  3282. Ajax.remoteCall('building_market', 'putup', params, function (resp) {
  3283. if (resp.error)
  3284. return new UserMessage(resp.msg).show();
  3285. Character.setMoney(resp.msg.money);
  3286. Character.setDeposit(resp.msg.deposit);
  3287. new UserMessage(s('Die Ware wird zum Kauf angeboten, die Gebühr beträgt $ %1', resp.msg.costs), 'success').show();
  3288. }, MarketWindow);
  3289. } else
  3290. wws.requestSell({
  3291. inv_id: inv_id,
  3292. count: amount
  3293. });
  3294. });
  3295. itemsToSell[mt] = {};
  3296. if (mt) {
  3297. EventHandler.signal('inventory_changed');
  3298. MarketWindow.Sell.initData();
  3299. }
  3300. exitSell();
  3301. }).addButton('cancel').show();
  3302. } else
  3303. exitSell();
  3304. }
  3305. },
  3306. sellButton = [null, null],
  3307. icon = ['dollar', 'box'],
  3308. addMtButton = function (winmt) {
  3309. mt = winmt;
  3310. if (!$('.LT_' + attr[mt] + '_button').length) {
  3311. sellButton[mt] = new west.gui.Iconbutton(new west.gui.Icon(icon[mt]), initSell).addClass('LT_' + attr[mt] + '_button').getMainDiv();
  3312. $(sellButton[mt]).css({
  3313. 'position': 'absolute',
  3314. 'left': 0,
  3315. 'z-index': 1,
  3316. 'filter': 'grayscale(90%)'
  3317. });
  3318. Inventory.DOM.children('.actions').prepend(sellButton[mt]);
  3319. }
  3320. };
  3321. wws.twlt_openSellInventory = wws.twlt_openSellInventory || wws.openSellInventory;
  3322. wws.openSellInventory = function () {
  3323. exitSell(true);
  3324. wws.twlt_openSellInventory.apply(this, arguments);
  3325. addMtButton(0);
  3326. };
  3327. /*MarketWindow.twlt_open = MarketWindow.twlt_open || MarketWindow.open;
  3328. MarketWindow.open = function () {
  3329. exitSell(true);
  3330. MarketWindow.twlt_open.apply(this, arguments);
  3331. addMtButton(1);
  3332. };*/
  3333. Inventory.twlt_setClickHandler = Inventory.twlt_setClickHandler || Inventory.setClickHandler;
  3334. Inventory.setClickHandler = function (h) {
  3335. if (sellButton[mt])
  3336. $(sellButton[mt]).hide();
  3337. var win = h && h.window.id,
  3338. winmt = ['new_item_shop', 'marketplace'].indexOf(win);
  3339. if (winmt > -1) {
  3340. mt = winmt;
  3341. h.callback = mt ? MarketWindow.onInventoryClick : wws.handleInventoryClick;
  3342. if (sellButton[mt])
  3343. $(sellButton[mt]).show();
  3344. }
  3345. Inventory.twlt_setClickHandler.apply(this, arguments);
  3346. };
  3347. Inventory.twlt_undock = Inventory.twlt_undock || Inventory.undock;
  3348. Inventory.undock = function () {
  3349. if (itemsToSell[mt])
  3350. exitSell(true);
  3351. if (sellButton[mt])
  3352. sellButton[mt].remove();
  3353. return Inventory.twlt_undock.apply(this, arguments);
  3354. };
  3355. var tIp = tw2widget.InventoryItem.prototype;
  3356. tIp.twlt_initDisplay = tIp.twlt_initDisplay || tIp.initDisplay;
  3357. tIp.initDisplay = function () {
  3358. this.twlt_initDisplay.apply(this, arguments);
  3359. if (!this.obj.auctionable)
  3360. this.addClass('not_auctionable');
  3361. };
  3362. west.window.shop.trackBuyItem = function () {};
  3363. }
  3364. }, 1000);
  3365. }
  3366. };
  3367. LT.TouchControl = {
  3368. init: function () {
  3369. var fingers = 0,
  3370. wgSbp = west.gui.Scrollbar.prototype;
  3371. wgSbp.twlt_init = wgSbp.twlt_init || wgSbp.init;
  3372. wgSbp.init = function () {
  3373. this.twlt_init.apply(this, arguments);
  3374. var start,
  3375. that = this;
  3376. $(this.divMain).on('touchstart', function (e) {
  3377. start = e.originalEvent.touches[0].clientY;
  3378. }).on('touchmove', function (e) {
  3379. e.stopPropagation();
  3380. e.preventDefault();
  3381. var move = e.originalEvent.changedTouches[0].clientY;
  3382. that.move(move - start);
  3383. start = move;
  3384. });
  3385. };
  3386. var wgSpp = west.gui.Scrollpane.prototype;
  3387. wgSpp.twlt_init = wgSpp.twlt_init || wgSpp.init;
  3388. wgSpp.init = function () {
  3389. this.twlt_init.apply(this, arguments);
  3390. var start,
  3391. coP = this.contentPane,
  3392. clP = this.clipPane,
  3393. vB = this.verticalBar,
  3394. ratio;
  3395. $(this.divMain).on('touchstart', function (e) {
  3396. fingers++;
  3397. start = e.originalEvent.touches[0].clientY;
  3398. ratio = (vB._divPullArea.height() - vB._divPulley.height()) / (clP.height() - coP.height());
  3399. }).on('touchmove', function (e) {
  3400. if (fingers != 1)
  3401. return;
  3402. e.preventDefault();
  3403. var move = e.originalEvent.changedTouches[0].clientY,
  3404. topPos = move - start;
  3405. vB.move(ratio * topPos);
  3406. start = move;
  3407. }).on('touchend', function (e) {
  3408. fingers = 0;
  3409. });
  3410. };
  3411. var start,
  3412. currZoom = 1;
  3413. $('#ui_minimap').on('touchstart', function (e) {
  3414. fingers++;
  3415. start = e.originalEvent.touches[0].clientY;
  3416. }).on('touchmove', function (e) {
  3417. if (fingers != 1)
  3418. return;
  3419. e.preventDefault();
  3420. var move = e.originalEvent.changedTouches[0].clientY,
  3421. cZmb = currZoom + (move - start) / 100;
  3422. if (cZmb >= 0.65 && cZmb <= 5)
  3423. document.getElementById('map').style.zoom = cZmb;
  3424. }).on('touchend', function (e) {
  3425. fingers = 0;
  3426. currZoom = $('#map').css('zoom') * 1;
  3427. Map.resize();
  3428. });
  3429. Map.twlt_getCurrentMid = Map.twlt_getCurrentMid || Map.getCurrentMid;
  3430. Map.getCurrentMid = function () {
  3431. var xy = this.twlt_getCurrentMid.apply(this, arguments);
  3432. return {
  3433. x: xy.x / currZoom,
  3434. y: xy.y / currZoom
  3435. };
  3436. };
  3437. Map.twlt_resize = Map.twlt_resize || Map.resize;
  3438. Map.resize = function () {
  3439. if (!Map.initialized)
  3440. return;
  3441. this.twlt_resize.apply(this, arguments);
  3442. this.width /= currZoom;
  3443. this.height /= currZoom;
  3444. };
  3445. var start2;
  3446. $('#map').on('touchstart', function (e) {
  3447. fingers++;
  3448. var eoEt = e.originalEvent.touches[0];
  3449. start2 = [eoEt.clientX, eoEt.clientY];
  3450. }).on('touchmove', function (e) {
  3451. if (fingers != 1)
  3452. return;
  3453. e.preventDefault();
  3454. var eoEcT = e.originalEvent.changedTouches[0],
  3455. move = [eoEcT.clientX, eoEcT.clientY];
  3456. Map.Drag.scrollby((start2[0] - move[0]) / currZoom, (start2[1] - move[1]) / currZoom);
  3457. start2 = move;
  3458. }).on('touchend', function (e) {
  3459. fingers = 0;
  3460. });
  3461. var wgWp = west.gui.Window.prototype;
  3462. wgWp.twlt_init = wgWp.twlt_init || wgWp.init;
  3463. wgWp.init = function () {
  3464. this.twlt_init.apply(this, arguments);
  3465. var start,
  3466. that = this,
  3467. tdM = that.divMain,
  3468. currPos;
  3469. $('div.tw2gui_inner_window_title', tdM).on('touchstart', function (e) {
  3470. fingers++;
  3471. var eoEt = e.originalEvent.touches[0];
  3472. start = [eoEt.clientX, eoEt.clientY];
  3473. that.bringToTop();
  3474. }).on('touchmove', function (e) {
  3475. if (fingers != 1)
  3476. return;
  3477. e.preventDefault();
  3478. currPos = [tdM.offsetLeft, tdM.offsetTop];
  3479. var eoEcT = e.originalEvent.changedTouches[0],
  3480. move = [eoEcT.clientX, eoEcT.clientY],
  3481. res = [currPos[0] + move[0] - start[0], currPos[1] + move[1] - start[1]];
  3482. if (res[0] > -1) {
  3483. tdM.style.left = res[0] + 'px';
  3484. currPos[0] = res[0];
  3485. }
  3486. if (res[1] > -1) {
  3487. tdM.style.top = res[1] + 'px';
  3488. currPos[1] = res[1];
  3489. }
  3490. start = move;
  3491. }).on('touchend', function (e) {
  3492. fingers = 0;
  3493. });
  3494. };
  3495. LT.addStyle('img {-webkit-touch-callout:none;}');
  3496. var timer,
  3497. timer2,
  3498. wph = west.popup.handler;
  3499. $(document).on('touchstart', function (e) {
  3500. timer = setTimeout(function () {
  3501. wph.handleMouseMove.call(wph, e);
  3502. }, 500);
  3503. timer2 = setTimeout(function () {
  3504. e.ctrlKey = 1;
  3505. LT.CalcTwdb.show(e);
  3506. }, 2000);
  3507. }).on('touchend', function (e) {
  3508. clearTimeout(timer);
  3509. clearTimeout(timer2);
  3510. });
  3511. }
  3512. };
  3513. LT.CalcTwdb = {
  3514. show: function (e) {
  3515. if (!e.ctrlKey && !e.altKey)
  3516. return;
  3517. var t = $(e.target).data();
  3518. var tdi = t.itemId || t.itemid || t.setkey;
  3519. if (!tdi)
  3520. return;
  3521. var add;
  3522. if (e.altKey) {
  3523. add = isNaN(tdi) ? 'supravy&set=' : 'item&id=';
  3524. LT.GUI.open('openFrame', 'https://tw-db.info/?strana=' + add + tdi, [1000, 630]);
  3525. LT.GUI.makeList();
  3526. } else {
  3527. add = isNaN(tdi) ? 'sets/' : 'item/';
  3528. window.open('https://tw-calc.net/' + add + tdi);
  3529. }
  3530. },
  3531. init: function () {
  3532. $(document).click(function (e) {
  3533. LT.CalcTwdb.show(e);
  3534. });
  3535. Inventory.clickHandler = function (item_id, e) {
  3536. var item = Bag.getItemByItemId(item_id);
  3537. if (e.shiftKey || e.ctrlKey || e.altKey)
  3538. return;
  3539. if (this.click && this.click.callback.apply(this.click.context, [item]))
  3540. return;
  3541. if (item.obj.action) {
  3542. $.globalEval(item.obj.action);
  3543. return;
  3544. }
  3545. if (wman.getById(Wear.uid)) {
  3546. Wear.carry(item);
  3547. return;
  3548. }
  3549. return;
  3550. };
  3551. }
  3552. (),
  3553. };
  3554. LT.CollectReminder = function () {
  3555. var setVal4 = setInterval(function () {
  3556. if (window.Bag && Bag.loaded) {
  3557. clearInterval(setVal4);
  3558. var nulls = [];
  3559. for (var y in LT.cooldown) {
  3560. var cdwn = LT.Data.cooldown && LT.Data.cooldown[y] || LT.cooldown[y];
  3561. var item = Bag.getItemsByBaseItemId(y)[0];
  3562. if (cdwn == 1 && item) {
  3563. var coold = BuffList.cooldowns[item.obj.item_id] && BuffList.cooldowns[item.obj.item_id].time || item.cooldown;
  3564. var sec = coold * 1000 - new ServerDate().getTime();
  3565. if (!(sec > 0))
  3566. nulls.push(item);
  3567. else if (!LT.cooldownTimer[y])
  3568. LT.cooldownSetTime(y, [item], sec);
  3569. } else if (cdwn == 0.5 && LT.cooldownTimer[y]) {
  3570. clearTimeout(LT.cooldownTimer[y]);
  3571. LT.cooldownTimer[y] = 0;
  3572. }
  3573. }
  3574. if (nulls.length)
  3575. LT.cooldownSetTime(0, nulls, 0);
  3576. }
  3577. }, 2000);
  3578. };
  3579. LT.SkipOpen = function () {
  3580. ItemUse.twlt_use = ItemUse.use;
  3581. ItemUse.use = function (itemId) {
  3582. var baseId = itemId / 1000,
  3583. skips = LT.Data.skipOpen && LT.Data.skipOpen[baseId] || LT.skipOpen[baseId];
  3584. if (skips == 1)
  3585. Ajax.remoteCall('itemuse', 'use_item', {
  3586. item_id: itemId,
  3587. lastInvId: Bag.getLastInvId()
  3588. }, function (res) {
  3589. if (res.error)
  3590. return new UserMessage(res.msg).show();
  3591. var m = res.msg.effects[0],
  3592. widget;
  3593. switch (m.type) {
  3594. case 'lottery':
  3595. case 'content':
  3596. var mi = m.items[0],
  3597. cont = {};
  3598. cont[mi.item_id] = mi.count;
  3599. widget = new tw2widget.Item(ItemManager.get(mi.item_id)).setCount(mi.count).getMainDiv();
  3600. $.get('https://tw-calc.net/service/chest-export', {
  3601. chest: itemId,
  3602. count: 1,
  3603. content: cont,
  3604. version: Game.version
  3605. }, function () {}, 'jsonp');
  3606. if (ItemUse.twdb)
  3607. ItemUse.twdb(itemId, res);
  3608. break;
  3609. case 'ses':
  3610. widget = ' <img src="images/icons/' + m.event + '.png" title="' + m.name.escapeHTML() + '" /> ' + m.amount;
  3611. break;
  3612. }
  3613. var mess = $('<div>' + LTlang.skipDone + ':<br></div>').append(widget);
  3614. new UserMessage(mess, 'success').show();
  3615. Bag.updateChanges(res.msg.changes);
  3616. EventHandler.signal('item_used', [itemId]);
  3617. });
  3618. else
  3619. ItemUse.twlt_use.apply(this, arguments);
  3620. };
  3621. };
  3622. LT.Skript.init();
  3623. } else if (location.href.includes('?strana=invent&x=')) {
  3624. var lg = LTstart.langs,
  3625. lang = /lang=([a-z]+)/.exec(document.cookie),
  3626. LTlang = lang && lg.hasOwnProperty(lang[1]) ? lg[lang[1]] : lg.en,
  3627. done = false,
  3628. i = document.getElementsByClassName('bag_empty'),
  3629. wrld = document.getElementById('char_server').textContent,
  3630. saveCounts = {},
  3631. sameWorld = false,
  3632. hide = function (it) {
  3633. saveCounts = {};
  3634. var sameItem = false;
  3635. for (var j of i) {
  3636. var m = j.children[1].innerHTML.match(/,\d,\d,\d,(\d),\d/),
  3637. auct = m ? m[1] == 1 : true,
  3638. id = j.id.slice(1),
  3639. level = id.slice(-1) > 0;
  3640. if (it)
  3641. sameItem = sameWorld ? it[id] : !it[id];
  3642. if (!auct || level || sameItem)
  3643. j.style.display = 'none';
  3644. else if (it && it[id]) {
  3645. var count = j.firstChild.firstChild;
  3646. if (count.textContent > it[id]) {
  3647. saveCounts[j.id] = count.textContent;
  3648. count.textContent = it[id];
  3649. }
  3650. }
  3651. }
  3652. $('.inputV2')[0].style.display = 'none';
  3653. };
  3654. LTstart.compInv = function () {
  3655. if (done) {
  3656. done = false;
  3657. for (var h of i) {
  3658. h.style.display = 'inline-block';
  3659. if (saveCounts[h.id])
  3660. h.firstChild.firstChild.textContent = saveCounts[h.id];
  3661. }
  3662. $('.inputV2')[0].style.display = 'inline-block';
  3663. } else {
  3664. done = true;
  3665. var url = prompt(LTlang.compInv + ': ');
  3666. if (url && url.includes('?strana=invent&x='))
  3667. $.ajax({
  3668. url: url
  3669. }).done(function (data) {
  3670. var regex = /<div id='i(\d+)' class='bag_empty'><span class="pocetx"><span class="pocet_cislox">(\d+)<\/span>/g,
  3671. t,
  3672. items = {},
  3673. world = /id="char_server">(.*?)</.exec(data);
  3674. if (!world) {
  3675. alert('invalid inventory');
  3676. done = false;
  3677. }
  3678. sameWorld = wrld == world[1];
  3679. while (t = regex.exec(data)) {
  3680. var u = sameWorld ? t[1].slice(0, -3) + '000' : t[1];
  3681. items[u] = t[2];
  3682. }
  3683. hide(items);
  3684. }).fail(function () {
  3685. alert(arguments[1] + arguments[2]);
  3686. done = false;
  3687. });
  3688. else {
  3689. sameWorld = false;
  3690. hide();
  3691. }
  3692. }
  3693. };
  3694. $('.inputV2').after('<img src="https://westzz.innogamescdn.com/images/items/yield/pick.png" width="25" style="position:absolute;right:0px;cursor:pointer;" onclick="LTstart.compInv();"/>');
  3695. } else {
  3696. window.onload = function () {
  3697. var lg = LTstart.langs,
  3698. LTlang = lg.hasOwnProperty(location.href.substr(21, 2)) ? lg[location.href.substr(21, 2)] : lg.en;
  3699. Worlds.show = (function () {
  3700. Worlds.twlt_show = Worlds.show;
  3701. return function () {
  3702. Worlds.twlt_show.apply(this, arguments);
  3703. var first = true;
  3704. var plyWrl = Worlds.playerWorlds,
  3705. state = (JSON.parse(localStorage.getItem('TWLTcustom1')) || {}),
  3706. t1 = [],
  3707. t2 = [];
  3708. for (var a in plyWrl) {
  3709. if (plyWrl[a][1] !== null) {
  3710. t1.push(a);
  3711. if (!state[a])
  3712. state[a] = false;
  3713. else if (state[a] == true)
  3714. t2.push(a);
  3715. }
  3716. }
  3717. var loginNow = function (t) {
  3718. for (var x = 0; x < t.length; x++) {
  3719. if (first)
  3720. Auth.login(plyWrl[t[x]]);
  3721. else
  3722. window.open(location.origin + '#loginWorld' + t[x], '_blank');
  3723. first = false;
  3724. }
  3725. };
  3726. $('#worldsWrapper').append('<div id="loginMore" />');
  3727. $('#loginMore').append('<a id="loginAll" title="' + LTlang.loginAll2 + '" href="#" >' + LTlang.loginAll1 + '</a>').append('<a id="custom" title="' + LTlang.custom2 + '" href="#" >' + LTlang.custom1 + '</a>').append('<img id="cust1" title="' + LTlang.edit + '" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuOWwzfk4AAAFOSURBVDhPY6A6KKnL4j60a2Xf1jWz/6PjQ5unbIUqww3WLpr0Hx0/vXXq/9e39/5fPL4VzAdZAlVOGFw6s9t49sQGsAF/f30GGwLiQ6UJA5Dio7tW/X/z6AIYgwxaNKPr7/1rh6ShSnADkJ/banPB/r9z+QDYIBAfRE9oKf7f2Vz8BKoUE+ydEfj/5Orm/88vb/1fVxwHdjZI88p5zc0gevemRWBxqHJUANP86+Wu/9f3TPu/Y1Yh2NbCskQWkPyiOTmiIM0gw8AakAFI88FFVWCbQYasn5iBVeG0SWWeUCYCLKl1B9sG0gwyZFl73P+99d79UGn8AKQZZBtIM8iQ2XXh2J2IDYA0g2x7cGwZ2JDJpf7E2zwnwwxsG0gzyJCuXC/iNYMAsubGFDvSNIMAyEaQFxoiDf93Vgb3QIWJBwtb3NJANoNoqBAJgIEBAEbiFXTTZGcSAAAAAElFTkSuQmCC"/>');
  3728. $('#selectWorldText').css('margin-bottom', '20px');
  3729. $('#loginAll').css({
  3730. 'background-image': 'url("' + LTstart.Images('LT_login') + '")',
  3731. 'height': '45px',
  3732. 'width': '180px',
  3733. 'line-height': '40px',
  3734. 'font-weight': 'bold',
  3735. 'font-size': '12px',
  3736. 'margin-left': '10px',
  3737. 'top': '35px',
  3738. 'z-index': '1',
  3739. 'position': 'absolute',
  3740. 'cursor': 'pointer',
  3741. }).mouseenter(function () {
  3742. $(this).css('background-position', '0px -45px');
  3743. }).mouseleave(function () {
  3744. $(this).css('background-position', '0px 0px');
  3745. }).click(function () {
  3746. loginNow(t1);
  3747. });
  3748. $('#custom').css({
  3749. 'background-image': 'url("' + LTstart.Images('LT_loginC') + '")',
  3750. 'background-repeat': 'no-repeat',
  3751. 'height': '36px',
  3752. 'width': '144px',
  3753. 'text-align': 'left',
  3754. 'padding-left': '15px',
  3755. 'line-height': '32px',
  3756. 'font-weight': 'bold',
  3757. 'font-size': '11px',
  3758. 'margin-left': '45px',
  3759. 'top': '70px',
  3760. 'z-index': '1',
  3761. 'position': 'absolute',
  3762. 'cursor': 'pointer',
  3763. }).mouseenter(function () {
  3764. $(this).css('background-position', '0px -36px');
  3765. }).mouseleave(function () {
  3766. $(this).css('background-position', '0px 0px');
  3767. }).click(function () {
  3768. loginNow(t2);
  3769. });
  3770. $('#cust1').css({
  3771. 'margin-left': '160px',
  3772. 'top': '78px',
  3773. 'z-index': '2',
  3774. 'position': 'absolute',
  3775. 'cursor': 'pointer',
  3776. }).click(function () {
  3777. var checkB = {},
  3778. checkD = {};
  3779. $('#loginMore').hide();
  3780. $('#allWorlds').empty();
  3781. $('#allWorlds').css('text-align', 'left');
  3782. for (var k = 0; k < t1.length; k++) {
  3783. checkB[t1[k]] = new west.gui.Checkbox().setLabel(Worlds.data[t1[k]].name).setSelected(state[t1[k]]).appendTo($('#allWorlds'));
  3784. $('#allWorlds').append('<br><div style="height:5px;" />');
  3785. }
  3786. var butB = new west.gui.Button(LTlang.save, function () {
  3787. for (var l in checkB) {
  3788. checkD[l] = checkB[l].isSelected();
  3789. localStorage.setItem('TWLTcustom1', JSON.stringify(checkD));
  3790. }
  3791. new UserMessage(LTlang.saveMessage2, 'success').show();
  3792. });
  3793. butB.appendTo($('#allWorlds'));
  3794. });
  3795. };
  3796. })();
  3797. };
  3798. if (location.hash.includes('loginWorld')) {
  3799. setTimeout(function () {
  3800. $('#loginButton').click();
  3801. var val = setInterval(function () {
  3802. var u = Worlds.playerWorlds;
  3803. if (Object.keys(u).length !== 0) {
  3804. clearInterval(val);
  3805. Auth.login(u[parseFloat(location.hash.replace(/\D/g, ''))]);
  3806. }
  3807. }, 500);
  3808. }, 1000);
  3809. }
  3810. }
  3811. }
  3812. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址