GC Questing Keyboard Controls

Adds keyboard controls for questing on GC.

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

    // ==UserScript==
    // @name         GC Questing Keyboard Controls
    // @namespace    http://tampermonkey.net/
    // @version      1.2
    // @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/halloween/braintree/*
    // @match        https://www.grundos.cafe/safetydeposit/*
    // @license     MIT
    // @icon         https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
    // ==/UserScript==

    // lol sorry for this if u can read it, it'll eventually be less .... like this

    var rmOne = document.querySelector("a.sdb-remove-one-text");
    var esoStart = document.querySelector("input[value='Sure I will find you food']");
    var chefStart = document.querySelector("input[value='Sure, I will help!']");
    var snowStart = document.querySelector("input[value='I will help you!']");
    var ednaStart = document.querySelector("input[value='Erm... OK then']");
    var brainStart = document.querySelector("input[value='Accept the Quest']");
    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 esdDone = document.querySelector("input[value='I have your food!']");
    var chefDone = document.querySelector("input[value='I have the ingredients!']");
    var snowDone = document.querySelector("input[value='I have the ingredients!']");
    var ednaDone = document.querySelector("input[value='I have the ingredients!']");
    var brainDone = document.querySelector("input[value='Submit Answer']");
    var esoRestart = document.querySelector("input[value='Approach the Esophagor again...']");
    var chefRestart = document.querySelector("input[value='Approach the Chef Again']");
    var snowRestart = document.querySelector( "input[value='Approach Taelia again...']");
    var ednaestart = document.querySelector("input[value='Approach the witch again...']");

    document.addEventListener("keydown", (event) => {
          if (event.keyCode == 13) { // enter
            if (esoStart != null) {
                esoStart.click();
            } else if (brainStart != null) {
              brainStart.click();
            } else if (chefStart != null) {
              chefStart.click();
            } else if (snowStart != null) {
              snowStart.click();
            } else if (ednaStart != null) {
              ednaStart.click();
            } else if (rmOne != null) {
                rmOne.click();
            } else if (esoDone != null) {
                esoDone.click();
            } else if (brainDone != null) {
              brainDone.click();
            } else if (chefDone != null) {
              chefDone.click();
            } else if (snowDone != null) {
              snowDone.click();
            } else if (ednaDone != null) {
              ednaDone.click();
            } else if (esoRestart != null) {
              esoRestart.click();
            } else if (chefRestart != null) {
              chefRestart.click();
            } else if (snowRestart != null) {
              snowRestart.click();
            } else if (ednaRestart != null) {
              ednaRestart.click();
            }
          }
        });

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

QingJ © 2025

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