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

DeletedUser

Guest
It makes my map go blank and freezes my browsers, this needs to be updated to run on the 8.2 framework thanks :)
 

Stotty2009

Guest
I know this is broken, but there is nothing I can do to fix it as its all server side which needs to be updated
 

DeletedUser

Guest
That bites :(

Wish I knew how to :p Thanks for the reply though Stotty.
 

DeletedUser

Guest
Stinks that this is broken. Hopefully the server is fixed soon? ha :D
 

File Not Found

Guest
Found the issue, and know how to fix it.

I'll code a temporary work around, until Morthy updates the script on TWStats.
 

File Not Found

Guest
Right, couldn't fix it the way I wanted, so went with something much simpler.


I've had some people test on .net, and they have confirmed it working.

[spoil]
Code:
javascript:TWMap.owngroups = ''; 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); TWMap.ownGroups = ['']; void(0);
[/spoil]

Its not a solution, but it fixes it until the original is repaired.
 

DeletedUser

Guest
Great script, but the writing is a bit small. (Don't know whether it's just my zoom level?) I have to scroll in quite a lot to see how many days they have been inactive, which means I can't see the quickbar, and then have to scroll up every time I move the map so I can see the new villages. Maybe I'm just lazy :lol:
 

Pain.Carbon

Guest
Right, couldn't fix it the way I wanted, so went with something much simpler.


I've had some people test on .net, and they have confirmed it working.

[spoil]
Code:
javascript:TWMap.owngroups = ''; 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); TWMap.ownGroups = ['']; void(0);
[/spoil]

Its not a solution, but it fixes it until the original is repaired.

Great help..thanks alot :)
 

dunn61984

Guest
Sorry to be a pest, but can anyone confirm if this script is still working?
 

File Not Found

Guest
Sorry to be a pest, but can anyone confirm if this script is still working?


The client side script works fine (the one I fixed, and probably the original also), the issue now, is that there is a code error in the script deployment php, or one of it's includes relevant to this script, and as such, the external script it's loading, isn't actually loading.

So, long story short, the script can now only be fixed by Morthy, (as he is the only one with ftp access to the relevant file) and the work around for the previous breaking of this script whilst functional, will no longer work either.
 

ShadowfoxDrow

Guest
Any idea where morthy is? I'd love to have this script up and running again :)

Shadow
 

DeletedUser

Guest
send him a pm maybe ? or if your feeling really cheeky sendin a support ticket marked fao morthy lol
 
Top