// ==UserScript== // @name Gladiatus Tools // @namespace https://greasyfork.org/users/904482 // @version 0.1.5 // @description Set of tools and aids for the game Gladiatus // @author lpachecob // @grant none // @match *.gladiatus.gameforge.com/game/index.php* // @icon https://lobby.gladiatus.gameforge.com/favicon.ico // @license MIT // @downloadURL none // ==/UserScript== const URL = window.location.search.split("&") const mainMenu = document.getElementById("mainmenu"); if (URL[0] == "?mod=guildMarket" && URL[1] != "submod=control") { MarketHelps(); } else if (URL[0] == "?mod=guildMarket" && URL[1] == "submod=control") { //comming soon } else if (URL[0] == "?mod=auction") { AcutionHouseTools(); } else if (URL[0] == "?mod=forge" && URL[1] == "submod=smeltery") { SmelteryTimeSaverExtension(); } else if (URL[0] == "?mod=forge" && URL[1] == "submod=forge") { Herreria(); }else if(URL[0] == "?mod=packages"){ Paquetes(); } window.addEventListener("load",()=>{ Menu.Dibujar(); }); document.addEventListener('keyup', (e)=>{ /* por se desa usar la combinacion con control if (e.ctrlKey && e.key === '}') { console.log("backlash") } */ if (e.key === 'q') { let timeSaver = document.getElementsByClassName("auto-settings")[0] let botonPlay = timeSaver.children[3]; if (botonPlay.classList[2] == "show") { //bot desactivado botonPlay.click(); } } }, false); class Menu{ static Dibujar(){ document.body.insertAdjacentHTML("afterbegin",` `); let menuOpen = document.getElementById("MenuOpen"); menuOpen.addEventListener("click", Menu.openNav); let closeMenu = document.getElementById("CloseMenu"); closeMenu.addEventListener("click", Menu.closeNav); document.addEventListener('mouseup', function(e) { var container = document.getElementById("menuSidenav"); if (!container.contains(e.target)) { container.style.display = 'none'; } }); Configuracion.Notificaciones(); } static openNav() { document.getElementById("menuSidenav").style.display = "block"; } static closeNav() { document.getElementById("menuSidenav").style.display = "none"; } } class Configuracion{ static Notificaciones(){ let oro = parseFloat(document.getElementById("sstat_gold_val").textContent); let NotificarOro = document.getElementById("NotificarOro"); //.checked indica si está activo o no if (JSON.parse(localStorage.NotificarOro) == undefined) { localStorage.NotificarOro = NotificarOro.checked } else { NotificarOro.checked = JSON.parse(localStorage.NotificarOro); } NotificarOro.addEventListener("change", () => { localStorage.NotificarOro = NotificarOro.checked; }) if (JSON.parse(localStorage.NotificarOro) == true) { console.log("aqui") if (oro > 50.000) { let mensaje = ""; if (Math.floor(oro / 50.000) >= 2) { mensaje += `Empaqueta ` + Math.floor(oro / 50.000) + ` rotativos de 50k ` } else if (Math.floor(oro / 50.000) == 1) { mensaje += `Empaqueta ` + Math.floor(oro / 50.000) + ` rotativo de 50k ` } if (Math.floor(oro / 100.000) >= 2) { mensaje += `Empaqueta ` + Math.floor(oro / 100.000) + ` rotativos de 100k ` } else if (Math.floor(oro / 100.000) == 1) { mensaje += `Empaqueta ` + Math.floor(oro / 100.000) + ` rotativo de 100k ` } if (Math.floor(oro / 200.000) >= 2) { mensaje += `Empaqueta ` + Math.floor(oro / 200.000) + ` rotativos de 100k ` } else if (Math.floor(oro / 200.000) == 1) { mensaje += `Empaqueta ` + Math.floor(oro / 200.000) + ` rotativo de 200k ` } if (Math.floor(oro / 500.000) >= 2) { mensaje += `Empaqueta ` + Math.floor(oro / 500.000) + ` rotativos de 100k ` } else if (Math.floor(oro / 500.000) == 1) { mensaje += `Empaqueta ` + Math.floor(oro / 500.000) + ` rotativo de 500k ` } if (Math.floor(oro / 1000.000) >= 2) { mensaje += `Empaqueta ` + Math.floor(oro / 1000.000) + ` rotativos de 100k ` } else if (Math.floor(oro / 1000.000) == 1) { mensaje += `Empaqueta ` + Math.floor(oro / 1000.000) + ` rotativo de 1kk ` } if (mensaje != "") { document.getElementById("mmonetbar").insertAdjacentHTML( "beforeend", `
` + mensaje + `