Gats.io right click for spacebar

This script allows you to use your right click for the abilities you usually use with spacebar. However it wont work for shield (working on it).

目前為 2021-10-23 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Gats.io right click for spacebar
// @version      2.2.06
// @description  This script allows you to use your right click for the abilities you usually use with spacebar. However it wont work for shield (working on it).
// @author       Rayan223
// @match        https://gats.io/
// @icon         none
// @grant        none
// @namespace https://greasyforks.org/users/825882
// ==/UserScript==

var numberdash = 0;
var shieldmode = 0;
let infinite = 9999999999999999;
let ondash;

window.oncontextmenu = function ()
{
    dash();
    ++numberdash
    if (numberdash>1){
        shieldmode = 1
        ondash = setTimeout(donothing,infinite);
    }
    console.log(numberdash)
    setTimeout(afterdash,250);
    shieldmode = 0
    numberdash = 0
    return false;
}

window.onclick = function(){
    numberdash = 0
    clearTimeout(ondash);
    console.log("shield ended")
}

function dash(){
    RF.list[0].socket.send('k,5,1');
}

function afterdash(){
    RF.list[0].socket.send('k,5,0');
}

function donothing(){}
长期地址
遇到问题?请前往 GitHub 提 Issues。