GC Questing Keyboard Controls

Adds keyboard controls for questing on GC.

目前為 2024-02-05 提交的版本,檢視 最新版本

    // ==UserScript==
    // @name         GC Questing Keyboard Controls
    // @namespace    http://tampermonkey.net/
    // @version      1.0
    // @description  Adds keyboard controls for questing on GC.
    // @author       Z
    // @match        https://www.grundos.cafe/halloween/esophagor/*
    // @match        https://www.grundos.cafe/island/kitchen/*
    // @match        https://www.grundos.cafe/winter/snowfaerie/*
    // @match        https://www.grundos.cafe/halloween/witchtower/*
    // @match        https://www.grundos.cafe/safetydeposit/*
    // @license     MIT
    // @icon         https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
    // ==/UserScript==

    var start = document.querySelector("input[value='Sure I will find you food']", "input[value='Sure I will help!']", "input[value='I will help you!']", "input[value='Erm... OK then']");
    var itemOne = document.querySelector(".itemList .shop-item:nth-child(1) img.search-helper-sdb-exists");
    var wizOne = document.querySelector(".itemList .shop-item:nth-child(1) img.search-helper-sw");
    var itemTwo = document.querySelector(".itemList .shop-item:nth-child(2) img.search-helper-sdb-exists");
    var wizTwo = document.querySelector(".itemList .shop-item:nth-child(2) img.search-helper-sw");
    var itemThree = document.querySelector(".itemList .shop-item:nth-child(3) img.search-helper-sdb-exists");
    var wizThree = document.querySelector(".itemList .shop-item:nth-child(3) img.search-helper-sw");
    var itemFour = document.querySelector(".itemList .shop-item:nth-child(4) img.search-helper-sdb-exists");
    var wizFour = document.querySelector(".itemList .shop-item:nth-child(4) img.search-helper-sw");
    var rmOne = document.querySelector("a.sdb-remove-one-text");
    var done = document.querySelector("input[value='I have your food!']", "input[value='I have the ingredients!']");
    var restart = document.querySelector("input[value='Approach the Esophagor again...']", "input[value='Approach the Chef Again']", "input[value='Approach Taelia again...']", "input[value='Approach the witch again...']");


    document.addEventListener("keydown", (event) => {
          if (event.keyCode == 13) { // enter
            if (start != null) {
                start.click();
            } else if (rmOne != null) {
                rmOne.click();
            } else if (done != null) {
                done.click();
            } else if (restart != null) {
                restart.click();
            }
          }
        });

 document.addEventListener("keydown", (event) => {
          if (event.keyCode == 37) { // left arrow
            if (itemOne != null) {
                itemOne.click();
            } else (wizOne != null); {
                wizOne.click();
            }
          }
        });
document.addEventListener("keydown", (event) => {
          if (event.keyCode == 38) { // up arrow
            if (itemTwo != null) {
                itemTwo.click();
            } else (wizTwo != null); {
                wizTwo.click();
            }
          }
        });
document.addEventListener("keydown", (event) => {
          if (event.keyCode == 39) { // right arrow
            if (itemThree != null) {
                itemThree.click();
            } else (wizThree != null); {
                wizThree.click();
            }
          }
        });
document.addEventListener("keydown", (event) => {
          if (event.keyCode == 40) { // down arrow
            if (itemFour != null) {
                itemFour.click();
            } else (wizFour != null); {
                wizFour.click();
            }
          }
        });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址