BB kodene til alle byene på kartet

Status
Stengt for ytterligere svar.

Bacardi Razz

Velkjent medlem
Dette scriptet fungerer ikke lenger
javascript: var win=window; var coords=[]; var outputID='villageList'; var encodeID='cbBBEncode'; var isEncoded=true; function fnRefresh(){win.$('#'+outputID).prop('value',coords.map(function(e){return isEncoded?'[coord]'+e+'[\/coord]':e;}).join(isEncoded?'\n':' '));} win.$(win.document).ready(function(){ if(win.$('#'+outputID).length<=0){ if(win.game_data.screen=='map'){ var srcHTML= '<div id="coord_picker">'+ '<span style="color:blue;text-decoration:underline;">dalesmckay\'s co-ordinate picker v7.1:</span><br/><br/>'+ '<input type="checkbox" id="cbBBEncode" onClick="isEncoded=this.checked;fnRefresh();"'+(isEncoded?'checked':'')+'/>BB-Codes<br/>'+ '<textarea id="'+outputID+'" cols="40" rows="10" value="" onFocus="this.select();"/>'+ '</div>'; ele=win.$('body').append(win.$(srcHTML)); win.TWMap.map._handleClick=function(e){ var pos=this.coordByEvent(e); var coord=pos.join("|"); var ii=coords.indexOf(coord); if(ii>=0){ coords.splice(ii,1); } else{ coords.push(coord); } fnRefresh(); return false; }; } else{ alert("Run this script from the Map.\nRedirecting now..."); self.location=win.game_data.link_base_pure.replace(/screen\=\w*/i,"screen=map"); } } }); void(0);
 
Sist redigert:

Bacardi Razz

Velkjent medlem
Kan scriptet som er i første post her byttes ut da det ikke funker lengre med dette.

javascript: var author = "Stotty2009 but most of the code is from: dalesmckay@gmail.com"; var minVer = "7.2"; var win = (window.frames.length > 0) ? window.main : window; var ver = win.game_data.version.match(/[\d|\.]+/g); function getMode() { mode = prompt("b for barb villages, p for player villages, or t for tribe villages", "p"); mode = mode.toLowerCase(); checkMode() } function checkMode() { if (mode == 'p') { playername = prompt("which player pl0x?", "Stotty2009") + ' ' } else if (mode == 't') { tribename = prompt("which tribe pl0x?", "Crazy Muthas") } else if (mode == 'b') { } else { getMode() } } getMode(); function trim(str) { return str.replace(/^\s+|\s+$/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]; var ally = TWMap.allies[player.ally] } if (player) { if (mode == "p") { if (trim(player.name) == trim(playername)) { coords.push(coord.join("|")) } } else if (mode == "t") { if (ally) { if (trim(ally.name) == trim(tribename)) { coords.push(coord.join("|")) } } } } else { if (mode == "b") { 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 (o);


eneste som er nytt med dette er at man heller for opp en boks b = den gir deg bb kords - p = spiller kords - t = egene stamme medlemmer koords
 

Beagle Eagle

Guest
Testet og det nederste scriptet til bacardi razz funker.. flyttes til boklisten
 
Status
Stengt for ytterligere svar.