Minefun.io Testing Utility

Automated interaction testing for minefun.io

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Minefun.io Testing Utility
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Automated interaction testing for minefun.io
// @author       YourName
// @match        *://minefun.io/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 1. Configuration: Add item IDs or coordinates here
    const CONFIG = {
        testItemName: "Wood",
        autoCollectRange: 100, // Distance in pixels
    };

    console.log("Minefun Testing Script Loaded");

    // 2. Function to simulate a key press (e.g., 'E' to pick up)
    function simulateInteraction(keyCode) {
        window.dispatchEvent(new KeyboardEvent('keydown', { 'keyCode': keyCode }));
        setTimeout(() => {
            window.dispatchEvent(new KeyboardEvent('keyup', { 'keyCode': keyCode }));
        }, 50);
    }

    // 3. Main Logic Loop
    // This looks for items in the DOM or via game objects (depending on game engine)
    setInterval(() => {
        // Example: Finding a button that says "Collect" or "Pickup"
        const pickupButton = document.querySelector('.pickup-btn-class'); // Replace with actual class
        
        if (pickupButton) {
            console.log("Item detected! Attempting to collect...");
            pickupButton.click();
            // Or simulate the 'E' key
            simulateInteraction(69); 
        }
    }, 1000);

})();