hej

Status
Ej öppen för ytterligare svar.

DeletedUser

Guest
Behöver lite hjälp jag skulle nämnligen vilja ha ett par
script till speeds te.x farm,barb find,recruit,by döpare och backtracking är glad för alla som kan slänga ut sig något.


Tack på för han :)
 

DeletedUser

Guest
Tycker det börjar bli lite små tjatigt nu... Använd sökfunktinoen som finns för forumet...


Men men bara för att jag är så snäll..


Källkod:
javascript:var barb_size={min:0,max:0};var village_size={min:0,max:500};var author="dalesmckay@gmail.com";var minVer="7.0";var win=(window.frames.length>0)?window.main:window;var ver=win.game_data.version.match(/[\d|\.]+/g);if(!ver||(parseFloat(ver[1])<minVer)){alert("This script requires v"+minVer+" or higher.\nYou are running: v"+ver[1]);}else{if(win.game_data.screen=="map"){var coords=[];var col,row,coord,village,player,points;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(coord){village=TWMap.villages[coord.join("")];if(village){player=null;if(parseInt(village.owner||"0",10)){player=TWMap.players[village.owner];}points=parseInt(village.points.replace(".",""),10);if(player){if(player.name!=win.game_data.player.name){if((!village_size.min||(points>=village_size.min))&&(!village_size.max||(points<=village_size.max))){coords.push(coord.join("|"));}}}else{if((!barb_size.min||(points>=barb_size.min))&&(!barb_size.max||(points<=barb_size.max))){coords.push(coord.join("|"));}}}}}}alert(coords.join(" "));}else{alert("Run this script from the Map.\nRedirecting now...");self.location=win.game_data.link_base_pure.replace(/screen\=/i,"screen=map");}}void(0);


Källkod:
javascript:sp=0;sw=0;ax=0;scout=0;lc=15;hv=0;cat=0;ra=0;coords='';var%20doc=document;if(window.frames.length>0)doc=window.main.document;url=document.URL;if(url.indexOf('screen=place')==-1)alert('This%20script%20needs%20to%20be%20run%20from%20the%20rally%20point');coords=coords.split("%20");index=0;farmcookie=document.cookie.match('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if(index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords[index];coords=coords.split("|");index=index+1;cookie_date=new%20Date(2012,11,11);document.cookie ="farm="+index+";expires="+cookie_date.toGMTString ();doc.forms[0].x.value=coords[0];doc.forms[0].y.value=coords[1];insertUnit(doc.forms[0].spear,sp);insertUnit(doc.forms[0].sword,sw);insertUnit(doc.forms[0].axe,ax);insertUnit(doc.forms[0].spy,scout);insertUnit(doc.forms[0].light,lc);insertUnit(doc.forms[0].heavy,hv);insertUnit(doc.forms[0].ram,ra);insertUnit(doc.forms[0].catapult,cat);end();

Källkod:
javascript:var%20text='Denea :D';var%20doc=document;if(window.frames.length>0)doc=window.main.document;var%20inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){if(inputs[i].id.indexOf('edit_input')!=-1){inputs[i].value=text;inputs[i+1].click();}}end();

Källkod:
javascript: var configuration = [0,0,5600,0,20,2600,1000,0,250,100]; var archers = true; var units; var unitsNET; var costs; function arrayMin(array) { var value = array[0]; for (var t = 1; t < array.length; t++) { if (array[t] < value) { value = array[t]; } } return value; } function linearDivideArray(array1, array2) { var value = []; if (array1.length == array2.length) { for (var t = 0; t < array1.length; t++) { if (array2[t] != 0) { value[t] = array1[t] * 1.0 / array2[t]; } else { value[t] = 0; } } } return value; } function linearAddArray(array1, array2) { var value = []; if (array1.length == array2.length) { for (var t = 0; t < array1.length; t++) { value[t] = array1[t] + array2[t]; } } return value; } function getUnitId(unit) { for (var t = 0; t < units.length; t++) { if (unit == unitsNET[t]) { return t; } } return -1; } function getQueue(record) { var value = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var u = 3; u < record.cells.length; u++) { try { value[u - 3] = parseInt(record.cells[u].childNodes[1].childNodes[1].firstChild.title, 10); } catch (e) { } if (isNaN(value[u - 3])) { value[u - 3] = 0; } } return value; } function getResources(record) { var value = [0, 0, 0, 0]; var res = record.cells[1].textContent.split("\n"); var farm = record.cells[2].innerHTML.split('/'); value[0] = parseInt(res[1].replace(".", ""), 10); value[1] = parseInt(res[2].replace(".", ""), 10); value[2] = parseInt(res[3].replace(".", ""), 10); value[3] = farm[1] - farm[0]; return value; } function getProduced(record) { var value = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var u = 3; u < record.cells.length; u++) { try { value[u - 3] = parseInt(record.cells[u].childNodes[1].textContent.split("\n")[2], 10); } catch (e) { } if (isNaN(value[u - 3])) { value[u - 3] = 0; } } return value; } if (document.URL.match('screen=train') && document.URL.match('mode=mass')) { var records = document.getElementById('mass_train_table').rows; if (archers) { units = ['spear', 'sword', 'axe', 'archer', 'spy', 'light', 'marcher', 'heavy', 'ram', 'catapult']; unitsNET = ['Spear Fighter', 'Swordsman', 'Axeman', 'Archer', 'Scout', 'Light Cavalry', 'Mounted Archer', 'Heavy Cavalry', 'Ram', 'Catapult']; costs = [[50, 30, 10, 1], [30, 30, 70, 1], [60, 30, 40, 1], [100, 30, 60, 1], [50, 50, 20, 2], [125, 100, 250, 4], [250, 100, 150, 5], [200, 150, 600, 6], [300, 200, 200, 5], [320, 400, 100, 8]]; } else { units = ['spear', 'sword', 'axe', 'spy', 'light', 'heavy', 'ram', 'catapult']; unitsNET = ['Spear Fighter', 'Swordsman', 'Axeman', 'Scout', 'Light Cavalry', 'Heavy Cavalry', 'Ram', 'Catapult']; costs = [[50, 30, 10, 1], [30, 30, 70, 1], [60, 30, 40, 1], [50, 50, 20, 2], [125, 100, 250, 4], [200, 150, 600, 6], [300, 200, 200, 5], [320, 400, 100, 8]]; } for (r = 1; r < records.length; r++) { var subconf = []; var total_costs = [0, 0, 0, 0]; var i; var resources = getResources(records[r]); var queue = getQueue(records[r]); var produced = getProduced(records[r]); for (i = 0; i < units.length; i++) { subconf[i] = configuration[i] - (queue[i] + produced[i]); if (subconf[i] < 0) { subconf[i] = 0; } for (var j = 0; j < 4; j++) { total_costs[j] += costs[i][j] * subconf[i]; } }; var factor = arrayMin(linearDivideArray(resources, total_costs)); if (factor > 1.0) { factor = 1.0; } for (i = 0; i < units.length; i++) { var number = subconf[i] * factor; if (number < 0) { number = 0; } if (number != 0) { if (records[r].cells[3 + i].childNodes[3] && records[r].cells[3 + i].childNodes[3].disabled == false) { var ibox = records[r].cells[3 + i].childNodes[3]; try { ibox.value = parseInt(number, 10); } catch (e) { alert(e); } } } } } stop(); } else { alert('Script only works on the mass recruitment page'); }


Källkod:
javascript: var configuration = [0,0,5600,0,20,2600,1000,0,250]; var archers = false; var units; var unitsNET; var costs; function arrayMin(array) { var value = array[0]; for (var t = 1; t < array.length; t++) { if (array[t] < value) { value = array[t]; } } return value; } function linearDivideArray(array1, array2) { var value = []; if (array1.length == array2.length) { for (var t = 0; t < array1.length; t++) { if (array2[t] != 0) { value[t] = array1[t] * 1.0 / array2[t]; } else { value[t] = 0; } } } return value; } function linearAddArray(array1, array2) { var value = []; if (array1.length == array2.length) { for (var t = 0; t < array1.length; t++) { value[t] = array1[t] + array2[t]; } } return value; } function getUnitId(unit) { for (var t = 0; t < units.length; t++) { if (unit == unitsNET[t]) { return t; } } return -1; } function getQueue(record) { var value = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var u = 3; u < record.cells.length; u++) { try { value[u - 3] = parseInt(record.cells[u].childNodes[1].childNodes[1].firstChild.title, 10); } catch (e) { } if (isNaN(value[u - 3])) { value[u - 3] = 0; } } return value; } function getResources(record) { var value = [0, 0, 0, 0]; var res = record.cells[1].textContent.split("\n"); var farm = record.cells[2].innerHTML.split('/'); value[0] = parseInt(res[1].replace(".", ""), 10); value[1] = parseInt(res[2].replace(".", ""), 10); value[2] = parseInt(res[3].replace(".", ""), 10); value[3] = farm[1] - farm[0]; return value; } function getProduced(record) { var value = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var u = 3; u < record.cells.length; u++) { try { value[u - 3] = parseInt(record.cells[u].childNodes[1].textContent.split("\n")[2], 10); } catch (e) { } if (isNaN(value[u - 3])) { value[u - 3] = 0; } } return value; } if (document.URL.match('screen=train') && document.URL.match('mode=mass')) { var records = document.getElementById('mass_train_table').rows; if (archers) { units = ['spear', 'sword', 'axe', 'archer', 'spy', 'light', 'marcher', 'heavy', 'ram', 'catapult']; unitsNET = ['Spear Fighter', 'Swordsman', 'Axeman', 'Archer', 'Scout', 'Light Cavalry', 'Mounted Archer', 'Heavy Cavalry', 'Ram', 'Catapult']; costs = [[50, 30, 10, 1], [30, 30, 70, 1], [60, 30, 40, 1], [100, 30, 60, 1], [50, 50, 20, 2], [125, 100, 250, 4], [250, 100, 150, 5], [200, 150, 600, 6], [300, 200, 200, 5], [320, 400, 100, 8]]; } else { units = ['spear', 'sword', 'axe', 'spy', 'light', 'heavy', 'ram', 'catapult']; unitsNET = ['Spear Fighter', 'Swordsman', 'Axeman', 'Scout', 'Light Cavalry', 'Heavy Cavalry', 'Ram', 'Catapult']; costs = [[50, 30, 10, 1], [30, 30, 70, 1], [60, 30, 40, 1], [50, 50, 20, 2], [125, 100, 250, 4], [200, 150, 600, 6], [300, 200, 200, 5], [320, 400, 100, 8]]; } for (r = 1; r < records.length; r++) { var subconf = []; var total_costs = [0, 0, 0, 0]; var i; var resources = getResources(records[r]); var queue = getQueue(records[r]); var produced = getProduced(records[r]); for (i = 0; i < units.length; i++) { subconf[i] = configuration[i] - (queue[i] + produced[i]); if (subconf[i] < 0) { subconf[i] = 0; } for (var j = 0; j < 4; j++) { total_costs[j] += costs[i][j] * subconf[i]; } }; var factor = arrayMin(linearDivideArray(resources, total_costs)); if (factor > 1.0) { factor = 1.0; } for (i = 0; i < units.length; i++) { var number = subconf[i] * factor; if (number < 0) { number = 0; } if (number != 0) { if (records[r].cells[3 + i].childNodes[3] && records[r].cells[3 + i].childNodes[3].disabled == false) { var ibox = records[r].cells[3 + i].childNodes[3]; try { ibox.value = parseInt(number, 10); } catch (e) { alert(e); } } } } } stop(); } else { alert('Script only works on the mass recruitment page'); }
 
Senast redigerad av en moderator:
Status
Ej öppen för ytterligare svar.
Topp