Ang3l
New Member
- Reaction score
- 0
- Author
- Unknown
- Contributors
- Ang3l
- Quickbar Entry
-
javascript:coords='566|503';var doc=document;if(window.frames.length>0 && window.main!=null)doc=window.main.document;url=doc.URL;if(url.indexOf('screen=place')==-1)alert('Use the script in the rally point page!');coords=coords.split(' ');index=0;farmcookie=document.cookie.match('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if(index>=coords.length)alert('All villages were extracted, now start from the first!');if(index>=coords.length)index=0;coords=coords[index];coords=coords.split('|');index=index+1;cookie_date=new Date(2022,3,27);document.cookie ='farm='+index+';expires='+cookie_date.toGMTString();doc.forms[0].x.value=coords[0];doc.forms[0].y.value=coords[1];$('#place_target').find('input').val(coords[0]+'|'+coords[1]);if( doc.forms[0].spy.dataset.allCount > 0) { doc.forms[0].spy.value=1;}if( doc.forms[0].ram.dataset.allCount > 0) { doc.forms[0].ram.value=1;} else if ( doc.forms[0].catapult.dataset.allCount > 0 ){doc.forms[0].catapult.value=1;} else if ( doc.forms[0].sword.dataset.allCount > 0 ){doc.forms[0].sword.value=1;} else if ( doc.forms[0].spear.dataset.allCount > 0 ){doc.forms[0].spear.value=1;} else if ( doc.forms[0].axe.dataset.allCount > 0 ){doc.forms[0].axe.value=1;} end();
- Public?
- Public
Hi,
I have made a small change to one of the widely used scripts in TW.
It's the script used to send fakes.
The original script would only add 1 scout and 1 ram to the form on the Rally Point page. But I have made the change to cater to available troop quantities.
So if there are no scouts available or no rams available, it instead adds cats, or spears or swords and so on to the form.
The script is below with the 566|503 as a dummy test co-ordinate:
Please do let me know if anything further is required,
p.s. if anyone knows original contributors, do let me know as I'd like to give them credit for majority of the script.
Thanks
I have made a small change to one of the widely used scripts in TW.
It's the script used to send fakes.
The original script would only add 1 scout and 1 ram to the form on the Rally Point page. But I have made the change to cater to available troop quantities.
So if there are no scouts available or no rams available, it instead adds cats, or spears or swords and so on to the form.
The script is below with the 566|503 as a dummy test co-ordinate:
Code:
javascript:coords='566|503';var doc=document;if(window.frames.length>0 && window.main!=null)doc=window.main.document;url=doc.URL;if(url.indexOf('screen=place')==-1)alert('Use the script in the rally point page!');coords=coords.split(' ');index=0;farmcookie=document.cookie.match('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if(index>=coords.length)alert('All villages were extracted, now start from the first!');if(index>=coords.length)index=0;coords=coords[index];coords=coords.split('|');index=index+1;cookie_date=new Date(2022,3,27);document.cookie ='farm='+index+';expires='+cookie_date.toGMTString();doc.forms[0].x.value=coords[0];doc.forms[0].y.value=coords[1];$('#place_target').find('input').val(coords[0]+'|'+coords[1]);if( doc.forms[0].spy.dataset.allCount > 0) { doc.forms[0].spy.value=1;}if( doc.forms[0].ram.dataset.allCount > 0) { doc.forms[0].ram.value=1;} else if ( doc.forms[0].catapult.dataset.allCount > 0 ){doc.forms[0].catapult.value=1;} else if ( doc.forms[0].sword.dataset.allCount > 0 ){doc.forms[0].sword.value=1;} else if ( doc.forms[0].spear.dataset.allCount > 0 ){doc.forms[0].spear.value=1;} else if ( doc.forms[0].axe.dataset.allCount > 0 ){doc.forms[0].axe.value=1;} end();
Please do let me know if anything further is required,
p.s. if anyone knows original contributors, do let me know as I'd like to give them credit for majority of the script.
Thanks
Last edited:
Upvote
0