您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically strifes on the Overseer project.
当前为
// ==UserScript== // @name Autostrife // @namespace http://gigapause.com/ // @version 0.7 // @description Automatically strifes on the Overseer project. // @author capableResistor // @grant none // @match http://*.theoverseerproject.com/striferesolve.php // @match http://*.theoverseerproject.com/strifebegin.php // @match http://*.theoverseerproject.com/strife.php // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js // ==/UserScript== function strife(){ if($('#aspect').length){ createInput(); var healthcontainer = $('.pined'); var encountercontainer = $('.c3'); var health = healthcontainer.html(); var encounters = encountercontainer.html(); health = health.replace( /^\D+/g, ''); health = health.replace('%',''); encounters = encounters.replace( /^\D+/g, ''); document.title = "H: " + Number(health) + "%" + " E: " + Number(encounters) + ". Overseer"; if (getCookie('autostrife') === "") { console.log("====> Autostrife cookie not set. Not autostrifing."); } else if (getCookie('autostrife') == "doStrife" || getCookie('autostrife') == "doGrind") { if(Number(health) < 20 && getCookie('autostrife') == "doStrife") { //abscond(); console.log("====> Too dangerous to autostrife (Health below 20%). Manual intervention required."); } else { attack(); } if (Number(health) < 5 && getCookie('autostrife') == "doGrind") { console.log("====> Looks like you're in trouble. Get healed above 5% before you attempt grinding and sure you're taking on enemies you're very sure you can defeat easily."); } else { attack(); } } else { console.log("====> Error: Cookie setting mismatch. Resetting cookie."); unsetCookie('autostrife'); } } else if ($('#canner a').length > 0 && $.trim($('#canner a').text()) == "Strife again" && getCookie('autostrife') == "doStrife") { console.log("====> Strife concluded."); unsetCookie('autostrife'); } else if ($('#canner a').length > 0 && $.trim($('#canner a').text()) == "Strife again" && getCookie('autostrife') == "doGrind") { console.log("====> Strife concluded, but grind mode is on."); window.location.href = 'strife.php'; } else if ($('input[type="submit"][value="Fight these enemies again!"]').length && getCookie('autostrife') == "doGrind") { console.log("====> On strife init page, and autoGrind is on."); var encountercontainer2 = $('.c3'); var encounters2 = encountercontainer2.html(); encounters2 = encounters2.replace( /^\D+/g, ''); if (Number(encounters2) <= 0) { console.log("====> However, there are no encounters left. Grinding is over."); unsetCookie('autostrife'); } else { console.log("====> We have " + Number(encounters2) + " enounter(s) to work with."); initiate(); } } else { console.log("====> Nothing to do right now."); } } function setCookie(cname, cvalue, exdays){ var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } function unsetCookie(cname){ document.cookie = cname + "=''; expires=-1"; } function getCookie(cname){ var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i<ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) != -1) return c.substring(name.length,c.length); } return ""; } function createInput(){ var atbutton = $('input[type="submit"][value="Abscond"]'); atbutton.after($('</br><input type="button" id="autostrife" name="astrife" value="autoStrife();"><input type="button" id="autogrind" name="agrind" value="autoGrind();"><input type="button" id="stop" name="stop" value="stop();">')); document.getElementById('autostrife').addEventListener("click", autoStrife, false); document.getElementById('autogrind').addEventListener("click", autoGrind, false); document.getElementById('stop').addEventListener("click", stop, false); } function attack(){ var atbutton = $('input[type="submit"][value="Attack"]'); atbutton.trigger("click"); } function abscond(){ var abbutton = $('input[type="submit"][value="Abscond"]'); abbutton.trigger("click"); } function initiate(){ var lastbutton = $('input[type="submit"][value="Fight these enemies again!"]'); lastbutton.trigger("click"); } function autoStrife(){ setCookie('autostrife', 'doStrife', '1'); window.location.href = 'strife.php'; } function autoGrind(){ setCookie('autostrife', 'doGrind', '7'); window.location.href = 'strife.php'; } function stop(){ unsetCookie('autostrife'); } setTimeout( strife(), 3000 );
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址