Adds keyboard controls for movement in DelugeRPG's mobile version.
当前为
// ==UserScript==
// @name DelugeRPG Movement Controller for Mobile UI
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Adds keyboard controls for movement in DelugeRPG's mobile version.
// @license MIT
// @author Your Name
// @match https://m.delugerpg.com/map*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// This script was designed to enhance gameplay convenience by adding keyboard controls to DelugeRPG's mobile version.
// While created with good intentions, I want to emphasize that I will promptly remove it if any functionality conflicts with the platform's Terms of Service.
// Thank you for your understanding and support.
const movementKeys = {
'q': '#dr-nw',
'w': '#dr-n',
'e': '#dr-ne',
'a': '#dr-w',
's': '#dr-s',
'd': '#dr-e',
'z': '#dr-sw',
'x': '#dr-s',
'c': '#dr-se'
};
document.addEventListener('keydown', function(e) {
const selector = movementKeys[e.key];
if (selector) {
const button = document.querySelector(selector);
if (button) {
button.click();
e.preventDefault();
}
}
});
})();