[quote="soul12"]Can try this one.
Don't know it works or not.
[spoiler]javascript:
var Dunits=['spear','sword','archer','heavy'];
var cookieID='__dSup';
function fnWriteCookie(cookieName,value){
var cookie_date=new Date(2099,11,11);
var cookieValue=cookieName+'='+value+';expires='+cookie_date.toGMTString();
document.cookie=cookieValue;
}
function fnReadCookie(cookieName){
var twCookie=document.cookie.match(cookieName+'=([^;]*)[;|$]');
return twCookie?unescape(twCookie[1]):null;
}
function fnFetchSupport(){
var cache=[];
win.$("#units_table tr:has(input[name*=units_back])").each(function(i,e){
var villageID=e.innerHTML.match(/units_back\[(\d+)\]/i);
var target=e.innerHTML.match(/\((\d+\|\d+)\)\sK\d+/i);
if(villageID&&target){
cache.push(villageID[1]+":"+target[1]);
}
});
fnWriteCookie(cookieID,cache.join("^"));
}
function fnGetSuppCoord(){
var mData=fnReadCookie(cookieID);
if(!mData){
return -1;
}
var villageID=url.match(/village\=(\d+)/i)[1];
var regEx=new RegExp(villageID+"\\:\(\\d+\\|\\d+\)","i");
var coord=regEx.exec(mData);
return coord?coord[1]:null;
}
function fnSupport(coords){
coords=coords.split('|');
win.document.units.x.value=coords[0];
win.document.units.y.value=coords[1];
win.$("#units_form input[maxUnits]").each(function(i,e){
e.value=Math.min(Math.max(0,e.parentNode.innerHTML.match(/maxUnits\=\"(\d+)\"/i)[1]),(Dunits.indexOf(e.name)>=0)?999999:0);
});
}
function fnFillSupport(doc){
var coords=fnGetSuppCoord();
if(coords<0){
alert('You must first run this Script from the Overviews->Troops->Support Screen');
}
else if(coords){
fnSupport(coords);
}
else{
alert('Nobody to support');
}
}
var win=(window.frames.length>0)?window.main:window;
var url=win.location.href;
var isPremium=(win.$("#quickbar_outer").length>0);
if(isPremium){
var isOK=true;
if(win.game_data.screen=="place"){
fnFillSupport();
}
else if(win.game_data.screen=="overview_villages"){
if(win.game_data.mode!="units"){
var vmode=win.$("#overview_menu td[class=selected] a").attr("href").match(/mode\=(\w*)/i)[1];
if(!vmode||(vmode!="units")){
isOK=false;
}
}
isOK&=(url.match(/type\=away_detail/i)!==null);
if(isOK){
fnFetchSupport();
alert('Done!');
}
}
else{
isOK=false;
}
if(!isOK){
alert('Run this Script from:\n\t* Rally point\n\t* Overviews->Troops->Support Screen');
}
}
else{
alert("This script requires a Premium Account");
}
void(0);[/spoiler]
[b][i]1)Run the script on the Overview>Troops, Support page. A cookie is stored with the villages from which you are supporting other players. It will prompt you as 'Done'.
2) now after your support dies and is trained again at your own village run the script at the village from which you are supporting the player. It will fill up the cordinates and dead troops to be replaced again.[/i][/b][/quote]
[quote="Killy Rider (deleted)"]Or this way :-)
[b]Standard Village:
(9,735 points) 20,723 farm space[/b]
[spoiler]Village Headquarters (Level 20)
Barracks (Level 25)
Stable (Level 20)
Workshop (Level 2)
Academy (Level 1)
Smithy (Level 20)
Rally point (Level 1)
Statue (Level 1)
Market (Level 20)
Timber camp (Level 30)
Clay pit (Level 30)
Iron mine (Level 30)
Farm (Level 30)
Warehouse (Level 30)
Hiding place (Level 9)
Wall (Level 20)[/spoiler]
[b]First Church Village (Also Level 1 Church):
(9,735 points) 15,726 farm space[/b]
[spoiler]Village Headquarters (Level 20)
Barracks (Level 25)
Stable (Level 20)
Workshop (Level 3)
Church (Level 1) OR First Church (Level 1)
Academy (Level 1)
Smithy (Level 20)
Rally point (Level 1)
Statue (Level 1)
Market (Level 20)
Timber camp (Level 30)
Clay pit (Level 30)
Iron mine (Level 30)
Farm (Level 30)
Warehouse (Level 30)
Hiding place (Level 1)
Wall (Level 20)[/spoiler]
[b]Level 2 Church Village:
(9,735 points) 12,977 farm space[/b]
[spoiler]Village Headquarters (Level 20)
Barracks (Level 25)
Stable (Level 20)
Workshop (Level 2)
Church (Level 2)
Academy (Level 1)
Smithy (Level 20)
Rally point (Level 1)
Statue (Level 1)
Market (Level 20)
Timber camp (Level 30)
Clay pit (Level 30)
Iron mine (Level 30)
Farm (Level 30)
Warehouse (Level 30)
Hiding place (Level 4)
Wall (Level 20)
[/spoiler]
[b]Level 3 Church village:
(9,735 points) 8,714 farm space[/b]
[spoiler]Village Headquarters (Level 20)
Barracks (Level 25)
Stable (Level 20)
Workshop (Level 2)
Church (Level 3)
Academy (Level 1)
Smithy (Level 20)
Rally point (Level 1)
Statue (Level 1)
Market (Level 20)
Timber camp (Level 30)
Clay pit (Level 30)
Iron mine (Level 30)
Farm (Level 30)
Warehouse (Level 30)
Hiding place (Level 3)
Wall (Level 20)[/spoiler][/quote]
最終更新:2012年09月01日 02:00