Mini javascripts for Quickbar (Administrator-Premium)

DeletedUser

Guest
Inserts scripts on the Quickbar settings

Quickbar.png

________________________________________

Find articles on the forum and the wiki
Use: any page

javascript:
var term=window.prompt("Insert your search term:");
window.open('http://forum.en.grepolis.com/search.php?do=process&query=' + term);
window.open('http://wiki.en.grepolis.com/index.php?&search=' + term);
window.history. go( -0 );

_______________________________________

Show graph of Player (en.grepostats.com)
Use: http://enx.grepolis.com/game/player?player_id=xxxxx

javascript:
if (document.URL.match('game/player?')) { $.extend({
getUrlVars: function() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; });
return vars;
}
});
var mundo = /:\/\/([^./]+)/.exec(window.location.href)[1];
var player_id = $.getUrlVars()['player_id'];
window.open('http://en.grepostats.com/image/' + mundo + '/graph?action=player&type=points&player_id=' + player_id,'Grafico','width=380,height=160,scrollbars=NO');
window.history. go( -0 );
}
else {alert('Should use this script on the page of general information Player ');}

________________________________________

Studying one Player in grepostats
Use: http://enx.grepolis.com/game/player?player_id=xxxxx

javascript:
if (document.URL.match('game/player?')) { $.extend({
getUrlVars: function() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; });
return vars;
}
});
var player_id = $.getUrlVars()['player_id'];
var mundo = /:\/\/([^./]+)/.exec(window.location.href)[1];
window.open('http://en.grepostats.com/world/' + mundo + '/player/' + player_id );
window.open('http://en.grepostats.com/world/' + mundo + '/player/' + player_id + '/towns');
window.open('http://en.grepostats.com/world/' + mundo + '/player/' + player_id + '/colonizations');
window.open('http://en.grepostats.com/world/' + mundo + '/player/' + player_id + '/alliancechanges');
window.open('http://en.grepostats.com/world/' + mundo + '/player/' + player_id + '/history');
window.history. go( -0 ); }
else {alert('Should use this script on the page of general information Player ');}

________________________________________

Counting points of culture in development
Use: http://enx.grepolis.com/game/town_overviews?action=culture_overview

javascript:
if (document.URL.match('action=culture_overview')) {
$(document).ready(function(){
var pon = $('#place_culture_count').text().split("/");
var i = $(".eta").length;
nums24 = 0;
nums48 = 0;
nums72 = 0;
nums96 = 0;
nums120 = 0;
nums = new Array();
var etas = $('.eta');
while (i >= 0) {
nums = etas.eq(i).text().split(":", 1);
if (nums < 24) {nums24++;}
if (nums < 48) {nums48++;}
if (nums < 72) {nums72++;}
if (nums < 96) {nums96++;}
if (nums < 120) {nums120++;}
i--;
}alert( ' You're developing ' + $(".eta").length +' cultural points. \n ------------------ \n Missing ' + (pon[1] - pon[0]) + ' points to the next city \n ------------------ \n In 1 day end ' + (nums24 - 1) + ' points \n In 2 days end ' + (nums48 - 1) + ' points \n In 3 days end ' + (nums72 - 1) + ' points \n In 4 days end ' + (nums96 - 1) + ' points \n In 5 days end ' + (nums120 - 1) + ' points');
document.location.assign('/game/town_overviews?action=culture_overview');
}); }
else {alert('Should use this script on the page of Premium- Tab Culture ');}
 
Last edited by a moderator:

DeletedUser5

Guest
All the scripts here have been approved by the powers that be.

Enjoy using them, I will add them to the list
 

DeletedUser

Guest
Can someone please provide a bit more information about how to use this script.
 
Top