User:FINNER/common.js

/* FINNER/Test9 START */ function update_scaling { if((curr_lvl = ehp_input.value) >= base_lvl_v) { clonedflesh.innerHTML = (Math.round(clonedflesh_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; flesh.innerHTML = (Math.round(flesh_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; fossilized.innerHTML = (Math.round(fossilized_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; infested.innerHTML = (Math.round(infested_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; infestedflesh.innerHTML = (Math.round(infestedflesh_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; infestedsinew.innerHTML = (Math.round(infestedsinew_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; machinery.innerHTML = (Math.round(machinery_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString; robotic.innerHTML = (Math.round(robotic_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015)* 100) / 100).toLocaleString;

ferritearmor.innerHTML = (Math.round(ferritearmor_v * (1 + Math.pow(curr_lvl - base_lvl_v, 1.75) * 0.005)* 100) / 100).toLocaleString; alloyarmor.innerHTML = (Math.round(alloyarmor_v * (1 + Math.pow(curr_lvl - base_lvl_v, 1.75) * 0.005)* 100) / 100).toLocaleString; damage_redux.innerHTML = damage_redux; shield.innerHTML = (Math.round(shieldx_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.0075)* 100) / 100).toLocaleString; protoshield.innerHTML = (Math.round(protoshield_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.0075)* 100) / 100).toLocaleString; out_ehp.innerHTML = (Math.round((health_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.015) * (1 + armor_v * (1 + Math.pow(curr_lvl - base_lvl_v, 1.75) * 0.005) / 300) + shield_v * (1 + Math.pow(curr_lvl - base_lvl_v, 2) * 0.0075))* 100) / 100).toLocaleString; affinity.innerHTML = (Math.round(affinity_v * (1 + Math.pow(curr_lvl - base_lvl_v, 0.5) * 0.1425)* 100) / 100).toLocaleString; } } if ($('#slider_div').length) { var clonedflesh_v = parseInt(clonedflesh.innerHTML, 10); var flesh_v = parseInt(flesh.innerHTML, 10); var fossilized_v = parseInt(fossilized.innerHTML, 10); var infested_v = parseInt(infested.innerHTML, 10); var infestedflesh_v = parseInt(infestedflesh.innerHTML, 10); var infestedsinew_v = parseInt(infestedsinew.innerHTML, 10); var machinery_v = parseInt(machinery.innerHTML, 10); var robotic_v = parseInt(robotic.innerHTML, 10); var health_v = clonedflesh_v + flesh_v + fossilized_v + infested_v + infestedflesh_v + infestedsinew_v + machinery_v + robotic_v; var ferritearmor_v = parseInt(ferritearmor.innerHTML, 10); var alloyarmor_v = parseInt(alloyarmor.innerHTML, 10); var armor_v = ferritearmor_v + alloyarmor_v; var damage_redux = (armor_v/(armor_v + 300))*100; var shieldx_v = parseInt(shield.innerHTML, 10); var protoshield_v = parseInt(protoshield.innerHTML, 10); var shield_v = shieldx_v + protoshield_v; var affinity_v = parseInt(affinity.innerHTML, 10); var base_lvl_v = parseInt(baselevel.innerHTML, 10); var spawn_lvl_v = parseInt(spawnlevel.innerHTML, 10); if (spawn_lvl_v === "") { spawn_lvl_v = base_lvl_v; }   if (base_lvl_v > 9) { var slider_width = 89; } else { var slider_width = 92; }   if (navigator.userAgent.indexOf("Firefox") != -1){ slider_div.innerHTML = " " + base_lvl_v + " " + slider_max.innerHTML + " "; } else if ((navigator.userAgent.indexOf("MSIE") != -1) || (!!document.documentMode === true )){ slider_div.innerHTML = " " + base_lvl_v + " " + slider_max.innerHTML + " "; } else { slider_div.innerHTML = " " + base_lvl_v + " " + slider_max.innerHTML + " "; }   out_lvl.innerHTML = ""; reset_btn.innerHTML = "Reset "; update_scaling; }   /* FINNER/Test9 END */ ///////////////////////////////////////////////////////////////////////////////// dil = new Array; function findDupImages(gf) { output = ""; url = "/api.php?action=query&generator=allimages&prop=duplicatefiles&gailimit=500&format=json"; if (gf) url += "&gaifrom=" + gf; $.getJSON(url,function (data) { if (data.query) { pages = data.query.pages; for (pageID in pages) { dils = ","+dil.join; if (dils.indexOf(","+pages[pageID].title) == -1 && pages[pageID].title.indexOf("File::") == -1 && pages[pageID].duplicatefiles) { output += " "+pages[pageID].title+" \n\n"; for (x=0;xFile:"+pages[pageID].duplicatefiles[x].name+"\n"; dil.push("File:"+pages[pageID].duplicatefiles[x].name.replace(/_/g," ")); } output += "\n\n"; } } $("#mw-dupimages").append(output); if (data["query-continue"]) setTimeout("findDupImages('"+data["query-continue"].allimages.gaifrom+"');",5000); } }); } $(function { if ($("#mw-dupimages").length) findDupImages; });