Script Summary: Gets, organizes and exports various stats in the popular browser game The West
Version: 2.0
Copyright: 2011+, Narulez (http://userscripts.org/users/268539)
License: (CC) Attribution Non-Commercial Share Alike; http://creativecommons.org/licenses/by-nc-sa/3.0/

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Warning
I didn't do this script only for fun, I started developing it to help Italian admins in tournaments.
There are two warnings you have to keep in mind:
- The servers load requested by this script is very huge, mostly updating the Duels Highscore, so you have to use it responsibly. Ex: don't update data every minute, you really don't need it ;)
- This script uses the Datamining, so you have to check if scripts that uses it are prohibited in your servers.
Compatibility
- The West: 1.36
- Firefox: tested with 14.0.1 with Scriptish 0.1.7
- Chrome: tested with 20.0.1132.57 m
Features
- All starts from a button that appears under the left menu.
- Calculates and exports two different type of player highscores: the first ordered by experience gained (exp gained * duel level / lost duels) during the time range, the second ordered by duels won during the time range.
- Displays info for the players added: name, city, alliance and all duel highscore data.
- Gets and displays data from duel reports.
- Makes different highscores from duel reports: higher single hit made and suffered, higher total damage made and suffered in a duel, higher attacker/defender experience, gain, bounty received.
- Translate the lang pack!! (list of translated)
Next Features
To Do
- Better Formulas Tab
- Export Fort Stats
- Png Duels Exception
- Pages in Fortbattles Summary
- Per-Town Fortbattles Stats
Changelog
2.0
(25/07/2012)- Added Fortbattles support, finally!
- Added IndexedDB Storage
- Improved code
- Dropped "official" support for 1.35 (all servers should have 1.36 now)
- Fixed HighDuels for 1.36
- Fixed SingleDuels when dollars received are more than 999
- Fixed some other bugs that I don't remember
- Note for translators: added a lot of new strings, check the Translation Sample Pack!
1.9.1
(24/02/2012)- Changed: now saves settings automatically
- Fixed some small and critical bugs
- Dropped support for 1.33: do not update if your servers have it!
1.9
(07/02/2012)- Added ability to use external Language Packs. A link to a list of them will be avaiable on the homepage of the script
- Added About tab, moved update button there
- Added Chrome compatibility as native extension
- Improved Chrome compatibility with Tampermonkey installed
- Improved: registering with the The West Api will work without altering the original code
- Improved code
- Changed version numbering
- Fixed for 1.35 (still works from 1.33)
- Fixed some bugs
- Prepared for caching with IndexedDB
- Removed Português and Español (They will be avaiable as external Language Packs, Italian will remain built-in)
1.8.3
(06/01/2012)- Added Português
- Fixed and speeded up sorting infos in Duels Highscores
- Fixed some bugs
1.8.2
(28/12/2011)- Fixed updater (if you have v1.8 installed, you won't see any update)
1.8.1
(28/12/2011)- Updated Español (thanks pepe100)
1.8
(27/12/2011)- Added export (only Duels Highscores)
- Improved code for TW 1.34
- Changed updater: now internally uses the SOM Updater (slightly modified and adapted)
- Fixed opening duel report in summary
- Fixed some small bugs
1.7.1
(24/12/2011)- Added getting profession (only on TW 1.34)
- Changed graphic of language selection
- Updated Español (thanks pepe100)
- Fixed for latest update of TW 1.34 (always works on 1.33)
- Fixed a bug saving settings
1.7
(21/12/2011)- Added more highscores in Single Duels
- Added sorting in Single Duels
- Added more sorting types in Duels Highscores
- Added Español (thanks pepe100)
- Improved code
- Changed: Single Duels are sorted by data (old first) in summary
- Changed: saving settings is not automatic any more
- Changed: data is saved in a different way. If you lose data, please don't update it but contact me!
- Fixed images
- Fixed bugs (one critical when changing language from forced to non-forced)
1.6.2
(12/12/2011)- Added getting bounty received in Single Duels
- Fixed getting money gained in Single Duels
- Fixed again the The West Api (now it always works)
1.6.1
(11/12/2011)- Fixed progress bar (again)
- Fixed register with The West Api (the The West script is bugged, I fixed it, even if it doesn't work always)
1.6
(11/12/2011)- Added Single Duels support!
- Added some highscores for Single Duels. They're not yet sortable
- Improved code: unwrapped and simplified!
- Improved: Battles Stats window is now minimizable
- Improved: script registered with The West Api
- Changed icon
- Changed: moved settings tab first
- Fixed progress bar for TW 1.34
- Fixed minor bugs
1.5
(4/12/2011)- Added Speed Mode
- Added sorting other columns
- Improved code: adding players and reloading data will not block the The West window any more, even with Speed Mode deactivated!
- Improved code: even faster opening and reloading the TWBS window
- Improved code/graphic: now TWBS uses the new The West windows style
- Improved percent row, even with the original The West style
- Fixed getting world on beta server
- Fixed various minor bugs
1.4
(28/11/2011)- Added sorting some columns
- Improved code: faster opening and reloading the TWBS window
- Fixed bug sorting highscore by experience
- Fixed bug if there are start/end spaces adding single player
1.3
(26/11/2011)- Added link to recover data (all inserted players name)
- Improved changing language (you won't have to refresh the page)
- Improved graphic
- Improved code
- Fixed displaying wrong data on highscore by experience table
- Fixed wrong title for wrong name case
- Fixed player name containing *
1.2
(24/11/2011)- Added ability to insert more players together writing "[player1, player2, ...]" without quotes
- Added and edited some phrases for translation
- Improved graphic (minor)
- Fixed possible incompatibility issues with some old browsers
- Fixed calculation in highscore by experience if lost duels are 0
1.1
(21/11/2011)- Added getting automatically the player id: only name required!
- Added getting more information from profile and duels highscore.
- Added highscore by experience gained between start and end time
- Added highscore by most won duels between start and end time
- Added more phrases for translation
- Added link to reset data
- Improved requests to server and response analyses
- Improved data displaying
- Improved code (minor)
- Fixed graphic (minor)
- Note: you NEED to reset or immedately update your data
1.0
(18/11/2011)- Initial Version



