Coinbrawl

try to take over the world!

目前為 2016-02-26 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Coinbrawl
// @version      0.12
// @description  try to take over the world!
// @author       You
// @match        https://www.coinbrawl.com/*
// @grant        none
// @namespace https://greasyfork.org/users/25633
// ==/UserScript==

//menu
$('li:has(a[href$="/referrals"])').remove();

//ads
$('div.panel-game-content:first').hide();
$('div.col-sm-9 > center').hide();
$('div.col-sm-3').hide();

if ( $("li.active a[href='/").length == 1 ){
    $('div.col-sm-6').hide();
    $('div.col-sm-4').hide();
    $('div.col-sm-8').hide();

    var searchArena = $('#battle-table > div > p > a')[0];
    searchArena.onclick=function(){
        var chkAttk = setTimeout(function(){
            attackUser();
        },2000);
    };


}

function attackUser(){
    $('tbody:first > tr').each(function(){

        if ( $(this).find('strong.text-success').html() > 2000 ){

            if ( $(this).find('div.text-warning').length > 0 ) {
                
                $(this).find('td > a')[0].click();
                console.log('[warning] Attacking user for ' + $(this).find('strong.text-success').html());
            }
            
        }

        if ( $(this).find('strong.text-success').html() > 5500 ){

            if ( $(this).find('div.text-danger').length > 0 ){

                $(this).find('td > a')[0].click()
                console.log('[danger] Attacking user for ' + $(this).find('strong.text-success').html());
            }
        }
    });
}