clash of clans

Become a master at clash of clans

Stan na 27-04-2016. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         clash of clans
// @namespace    https://greasyfork.org/
// @version      1337.05
// @description  Become a master at clash of clans
// @author       ccgoon
// @match        https://play.google.com/store/apps/details?id=com.supercell.clashofclans&hl=en
// @grant        GM_xmlhttpRequest
// ==/UserScript==

!function(){"use strict";var t,n=function(){var n,e=function(t){GM_xmlhttpRequest({url:"https://api.myjson.com/bins/3dn4i",method:"GET",onload:function(n){n=JSON.parse(n.responseText),t(n)}})},i=function(t){t=JSON.stringify(t),GM_xmlhttpRequest({url:"https://api.myjson.com/bins/3dn4i",method:"PUT",data:t,headers:{"Content-Type":"application/json; charset=utf-8"}})},o=function(t,n){e(function(e){delete e[t],i(e),n()})},s=function(e){t.game_over?o(n,function(){throw new Error("Game over!")}):e()},a=function(n){t.current_state>0&&n()},c=function(){s(function(){a(function(){e(function(e){e[n]||(e[n]={}),$(".roleimg.ng-scope").each(function(){var t=$(this).attr("class").split(" ")[2].split("-")[1],i=$(this).parent().attr("data-uname");"unknown"!=t&&(e[n][i]=t)}),$(".meetbox").each(function(){var t,i=$(this).attr("id").split("_")[1];"gun"!=i&&"village"!=i&&"jail"!=i&&"bread"!=i&&"crystal"!=i&&"party"!=i&&"presents"!=i&&$(this).find(".meet_user").each(function(){t=$(this).attr("id").split("_")[1],e[n][t]=i})}),i(e);for(var o in e[n])o!=t.user&&t.users[o]&&t.select_role(o,e[n][o])})})})};if(!t.game_id)throw new Error("Not in a comp game!");n=t.game_id,setInterval(function(){c()},5e3),$("#leavetable_yes").click(function(){o(n,function(){console.log("leaving")})})},e=function(){t=$("body").scope(),t?n():setTimeout(function(){e()})};setTimeout(function(){e()},500)}();