MediaWiki:Killxp.js

var creatureKillXPDiv = null; var creatureKillXPResultEl = null;

if (creatureKillXPDiv = document.getElementById('creatureKillXP')) { if (creatureKillXPDiv.dataset.basexp) { creatureKillXPDiv.innerHTML = 'Level : '; creatureKillXPResultEl = document.getElementById('creatureKillXPResult'); creatureKillXPResultEl.innerHTML = updateXPLevel(creatureKillXPDiv.dataset.basexp, 1); } }

function updateXPLevel(baseXP, level) { return (baseXP * (1 + (level - 1) * 0.1)).toFixed(2); }