Forum | The Gate Mud
[Trick] Scorciatoie - Versione stampabile

+- Forum | The Gate Mud (https://forum.thegatemud.it)
+-- Forum: Zona OFF-GDR (https://forum.thegatemud.it/forumdisplay.php?fid=3)
+--- Forum: Web Client (https://forum.thegatemud.it/forumdisplay.php?fid=45)
+---- Forum: Archivio Bug WC (https://forum.thegatemud.it/forumdisplay.php?fid=46)
+---- Discussione: [Trick] Scorciatoie (/showthread.php?tid=1744)



[Trick] Scorciatoie - NighTiger - 18-03-2019

Ciao a tutti,

ho trovato un modo temporaneo per avere le scorciatoie.
I passaggi da fare sono questi:

1. Installare Tampermokey
2. Cliccare sull'icona e andare sulla "Dashboard"
3. Inserire questo codice:

Codice:
[code]
// ==UserScript==
// @name The Gate Mud
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://play.thegatemud.it/webclient
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
// ==/UserScript==

window.jQuery.noConflict();
window.jQuery(document).ready(function() {
window.jQuery(document).keyup(function (event) {
if (event.which == "113") {
window.jQuery('input[name="sendinput"]').val("grida Apri");
}
});
});
[/code]

In questo caso il numero 113 indica il pulsante F2 che scriverebbe "grida Apri",
nella textbox per WebClient.

Gli altri numeri dei pulsanti potete trovarli qui:
https://keycode.info/

Ovviamente per aggiungere più comandi dovete solamente ricopiare l'if, ad esempio:

Codice:
[code]
if (event.which == "112") {
window.jQuery('input[name="sendinput"]').val("prendi coltello calesse");
}
if (event.which == "114") {
window.jQuery('input[name="sendinput"]').val("sospira");
}
[/code]
Se volete disabilitare le scorciatoie perché avete fatto qualche casotto basta cliccare sull'icona di Tampermokey e cliccare su "Disable"

Se avete delle domande.... domandate!