您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
适用于某个场景下的自动答题
当前为
// ==UserScript== // @name 自动答题 // @namespace http://tampermonkey.net/ // @version 0.3.4 // @description 适用于某个场景下的自动答题 // @author 蓝色灭火器 // @match https://www.wizard101.com/quiz/trivia/game/* // @icon https://www.google.com/s2/favicons?domain=www.wizard101.com // @grant none // @license MIT // @require https://gf.qytechs.cn/scripts/446167-quiz-answer/code/quiz_answer.js?version=1058799 // ==/UserScript== (function() { var timer var questions = window.questions var prve = '' var alertAble = true var index = 0 // console.log(questions) // 找答案 function findAnswer(){ let quiz = document.getElementsByClassName('quizQuestion') let title = quiz.length > 0 ? quiz[0].innerHTML : '' let answerr = questions[title] if(answerr){ alertAble = true return answerr || '' }else{ if(alertAble){ alertAble = false alert('没找到答案,请尝试wizard101和部分pirate101题目') } return '' } } // 选答案并提交 function answer(answerVal){ let quiz = document.getElementsByClassName('quizQuestion') let title = quiz.length > 0 ? quiz[0].innerHTML : '' if(prve === title){ //题目没有提交完成 console.log('......') return } if(answerVal === ''){ // console.log('未找到答案...') return } let answerText = document.getElementsByClassName('answerText') let largecheckbox = document.getElementsByClassName('largecheckbox') for (let i = 0; i < answerText.length; i++) { let answerTextt = answerText[i]?.innerHTML.trim() let answerVall = answerVal.trim() if(answerTextt === answerVall){ console.log('※答案※') console.log(`[${answerVal}]`) // console.log(answerTextt) // console.log(answerVall) largecheckbox[i].classList.replace('largecheckbox','largecheckboxselected') setTimeout(()=>{ window.selectQuizAnswer(document.getElementsByClassName('largecheckboxselected')[0]) window.updateQuiz(); },1500) if(index >= 10){ clearInterval(timer) index = 0 } let quiz = document.getElementsByClassName('quizQuestion') let title = quiz.length > 0 ? quiz[0].innerHTML : '' prve = title } } } timer = setInterval(function () { if(document.getElementsByClassName('quizQuestion').length === 0){ console.log('答题完毕或未开始') return } console.log('一切正常,冲冲冲!!!') answer(findAnswer()) },1000) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址