Map/Coord Display last village growth on map

DeletedUser656

Guest
Author
Morthy
Contributors
N/A
Quickbar Entry
javascript:if(game_data.screen != 'map') {document.location.replace('?screen=map');void(0);}function getDoc() {return document;}$(document).ajaxStop(function() {TWMap.map.reload();});coords = [];for(row=0; row<TWMap.size[1]; row++){for(col=0; col<TWMap.size[0]; col++){coord = TWMap.map.coordByPixel(TWMap.map.pos[0]+(TWMap.tileSize[0]*col), TWMap.map.pos[1]+(TWMap.tileSize[1]*row));if(TWMap.villages[coord.join("")]) {coords.push(coord[0] + '|' + coord[1]);}}}url = 'http://www.twstats.com/scriptdispatch.php?script=mapmod&m=' + game_data.market + '&s=' + game_data.world + '&v=' + game_data.version + '&coords=' + coords.join(',');scr = $('<script type="text/javascript" />').attr('src', url);$(document).append(scr);void(0);
Public?
Public
esLUL.png


This works very simply, run it from the map screen and it will show how long since each village last changed points below each village, as well as the most recent point change. Times are accurate to within a hour or so.

Code:
javascript:if(game_data.screen != 'map') {document.location.replace('?screen=map');void(0);}function getDoc() {return document;}$(document).ajaxStop(function() {TWMap.map.reload();});coords = [];for(row=0; row<TWMap.size[1]; row++){for(col=0; col<TWMap.size[0]; col++){coord = TWMap.map.coordByPixel(TWMap.map.pos[0]+(TWMap.tileSize[0]*col), TWMap.map.pos[1]+(TWMap.tileSize[1]*row));if(TWMap.villages[coord.join("")]) {coords.push(coord[0] + '|' + coord[1]);}}}url = 'http://www.twstats.com/scriptdispatch.php?script=mapmod&m=' + game_data.market + '&s=' + game_data.world + '&v=' + game_data.version + '&coords=' + coords.join(',');scr = $('<script type="text/javascript" />').attr('src', url);$(document).append(scr);void(0);

Tested in IE9, FF, Opera, Chrome and Safari, but please let me know if you find any problems.
 
Upvote 1

DeletedUser112399

Guest
Is there a working version of this script anymore?
 

DeletedUser114063

Guest
Well, since this code is a client-side script I wasn't able to view and modify the code, but I created an entirely new one that does more than just displaying a village's growth on the Map.


Code:
 javascript:$.getScript('https://dl.dropboxusercontent.com/s/kcysj3qhgoc04cu/Tsalkapone.more_map_info.js');void 0;

Functions and Options:

  • 7 different templates that apply additional info on Map's villages.
  • Option to save each village's data while moving your cursor on Map.
  • Thorough guides and tips about each template.
  • 8 customizable variables for the available templates.
AMI_1.png
AMI_3.png


Preview of the Map after activating a template:


1. Village's Growth
map1.png

2. Conquers
map2.png

3. Flags
map3.png


Saving the data:

Two of the available templates (Village Growth and Conquers) demand to save each village's data in your localStorage. You may do that while moving your cursor on the Map. Every time you move your cursor on the Map the script will fetch every map's sector's data and save it in your localStorage.

Read inside the script for more info about this option and its usage.

map_save.gif

The script is APPROVED. You may find more useful and approved scripts in the html page displayed below:

NET~Scripts

Yours sincerely,
Tsalkapone

 
Top