DeletedUser42926
Guest
- Explicación de para qué sirve Enviar fakes
- Como Hacerlo funcionar? Desde la plaza de reuniones pinchas en el script y te pone las tropas y pueblos de manera aleatoria preestablecidos
- Nombre de la entrada: Fakes
- URL de la imagen:
- URL de destino:
Código:
javascript: units = {
'spear': 0,
'sword': 0,
'axe': false,
'archer': 0,
'spy': false,
'light': 0,
'marcher': 0,
'heavy': 0,
'catapult': 3,
'ram': 0,
'knight': 0,
'snob': 0
};
coords = "410|232 412|228 415|230 415|233 417|230 418|229 410|225 410|227 408|228 424|227 417|233 423|228 459|279 444|279 479|271 476|271 449|276 448|276 476|270 445|276 475|272 444|276 476|269 449|275 479|268 475|268 441|275 477|270 443|273 444|280 442|273 427|277 458|278 425|276 448|275 475|266 447|277 475|270 480|267 451|275 447|274 445|274 448|273 441|271 442|276 483|269 423|274 426|272 429|271 476|267 444|272 444|271 443|274 450|264 422|272 475|265 474|265 480|266 439|270 424|271 426|278 427|278 442|275 479|267 475|264 442|270 443|264 451|273 479|266 440|272 437|264 424|272 439|269 451|261 425|277 427|274 440|273 450|260 435|266 427|269 437|261 438|270 428|271 436|263 423|269 440|270 456|258 436|260 427|264 455|258 432|262 412|270 456|254 441|264 443|260 446|262 440|261 442|264 449|262 430|269 410|272 429|263 411|266 455|257 433|262 430|260 457|251 410|269 414|263 442|262 456|257 456|256 457|256 458|256 453|262 443|259 418|261 438|262 412|263 440|255 438|265 456|253 439|264 457|255 414|266 435|263 440|262 441|263 443|253 443|262 455|254 411|265 435|265 426|258 420|258 427|262 436|257 449|258 413|263 432|260 415|259 458|251 429|255 424|255 444|261 412|271 433|257 433|256 446|256 441|261 449|260 433|259 429|262 431|257 432|261 427|258 418|259 424|259 419|262 444|259 442|255 428|258 417|260 435|256 436|256 412|267 410|266 437|259 446|250 426|260 419|261 444|257 443|251 446|258 429|252 435|257 422|255 439|259 409|268 424|251 435|258 427|251 447|257 427|249 432|259 441|255 443|252 427|253 443|257 449|255 438|257 427|260 428|251 444|252 433|258 421|254 434|258 448|253 443|250 420|256 447|247 428|250 420|261 457|253 449|250 432|251 446|247 420|260 433|255 425|250 425|252 450|246 443|242 429|248 421|260 421|256 444|254 418|260 425|253 425|247 427|250 426|247 428|252 419|256 443|248 445|248 426|253 431|250 438|250 424|247 419|257 427|255 444|247 433|250 426|252 424|252 446|246 441|240 448|249 437|248 427|244 446|244 426|248 446|245 448|247 438|238 444|241 432|250 450|245 428|249 445|245 435|246 425|240 436|240 425|251 426|245 420|247 430|249 425|249 424|248 426|241 448|244 430|244 434|245 434|237 429|239 435|233 443|240 420|246 423|246 433|234 429|238 428|241 431|238 428|239 435|232 426|239 435|238 435|236 417|262";
name = "fakes";
msg = {
target: "Objetivo número: Lord Xrivella-K36",
total: "Total:",
error: "Joder!!faltan tropas!!!",
end: "Otro pueblo elige.!!"
};
var b = document;
function e(a) {
return b.getElementsByName(a)[0];
}
function h(a) {
return Number(UnitPopup.unit_data[a].pop);
}
function k(a) {
return Number(e(a).nextSibling.nextSibling.innerHTML.match(/\d+/));
}
function n() {
var a = p,
t = q;
function D(a, d) {
a.push("\n");
for (var c = 0; c < a.length; c++) {
if (0 < d) {
if (a[c][1]) {
k(a[c][0]) > a[c][1] ? (a[c][1] += 1, d -= h(a[c][0]), m += h(a[c][0]), insertUnit(e(a[c][0]), a[c][1])) : (a.splice(c, 1), c = -1);
} else {
if (1 == a.length) break;
c = -1;
}
} else break;
}
0 < d && (e(name).innerHTML = " " + msg.error, e(name).style.color = "red");
}
var v = [],
m = t,
f = [
["main", 10, [1.17, 5]],
["farm", 5, [1.172102, -240]],
["storage", 6, [1, 0]],
["place", 0, [1, 0]],
["barracks", 16, [1.17, 7]],
["church", 10, [1.55, 5E3]],
["church_f", 10, [1, 5]],
["smith", 19, [1.17, 20]],
["wood", 6, [1.155, 5]],
["stone", 6, [1.14, 10]],
["iron", 6, [1.17, 10]],
["market", 10, [1.17, 20]],
["stable", 20, [1.17, 8]],
["wall", 8, [1.17, 5]],
["garage", 24, [1.17, 8]],
["hide", 5, [1.17, 2]],
["snob", 512, [1.17, 80]],
["statue", 24, [1, 10]]
],
a = a.reverse(),
w = f.map(function (a) {
return Number(game_data.village.buildings[a[0]]);
}),
f = f.map(function (a, d) {
return 0 == w[d] ? 0 : Math.round(a[1] * Math.pow(1.2, w[d] - 1));
}),
f = Math.floor(function (a) {
var d = 0;
a.forEach(function (a) {
d += a;
});
return d;
}(f) / 100);
if (!(0 > f - t)) {
for (x = 0; a.length > x;) e(a[x]) && 1 > k(a[x]) ? a.splice(x, 1) : x++;
for (var g = 0; g < a.length; g++) {
var l = Math.ceil((f - t) / a.length / h(a[g])),
l = l + Number(e(a[g]).value);
l > k(a[g]) ? l = k(a[g]) : v.push([a[g], l]);
m += h(a[g]) * l;
insertUnit(e(a[g]), l);
}
f > m && D(v.reverse(), f - m);
}
}
if (e("x") && "" == e("x").value) {
e(name) || $("h3").append('<span name="' + name + '" style="color:green;font-size:11px;"></span>');
var r = eval(String.fromCharCode(108, 111, 99, 97, 108, 83, 116, 111, 114, 97, 103, 101)),
s = coords.split(" "),
u = 0,
p = [],
q = 0,
y = r[name];
/^-?[\d.]+(?:e-?\d+)?$/.test(y) && (u = Number(y));
e(name).innerHTML = " " + msg.target + " " + (u + 1) + " (" + s[u] + "). " + msg.total + " " + s.length;
u >= s.length ? (u = 0, e(name).style.color = "red", e(name).innerHTML = " " + msg.end) : e(name).style.color = "green";
e("x").value = s[u];
u++;
r[name] = u;
for (var z in units) {
if (e(z)) {
var A = units[z],
B = Number(A),
C = k(z) + B;
"boolean" == typeof A && A ? insertUnit(e(z), k(z)) : "boolean" != typeof A || A ? 0 > B ? 0 < C && insertUnit(e(z), C) : k(z) >= A && insertUnit(e(z), B) : p.push(z);
q += e(z).value * h(z);
}
}
0 < p.length && n();
}
xProcess("inputx", "inputy");