Sate BB-codes

  • Autor subiect DeletedUser5809
  • Data de început

pictard

pe IE imi arata asa : The page cannot be displayed

pe Opera : javascript:doc=document;i......

pe mozilla : : scrie pe banda de cautare ' fila noua ' si atat

concluzia , nu-mi merge .
Ai bifat: "Deschide într-o fereastră nouă".
Nu trebuie bifata.
 

DeletedUser25671

Poate cineva sa refaca scriptul acesta,vad ca numai functioneaza???

Extrage coordonate sate in bb-code dupa harta:
Cod:
javascript:var win=(window.frames.length>0)?window.main:window;var coords=[];var outputID='villageList';var encodeID='cbBBEncode';var isEncoded=true;function fnRefresh(){win.$('#'+outputID).attr('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);
 

alex02dsa

Moderator
Membru personal
Eu îl foloesc pe următorul
Cod:
javascript:var win=(window.frames.length>0)?window.main:window;var coords=[];var outputID='villageList';var encodeID='cbBBEncode';var isEncoded=true;function fnRefresh(){win.$('#'+outputID).attr('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);
 

DeletedUser42349

Pai si de ce nu`mi adauga bb codes la satele care la punctez pe harta? imi arata doar casuta alba dar goala

dalesmckay's co-ordinate picker v7.1:

BB-Codes
 

mythra

SuperModerator GameSuport
Membru personal
PHP:
javascript: var win = (window.frames.length > 0) ? window.main : window;
var coords = [];
var outputID = 'villageList';
var encodeID = 'cbBBEncode';
var isEncoded = true;

function fnRefresh() {
    win.$('#' + outputID).text(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;"></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.handler.onClick = function (x, y, e) {
                var village = TWMap.villages[x * 1000 + y];
                if (village) {
                    var coord = x+"|"+y;
                    var ii = coords.indexOf(coord);
                    if (ii >= 0) {
                        coords.splice(ii, 1);
                    } else {
                        coords.push(coord);
                    }
                }
                fnRefresh();
                return false
            }
        } else {
            alert("Acest script trebuie rulat pe harta.\nVa redirectionez acum...");
            self.location = win.game_data.link_base_pure.replace(/screen\=\w*/i, "screen=map");
        }
    }
});
 void(0);