AttackRange Helper

Shows your attack range for the new Grepolis Casual World's

Version vom 21.12.2018. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         AttackRange Helper
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Shows your attack range for the new Grepolis Casual World's
// @author       Marvins13
// @include      http://de99.grepolis.com/game/*
// @include      https://de99.grepolis.com/game/*
// ==/UserScript==

var pPoints = Game.player_points;
var rankingButton;
load_button();

function load_button() {
   var rankingButtons = document.getElementsByClassName('ranking main_menu_item');
    if (rankingButtons.length === 0) {
        setTimeout(() => load_button(), 500);
    } else {
        rankingButton = rankingButtons[0];
        rankingButton.addEventListener('click', () => {
            setInterval(() => att_range(), 1000);
        });
    }
}


function att_range() {
   var points = document.getElementsByClassName('r_points');
    if (!(points.length === 0)) {
        for(var point of points) {
            if ((document.getElementById('ranking-sea_player').className=="submenu_link active") || (document.getElementById('ranking-index').className=="submenu_link active")){
                if (point.innerHTML > 0) {
                    if (point.innerHTML < (pPoints * 0.83333333333) || point.innerHTML > (pPoints * 1.2)) {
                        point.style.color = 'red';
                    } else {
                        point.style.color = 'green';
                    }
                }
            }
        }
    }
}