// ==UserScript==
// @name MoxxiMod
// @namespace https://studiomoxxi.com/
// @description one click at a time
// @author Ben
// @match *.outwar.com/*
// @version 4.5
// @grant GM_xmlhttpRequest
// @license MIT
// @grant GM_getResourceText
// @grant GM_addStyle
// @require http://code.jquery.com/jquery-3.6.0.min.js
// @downloadURL none
// ==/UserScript==
// change log
// added trustees link to RGA menu tab
// moved active skills bar to the right side of the screen
// added additional skills and pots to skills bar
// added damage information to boss raid page
// expanded crew boss raid page data
// added bounty board to PVP menu
// removed attack frame box until mob is attacked
// boss raid individual pages
if (document.URL.indexOf("boss_stats") != -1 ) {
let str = document.querySelector("#content-header-row > div > table")
str.innerHTML = str.innerHTML
.replace("Ancestral","Ancestral")
.replace("Tomb","Tomb")
.replace("Boon of Madness","Boon of Madness")
.replace("Tier 2 Booster Upgrade","Tier 2 Booster Upgrade")
.replace("8-Bit Banana","8-Bit Banana")
.replace("Augment of Vision","Augment of Vision")
.replace("Transcended Extract","Transcended Extract")
.replace("Prophecy Mail Reborn","Prophecy Mail Reborn")
.replace("Cord of Freezing Winds Reborn","Cord of Freezing Winds Reborn")
.replace("Soul of Blackhand Reborn","Soul of Blackhand Reborn")
.replace("Trinket of Aridity Reborn","Trinket of Aridity Reborn")
.replace("Interstellar Leggings Reborn","Interstellar Leggings Reborn")
.replace("Myrmidon Helm Reborn","Myrmidon Helm Reborn")
.replace("Blackhand Reborn","Blackhand Reborn")
.replace("Incredible Tower Shield Reborn","Incredible Tower Shield Reborn")
.replace("Ring of the Sea Reborn","Ring of the Sea Reborn")
.replace("Boots of the Eagle Reborn","Boots of the Eagle Reborn")
.replace("Core of Exalted Perfection","Core of Exalted Perfection")
.replace("Greathelm of Exalted Perfection","Greathelm of Exalted Perfection")
.replace("Brooch of Exalted Perfection","Brooch of Exalted Perfection")
.replace("Launcher of Exalted Perfection","Launcher of Exalted Perfection")
.replace("Cuirass of Exalted Perfection","Cuirass of Exalted Perfection")
.replace("Boon of Exalted Perfection","Boon of Exalted Perfection")
.replace("Link of Exalted Perfection","Link of Exalted Perfection")
.replace("Scales of Exalted Perfection","Scales of Exalted Perfection")
.replace("Twirl of Exalted Perfection","Twirl of Exalted Perfection")
.replace("Spurs of Exalted Perfection","Spurs of Exalted Perfection")
var deadCheck = document.querySelector("#content-header-row > div > table > tbody > tr:nth-child(1) > td:nth-child(3)").innerHTML;
if (deadCheck > 0){
var bossTableX = document.querySelector("#content-header-row > div > table");
var bossTableRowsX = bossTableX.rows.length;
function insertAfter(newNode, existingNode) {
existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling);
}
for (let rownumX = 1; rownumX < bossTableRowsX; rownumX++) {
GM_addStyle ( `
td:nth-of-type(3){display: none !important;}
#content-header-row > div > table > thead > tr > th:nth-child(3){width: 60% !important;}
.table td{border: 1px SOLID #0F0F0F !important;}
`);
let bossLootCnt = document.querySelector("#content-header-row > div > table > tbody > tr:nth-child("+rownumX+") > td:nth-child(3)").innerHTML
let bossLoot = document.querySelector("#content-header-row > div > table > tbody > tr:nth-child("+rownumX+") > td:nth-child(3)").outerHTML
bossLoot = "
"+bossLootCnt+"
"+bossLoot.replace(/
','808080'\)" onmouseout="kill\(\)">.*<\/td>/g,"").replaceAll(" ",", ").replaceAll(/No Items','808080'\)" onmouseout="kill\(\)">0/g,"");
let menu = document.querySelector("#content-header-row > div > table > tbody > tr:nth-child("+rownumX+")");
let td = document.createElement('td');
td.innerHTML = bossLoot;
insertAfter(td, menu.lastElementChild);
}}}
if (document.URL.indexOf("boss_stats") != -1 ) {
var bossName = document.querySelector("#content-header-row > h1").innerHTML
var lootCount = '';
if (bossName == "Cosmos, Great All Being")
lootCount = "50"
if (bossName == "Death, Reaper of Souls")
lootCount = "78"
if (bossName == "Maekrix, Dreaded Striker")
lootCount = "73"
if (bossName == "Blackhand Reborn")
lootCount = "61"
if (bossName == "Zyrak, Vision of Madness")
lootCount = "64"
var bossHP = '';
if (bossName == "Cosmos, Great All Being")
bossHP = "100000000000"
if (bossName == "Death, Reaper of Souls")
bossHP = "295000000000"
if (bossName == "Maekrix, Dreaded Striker")
bossHP = "320000000000"
if (bossName == "Blackhand Reborn")
bossHP = "570000000000"
if (bossName == "Zyrak, Vision of Madness")
bossHP = "1200000000000"
var bossTable = document.querySelector("#content-header-row > div > table");
var bossTableRows = bossTable.rows.length;
function insertAfter(newNode, existingNode) {
existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling);
}
var aliveCheck = document.querySelector("#content-header-row > div > table > tbody > tr:nth-child(1) > td:nth-child(3)").innerHTML;
if (aliveCheck < 1){
let menu = document.querySelector("#content-header-row > div > table > thead > tr");
let td1 = document.createElement('td');
td1.innerHTML = `
(.*) \(/g);
for (const BaseMatchLoop of BaseMatch) {
let BaseObj = [parseInt(BaseMatchLoop[1].replace(",","").replace(",","").replace(",",""))];
for (const BaseDmg of BaseObj) {
BaseDmgArray.push(BaseDmg);}}
var BaseNumbers = BaseDmgArray.map(Number)
var SumOfBase = BaseNumbers.reduce(reducer)
let td2 = document.createElement('td');
td2.innerHTML = Math.round(damage/SumOfBase*bossHP).toLocaleString("en-US");
insertAfter(td2, menu.children[2]);
const header = document.querySelector("#content-header-row > h5")
header.innerHTML = " Health Remaining: "+(bossHP-SumOfBase).toLocaleString("en-US")+" ("+((bossHP-SumOfBase)/bossHP*100).toFixed(3)+"%)"
}}}
// moxximod boss raid main page
if (document.URL.indexOf("crew_bossspawns") != -1 ) {
GM_addStyle ( `
#content-header-row > div.col-12.layout-spacing{display: none !important;}
`);
var bossCount = $('#divCollections > div.row > div').length
fetch("crew_profile")
.then(response => response.text())
.then((response) => {
var myCrew = response.match(/
.*<\/h2>/g)
var myCrewID = response.match(/href="\/crew_raidresults\.php\?crewid=(.*)">Raid Results<\/a>/i)
var bossHead = document.querySelector("#divHeader > h3")
bossHead.innerHTML = " Moxxi Mod Raid Results"
})
for (let bossNum = 1; bossNum < 1+bossCount; bossNum++) {
var bossLink = document.querySelector("#divCollections > div.row > div:nth-child("+bossNum+") > div > div > div.user-info.w-100.pr-3 > p.card-user_occupation > a")
var boss = '';
if (bossLink != null)
boss = document.querySelector("#divCollections > div.row > div:nth-child("+bossNum+") > div > div > div.user-info.w-100.pr-3 > p.card-user_occupation > a")
if (bossLink =! null){
fetch(boss)
.then(response => response.text())
.then((response) => {
var bossName = response.match(/
(.*)<\/h1>/i)
if (bossName != null){
var bossHP = '';
if (bossName[1] == "Cosmos, Great All Being")
bossHP = "100000000000"
if (bossName[1] == "Death, Reaper of Souls")
bossHP = "295000000000"
if (bossName[1] == "Maekrix, Dreaded Striker")
bossHP = "320000000000"
if (bossName[1] == "Blackhand Reborn")
bossHP = "570000000000"
if (bossName[1] == "Zyrak, Vision of Madness")
bossHP = "1200000000000"
var crew1 = response.match(/(.*)<\/font>.*[\n\r].*
(.*) \(.*\)<\/font>/i);
const reducer = (accumulator, curr) => accumulator + curr
var BaseDmgArray = [];
var BaseMatch = response.matchAll(/
'
+ ''
$('#rankings_crewboss').append(html);
isOdd = !isOdd;
});
isLoading = false;
$('#last-updated').html(' Last updated: ' + data.timestamp);
$('#ranks').show();
}, "json");
}
$( document ).ready(function() {
var selO = $('option[value="char_power"]');selectCategory('char_power', selO.html());
$( ".rank-sel2" ).change(function() {
if($( this ).val() == '')
return;
var isCrew = $( this ).attr('iscrew') == '1';
selectCategory($( this ).val(), $(this).find("option:selected").text(), isCrew);
});
});
}})}})}})}})}})}})}})}})};
// equipment injection
if ( document.URL.indexOf("outwar.com/home") != -1 ) {
GM_xmlhttpRequest ( {
method: 'GET',
url: 'https://torax.outwar.com/profile',
onload: function (responseDetails) {
const EQ = /
[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*/im;
const EQprint = EQ.exec(responseDetails.responseText);
function insertBefore(newNode, existingNode) {
let sp2 = document.querySelector("#content-header-row > div.bio.col-lg-8.col-md-8.col-sm-12.col-12.layout-spacing.layout-spacing > div.widget-content.widget-content-area.text-left > div > div > div:nth-child(1) > div > div:nth-child(1)");
existingNode.parentNode.insertBefore(newNode, sp2);
}
let menu = document.querySelector("#content-header-row > div.bio.col-lg-8.col-md-8.col-sm-12.col-12.layout-spacing.layout-spacing > div.widget-content.widget-content-area.text-left > div > div > div:nth-child(1) > div")
var homepageEQ =
'
' +
EQprint +
'
'
let div = document.createElement('div');
div.innerHTML += homepageEQ;
insertBefore(div, menu.children[0]);
}})};
if ( document.URL.indexOf("world") != -1 ) {
GM_xmlhttpRequest ( {
method: 'GET',
url: 'https://torax.outwar.com/profile',
onload: function (responseDetails) {
const EQ = /
[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*[\n\r].*/im;
const EQprint = EQ.exec(responseDetails.responseText);
var EQworld = document.querySelector("#content-header-row > div.col-xl-4.col-lg-12.col-md-12.col-sm-12.col-12.layout-spacing.px-1 > div > div.widget-heading");
EQworld.innerHTML =
'