您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
gladiatus auto dungeon
当前为
// ==UserScript== // @name Gladiatus Auto Dungeon click // @description gladiatus auto dungeon // @include https://s*.gladiatus.gameforge.*/game/index.php?mod=dungeon* // @include https://s*.gladiatus.gameforge.*/game/index.php?mod=reports&submod=showCombatReport*t=1* // @author ZaharX97 // @version 0.94 // @namespace https://greasyfork.org/users/104906 // ==/UserScript== window.addEventListener("load", main); var sRuntime = Date.now(); var eRuntime; function main () { var elemLink, dungeonLink, time, x, elemFights, elemDungeons; elemLink = document.getElementsByClassName("cooldown_bar_link"); dungeonLink = elemLink[1].href; time = getRemainingTime(); if(isNaN(time)){ if(window.location.href != dungeonLink){ x = getRndInteger( 0, 2899 ); setTimeout(function(){ console.log("[GAD]: going to dungeon"); window.location.assign(dungeonLink); }, 2510 + x); eRuntime = Date.now() - sRuntime; console.log("[GAD] runtime: " + eRuntime + "ms" ); return; } elemFights = document.getElementsByTagName("area"); //console.log("fights length= " + elemFights.length ); x = getRndInteger( 0, 3281 ); if(elemFights.length) setTimeout( function(){ clickNextFight(elemFights[elemFights.length - 1]); }, x); else{ elemDungeons = document.getElementsByClassName("button1"); for(var i = elemDungeons.length - 1 ; i >= 0 ; i--) if( elemDungeons[i].type == "submit" ){ setTimeout( function(){ clickNextFight(elemDungeons[i]); }, x); eRuntime = Date.now() - sRuntime; console.log("[GAD] runtime: " + eRuntime + "ms" ); return; } } } else{ setTimeout( function(){ console.log( "[GAD]: " + time + " passed, going to dungeon" ); window.location.assign(dungeonLink); }, time ); eRuntime = Date.now() - sRuntime; console.log("[GAD] runtime: " + eRuntime + "ms" ); return; } } function getRemainingTime(){ var elemTime, timeText, x, time; elemTime = document.getElementById("cooldown_bar_text_dungeon"); timeText = elemTime.innerText; x = getRndInteger( 1, 4 ); time = timeText[0]*3600 + timeText[2]*10*60 + timeText[3]*60 + timeText[5]*10 + timeText[6]*1 + x*1; //console.log( timeText[0]*3600 + " " + timeText[2]*10*60 + " " + timeText[3]*60 + " " + timeText[5]*10 + " " + timeText[6] + " " + x + " timp= " + time); time = time*1000; console.log( "[GAD]: going to dungeon in " + time + "ms" ); return time; } function clickNextFight(elemFight){ elemFight.click(); } function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min; }