Deluge RPG Legendary Pokémon Auto-Hunter

Automatically moves character and stops when legendary, mythical, or Ultra Beast Pokémon are detected

Size

5.9 KB

Version

1.4.1

Created

Mar 19, 2026

Updated

29 days ago

1// ==UserScript==
2// @name		Deluge RPG Legendary Pokémon Auto-Hunter
3// @description		Automatically moves character and stops when legendary, mythical, or Ultra Beast Pokémon are detected
4// @version		1.4.1
5// @match		https://www.delugerpg.com/map/*
6// @icon		https://robomonkey.io/favicon.ico
7// @license		MIT
8// @namespace		http://your-namespace.com
9// ==/UserScript==
10(function() {
11    'use strict';
12
13    // =========================
14    // TARGET LIST
15    // =========================
16
17    var basePokemon = [
18        'Mew','Mewtwo','Articuno','Zapdos','Moltres',
19        'Raikou','Entei','Suicune','Lugia','Ho-Oh','Celebi',
20        'Regirock','Regice','Registeel','Latias','Latios','Kyogre','Groudon','Rayquaza','Jirachi','Deoxys',
21        'Uxie','Mesprit','Azelf','Dialga','Palkia','Heatran','Regigigas','Giratina','Cresselia','Phione','Manaphy','Darkrai','Shaymin','Arceus',
22        'Victini','Cobalion','Terrakion','Virizion','Tornadus','Thundurus','Landorus','Reshiram','Zekrom','Kyurem','Keldeo','Meloetta','Genesect',
23        'Xerneas','Yveltal','Zygarde','Diancie','Hoopa','Volcanion',
24        'Tapu Koko','Tapu Lele','Tapu Bulu','Tapu Fini','Cosmog','Cosmoem','Solgaleo','Lunala','Necrozma','Magearna','Marshadow','Zeraora','Meltan','Melmetal',
25        'Zacian','Zamazenta','Eternatus','Kubfu','Urshifu','Zarude','Regieleki','Regidrago','Glastrier','Spectrier','Calyrex',
26        'Enamorus',
27        'Wo-Chien','Chien-Pao','Ting-Lu','Chi-Yu','Koraidon','Miraidon',
28        'Walking Wake','Iron Leaves',
29        'Ogerpon','Terapagos','Pecharunt',
30
31        'Type: Null','Silvally',
32        'Okidogi','Munkidori','Fezandipiti',
33
34        'Mega Mewtwo X','Mega Mewtwo Y',
35        'Mega Latias','Mega Latios',
36        'Primal Kyogre','Primal Groudon',
37        'Mega Rayquaza',
38        'G-Max Urshifu',
39        'Mega Diancie',
40        'G-Max Melmetal',
41
42        'Nihilego','Buzzwole','Pheromosa','Xurkitree',
43        'Celesteela','Kartana','Guzzlord',
44        'Poipole','Naganadel','Stakataka','Blacephalon'
45    ];
46
47    var variants = [
48        '', 'Shiny','Metallic','Ghost','Dark','Shadow','Mirage','Chrome','Negative','Retro'
49    ];
50
51    var pokemonList = [];
52
53    for (let p of basePokemon) {
54        for (let v of variants) {
55            pokemonList.push(v ? v + ' ' + p : p);
56        }
57    }
58
59    console.log('Deluge RPG Legendary Pokémon Auto-Hunter initialized');
60    console.log('Tracking ' + pokemonList.length + ' legendary/mythical/UB Pokémon variants');
61
62    // =========================
63    // STATE
64    // =========================
65
66    let isAutoMoving = true;
67    let moveInterval = null;
68    let stopped = false;
69
70    // =========================
71    // UTIL
72    // =========================
73
74    function debounce(func, wait) {
75        let timeout;
76        return function(...args) {
77            clearTimeout(timeout);
78            timeout = setTimeout(() => func(...args), wait);
79        };
80    }
81
82    function getRandomDirection() {
83        const directions = ['north','south','east','west','north-west','north-east','south-west','south-east'];
84        return directions[Math.floor(Math.random() * directions.length)];
85    }
86
87    // =========================
88    // MOVEMENT
89    // =========================
90
91    function moveCharacter() {
92        if (!isAutoMoving || stopped) return;
93
94        const direction = getRandomDirection();
95        const moveLink = document.querySelector(`a[href*="/move/${direction}"]`);
96
97        if (moveLink) {
98            console.log('Moving ' + direction);
99            moveLink.click();
100        } else {
101            console.error('Move link not found for direction: ' + direction);
102        }
103    }
104
105    // =========================
106    // DETECTION (FIXED)
107    // =========================
108
109    function checkPokemon() {
110        const showPokeDiv = document.querySelector('#show-poke');
111        if (!showPokeDiv) return;
112
113        const content = showPokeDiv.textContent || "";
114
115        if (!content.toLowerCase().includes('appeared')) return;
116
117        // Try match from target list
118        let detected = pokemonList.find(p => content.includes(p));
119
120        if (detected) {
121            console.log('🎯 LEGENDARY DETECTED: ' + detected);
122            console.log('Full message: ' + content);
123
124            stopped = true;
125            isAutoMoving = false;
126
127            if (moveInterval) {
128                clearInterval(moveInterval);
129                moveInterval = null;
130            }
131
132            console.log('⚠️ AUTO-MOVEMENT STOPPED - Legendary Pokémon found!');
133        } else {
134            // fallback for normal Pokémon
135            let rough = content.split('appeared')[0];
136            console.log('Normal Pokémon appeared: ' + rough.trim());
137        }
138    }
139
140    const debouncedCheck = debounce(checkPokemon, 300);
141
142    // =========================
143    // OBSERVER
144    // =========================
145
146    function setupObserver() {
147        const showPokeDiv = document.querySelector('#show-poke');
148
149        if (!showPokeDiv) {
150            console.log('Waiting for #show-poke element...');
151            setTimeout(setupObserver, 1000);
152            return;
153        }
154
155        console.log('Observer attached to #show-poke element');
156
157        const observer = new MutationObserver(debouncedCheck);
158
159        observer.observe(showPokeDiv, {
160            childList: true,
161            subtree: true,
162            characterData: true
163        });
164
165        checkPokemon();
166    }
167
168    // =========================
169    // START
170    // =========================
171
172    function startAutoMovement() {
173        isAutoMoving = true;
174        stopped = false;
175
176        console.log('Starting auto-movement (every 3 seconds)');
177        moveInterval = setInterval(moveCharacter, 3000);
178        setTimeout(moveCharacter, 1000);
179    }
180
181    if (document.readyState === 'loading') {
182        document.addEventListener('DOMContentLoaded', () => {
183            setupObserver();
184            startAutoMovement();
185        });
186    } else {
187        setupObserver();
188        startAutoMovement();
189    }
190
191})();
Deluge RPG Legendary Pokémon Auto-Hunter | Robomonkey