Anonymous
×
Create a new article
Write your page title here:
We currently have 496 articles on WIKI - Idle Pixel. Type your article name above or click on one of the titles below and start writing!



WIKI - Idle Pixel

MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 63: Line 63:
document.getElementById('compareSelect2').innerHTML = addSelects(2)
document.getElementById('compareSelect2').innerHTML = addSelects(2)
}
}
mw.loader.load('https://cdn.jsdelivr.net/gh/cferdinandi/tabby@12/dist/js/tabby.polyfills.min.js')
/*if (document.getElementById('data-tabs')) {
document.getElementById('data-tabs').innerHTML = '<li><a data-tabby-default href="#harry">Harry Potter</a></li>\
<li><a href="#hermione">Hermione</a></li>\
<li><a href="#neville">Neville</a></li>';
}
window.onload = function() {
  var tabs = new Tabby('#data-tabs');
}*/

Revision as of 08:04, 16 January 2024

var weaponDPS = {
    WithoutWeapon: [0,1,3,6,10,15,21,25],
    WoodenSword: [0.125,0.25,0.5,0.875,1.375,2,2.75,3.25],
    Stinger: [0.25,0.375,0.625,1,1.5,2.125,2.875,3.375],
    PoisonStinger: [0.333333333,0.458333333,0.708333333,1.083333333,1.583333333,2.208333333,2.958333333,3.458333333],
    IronDagger: [0.333333333,0.5,0.833333333,1.333333333,2,2.833333333,3.833333333,4.5],
    SkeletonSword: [0.625,0.75,1,1.375,1.875,2.5,3.25,3.75],
    Club: [0.666666667,0.75,0.916666667,1.166666667,1.5,1.916666667,2.416666667,2.75],
    SpikedClub: [1,1.083333333,1.25,1.5,1.833333333,2.25,2.75,3.083333333],
    Scythe: [1,1.125,1.375,1.75,2.25,2.875,3.625,4.125],
    StingerDagger: [0.25,0.5625,0.9375,1.5,2.25,3.1875,4.3125,5.0625],
    PoisonStingerDagger: [0.583333333,0.895833333,1.270833333,1.833333333,2.583333333,3.520833333,4.645833333,5.395833333],
    Rapier: [1.5,1.625,1.875,2.25,2.75,3.375,4.125,4.625],
    PoisonRapier: [1.916666667,2.041666667,2.291666667,2.666666667,3.166666667,3.791666667,4.541666667,5.041666667],
    DenseClub: [1.666666667,1.75,1.916666667,2.166666667,2.5,2.916666667,3.416666667,3.75],
    SpikedDenseClub: [2.5,2.583333333,2.75,3,3.333333333,3.75,4.25,4.583333333],
    GoldenRapier: [2,2.166666667,2.5,3,3.666666667,4.5,5.5,6.166666667],
    PoisonGoldenRapier: [2.777777778,2.944444444,3.277777778,3.777777778,4.444444444,5.277777778,6.277777778,6.944444444],
    Ballista: [1.166666667,1.333333333,1.666666667,2.166666667,2.833333333,3.666666667,4.666666667,5.333333333],
    HauntedBow: [0.875,1,1.25,1.625,2.125,2.75,3.5,4]
};

function compareDPS(value,id) {
	document.getElementById('compareDPST0Row'+id).innerText = Math.round(weaponDPS[value][0] * 100) / 100;
	document.getElementById('compareDPST1Row'+id).innerText = Math.round(weaponDPS[value][1] * 100) / 100;
	document.getElementById('compareDPST2Row'+id).innerText = Math.round(weaponDPS[value][2] * 100) / 100;
	document.getElementById('compareDPST3Row'+id).innerText = Math.round(weaponDPS[value][3] * 100) / 100;
	document.getElementById('compareDPST4Row'+id).innerText = Math.round(weaponDPS[value][4] * 100) / 100;
	document.getElementById('compareDPST5Row'+id).innerText = Math.round(weaponDPS[value][5] * 100) / 100;
	document.getElementById('compareDPST6Row'+id).innerText = Math.round(weaponDPS[value][6] * 100) / 100;
	document.getElementById('compareDPST7Row'+id).innerText = Math.round(weaponDPS[value][7] * 100) / 100;
}

function addSelects(id) {
	return '<select onchange="compareDPS(this.value,'+id+')">\
		<option value="" disabled selected>Weapon '+id+'</option>\
		<option value="WithoutWeapon">Without Weapon</option>\
		<option value="WoodenSword">Wooden Sword</option>\
		<option value="Stinger">Stinger</option>\
		<option value="PoisonStinger">Poison Stinger</option>\
		<option value="IronDagger">Iron Dagger</option>\
		<option value="SkeletonSword">Skeleton Sword</option>\
		<option value="Club">Club</option>\
		<option value="SpikedClub">Spiked Club</option>\
		<option value="Scythe">Scythe</option>\
		<option value="StingerDagger">Stinger Dagger</option>\
		<option value="PoisonStingerDagger">Poison Stinger Dagger</option>\
		<option value="Rapier">Rapier</option>\
		<option value="PoisonRapier">Poison Rapier</option>\
		<option value="DenseClub">Dense Club</option>\
		<option value="SpikedDenseClub">Spiked Dense Club</option>\
		<option value="GoldenRapier">Golden Rapier</option>\
		<option value="PoisonGoldenRapier">Poison Golden Rapier</option>\
		<option value="Ballista">Ballista</option>\
		<option value="HauntedBow">Haunted Bow</option>\
	</select>'
}

if (document.getElementById('compareSelect1')) {
	document.getElementById('compareSelect1').innerHTML = addSelects(1)
}
if (document.getElementById('compareSelect2')) {
	document.getElementById('compareSelect2').innerHTML = addSelects(2)
}

mw.loader.load('https://cdn.jsdelivr.net/gh/cferdinandi/tabby@12/dist/js/tabby.polyfills.min.js')

/*if (document.getElementById('data-tabs')) {
	document.getElementById('data-tabs').innerHTML = '<li><a data-tabby-default href="#harry">Harry Potter</a></li>\
	<li><a href="#hermione">Hermione</a></li>\
	<li><a href="#neville">Neville</a></li>';
}
window.onload = function() {
   var tabs = new Tabby('#data-tabs');
}*/