busamad
Contributing Poster
- Reaction score
- 34
Try it now:
[spoil]
[/spoil]
Works with old units as well.
You can add or remove units from this :
Array('spear','sword','axe','archer','spy','light' ,'heavy','marcher','knight')
Depending on what you want to send.
The script above did not work until I removed all the gaps that are in the script due to the way it was copied & reposted examples:
lengtHereh>0
if(uHererl.indexOf
=cHereoords
It happens all the time & its getting old now.
[spoil]
Code:
javascript:coords='446|499 447|497';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('(^|;)?farm1=([^;]*)(;|$)');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(2099,11,11);document.cookie="farm1="+index+";expires="+cookie_date.toGMTString();doc.forms[0].x.value=coords[0];doc.forms[0].y.value=coords[1];Array.prototype.contains=function(obj){var i,listed=false;for(i=0;i<this.length;i++){if(this[i]===obj){listed=true;break}}return listed};function getGameDoc(){getdoc=window.document;if(!getdoc.URL.match('game\.php')){for(var i=0;i<window.frames.length;i++){if(window.frames[i].document.URL.match('game\.php')){getdoc=window.frames[i].document}}}return getdoc};units=Array('spear','sword','axe','archer','spy','light','heavy','marcher','knight');doc=getGameDoc();form=doc.units;inputs=form.getElementsByTagName('input');for(var i=0;i<inputs.length;i++){if(inputs[i].type=='text'){if(units.contains(inputs[i].name)){next=inputs[i].nextSibling;do{next=next.nextSibling}while(next.nodeType!=1);s=next.firstChild.nodeValue;insertUnit(form.elements[inputs[i].name],next.firstChild.nodeValue.replace(/\(/g,"").replace(/\)/g,""))}}}
Works with old units as well.
You can add or remove units from this :
Array('spear','sword','axe','archer','spy','light' ,'heavy','marcher','knight')
Depending on what you want to send.
The script above did not work until I removed all the gaps that are in the script due to the way it was copied & reposted examples:
lengtHereh>0
if(uHererl.indexOf
=cHereoords
It happens all the time & its getting old now.
Last edited: