This script allows you to use your right click for the abilities you usually use with spacebar. However it wont work for shield yet (working on it).
当前为
// ==UserScript==
// @name Gats.io right click for spacebar
// @version 2.0.7.1
// @description This script allows you to use your right click for the abilities you usually use with spacebar. However it wont work for shield yet (working on it).
// @author Rayan223
// @match https://gats.io
// @icon none
// @grant none
// @license MIT
// @namespace https://greasyfork.org/users/825882
// ==/UserScript==
var loaded = 0;
document.addEventListener('DOMContentLoaded', function(event) {
loaded = 1;
});
document.addEventListener('mousedown', function(event){
console.warn("clic");
if(event.which== 2 && loaded == 1){
console.warn('rightclic');
RF.list[0].socket.send('k,5,1');
}
});
document.addEventListener('mouseup', function(event){
if(event.which== 2 && loaded == 1){
RF.list[0].socket.send('k,5,0');
}
});
//window.oncontextmenu = function ()
//{
// dash();
// setTimeout(afterdash,50);
// return false;
//}
//function dash(){
// RF.list[0].socket.send('k,5,1');
//}
//function afterdash(){
// RF.list[0].socket.send('k,5,0');
//}