Automatically catches Pokémon from the list if they appear on the Deluge RPG website.
Size
2.8 KB
Version
1.0
Created
Nov 6, 2025
Updated
about 1 month ago
1// ==UserScript==
2// @name Deluge RPG Pokémon Catcher
3// @license MIT
4// @namespace http://your-namespace.com
5// @version 1.0
6// @description Automatically catches Pokémon from the list if they appear on the Deluge RPG website.
7// @match https://www.delugerpg.com/map/*
8// @grant none
9// @downloadURL https://update.greasyfork.org/scripts/468844/Deluge%20RPG%20Pok%C3%A9mon%20Catcher.user.js
10// @updateURL https://update.greasyfork.org/scripts/468844/Deluge%20RPG%20Pok%C3%A9mon%20Catcher.meta.js
11// ==/UserScript==
12
13(function() {
14 'use strict';
15
16 // Pokémon list to match against
17 var pokemonList = ["Pikachu", "Charizard", "Gyarados"]; // Add or remove Pokémon names here
18
19 // Function to check if a Pokémon is on the list
20 function isPokemonOnList(pokemonName) {
21 return pokemonList.includes(pokemonName);
22 }
23
24 // Function to catch the Pokémon
25 function catchPokemon() {
26 var elements = document.querySelectorAll("#catch");
27 elements.forEach(function(element) {
28 var pokemonName = element.textContent.trim();
29 if (isPokemonOnList(pokemonName)) {
30 console.log("Catching Pokémon: " + pokemonName);
31 element.click();
32 }
33 });
34 }
35
36 // Function to simulate a key press
37 function simulateKeyPress(key) {
38 var eventObj = document.createEventObject ? document.createEventObject() : document.createEvent("Events");
39 if (eventObj.initEvent) {
40 eventObj.initEvent("keydown", true, true);
41 }
42 eventObj.keyCode = key;
43 eventObj.which = key;
44 document.dispatchEvent ? document.dispatchEvent(eventObj) : document.fireEvent("onkeydown", eventObj);
45 }
46
47 // Function to start pressing a random key ('w', 'a', 's', 'd') every 2 seconds
48 function startKeyPress() {
49 setInterval(function() {
50 var randomKey = Math.floor(Math.random() * 4); // Generate a random number from 0 to 3
51 var keys = [87, 65, 83, 68]; // Key codes for 'w', 'a', 's', 'd' respectively
52 simulateKeyPress(keys[randomKey]);
53 }, 2000);
54 }
55
56 // Call the startKeyPress function to begin key presses
57 startKeyPress();
58
59 // Event listener for keydown events
60 document.addEventListener('keydown', function(event) {
61 var key = event.key.toLowerCase();
62 if (key === 'w' || key === 'a' || key === 's' || key === 'd') {
63 catchPokemon();
64 }
65 });
66
67 // Refresh the Pokémon list when 'w', 'a', 's', or 'd' keys are pressed
68 document.addEventListener('keydown', function(event) {
69 var key = event.key.toLowerCase();
70 if (key === 'w' || key === 'a' || key === 's' || key === 'd') {
71 console.log("Refreshing Pokémon list...");
72 location.reload();
73 }
74 });
75
76})();
77