// ==UserScript==
// @name MoxxiMod
// @namespace https://studiomoxxi.com/
// @description one click at a time
// @author Ben
// @match *.outwar.com/*
// @version 4.7
// @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==
// itemlink modifications
if (document.URL.indexOf("itemlink") != -1 ) {
var itemID = window.location.search.replace(/\?id=/g,"").replace(/&owner=.*/g,"")
fetch("/item_rollover.php?id="+itemID+"_1")
.then(response => response.text())
.then((response) => {
var holyaug = response.match(/ \+([0-9]+) response.text())
.then((response) => {
var holyaug = response.match(/ \+([0-9]+) response.text())
.then((response) => {
var holyaug = response.match(/ \+([0-9]+) response.text())
.then((response) => {
var holyaug = response.match(/ \+([0-9]+) response.text())
.then((response) => {
var holyaug = response.match(/ \+([0-9]+) tbody > tr:nth-child(2) > td:nth-child(2) > img:nth-child(3)").outerHTML.replace(//i,1).replace(/
/i,0)
var Gslot2 = document.querySelector("#itemtable > tbody > tr:nth-child(2) > td:nth-child(2) > img:nth-child(4)").outerHTML.replace(/
/i,1).replace(/
/i,0)
var Gslot3 = document.querySelector("#itemtable > tbody > tr:nth-child(2) > td:nth-child(2) > img:nth-child(5)").outerHTML.replace(/
/i,1).replace(/
/i,0)
var Gslot4 = document.querySelector("#itemtable > tbody > tr:nth-child(2) > td:nth-child(2) > img:nth-child(6)").outerHTML.replace(/
/i,1).replace(/
/i,0)
var sum = Math.round(Gslot1+Gslot2+Gslot3+Gslot4)
var gems = '';
if (sum == "0")
gems = "4"
if (sum == "1")
gems = "3"
if (sum == "11")
gems = "2"
if (sum == "111")
gems = "1"
if (sum == "1111")
gems = "0"
var item = document.querySelector("#itemtable > tbody > tr:nth-child(2) > td:nth-child(1)").outerHTML.replace(/ \(\+[0-9]+\)<\/span>/g,"").replaceAll(",","");
var atk = item.match(/\+([0-9]+) ATK/) ?? 0
var holy = item.match(/\+([0-9]+) Holy/) ?? 0
var arcane = item.match(/\+([0-9]+) Arcane/) ?? 0
var shadow = item.match(/\+([0-9]+) Shadow/) ?? 0
var fire = item.match(/\+([0-9]+) Fire/) ?? 0
var kinetic = item.match(/\+([0-9]+) Kinetic/) ?? 0
var chaos = item.match(/\+([0-9]+) Chaos/) ?? 0
var vile = item.match(/\+([0-9]+) vile energy/) ?? 0
var hp = item.match(/\+([0-9]+) HP/) ?? 0
var holyr = item.match(/\+([0-9]+) Holy Resist/) ?? 0
var arcaner = item.match(/\+([0-9]+) Arcane Resist/) ?? 0
var shadowr = item.match(/\+([0-9]+) Shadow Resist/) ?? 0
var firer = item.match(/\+([0-9]+) Fire Resist/) ?? 0
var kineticr = item.match(/\+([0-9]+) Kinetic Resist/) ?? 0
var chaosr = item.match(/\+([0-9]+) Chaos Resist/) ?? 0
var block = item.match(/\+([0-9]+)% block/) ?? 0
var eblock = item.match(/\+([0-9]+)% elemental block/) ?? 0
var rpt = item.match(/\+([0-9]+) rage per hr/) ?? 0
var ept = item.match(/\+([0-9]+) exp per hr/) ?? 0
var ramp = item.match(/\+([0-9]+)% rampage/) ?? 0
var ps = item.match(/\+([0-9]+)% perfect strike/) ?? 0
var mr = item.match(/\+([0-9]+) max rage/) ?? 0
var crit = item.match(/\+([0-9]+)% critical hit/) ?? 0
var edititem = document.querySelector("#itemtable > tbody > tr:nth-child(2) > td:nth-child(1)");
if (aholy != 0){
edititem.innerHTML = edititem.innerHTML.replace(/ \+.* Holy/," +"+(parseInt(holy[1])-aholy)+" (+"+aholy+") Holy")}
if (aarcane != 0){
edititem.innerHTML = edititem.innerHTML.replace(/ \+.* Arcane/," +"+(parseInt(arcane[1])-aarcane)+" (+"+aarcane+") Arcane")}
if (afire != 0){
edititem.innerHTML = edititem.innerHTML.replace(/ \+.* Fire/," +"+(parseInt(fire[1])-afire)+" (+"+afire+") Fire")}
if (akinetic != 0){
edititem.innerHTML = edititem.innerHTML.replace(/ \+.* Kinetic/," +"+(parseInt(kinetic[1])-akinetic)+" (+"+akinetic+") Kinetic")}
if (ashadow != 0){
edititem.innerHTML = edititem.innerHTML.replace(/ \+.* Shadow/," +"+(parseInt(shadow[1])-ashadow)+" (+"+ashadow+") Shadow")}
if (achaos != 0){
edititem.innerHTML = edititem.innerHTML.replace(/ \+.* Chaos/," +"+(parseInt(chaos[1])-achaos)+" (+"+achaos+") Chaos")}
var g1 = '';
var g2 = '';
var g3 = '';
var g4 = '';
if (atk[1] > 0){
g1 += "+"+Math.round(atk[1]*1.15)+" ATK
"
g2 += "+"+Math.round(atk[1]*1.3225)+" ATK
"
g3 += "+"+Math.round(atk[1]*1.520875)+" ATK
"
g4 += "+"+Math.round(atk[1]*1.74900625)+" ATK
"}
if (holy[1] > 0){
g1 += " +"+(parseInt(holy[1])-aholy)+" Holy
"
g2 += " +"+(parseInt(holy[1])-aholy)+" Holy
"
g3 += " +"+(parseInt(holy[1])-aholy)+" Holy
"
g4 += " +"+(parseInt(holy[1])-aholy)+" Holy
"}
if (arcane[1] > 0){
g1 += " +"+(parseInt(arcane[1])-aarcane)+" Arcane
"
g2 += " +"+(parseInt(arcane[1])-aarcane)+" Arcane
"
g3 += " +"+(parseInt(arcane[1])-aarcane)+" Arcane
"
g4 += " +"+(parseInt(arcane[1])-aarcane)+" Arcane
"}
if (shadow[1] > 0){
g1 += " +"+(parseInt(shadow[1])-ashadow)+" Shadow
"
g2 += " +"+(parseInt(shadow[1])-ashadow)+" Shadow
"
g3 += " +"+(parseInt(shadow[1])-ashadow)+" Shadow
"
g4 += " +"+(parseInt(shadow[1])-ashadow)+" Shadow
"}
if (fire[1] > 0){
g1 += " +"+(parseInt(fire[1])-afire)+" Fire
"
g2 += " +"+(parseInt(fire[1])-afire)+" Fire
"
g3 += " +"+(parseInt(fire[1])-afire)+" Fire
"
g4 += " +"+(parseInt(fire[1])-afire)+" Fire
"}
if (kinetic[1] > 0){
g1 += " +"+(parseInt(kinetic[1])-akinetic)+" Kinetic
"
g2 += " +"+(parseInt(kinetic[1])-akinetic)+" Kinetic
"
g3 += " +"+(parseInt(kinetic[1])-akinetic)+" Kinetic
"
g4 += " +"+(parseInt(kinetic[1])-akinetic)+" Kinetic
"}
if (chaos[1] > 0){
g1 += " +"+(parseInt(chaos[1])-achaos)+" Chaos
"
g2 += " +"+(parseInt(chaos[1])-achaos)+" Chaos
"
g3 += " +"+(parseInt(chaos[1])-achaos)+" Chaos
"
g4 += " +"+(parseInt(chaos[1])-achaos)+" Chaos
"}
if (vile[1] > 0){
g1 += " +"+vile[1]+" vile energy
"
g2 += " +"+vile[1]+" vile energy
"
g3 += " +"+vile[1]+" vile energy
"
g4 += " +"+vile[1]+" vile energy
"}
if (hp[1] > 0){
g1 += "+"+Math.round(hp[1]*1.15)+" HP
"
g2 += "+"+Math.round(hp[1]*1.3225)+" HP
"
g3 += "+"+Math.round(hp[1]*1.520875)+" HP
"
g4 += "+"+Math.round(hp[1]*1.74900625)+" HP
"}
if (holyr[1] != undefined){
g1 += " +"+holyr[1]+" Holy Resist
"
g2 += " +"+holyr[1]+" Holy Resist
"
g3 += " +"+holyr[1]+" Holy Resist
"
g4 += " +"+holyr[1]+" Holy Resist
"}
if (arcaner[1] > 0){
g1 += " +"+arcaner[1]+" Arcane Resist
"
g2 += " +"+arcaner[1]+" Arcane Resist
"
g3 += " +"+arcaner[1]+" Arcane Resist
"
g4 += " +"+arcaner[1]+" Arcane Resist
"}
if (shadowr[1] > 0){
g1 += " +"+shadowr[1]+" Shadow Resist
"
g2 += " +"+shadowr[1]+" Shadow Resist
"
g3 += " +"+shadowr[1]+" Shadow Resist
"
g4 += " +"+shadowr[1]+" Shadow Resist
"}
if (firer[1] > 0){
g1 += " +"+firer[1]+" Fire Resist
"
g2 += " +"+firer[1]+" Fire Resist
"
g3 += " +"+firer[1]+" Fire Resist
"
g4 += " +"+firer[1]+" Fire Resist
"}
if (kineticr[1] > 0){
g1 += " +"+kineticr[1]+" Kinetic Resist
"
g2 += " +"+kineticr[1]+" Kinetic Resist
"
g3 += " +"+kineticr[1]+" Kinetic Resist
"
g4 += " +"+kineticr[1]+" Kinetic Resist
"}
if (chaosr[1] > 0){
g1 += " +"+chaosr[1]+" Chaos Resist
"
g2 += " +"+chaosr[1]+" Chaos Resist
"
g3 += " +"+chaosr[1]+" Chaos Resist
"
g4 += " +"+chaosr[1]+" Chaos Resist
"}
if (block[1] > 0){
g1 += "+"+block[1]+"% block
"
g2 += "+"+block[1]+"% block
"
g3 += "+"+block[1]+"% block
"
g4 += "+"+block[1]+"% block
"}
if (eblock[1] > 0){
g1 += "+"+eblock[1]+"% elemental block
"
g2 += "+"+eblock[1]+"% elemental block
"
g3 += "+"+eblock[1]+"% elemental block
"
g4 += "+"+eblock[1]+"% elemental block
"}
if (rpt[1] > 0){
g1 += "+"+Math.round(rpt[1]*1.15)+" rage per hour
"
g2 += "+"+Math.round(rpt[1]*1.3225)+" rage per hour
"
g3 += "+"+Math.round(rpt[1]*1.520875)+" rage per hour
"
g4 += "+"+Math.round(rpt[1]*1.74900625)+" rage per hour
"}
if (ept[1] > 0){
g1 += "+"+Math.round(ept[1]*1.15)+" exp per hour
"
g2 += "+"+Math.round(ept[1]*1.3225)+" exp per hour
"
g3 += "+"+Math.round(ept[1]*1.520875)+" exp per hour
"
g4 += "+"+Math.round(ept[1]*1.74900625)+" exp per hour
"}
if (ramp[1] > 0){
g1 += "+"+ramp[1]+"% rampage
"
g2 += "+"+ramp[1]+"% rampage
"
g3 += "+"+ramp[1]+"% rampage
"
g4 += "+"+ramp[1]+"% rampage
"}
if (ps[1] > 0){
g1 += "+"+ps[1]+"
% perfect strike
"
g2 += "+"+ps[1]+"
% perfect strike
"
g3 += "+"+ps[1]+"
% perfect strike
"
g4 += "+"+ps[1]+"
% perfect strike
"}
if (mr[1] > 0){
g1 += "+"+Math.round(mr[1]*1.15)+" max rage
"
g2 += "+"+Math.round(mr[1]*1.3225)+" max rage
"
g3 += "+"+Math.round(mr[1]*1.520875)+" max rage
"
g4 += "+"+Math.round(mr[1]*1.74900625)+" max rage
"}
if (crit[1] > 0){
g1 += "+"+crit[1]+"% critical hit
"
g2 += "+"+crit[1]+"% critical hit
"
g3 += "+"+crit[1]+"% critical hit
"
g4 += "+"+crit[1]+"% critical hit
"}
var openslot = document.querySelectorAll("img[src='/images/gemslot2.jpg']");
if (openslot[0] != null)
openslot[0].setAttribute(`onmouseover`, `popup(event,'
Item Rarity: `+itemRarity+` | Number of Gems: `+gems+` |