/,'').replace('',''));
let multiplier = gems == 3 ? 0.15 : gems == 2 ? 0.3225 : gems == 1 ? 0.520875 : gems == 0 ? 0.74900625 : 0;
if (charclass == "Monster"){ multiplier *= 1.1; }
else if (charclass == "Pop Star"){ multiplier *= 1.05; };
mrFromGems += (itemMr * multiplier);
missingGems -= gems
const upgrades = await info("Cost to Gem");
costToGem += upgrades[rarity][gems];
};
};
const maxMr = Math.ceil(mrFromGems) + parseInt(mr.replace(/,/g,'')) + available;
const perPoint = missingGems == 0 ? 0 : Math.ceil(mrFromGems/costToGem)
rows.push(`
${i.static}
${charclass} |
${mr} |
${upgraded.toLocaleString()} |
${available.toLocaleString()} |
${missingGems} |
${(Math.ceil(mrFromGems) + available).toLocaleString()} |
${costToGem.toLocaleString()} |
${maxMr.toLocaleString()} |
${perPoint} |
`);
};
await Promise.all(array.map(table));
document.querySelector("#mvContent").innerHTML = `
char |
rga |
lvl |
class |
max rage |
char upgrades |
upgrades available
| missing gems |
max gains |
full gem cost |
mr if maxed |
mr per point |
${rows.join('')}
`
await sortableTables();
if (!string.match('Full')){ await mvNotSpecial("MAX RAGE") };
document.querySelector("#loadingDiv").remove();
};
async function mvEvents(rgas,event,string){
const peram = event == "WAR OF ZHUL" ? "woz" : "top"
const qItemLong = event == "WAR OF ZHUL" ? "Summoning Shard" : "Trial Insignia"
const qItemShort = event == "WAR OF ZHUL" ? "shards" : "insignias"
const qItemImg = event == "WAR OF ZHUL" ? "images/warshard.jpg" : "images/items/trialinsignia.jpg"
let runsLeft;
const eventPage = await superfetch(`event?eventid=${peram}`);
if (eventPage.match('START COUNTDOWN')){
runsLeft = 31;
} else {
const timer = parseInt(eventPage.match(/countdown = ([0-9]+)/i)[1])*1000;
const now = ((new Date().getTime()) - 18000000);
runsLeft = (timer-now)/3600000/10.8;
};
if (!string.match('Full')){ rgas = rgas.slice(0, 2) };
const endpoints = ['profile','ajax/backpackcontents.php?tab=quest','ajax/backpackcontents.php?tab=potion'];
const array = await mvFetch(rgas,endpoints);
const rows = [];
const regex = new RegExp(`data-itemidqty="[0-9]+" data-name="${qItemLong}"`);
const table = async (i) => {
const fury = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Recharge the Fury"/i) || [0,0])[1]);
const spark = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Spark the Fury"/i) || [0,0])[1]);
const elepot = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Potion of Elemental Resistance"/i) || [0,0])[1]);
const kixpot = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Kix Potion"/i) || [0,0])[1]);
const amdirpot = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Potion of Amdir"/i) || [0,0])[1]);
const squidpot = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Squidberry Juice"/i) || [0,0])[1]);
const wonderlandpot = parseInt((i.potion.match(/data-itemidqty="([0-9]+)" data-name="Wonderland Potion"/i) || [0,0])[1]);
const refills = fury + (spark/2);
const qitem = parseInt((i.quest.match(regex) || '0').toString().match(/[0-9]+/i));
const mr = parseInt(i.profile.replace(/,/g,'').match(/Maximum:<\/b><\/td>(.*?)<\/td><\/tr>/i)[1]);
const rpt = parseInt(i.profile.replace(/,/g,'').match(/ ${fury} |
${spark} |
${elepot} |
${kixpot} |
${amdirpot} |
${squidpot} |
${wonderlandpot} |
${qitem} |
${mr.toLocaleString()} |
${rpt.toLocaleString()} |
${Math.ceil(runsLeft*(mr+rpt)/20000+qitem)} |
|
${Math.ceil(refills*mr/20000) + Math.ceil(runsLeft*(mr+rpt)/20000+qitem)} |
`);
};
await Promise.all(array.map(table));
document.querySelector("#mvContent").innerHTML = `
char |
rga |
lvl |
 |
 |
 |
 |
 |
 |
 |
 |
max rage |
rpt |
proj tot ${qItemShort} |
furys to use |
new proj ${qItemShort} |
${rows.join('')}
`
const furyInput = Array.from(document.querySelectorAll(".fury-math-input"));
for (let i = 0; i < furyInput.length; i++) {
furyInput[i].addEventListener('input',async function(){
const cellInput = parseFloat(this.value);
const cellOutput = this.parentNode.parentNode.querySelector('.fury-math-output');
const cellMaxRage = parseInt(this.parentNode.parentNode.querySelector('.max-rage').innerHTML.replace(/,/g,''));
const cellQItem = parseInt(this.parentNode.parentNode.querySelector('.projected-qitem').innerHTML.replace(/,/g,''));
cellOutput.innerHTML = Math.ceil(((cellInput*cellMaxRage)/20000) + cellQItem);
});
};
await sortableTables();
if (!string.match('Full')){ await mvNotSpecial(event) };
document.querySelector("#loadingDiv").remove();
};
async function mvHolidays(rgas,string){
if (!string.match('Full')){ rgas = rgas.slice(0, 2) };
const endpoints = ['profile','ajax/backpackcontents.php?tab=quest'];
const array = await mvFetch(rgas,endpoints);
const rows = [];
const table = async (i) => {
const mr = i.profile.match(/Maximum:<\/b><\/td>(.*?)<\/td><\/tr>/i)[1];
const rpt = i.profile.match(/
${i.static}
| ${mr} |
${rpt} |
${components} |
${canes} |
`);
};
await Promise.all(array.map(table));
document.querySelector("#mvContent").innerHTML = `
char |
rga |
lvl |
max rage |
rpt |
 |
 |
${rows.join('')}
`
await sortableTables();
if (!string.match('Full')){ await mvNotSpecial("HOLIDAYS") };
document.querySelector("#loadingDiv").remove();
}
async function mvFetch(rgas,endpoints){
const loadingDiv = document.createElement("div");
loadingDiv.innerHTML = `loading
⧖`
loadingDiv.id = "loadingDiv"
document.body.appendChild(loadingDiv);
const array = [];
const fetch = async (endpoint) => {
for (let i = 0; i < rgas.length; i++) {
const key = endpoint.match(/[a-zA-Z]{2,}(?![a-zA-Z])/g)?.pop();
const login = rgas[i][0]
const url = endpoint.match(/\?/i) ? endpoint.replace(/\?/i,`?${login}&`) : `${endpoint}?${login}`
const data = await superfetch(`${url}`);
if (!array[i]) { array[i] = {} };
if (!array[i].static) { array[i].static = `${rgas[i][3]} | ${rgas[i][1]} | ${rgas[i][4]} | `}
array[i][key] = data;
};
};
await Promise.all(endpoints.map(fetch));
return array;
};
async function mvItemSpec(itemid){
const item = (await superfetch(`item_rollover.php?id=${itemid}`)).replace(/ \(\+[0-9]+\)<\/span>/g,'').replace(//g,'').replace(/,|%/g,'');
const slot = (item.match(/\[Slot - (.*?)\]
/i) || ['','slot unknown'])[1].toLowerCase();
const img = itemid > 0 ? ` /i) || ['',''])[1]}" onmouseover="itempopup(event,'${itemid}')" onmouseout="kill()"> | ` : ' | ';
const name = '' + (item.match(/>(.*?)<\/td><\/tr>/i) || ['',''])[1].replace('td colspan="2"','a')+' | ';
const cloned = item.match(/\[Cloned: .*?\]/i) ? true : false;
const augs = '' + (item.match(/src="[^"]*" ONMOUSEOVER="itempopup\(event'[0-9]+_[0-9]+'\)"/g) || []).map(i => ` `).join('') + ' | ';
const openaugs = item.match(/\/images\/augslot\.jpg/) ? item.match(/\/images\/augslot\.jpg/g).length : 0;
const gems = '' +(4-((item.match(/src="\/images\/gemslot2\.jpg"/g) || []).length)) + ' | ';
const atk = '' + parseInt((item.match(/\+([0-9]+) ATK /i) || [0,0])[1]).toLocaleString() + ' | ';
const hp = '' + parseInt((item.match(/\+([0-9]+) HP /i) || [0,0])[1]).toLocaleString() + ' | ';
const ele1 = parseInt((item.match(/\+([0-9]+) Holy<\/span>/i) || [0,0])[1]);
const ele2 = parseInt((item.match(/\+([0-9]+) Arcane<\/span>/i) || [0,0])[1]);
const ele3 = parseInt((item.match(/\+([0-9]+) Shadow<\/span>/i) || [0,0])[1]);
const ele4 = parseInt((item.match(/\+([0-9]+) Fire<\/span>/i) || [0,0])[1]);
const ele5 = parseInt((item.match(/\+([0-9]+) Kinetic<\/span>/i) || [0,0])[1]);
const elemental = '' + (ele1 + ele2 + ele3 + ele4 + ele5).toLocaleString() + ' | ';;
const ele6 = '' + parseInt((item.match(/\+([0-9]+) Chaos<\/span>/i) || [0,0])[1]).toLocaleString() + ' | ';
const res1 = parseInt((item.match(/\+([0-9]+) Holy Resist/i) || [0,0])[1]);
const res2 = parseInt((item.match(/\+([0-9]+) Arcane Resist/i) || [0,0])[1]);
const res3 = parseInt((item.match(/\+([0-9]+) Shadow Resist/i) || [0,0])[1]);
const res4 = parseInt((item.match(/\+([0-9]+) Fire Resist/i) || [0,0])[1]);
const res5 = parseInt((item.match(/\+([0-9]+) Kinetic Resist/i) || [0,0])[1]);
const resist = '' + (res1 + res2 + res3 + res4 + res5).toLocaleString() + ' | ';;
const res6 = '' + (item.match(/\+([0-9]+) Chaos Resist/i) || [0,0])[1] + ' | ';
const vile = '' + parseInt((item.match(/\+([0-9]+) vile energy/i) || [0,0])[1]).toLocaleString() + ' | ';
const rpt = '' + parseInt((item.match(/\+([0-9]+) rage per hr/i) || [0,0])[1]).toLocaleString() + ' | ';
const ept = '' + parseInt((item.match(/\+([0-9]+) exp per hr/i) || [0,0])[1]).toLocaleString() + ' | ';
const rampage = '' + (item.match(/\+([0-9]+) rampage/i) || [0,0])[1] + ' | ';
const critical = '' + (item.match(/\+([0-9]+) critical hit/i) || [0,0])[1] + ' | ';
const mr = '' + parseInt((item.match(/\+([0-9]+) max rage/i) || [0,0])[1]).toLocaleString() + ' | ';
const block = '' + (item.match(/\+([0-9]+) block/i) || [0,0])[1] + ' | ';
const eleblock = '' + (item.match(/\+([0-9]+) elemental block/i) || [0,0])[1] + ' | ';
const ps = '' + (item.match(/\+(\d+(\.\d+)?) perfect strike/i) || [0,0])[1] + ' | ';;
return {slot:slot,img:img,name:name,cloned:cloned,augs:augs,openaugs:openaugs,gems:gems,atk:atk,hp:hp,elemental:elemental,ele6:ele6,resist:resist,res6:res6,vile:vile,rpt:rpt,ept:ept,rampage:rampage,critical:critical,mr:mr,block:block,eleblock:eleblock,ps:ps};
};
async function mvNotSpecial(tab){
document.querySelector("#banner").innerHTML = `
`
};
async function openPotionBp(){
window.XMLHttpRequest.prototype.realOpen = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function(method, url) {
if (url.includes('ajax/backpackcontents.php?tab=potion')) {
this.onreadystatechange = function() {
if (this.readyState === 4) {
var pbp = this.responseText;
const inbp = pbp.replace(/'/g,'').match(/data-name="[^"]*"/g).map(pot => pot.match(/"([^"]*)"/i)[1]);
info("All Potions").then(array => {
const allpots = array.map(([item]) => item);
const missing = allpots.filter(item => !inbp.includes(item) && item != "Boost One" && item != "Boost Two" && item != "Boost Three" && item != "Boost Four" && item != "Boost Five");
if (GM_getValue('auth').match('Full')){
document.querySelector("#backpackitemct").innerHTML = `missing
`
} else {
document.querySelector("#backpackitemct").innerHTML = `missing
`
};
});
};
};
};
this.realOpen.apply(this, arguments);
};
};
async function blankOverlay(server,serverNo,rgaName,charId){
appsMenuClose();
$("body").append(`
`);
document.body.style.overflow = 'hidden';
document.querySelector("#blankOverlay").setAttribute('style',`background:#000000;padding:20px;`)
};
async function parseAugments(){
const tip = document.getElementById('dhtmltooltip');
const observerCallback = async () => {
if (tip.innerHTML.match(/id="itemtable"/i)) {
observer.disconnect();
await parse(tip);
await parseAugments();
};
};
const observer = new MutationObserver(observerCallback);
observer.observe(tip, { attributes: true, childList: true, subtree: true });
async function parse(tip){
let itemHoly = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Holy/i) || [0,0])[1]);
let itemArcane = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Arcane/i) || [0,0])[1]);
let itemShadow = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Shadow/i) || [0,0])[1]);
let itemFire = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Fire/i) || [0,0])[1]);
let itemKinetic = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Kinetic/i) || [0,0])[1]);
let itemChaos = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Chaos/i) || [0,0])[1]);
let itemHolyRes = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Holy Resist/i) || [0,0])[1]);
let itemArcaneRes = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Arcane Resist/i) || [0,0])[1]);
let itemShadowRes = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Shadow Resist/i) || [0,0])[1]);
let itemFireRes = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Fire Resist/i) || [0,0])[1]);
let itemKineticRes = parseInt((tip.innerHTML.replace(/,/g,'').match(/\+([0-9]+) Kinetic Resist/i) || [0,0])[1]);
let augsHoly = 0
let augsArcane = 0
let augsShadow = 0
let augsFire = 0
let augsKinetic = 0
let augsChaos = 0
let augsHolyRes = 0
let augsArcaneRes = 0
let augsShadowRes = 0
let augsFireRes = 0
let augsKineticRes = 0
const allAugs = tip.innerHTML.match(/[0-9]+_[0-9]+/g) || []
const augs = async (iid) => {
const aug = await superfetch(`item_rollover.php?id=${iid}`);
itemHoly -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Holy/i) || [0,0])[1]);
augsHoly += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Holy/i) || [0,0])[1]);
itemHolyRes -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Holy Resist/i) || [0,0])[1]);
augsHolyRes += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Holy Resist/i) || [0,0])[1]);
itemArcane -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Arcane/i) || [0,0])[1]);
augsArcane += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Arcane/i) || [0,0])[1]);
itemArcaneRes -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Arcane Resist/i) || [0,0])[1]);
augsArcaneRes += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Arcane Resist/i) || [0,0])[1]);
itemShadow -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Shadow/i) || [0,0])[1]);
augsShadow += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Shadow/i) || [0,0])[1]);
itemShadowRes -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Shadow Resist/i) || [0,0])[1]);
augsShadowRes += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Shadow Resist/i) || [0,0])[1]);
itemFire -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Fire/i) || [0,0])[1]);
augsFire += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Fire/i) || [0,0])[1]);
itemFireRes -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Fire Resist/i) || [0,0])[1]);
augsFireRes += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Fire Resist/i) || [0,0])[1]);
itemKinetic -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Kinetic/i) || [0,0])[1]);
augsKinetic += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Kinetic/i) || [0,0])[1]);
itemKineticRes -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Kinetic Resist/i) || [0,0])[1]);
augsKineticRes += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Kinetic Resist/i) || [0,0])[1]);
itemChaos -= parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Chaos/i) || [0,0])[1]);
augsChaos += parseInt((aug.replace(/,/g,'').match(/\+([0-9]+) Chaos/i) || [0,0])[1]);
};
await Promise.all(allAugs.map(augs));
tip.innerHTML = tip.innerHTML.replace(/,/g,'')
if (augsHoly > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Holy/i,`+${itemHoly.toLocaleString()} (+${augsHoly.toLocaleString()}) Holy`) }
if (augsHolyRes > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Holy Resist/i,`+${itemHolyRes.toLocaleString()} (+${augsHolyRes.toLocaleString()}) Holy Resist`) }
if (augsArcane > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Arcane/i,`+${itemArcane.toLocaleString()} (+${augsArcane.toLocaleString()}) Arcane`) }
if (augsArcaneRes > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Arcane Resist/i,`+${itemArcaneRes.toLocaleString()} (+${augsArcaneRes.toLocaleString()}) Arcane Resist`) }
if (augsShadow > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Shadow/i,`+${itemShadow.toLocaleString()} (+${augsShadow.toLocaleString()}) Shadow`) }
if (augsShadowRes > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Shadow Resist/i,`+${itemShadowRes.toLocaleString()} (+${augsShadowRes.toLocaleString()}) Shadow Resist`) }
if (augsFire > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Fire/i,`+${itemFire.toLocaleString()} (+${augsFire.toLocaleString()}) Fire`) }
if (augsFireRes > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Fire Resist/i,`+${itemFireRes.toLocaleString()} (+${augsFireRes.toLocaleString()}) Fire Resist`) }
if (augsKinetic > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Kinetic/i,`+${itemKinetic.toLocaleString()} (+${augsKinetic.toLocaleString()}) Kinetic`) }
if (augsKineticRes > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Kinetic Resist/i,`+${itemKineticRes.toLocaleString()} (+${augsKineticRes.toLocaleString()}) Kinetic Resist`) }
if (augsChaos > 0){ tip.innerHTML = tip.innerHTML.replace(/\+([0-9]+) Chaos/i,`+${itemChaos.toLocaleString()} (+${augsChaos.toLocaleString()}) Chaos`) }
};
};
async function blankOff(){
GM_addStyle(`
@keyframes fadeOut {from {opacity: 1;} to {opacity: 0;}}
#blankOverlay {animation: fadeOut 1s ease;}
`)
await new Promise(resolve => setTimeout(resolve, 1000));
document.querySelector("#blankOverlay").remove();
document.body.style.overflowY = 'visible';
};
async function loadingOverlay(){
$("body").append(`
`);
document.body.style.overflow = 'hidden';
document.querySelector("#loadingOverlay").setAttribute('style',`background:#000000;padding:20px;`)
};
async function loadingOff(){
document.body.style.overflowY = 'visible';
document.querySelector("#loadingOverlay").remove();
};
async function info(request){
if (request == 'Array of all gods'){
return ["Animation of Versatility", "Ag Nabak the Abomination", "Agnar, Astral Betrayer", "Akkel the Enflamed Warrior", "Amalgamated Apparition", "Ancient Magus Tarkin", "Anguish", "Animated Captain", "Anvilfist", "Archdevil Yirkon", "Arcon, the Arcane Deity", "Balerion, Dragon of Dread", "Banok, Demon of Insanity", "Baron Mu, Dark Rider of the Undead", "Beast of Cards", "Bloodchill the Grizzly", "Bolkor, the Holy Master", "Brutalitar, Lord of the Underworld", "Crane", "Crantos, Defender of Ultimation", "Crolvak, the Fire Master", "Detox", "Dexor, Victor of Veldara", "Dlanod, the Crazed Chancellor", "Dreg nor, Keeper of the Infernal Essence", "Ebliss, Fallen Angel of Despair", "Emperor Neudeus, Controller of the Universe", "Envar, Demon of Lunacy", "Esquin, the Kinetic Master", "Felroc, Overseer of Hellfire", "Firan, the Fire Deity", "Freezebreed, The Frozen Manipulator", "Ganja the Stone Golem", "Garland, The Lord Keeper", "Gnorb", "Gorganus of the Wood", "Great Lord Ganeshan", "Gregov, Knight of the Woods", "Grivvek, Protector of the Brood", "Hackerphage, Protector of the Gateway", "Holgor, the Holy Deity", "Howldroid, Tormentor of the Pit", "Hyrak, Bringer of Nightmares", "Jade Dragonite", "Jazzmin, Maiden of Vitality", "Jorun the Blazing Swordsman", "Karvaz, Lord of Alsayic", "Keeper of Nature", "Kinark, the Kinetic Deity", "King Ashnar, Lord of the Unliving", "Kretok, Descendant of Nature", "Kro Shuk, Doomslayer", "Lacuste of the Swarm", "Lady Ariella", "Lady Chaos, Queen of the Abyss", "Lord Narada", "Lord Sibannac", "Lord Suka", "Lord Varan", "Lord Xordam", "Melt Bane, The Forbidden Demon Dragon", "Mistress of the Sword", "Murderface", "Murfax, Beast of the Caves", "Nafir, God of Desolation", "Nar Zhul, Slayer of All", "Nayark the Mummified Sorcerer", "Nessam", "Noxious Slug", "Numerocure, The Black Messenger of Evil", "Old World Drake", "Ormsul the Putrid", "Pinosis", "Q-SEC Commander", "Quiver, The Renegade", "Raiyar, the Shadow Master", "Rancid, Lord of Thugs", "Rezun, Demon of Madness", "Rillax, Twin of Wisdom", "Rotborn, Eater of the Dead", "Samatha Dark-Soul", "Sarcrina the Astral Priestess", "Shadow", "Shayar, the Shadow Deity", "Sigil, Lich of Woe", "Skarthul the Avenged", "Skybrine The Inescapable", "Slashbrood, Devourer of the Blackness", "Smoot the Yeti", "Straya, the Underworld Ruler", "Sylvanna TorLai", "Synge, The Red Dragon", "Terrance, Rebel of Rallis", "Thanox, Balancer of Chaos", "The Emerald Assassin", "Threk, King of Lords", "Traxodon the Plaguebringer", "Tsort", "Tylos, The Lord Master", "Valzek, Harbinger of Death", "Varsanor, Master of Darkness", "Villax, Twin of Strength", "Viserion, the Necrodragon", "Vitkros, Hydra of the Deep", "Volgan the Living Ironbark", "Wanhiroeaz the Devourer", "Windstrike The Vile", "Xynak, the Arcane Master", "Zertan, The Collector", "Zikkir the Dark Archer"];
} else if (request == 'Cosmos, Great All Being'){
return [100000000000,50,'Demonic Teleporter
Recharge the Fury
Cosmos Talisman
Tome of Daily Grind
Key to Knights Horror
Astral Shard
Quest Shard
Recharge Totem
Star Power
Ticket to the Mystifying Carnival
Containment Orb
Orb of the Scepter
Amulet Chest (50)']
} else if (request == 'Death, Reaper of Souls'){
return [290000000000,80,'Recharge Totem
Recharge the Fury
Standard Issue Neuralyzer
Death Talisman
Pirate Treasure Map
Key of the Elements
Advanced Neuralyzer
Trinket Items
Elemental Vigor Orb
Elemental Assault Orb
Elemental Defense Orb
Amulet Chest (50)
Chancellor Items
Spiral Gear']
} else if (request == 'Maekrix, Dreaded Striker'){
return [320000000000,73,'Red Dragon Items
Astral Totem
Maekrix Talisman
Key to the Alsayic Ruins (Solo)
Juggernaut Talisman
Advanced Neuralyzer
Irthys Vigor Orb
Irthys Assault Orb
Irthys Defense Orb
Add Augment Slot
Remove Augment
Amulet Chest (50)
Nobel Gear']
} else if (request == 'Blackhand Reborn'){
return [570000000000,61,'Augment of the Reborn Knight
Core of Blackhand
Essence of Reincarnation
Blackhand Talisman
Profound Ward
8-Bit Banana
Buckler of Insanity
Hauberk of Lunacy
Charm of Havoc
Unstoppable Concoction
Advanced Neuralyzer
Power Potion Pack
Flask of Endurance
Magic Gem
Thunder Ball
Perfection Gear
Exalted Gear']
} else if (request == 'Zyrak, Vision of Madness'){
return [1200000000000,65,'Augment of Madness
Unstable Jewel
Veldarabloom
Scripture of Zyrak
Pulsating Stone
Bottled Chaos
Thunder Ball
Force of Veldara
Interstellar Vessel
Vault Tear
Vial of Insanity
Demonic Madness
Infinite Tower Spheroid
Transcended Extract
Tier 2 Booster Upgrade
Ghostly Gear
Boon of Vision
Ancestral Tombs']
} else if (request == 'Triworld Simulation'){
return [2400000000000,39,'20x Ask The Oracle Bundle
20x Remove Augment Bundle
Augment of Simulation
Cosmic Mote
Amalgamation Blossoms
Catalysts of Addumulation
Faction Change
Codex Chapter 30
Codex Chapter 31
Triworld Experience Ward
Descendant Set Items
Quest Experience Potion
Blazing Serpent Gear']
} else if (request == 'Arkron, God of Trials'){
return [900000000000,160,'']
} else if (request == 'Bazak, Demon of Hatred'){
[900000000000,160,'']
} else if (request == 'Vorox, Mind of Ruin'){
return [900000000000,160,'']
} else if (request == 'All Potions'){
return [
[`Triworld Tincture`,`/images/items/triworldtincture.png`],
[`20 Year Aged Whiskey`,`/images/items/whiskeypot.png`],
[`Blazing Holiday Sauce`,`/images/items/emblemPotion2.jpg`],
[`Bottle of Holy Slaughter`,`/images/potion26.jpg`],
[`Brew of Precision`,`/images/items/potion3.gif`],
[`Holy Vile`,`/images/items/Pot_HolyVile.jpg`],
[`Damned Element Shot`,`/images/items/h16_Pot6.png`],
[`Demonic Madness`,`/images/items/vaultpot2.png`],
[`Dose of Destruction`,`/images/pot2.jpg`],
[`Evil Scream`,`/images/potion25.jpg`],
[`Fire Water`,`/images/potion22.jpg`],
[`Flask of Burning Souls`,`/images/items/basicflask1.gif`],
[`Flask of Conjured Lightning`,`/images/basicflask4.gif`],
[`Flask of Endurance`,`/images/items/itemz28.jpg`],
[`Flask of Flaming Death`,`/images/basicflask2.gif`],
[`Flask of Forbidden Knowledge`,`/images/basicflask3.gif`],
[`Flask of Super Nova`,`/images/basicflask5.gif`],
[`Funny Little Mushroom`,`/images/mushroom.jpg`],
[`Griznix Potion`,`/images/items/purepwnagepotion.png`],
[`Halloween Potion`,`/images/items/itemz27.jpg`],
[`Jabberwocky Blood`,`/images/items/Item_JabberwockyBlood.jpg`],
[`Kinetic Potency`,`/images/items/KineticShot.jpg`],
[`Kix Potion`,`/images/potion28.jpg`],
[`Kombucha`,`/images/items/Putrid%20Power%20Clusters.jpg`],
[`Liquid Bone Juice`,`/images/items/Item_JabberwockyBlood.jpg`],
[`Major Chaos Philter`,`/images/items/itemz82.jpg`],
[`Marsh Water`,`/images/potion24.jpg`],
[`Minor Chaos Philter`,`/images/items/itemz91.jpg`],
[`Olympian Juicebox`,`/images/items/lesserolympian.png`],
[`Olympian Push`,`/images/items/2k8.png`],
[`Potion of Amdir`,`/images/items/arelepot.jpg`],
[`Potion of Deceit`,`/images/items/potion2.gif`],
[`Potion of Elemental Resistance`,`/images/items/eleresistpotion.png`],
[`Potion of Enraged Alsayic`,`/images/items/PotionofEA.jpg`],
[`Pumpkin Juice`,`/images/halloween/PumpkinJuice.gif`],
[`Quantum Quattro`,`/images/items/pot_quantumquattro.jpg`],
[`Rampage Vile`,`/images/items/Pot_RampageVile.jpg`],
[`Reikavons Elixir`,`/images/items/ReikavonsElixer.jpg`],
[`Remnant Solice Lev 10`,`/images/items/90remnant.png`],
[`Remnant Solice Lev 11`,`/images/items/95remnant.png`],
[`Sammy Sosas Special Sauce`,`/images/pot5.jpg`],
[`Squidberry Juice`,`/images/items/Item_SquidberryJuice.jpg`],
[`Star Power`,`/images/items/starpowerelec.jpg`],
[`Strong Man Elixir`,`/images/items/potion1.gif`],
[`Sugar Daddy`,`/images/items/sugardaddy.png`],
[`Unstoppable Concoction`,`/images/items/juggerelepot.jpg`],
[`Vial of Insanity`,`/images/items/vaultpot1.png`],
[`Vile Energy`,`/images/items/vile_energy_potion.jpg`],
[`Wonderland Potion`,`/images/items/itemz95.png`],
[`Zhulian Potion`,`/images/items/wozpotionzor.jpg`],
[`Zombie Potion 1`,`/images/items/potion_1.gif`],
[`Zombie Potion 2`,`/images/items/potion_2.gif`],
[`Zombie Potion 3`,`/images/items/potion_3.gif`],
[`Zombie Potion 4`,`/images/items/potion_4.gif`],
[`Zombie Potion 5`,`/images/items/potion_5.gif`],
[`Zombie Potion 6`,`/images/items/potion_6.gif`],
[`Boost One`,`/images/items/icon_vial_blue.jpg`],
[`Boost Two`,`/images/items/icon_vial_green.jpg`],
[`Boost Three`,`/images/items/icon_vial_orange.jpg`],
[`Boost Four`,`/images/items/icon_vial_red.jpg`],
[`Boost Five`,`/images/items/icon_vial_yellow.jpg`]
]
} else if (request = "Cost to Gem"){
return {
"cccccc":[10,9,7,4,0],
"FFFFFF":[25,23,18,10,0],
"1eff00":[50,45,35,20,0],
"ffde5b":[100,90,70,40,0],
"CA1111":[200,180,140,80,0],
"0070ff":[300,270,210,120,0],
"ff8000":[400,360,280,160,0],
"9000ba":[500,450,350,200,0]
};
} else {
return 'error';
};
};
async function superfetch(url,skipCache){
if (!skipCache && superfetchCache.hasOwnProperty(url)) {
return superfetchCache[url];
} else {
while (true) {
try {
let data = await fetch(url).then(res => res.text());
if (data.match(/"error":"Rate limit exceeded/i)){
await new Promise(resolve => setTimeout(resolve, 1000));
} else {
superfetchCache[url] = data;
if (data.match('images/ErrorImg.jpg')){
data = "error"
};
return data;
};
} catch (error) {
await new Promise(resolve => setTimeout(resolve, 1000));
};
};
};
};
async function superpost(url,body){
while (true) {
try {
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: body
});
const data = await response.text();
if (data.includes("Rate limit exceeded. Please be kind to our servers ;)")) {
await new Promise(resolve => setTimeout(resolve, 1000));
} else {
return data;
}
} catch (error) {
await new Promise(resolve => setTimeout(resolve, 1000));
};
};
};
async function updateRga(rgaName){
if (rgaName != GM_getValue("rgaName")){
await mmplus(`AuthCheck|${rgaName}`);
await GM_setValue("rgaName",rgaName);
};
};
function mmplus(string) {
return new Promise((resolve) => {
let rgaName;
if (document.querySelector("#rg_sess_id")) {
rgaName = document.querySelector("#rg_sess_id").value;
} else {
rgaName = document.body.innerHTML.match(/rg_sess_id=([A-Za-z0-9]+)">[\n\r]
/i)[1];
};
const task = string.replace('rganame',rgaName);
GM_xmlhttpRequest({
method: 'POST',
url: 'http://boss.outwar.link:8001/',
data: task,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
onload: function(data) {
const response = data.response;
if (response.match(/^[a-zA-Z]+$/)){
GM_setValue("auth", response);
};
displayAuthStatus(response).then(() => {
resolve(response);
});
}
});
});
}
async function displayAuthStatus(status) {
const moxxiImg = '
'
if (authSliderCreated == false) {
var newDiv = document.createElement('div');
newDiv.id = 'authSlider';
document.body.appendChild(newDiv);
};
if (status.match("NotAuthed")) {
document.querySelector("#authSlider").innerHTML = `${moxxiImg} THIS RGA IS NOT SUBSCRIBED TO MOXXIMOD+`;
document.querySelector("#authSlider").setAttribute('style', 'background:#870000;');
} else {
document.querySelector("#authSlider").innerHTML = `${moxxiImg} THANK YOU FOR SUBSCRIBING TO MOXXIMOD+`;
document.querySelector("#authSlider").setAttribute('style', 'background:#008700;');
};
GM_addStyle("#authSlider {animation: none;}");
document.querySelector("#authSlider").offsetHeight;
GM_addStyle("#authSlider {animation: authSliderAnimation 3s ease forwards;}");
GM_addStyle("@keyframes authSliderAnimation {0% {height:0px;position:fixed;bottom:-45px;opacity:0;} 50% {height:45px;position:fixed;bottom:0px;opacity:1:padding:10px} 80% {height:45px;position:fixed;bottom:0px;opacity:1;padding:10px} 100% {height:0px;position:fixed;bottom:-45px;opacity:0}}");
authSliderCreated = true;
};
async function filterTables() {
const filterInput = document.getElementById('filter');
const tableRows = document.querySelectorAll('.filterable tbody tr');
filterInput.addEventListener('input', function() {
const filterValue = this.value.trim().toLowerCase();
tableRows.forEach(row => {
const cells = row.querySelectorAll('.filt');
let matched = false;
cells.forEach(cell => {
const values = cell.textContent.split(',').map(item => item.trim().toLowerCase());
if (values.includes(filterValue)) {
matched = true;
};
});
if (filterValue === '' || matched) {
row.style.display = '';
} else {
row.style.display = 'none';
};
});
});
};
async function sortableTables() {
document.querySelectorAll('table.sortable').forEach(table => {
Array.from(table.querySelectorAll('thead th')).forEach(header => {
header.addEventListener('click', event => {
const columnIndex = header.cellIndex;
const tbody = table.querySelector('tbody');
const rows = Array.from(tbody.querySelectorAll('tr'));
const isAscending = header.classList.contains('ascending');
rows.sort((a, b) => {
const aValue = getValue(a.cells[columnIndex].textContent);
const bValue = getValue(b.cells[columnIndex].textContent);
if (typeof aValue === 'number' && typeof bValue === 'number') {
return isAscending ? aValue - bValue : bValue - aValue;
} else {
if (isAscending) {
return aValue.localeCompare(bValue);
} else {
return bValue.localeCompare(aValue);
};
};
});
header.classList.toggle('ascending', !isAscending);
header.classList.toggle('descending', isAscending);
rows.forEach(row => tbody.removeChild(row));
rows.forEach(row => tbody.appendChild(row));
});
header.style.cursor = 'pointer';
});
});
function getValue(value) {
const parsedValue = parseFormattedNumber(value);
return isNaN(parsedValue) ? value.trim() : parsedValue;
};
function parseFormattedNumber(value) {
return parseInt(value.replace(/,/g, ''), 10);
};
GM_addStyle(`table.sortable th:after {content: "▾";margin-left: 0.1em;}`)
};