Predator Stack - V & B (Reload 7 & 5)

Press "V" or "P" to stack.

目前為 2026-03-20 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Predator Stack - V & B (Reload 7 & 5)
// @license MIT
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Press "V" or "P" to stack.
// @author       Voyager
// @match        *://diep.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // aqui simulo las teclas para que funcionen siempre
    function simulateKey(code, keyCode, type) {
        const event = new KeyboardEvent(type, {
            code: code,
            keyCode: keyCode,
            which: keyCode,
            bubbles: true,
            cancelable: true,
            view: window
        });
        document.dispatchEvent(event);
    }

    function shoot(duration) {
        simulateKey("Space", 32, "keydown");
        setTimeout(() => {
            simulateKey("Space", 32, "keyup");
        }, duration);
    }

    function executeStack(t1, t2, t3) {
        console.log(`Ejecutando Stack... (Espera T2: ${t2}ms, Auto-fire T3: ${t3}ms)`);

        // primera bala
        shoot(t1);

        // segunda bala
        setTimeout(() => {
            shoot(300);
        }, t2);

        // aqui se activa el Auto para que se mantenga el stack
        setTimeout(() => {
            simulateKey("KeyE", 69, "keydown");
            setTimeout(() => simulateKey("KeyE", 69, "keyup"), 50);
            console.log("Stack Predator Completo.");
        }, t3);
    }

    window.addEventListener('keydown', (e) => {
        // para que no se active si estas en alguna otra parte como la consola, creo
        if (document.activeElement.tagName === 'INPUT') return;
        if (e.repeat) return;

        const key = e.key.toLowerCase();

        if (key === 'v') {
            // RELOAD 7 (Delays: 50, 750, 1500)
            executeStack(50, 750, 1500);
        }
        else if (key === 'b') {
            // RELOAD 5 (Delays: 50, 900, 1800)
            executeStack(50, 900, 1800);
        }
    });
})();