// ==UserScript==
// @name Gladiatus Tools
// @namespace https://greasyfork.org/users/904482
// @version 0.0.7
// @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==
if (
window.location.search.split("&")[0] == "?mod=guildMarket" &&
window.location.search.split("&")[1] != "submod=control"
) {
MarketHelps();
} else if (
window.location.search.split("&")[0] == "?mod=guildMarket" &&
window.location.search.split("&")[1] == "submod=control"
) {
//comming soon
} else if (window.location.search.split("&")[0] == "?mod=auction") {
AcutionHouseTools();
} else if (
window.location.search.split("&")[0] == "?mod=forge" &&
window.location.search.split("&")[1] == "submod=smeltery"
) {
SmelteryTimeSaverExtension();
}
Menu();
autoGuardarOro();
function Menu(){
let header_game = document.getElementById("header_game");
header_game.insertAdjacentHTML(
"beforeend",
`
`
);
timeSaver();
}
function Notificaciones(){
}
function timeSaver() {
function menu(){
let menu = document.getElementById("GladiatusToolsMenu");
menu.insertAdjacentHTML(
"beforeend",
`
`);
}
if(document.getElementsByClassName("auto-settings")[0] =! undefined){
console.log("sadsad")
}
function apagar(){
let botonPlay = timeSaver.children[3];
if (botonPlay.classList[2] == "show") {
//bot desactivado
botonPlay.click();
}
}
}
function autoGuardarOro() {
let oro = parseFloat(document.getElementById("sstat_gold_val").textContent);
let ObjetosMercado, elements, elementsArray, elementsOnlyTR = [], itemsCanBuy = [];
var dobleClickEvent = document.createEvent ('MouseEvents');
dobleClickEvent.initEvent ('dblclick', true, true);
if (
window.location.search.split("&")[0] == "?mod=guildMarket" &&
window.location.search.split("&")[1] != "submod=control"
) {
ObjetosMercado = document.getElementById("market_item_table").children[0];
elements = document.getElementById("market_item_table").children[0];
elementsArray = [].slice.call(elements.children);
for (let index = 0; index < elementsArray.length; index++) {
let element = elementsArray[index];
if (element.tagName == "TR") {
elementsOnlyTR.push(element)
}
}
for (let item of elementsOnlyTR) {
if (item.children[0].children[0] != undefined) {
itemsCanBuy.push(item)
}
}
}
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;
})
window.addEventListener("load", () => {
if (document.getElementById("mmonetbar") != undefined && JSON.parse(localStorage.NotificarOro) == true) {
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",
`