您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Let all skill slots automated...
当前为
// ==UserScript== // @name StarrFantasyEnhanced // @name:zh-CN StarrFantasyEnhanced // @namespace [email protected] // @author rusyue // @icon https://rusyue.com/images/avatar.png // @description Let all skill slots automated... // @description:zh-cn 让所有技能都能自动使用 // @include *://www.starrfantasy.com/* // @version 1.0.0 // @grant none // @run-at document-end // ==/UserScript== (async function() { 'use strict'; try { let message = await gameLoading(); let hotbarItems = document.querySelectorAll('.hotbarItemOuter'); console.log(message); hotbarItems.forEach((el, idx) => { /[2-9]/.test(idx) && el.classList.add('autobattleSlot'); }); } catch (err) { console.log(err); } }()); function gameLoading() { return new Promise((resolve, reject) => { let loading = document.querySelector('#loadingOverlay'); let times = 1; let timer = setInterval(() => { if (loading !== null) { loading = document.querySelector('#loadingOverlay'); console.log(`StarrFantasyEnhanced: Game loading... | Retrying: ${times} | Time: ${new Date().toLocaleTimeString()}`); if (times++ > 19) { clearInterval(timer); return reject('StarrFantasyEnhanced: Game failed to load, please try again later.'); } } else { clearInterval(timer); return resolve('StarrFantasyEnhanced: Game loading completed!'); } }, 6000); }); }