Free javascript Hosting


wp-acanie-z-ota-do-klanu-user.js

Uploaded on May 16 2022 18:57 by szymek0254

// ==UserScript==
// @name Wpłacanie złota do klanu
// @namespace http://tampermonkey.net/
// @version 0.1
// @author Czogi
// @match https://*.margonem.pl/
// @grant none
// ==/UserScript==

"use strict";
{
const config = {
doNotSend: 10_000_000 /* Tyle ma zostawić */,
minAmount: 50_000_000 /* Minimum wysyłaj tyle złota */
};
(async (sleep) => {
if (typeof unsafeWindow !== "undefined") {
window = unsafeWindow;
}
const isSi = window.getCookie("interface") === "si";
do {
await sleep(1e3);
} while (
!Object.keys(isSi ? window?.hero || {} : window?.Engine?.hero || {})
.length
);
{
}

if (isSi ? !("clan" in window.hero) : !("clan" in window.Engine.hero.d)) {
return;
}

while (true) {
await sleep(1e3);
const currGold = isSi ? window.hero.gold : window.Engine.hero.d.gold;
const toSend = currGold - config.doNotSend;

if (toSend < config.minAmount) {
continue;
}
window._g(`clan&a=save&f=gold&v=${toSend}`);
}
})((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
}

Back to list