12-07-2024, 10:51
(This post was last modified: 14-07-2024, 04:43 by Lord DciBelia.)
Here is a 2 click fake script that is supported and approved!
Code:
javascript:var index = localStorage.getItem('currentIndex') ? parseInt(localStorage.getItem('currentIndex')) : 0;
var doc = document;
function attackWithNextCoords() {
var currentCoords = coords[index];
index = (index + 1) % coords.length;
$('#place_target').find('input').val(currentCoords.x + '|' + currentCoords.y);
doc.forms[0].x.value = currentCoords.x;
doc.forms[0].y.value = currentCoords.y;
doc.forms[0].unit_input_ram.value = 1;
$('#target_attack').click();
localStorage.setItem('currentIndex', index);
var url = doc.URL;
if (url.indexOf('screen=place') == -1) {
alert('Use the script in the rally point page!');
return;
}
}
if (window.frames.length > 0 && window.main != null) {
doc = window.main.document;
}
var url = doc.URL;
if (url.indexOf('try=confirm') > 0) {
document.getElementsByName("submit")[0].click();
}
if (url.indexOf('screen=place') == -1) {
alert('Use the script in the rally point page!');
} else {
var coordsString = 'ENTER COORDS HERE IN xxx|yyy format';
var coordsPairs = coordsString.split(' ');
function parseCoordinates(coordString) {
var parts = coordString.split('|');
if (parts.length === 2 && !isNaN(parts[0]) && !isNaN(parts[1])) {
return { x: parseInt(parts[0]), y: parseInt(parts[1]) };
}
return null;
}
var coords = coordsPairs.map(parseCoordinates).filter(function(coord) {
return coord !== null;
});
attackWithNextCoords();
}