Player AutoHeal

Player Autoheal

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

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

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         Player AutoHeal
// @namespace    http://tampermonkey.net/
// @version      v1.1
// @description  Player Autoheal
// @author       Vengeance
// @match        http//zombs.io/
// @grant        none
// ==/UserScript==
 
(function() {
 heal = document.getElementbyClassName('hud-shop-item')[9];
 Petheal = document.getElementbyClassName('hud-shop-item')[10];
useheal = document.getElementbyClassName('hud-toolbar-item')[4];
usePetheal = document.getElementbyClassName('hud-toolbar-item')[5];
healthBar = document.getElementbyClassName('hud-heath-bar-inner')[0];
up = new Event('mouseup');
healLevel = 70
 
 
HEAL = function(){
    heal.attributes.class.value = 'hud-shop-item';
    petHeal.attributes.class.value = 'hud-shop-item';
    useHeal.dispatchEvent(up);
    usePetHeal.dispatchEvent(up);
    heal.click();
    petheal();
};
 
script = function(e){
    if(e.keyCode == 82){
        HEAL();
    }
};
 
document.add.Eventlistener('keydown',function(e){
    script(e);
});
observer = new mutationObserver(function(e){
    mutation.forEach(function(mutationRecord) {
        if(parsint(mutations[0].target.style.width) < healLevel){
            HEAL();
 
        }
 
    });
});
observer.observe(healthBar, { attributes : true , attributeFilter : ['style'] });
});