User:FINNER/common.js

/* FINNER/Test9 START */ var clonedflesh = document.getElementById("clonedflesh").innerHTML; var flesh = document.getElementById("flesh").innerHTML; var fossilized = document.getElementById("fossilized").innerHTML; var infested = document.getElementById("infested").innerHTML; var infestedflesh = document.getElementById("infestedflesh").innerHTML; var infestedsinew = document.getElementById("infestedsinew").innerHTML; var machinery = document.getElementById("machinery").innerHTML; var robotic = document.getElementById("robotic").innerHTML; var health = clonedflesh + flesh + fossilized + infested + infestedflesh + infestedsinew + machinery + robotic; var ferritearmor = document.getElementById("ferritearmor").innerHTML; var alloyarmor = document.getElementById("alloyarmor").innerHTML; var armor = ferritearmor + alloyarmor; var shield_ = document.getElementById("shield").innerHTML; var protoshield = document.getElementById("protoshield").innerHTML; var shield = shield_ + protoshield; var affinity = document.getElementById("affinity").innerHTML; var base_lvl = document.getElementById("baselevel").innerHTML; document.getElementById('out_lvl').innerHTML = ""; document.getElementById('slider_div').innerHTML = " " + base_lvl + " 155 "; document.getElementById('reset_btn').innerHTML = "Reset "; document.getElementById("ehp_input").oninput = function { update_scaling; };

document.getElementById("ehp_slider").oninput = function { update_scaling2; };

function update_scaling { var curr_lvl = document.getElementById("ehp_input").value; document.getElementById("ehp_slider").value = curr_lvl; update_scaling3(curr_lvl); }

function update_scaling2 { var curr_lvl = document.getElementById("ehp_slider").value; document.getElementById("ehp_input").value = curr_lvl; update_scaling3(curr_lvl); }

function update_scaling3(curr_lvl) { var clonedflesh1 = Math.round(clonedflesh * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("clonedflesh").innerHTML = clonedflesh1.toLocaleString; var flesh1 = Math.round(clonedflesh * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("flesh").innerHTML = flesh1.toLocaleString; var fossilized1 = Math.round(fossilized * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("fossilized").innerHTML = fossilized1.toLocaleString; var infested1 = Math.round(infested * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("infested").innerHTML = infested1.toLocaleString; var infestedflesh1 = Math.round(infestedflesh * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("infestedflesh").innerHTML = infestedflesh1.toLocaleString; var infestedsinew1 = Math.round(infestedsinew * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("infestedsinew").innerHTML = infestedsinew1.toLocaleString; var machinery1 = Math.round(machinery * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("machinery").innerHTML = machinery1.toLocaleString; var robotic1 = Math.round(robotic * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * 100) / 100; document.getElementById("robotic").innerHTML = robotic1.toLocaleString; var ferritearmor1 = Math.round(ferritearmor * (1 + Math.pow(curr_lvl - base_lvl, 1.75) * 0.005)*100) / 100; document.getElementById("ferritearmor").innerHTML = ferritearmor1.toLocaleString; var alloyarmor1 = Math.round(alloyarmor * (1 + Math.pow(curr_lvl - base_lvl, 1.75) * 0.005)*100) / 100; document.getElementById("alloyarmor").innerHTML = alloyarmor1.toLocaleString; var shield1 = Math.round(shield_ * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.0075)*100)/100; document.getElementById("shield").innerHTML = shield1.toLocaleString; var protoshield1 = Math.round(protoshield * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.0075)*100)/100; document.getElementById("protoshield").innerHTML = protoshield1.toLocaleString; var out_ehp = Math.round((health * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.015) * (1 + armor * (1 + Math.pow(curr_lvl - base_lvl, 1.75) * 0.005) / 300) + shield * (1 + Math.pow(curr_lvl - base_lvl, 2) * 0.0075))*100)/100; document.getElementById("out_ehp").innerHTML = out_ehp.toLocaleString; var affinity1 = Math.round(affinity * (1 + Math.pow(curr_lvl - base_lvl, 0.5) * 0.1425) * 100) / 100; document.getElementById("affinity").innerHTML = affinity1.toLocaleString; }   /* 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; });