您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
循环学习、参加考试、使用装备
当前为
// ==UserScript== // @name Gooboo辅助 // @license MIT // @namespace http://tampermonkey.net/ // @homepage http://greasyfork.icu/zh-CN/scripts/481441-gooboo辅助 // @version 1.1 // @description 循环学习、参加考试、使用装备 // @author jasmineamber // @match https://gityxs.github.io/gooboo/ // @icon https://www.google.com/s2/favicons?sz=64&domain=github.io // @grant GM_registerMenuCommand // ==/UserScript== (function() { 'use strict'; function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } function auto_writing() { let id id = setInterval(function() { let input = document.querySelector(".answer-input input") let text = '' let nodes = document.querySelector(".question-text .mx-2") if (nodes == null) { clearInterval(id); return } nodes = nodes.querySelectorAll("span") for (let i of nodes) { text += i.innerText } input.value = text input.dispatchEvent(new Event('input')) }, 200) } let id_writing async function study(is_first=false) { let target = [...document.querySelectorAll(".v-card__title")].find(item => item.innerText === "文学") if (!target) { if (is_first) { alert("请解锁文学科目后再使用") clearInterval(id_writing); } return } let btn_writing = [...target.parentNode.querySelectorAll(".v-btn__content")].find(item => item.innerText === "学习") if (btn_writing) { btn_writing.click() await sleep(2000) auto_writing() } id_writing = setInterval(study, 5000) } GM_registerMenuCommand("【学校】开始学习", async function() { await study(true) }, "1") GM_registerMenuCommand("【学校】停止学习", function() { clearInterval(id_writing); }, "2") GM_registerMenuCommand("【学校】参加考试", async function() { let target = [...document.querySelectorAll(".v-card__title")].find(item => item.innerText === "文学") if (!target) { alert("请解锁文学科目后再使用") return } let id let btn_exam = [...target.parentNode.querySelectorAll(".v-btn__content")].find(item => item.innerText === "参加考试") if (btn_exam) { btn_exam.click() await sleep(2000) auto_writing() } }, "3") GM_registerMenuCommand("【部落】自动攻击", async function() { let id id = setInterval(function() { let skill_bar = document.querySelector("html body div#app.v-application.game-app.v-application--is-ltr.theme--light.background-theme-default.css-shadow-2 div.v-application--wrap main.v-main div.v-main__wrap div div.row.no-gutters div.scroll-container-tab.col.col-6 div.ma-1 div.row.no-gutters div.col-sm-6.col-12 div.d-flex.flex-wrap.ma-1.mb-2.pa-1.v-card.v-sheet.theme--light"); //let btn_knock = document.querySelector(".mdi-octagram-outline") //let btn_knife = document.querySelector(".mdi-knife-military") if (skill_bar == null) { clearInterval(id); return } let skills = skill_bar.querySelectorAll(".v-icon"); [...skills].forEach(item => { item.click() sleep() }) }, 1000) }, "a") })();