Support script

BiTr3X

Member
Reaction score
3
does exist a script which is working like a fake script but instead of send attacks to the villages you choose, it sends support's packets?
 

Shinko to Kuma

Still Going Strong
Reaction score
776
does exist a script which is working like a fake script but instead of send attacks to the villages you choose, it sends support's packets?

Adjust the popsend/minpop and include settings to your liking, and fill in the coordinates where it says COORDINATES HERE

Code:
javascript: var popsend = 1000;
var minPop = 1000;
var alertWhenDone = 1;
var nextVillageWhenDone = 1;
var include = {
    spear: 1,
    sword: 1,
    archer: 1,
    scout: 0,
    heavy: 1,
    cat: 0
};
var targets = 'COORDINATES HERE';
var doc = (window.frames.length > 0) ? window.main.document : document;

function getTroop(a) {
    return parseInt(doc.units[a].parentNode.getElementsByTagName("a")[1].innerHTML.match(/\d+/), 10);
}
var SP = include.spear ? getTroop("spear") : 0;
var AR = include.archer ? getTroop("archer") : 0;
var HC = include.heavy ? getTroop("heavy") : 0;
var CAT = include.cat ? getTroop("catapult") : 0;
var SPY = include.scout ? getTroop("spy") : 0;
var SW = include.sword ? getTroop("sword") : 0;
var pop = SP + SW + AR + 2 * SPY + 8 * CAT + 6 * HC;
if (pop > minPop) {
    var ratio = popsend / pop;
    ratio = ratio > 1 ? 1 : ratio;
    doc.forms[0].spear.value = SP * ratio;
    doc.forms[0].heavy.value = HC * ratio;
      doc.forms[0].archer.value = AR * ratio;
    doc.forms[0].sword.value = SW * ratio;
    doc.forms[0].catapult.value = CAT * ratio;
    doc.forms[0].spy.value = SPY * ratio;
    targets = targets.split(" ");
    var index = 0;
    var farmcookie = document.cookie.match("(^|;) ?fluffy_fake=([^;]*)(;|$)");
    if (farmcookie == null) {
        index = Math.floor(Math.random() * (targets.length + 1));
    } else {
        index = parseInt(farmcookie[2]);
    }
    if (index >= targets.length) index = 0;
    var coord = targets[index].split("|");
    index++;
    cookie_date = new Date(2099, 11, 11);
    document.cookie = "fluffy_fake=" + index + "; expires=" + cookie_date.toGMTString();
    doc.forms[0].x.value = coord[0];
    doc.forms[0].y.value = coord[1];
    void(0);
} else {
    if (alertWhenDone) alert('done');
    if (nextVillageWhenDone) {
        var sitter = doc.URL.match(/t=\d+/);
        sitter = sitter ? "&" + sitter : "";
        window.location = "game.php?village=n" + window.game_data.village.id + "&screen=place" + sitter
    }
}
 

BiTr3X

Member
Reaction score
3
you are just the best <3 thanks a lot for this and for all the work that you have done and that you do for the community
 

Deleted User - 11572570

Guest
Adjust the popsend/minpop and include settings to your liking, and fill in the coordinates where it says COORDINATES HERE

Code:
javascript: var popsend = 1000;
var minPop = 1000;
var alertWhenDone = 1;
var nextVillageWhenDone = 1;
var include = {
    spear: 1,
    sword: 1,
    archer: 1,
    scout: 0,
    heavy: 1,
    cat: 0
};
var targets = 'COORDINATES HERE';
var doc = (window.frames.length > 0) ? window.main.document : document;

function getTroop(a) {
    return parseInt(doc.units[a].parentNode.getElementsByTagName("a")[1].innerHTML.match(/\d+/), 10);
}
var SP = include.spear ? getTroop("spear") : 0;
var AR = include.archer ? getTroop("archer") : 0;
var HC = include.heavy ? getTroop("heavy") : 0;
var CAT = include.cat ? getTroop("catapult") : 0;
var SPY = include.scout ? getTroop("spy") : 0;
var SW = include.sword ? getTroop("sword") : 0;
var pop = SP + SW + AR + 2 * SPY + 8 * CAT + 6 * HC;
if (pop > minPop) {
    var ratio = popsend / pop;
    ratio = ratio > 1 ? 1 : ratio;
    doc.forms[0].spear.value = SP * ratio;
    doc.forms[0].heavy.value = HC * ratio;
      doc.forms[0].archer.value = AR * ratio;
    doc.forms[0].sword.value = SW * ratio;
    doc.forms[0].catapult.value = CAT * ratio;
    doc.forms[0].spy.value = SPY * ratio;
    targets = targets.split(" ");
    var index = 0;
    var farmcookie = document.cookie.match("(^|;) ?fluffy_fake=([^;]*)(;|$)");
    if (farmcookie == null) {
        index = Math.floor(Math.random() * (targets.length + 1));
    } else {
        index = parseInt(farmcookie[2]);
    }
    if (index >= targets.length) index = 0;
    var coord = targets[index].split("|");
    index++;
    cookie_date = new Date(2099, 11, 11);
    document.cookie = "fluffy_fake=" + index + "; expires=" + cookie_date.toGMTString();
    doc.forms[0].x.value = coord[0];
    doc.forms[0].y.value = coord[1];
    void(0);
} else {
    if (alertWhenDone) alert('done');
    if (nextVillageWhenDone) {
        var sitter = doc.URL.match(/t=\d+/);
        sitter = sitter ? "&" + sitter : "";
        window.location = "game.php?village=n" + window.game_data.village.id + "&screen=place" + sitter
    }
}

anyone know how to make this script send the coordinates randonly? the same way as the http://www.fxutility.net/fake_eng.php can generate the fake script?
 
Top