daily pastebin goal
66%
SHARE
TWEET

SMN Magic Damage Calculator

Pergatory Mar 16th, 2017 (edited) 549 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html><head>
  2. <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  3. <title>Summoner Magic Damage Calculator</title>
  4. <script type="text/javascript" language="JavaScript">
  5.  
  6. var setNum = 1;
  7.  
  8. // Defaults for equipment panel
  9. var mainMab = 140;
  10. var mainBpd = 10;
  11. var subMab = 0;
  12. var subBpd = 5;
  13. var rangeMab = 0;
  14. var rangeBpd = 0;
  15. var ammoMab = 0;
  16. var ammoBpd = 15;
  17. var headMab = 35;
  18. var headBpd = 10;
  19. var neckMab = 0;
  20. var neckBpd = 10;
  21. var ear1Mab = 0;
  22. var ear1Bpd = 10;
  23. var ear2Mab = 0;
  24. var ear2Bpd = 5;
  25. var bodyMab = 35;
  26. var bodyBpd = 10;
  27. var handsMab = 48;
  28. var handsBpd = 15;
  29. var ring1Mab = 0;
  30. var ring1Bpd = 4;
  31. var ring2Mab = 0;
  32. var ring2Bpd = 4;
  33. var backMab = 0;
  34. var backBpd = 5;
  35. var waistMab = 10;
  36. var waistBpd = 0;
  37. var legsMab = 35;
  38. var legsBpd = 17;
  39. var feetMab = 35;
  40. var feetBpd = 12;
  41.  
  42. function startup()
  43. {
  44.   addSet();
  45.   dmgCalc();
  46.   copyValues(document.getElementById("totalMAB1").value, document.getElementById("totalBPD1").value);
  47. }
  48.  
  49. function dmgEvent()
  50. {
  51.   dmgCalc();
  52. }
  53.  
  54. function dmgCalc()
  55. {
  56.   var mab = 100 + +document.getElementById("equipmentMAB").value;
  57.   var bpd = 100 + +document.getElementById("equipmentBPD").value;
  58.   var nativeMAB = document.getElementsByName("nativeMAB");
  59.   for(var i = 0; i < nativeMAB.length; i++) {
  60.    if(nativeMAB[i].checked == true) {
  61.      mab = mab + +nativeMAB[i].value;
  62.    }
  63.  }
  64.  var meritMAB = document.getElementsByName("meritMAB");
  65.  for(var i = 0; i < meritMAB.length; i++) {
  66.    if(meritMAB[i].checked == true) {
  67.      mab = mab + +meritMAB[i].value;
  68.    }
  69.  }
  70.  var capacityMAB = document.getElementsByName("capacityMAB");
  71.  for(var i = 0; i < capacityMAB.length; i++) {
  72.    if(capacityMAB[i].checked == true) {
  73.      mab = mab + +capacityMAB[i].value;
  74.    }
  75.  }  
  76.  document.getElementById("textResults").innerHTML = (mab/100) + " MAB multiplier x " + (bpd/100) + " BPD multiplier = " + (mab*bpd/10000) + " Total Multiplier";
  77. }
  78.  
  79. function equipEvent(recalcSet)
  80. {
  81.  equipCalc(recalcSet);
  82. }
  83.  
  84. function equipCalc(recalcSet)
  85. {
  86.  var mab = +document.getElementById("mainMAB"+recalcSet).value + +document.getElementById("subMAB"+recalcSet).value + +document.getElementById("rangeMAB"+recalcSet).value + +document.getElementById("ammoMAB"+recalcSet).value
  87.    + +document.getElementById("headMAB"+recalcSet).value + +document.getElementById("neckMAB"+recalcSet).value + +document.getElementById("ear1MAB"+recalcSet).value + +document.getElementById("ear2MAB"+recalcSet).value
  88.    + +document.getElementById("bodyMAB"+recalcSet).value + +document.getElementById("handsMAB"+recalcSet).value + +document.getElementById("ring1MAB"+recalcSet).value + +document.getElementById("ring2MAB"+recalcSet).value
  89.    + +document.getElementById("backMAB"+recalcSet).value + +document.getElementById("waistMAB"+recalcSet).value + +document.getElementById("legsMAB"+recalcSet).value + +document.getElementById("feetMAB"+recalcSet).value;
  90.  var bpd = +document.getElementById("mainBPD"+recalcSet).value + +document.getElementById("subBPD"+recalcSet).value + +document.getElementById("rangeBPD"+recalcSet).value + +document.getElementById("ammoBPD"+recalcSet).value
  91.    + +document.getElementById("headBPD"+recalcSet).value + +document.getElementById("neckBPD"+recalcSet).value + +document.getElementById("ear1BPD"+recalcSet).value + +document.getElementById("ear2BPD"+recalcSet).value
  92.    + +document.getElementById("bodyBPD"+recalcSet).value + +document.getElementById("handsBPD"+recalcSet).value + +document.getElementById("ring1BPD"+recalcSet).value + +document.getElementById("ring2BPD"+recalcSet).value
  93.    + +document.getElementById("backBPD"+recalcSet).value + +document.getElementById("waistBPD"+recalcSet).value + +document.getElementById("legsBPD"+recalcSet).value + +document.getElementById("feetBPD"+recalcSet).value;
  94.  
  95.  document.getElementById("totalMAB"+recalcSet).value = mab;
  96.  document.getElementById("totalBPD"+recalcSet).value = bpd;
  97. }
  98.  
  99. function copyValues(mab, bpd)
  100. {
  101.  document.getElementById("equipmentMAB").value = mab;
  102.  document.getElementById("equipmentBPD").value = bpd;
  103.  dmgCalc();
  104. }
  105.  
  106. function addSet()
  107. {
  108.  var newDiv = document.createElement("div");
  109.  newDiv.id = "set" + setNum;
  110.  newDiv.style = "float:left; margin:5;";
  111.  var divText = "<table border='1' cellspacing='0' cellpadding='2'><tr><td>";
  112.   divText += "<p align='center'>Set Name: <input /></p>";
  113.   divText += "<table class='EquipTable'>";
  114.   divText += "  <tr>";
  115.   divText += "    <th><br/>MAB<br/>BPD</th>";
  116.   divText += "  <td>Main<br /><input id='mainMAB"+setNum+"' size='3' value='"+mainMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='mainBPD"+setNum+"' size='3' value='"+mainBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  117.   divText += "    <td>Sub<br /><input id='subMAB"+setNum+"' size='3' value='"+subMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='subBPD"+setNum+"' size='3' value='"+subBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  118.   divText += "    <td>Range<br /><input id='rangeMAB"+setNum+"' size='3' value='"+rangeMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='rangeBPD"+setNum+"' size='3' value='"+rangeBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  119.   divText += "    <td>Ammo<br /><input id='ammoMAB"+setNum+"' size='3' value='"+ammoMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='ammoBPD"+setNum+"' size='3' value='"+ammoBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  120.   divText += "  </tr>";
  121.   divText += "  <tr>";
  122.   divText += "    <th><br/>MAB<br/>BPD</th>";
  123.   divText += "  <td>Head<br /><input id='headMAB"+setNum+"' size='3' value='"+headMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='headBPD"+setNum+"' size='3' value='"+headBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  124.   divText += "    <td>Neck<br /><input id='neckMAB"+setNum+"' size='3' value='"+neckMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='neckBPD"+setNum+"' size='3' value='"+neckBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  125.   divText += "    <td>Ear1<br /><input id='ear1MAB"+setNum+"' size='3' value='"+ear1Mab+"' onchange='equipEvent("+setNum+");' /><br/><input id='ear1BPD"+setNum+"' size='3' value='"+ear1Bpd+"' onchange='equipEvent("+setNum+");' /></td>";
  126.   divText += "    <td>Ear2<br /><input id='ear2MAB"+setNum+"' size='3' value='"+ear2Mab+"' onchange='equipEvent("+setNum+");' /><br/><input id='ear2BPD"+setNum+"' size='3' value='"+ear2Bpd+"' onchange='equipEvent("+setNum+");' /></td>";
  127.   divText += "  </tr>";
  128.   divText += "  <tr>";
  129.   divText += "    <th><br/>MAB<br/>BPD</th>";
  130.   divText += "  <td>Body<br /><input id='bodyMAB"+setNum+"' size='3' value='"+bodyMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='bodyBPD"+setNum+"' size='3' value='"+bodyBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  131.   divText += "    <td>Hands<br /><input id='handsMAB"+setNum+"' size='3' value='"+handsMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='handsBPD"+setNum+"' size='3' value='"+handsBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  132.   divText += "    <td>Ring1<br /><input id='ring1MAB"+setNum+"' size='3' value='"+ring1Mab+"' onchange='equipEvent("+setNum+");' /><br/><input id='ring1BPD"+setNum+"' size='3' value='"+ring1Bpd+"' onchange='equipEvent("+setNum+");' /></td>";
  133.   divText += "    <td>Ring2<br /><input id='ring2MAB"+setNum+"' size='3' value='"+ring2Mab+"' onchange='equipEvent("+setNum+");' /><br/><input id='ring2BPD"+setNum+"' size='3' value='"+ring2Bpd+"' onchange='equipEvent("+setNum+");' /></td>";
  134.   divText += "  </tr>";
  135.   divText += "  <tr>";
  136.   divText += "    <th><br/>MAB<br/>BPD</th>";
  137.   divText += "  <td>Back<br /><input id='backMAB"+setNum+"' size='3' value='"+backMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='backBPD"+setNum+"' size='3' value='"+backBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  138.   divText += "    <td>Waist<br /><input id='waistMAB"+setNum+"' size='3' value='"+waistMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='waistBPD"+setNum+"' size='3' value='"+waistBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  139.   divText += "    <td>Legs<br /><input id='legsMAB"+setNum+"' size='3' value='"+legsMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='legsBPD"+setNum+"' size='3' value='"+legsBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  140.   divText += "    <td>Feet<br /><input id='feetMAB"+setNum+"' size='3' value='"+feetMab+"' onchange='equipEvent("+setNum+");' /><br/><input id='feetBPD"+setNum+"' size='3' value='"+feetBpd+"' onchange='equipEvent("+setNum+");' /></td>";
  141.   divText += "  </tr>";
  142.   divText += "</table>";
  143.   divText += "<p align='center'><span>Total MAB: <input id='totalMAB"+setNum+"' size='4' readonly /></span><span>Total BPD: <input id='totalBPD"+setNum+"' size='4' readonly /></span></p>";
  144.   divText += "<p align='center'><input type='button' onClick='copyValues(document.getElementById(\"totalMAB"+setNum+"\").value, document.getElementById(\"totalBPD"+setNum+"\").value);' value='Use These Values' /></p>";
  145.   divText += "</td></tr></table>";  
  146.   newDiv.innerHTML = divText;  
  147.   var div = document.getElementById("sets");
  148.   div.appendChild(newDiv);
  149.   if (setNum > 1)
  150.   {
  151.     document.getElementById("mainMAB"+setNum).value = document.getElementById("mainMAB1").value;
  152.     document.getElementById("mainBPD"+setNum).value = document.getElementById("mainBPD1").value;
  153.     document.getElementById("subMAB"+setNum).value = document.getElementById("subMAB1").value;
  154.     document.getElementById("subBPD"+setNum).value = document.getElementById("subBPD1").value;
  155.     document.getElementById("rangeMAB"+setNum).value = document.getElementById("rangeMAB1").value;
  156.     document.getElementById("rangeBPD"+setNum).value = document.getElementById("rangeBPD1").value;
  157.     document.getElementById("ammoMAB"+setNum).value = document.getElementById("ammoMAB1").value;
  158.     document.getElementById("ammoBPD"+setNum).value = document.getElementById("ammoBPD1").value;
  159.     document.getElementById("headMAB"+setNum).value = document.getElementById("headMAB1").value;
  160.     document.getElementById("headBPD"+setNum).value = document.getElementById("headBPD1").value;
  161.     document.getElementById("neckMAB"+setNum).value = document.getElementById("neckMAB1").value;
  162.     document.getElementById("neckBPD"+setNum).value = document.getElementById("neckBPD1").value;
  163.     document.getElementById("ear1MAB"+setNum).value = document.getElementById("ear1MAB1").value;
  164.     document.getElementById("ear1BPD"+setNum).value = document.getElementById("ear1BPD1").value;
  165.     document.getElementById("ear2MAB"+setNum).value = document.getElementById("ear2MAB1").value;
  166.     document.getElementById("ear2BPD"+setNum).value = document.getElementById("ear2BPD1").value;
  167.     document.getElementById("bodyMAB"+setNum).value = document.getElementById("bodyMAB1").value;
  168.     document.getElementById("bodyBPD"+setNum).value = document.getElementById("bodyBPD1").value;
  169.     document.getElementById("handsMAB"+setNum).value = document.getElementById("handsMAB1").value;
  170.     document.getElementById("handsBPD"+setNum).value = document.getElementById("handsBPD1").value;
  171.     document.getElementById("ring1MAB"+setNum).value = document.getElementById("ring1MAB1").value;
  172.     document.getElementById("ring1BPD"+setNum).value = document.getElementById("ring1BPD1").value;
  173.     document.getElementById("ring2MAB"+setNum).value = document.getElementById("ring2MAB1").value;
  174.     document.getElementById("ring2BPD"+setNum).value = document.getElementById("ring2BPD1").value;
  175.     document.getElementById("backMAB"+setNum).value = document.getElementById("backMAB1").value;
  176.     document.getElementById("backBPD"+setNum).value = document.getElementById("backBPD1").value;
  177.     document.getElementById("waistMAB"+setNum).value = document.getElementById("waistMAB1").value;
  178.     document.getElementById("waistBPD"+setNum).value = document.getElementById("waistBPD1").value;
  179.     document.getElementById("legsMAB"+setNum).value = document.getElementById("legsMAB1").value;
  180.     document.getElementById("legsBPD"+setNum).value = document.getElementById("legsBPD1").value;
  181.     document.getElementById("feetMAB"+setNum).value = document.getElementById("feetMAB1").value;
  182.     document.getElementById("feetBPD"+setNum).value = document.getElementById("feetBPD1").value;
  183.   }
  184.   equipCalc(setNum);
  185.   setNum++;
  186. }
  187.  
  188. </script>
  189. <style type="text/css">
  190. body
  191. {
  192.   font-family: Verdana, Arial;
  193.   font-size: 8pt;
  194. }
  195.  
  196. p{font-size: 10pt;}
  197.  
  198. span{white-space: nowrap;}
  199.  
  200. td
  201. {
  202.   font-size: 10pt;
  203.   padding: 3px;
  204. }
  205.  
  206. input, select{font-family: inherit;}
  207.  
  208. .EquipTable TR TH
  209. {
  210.   padding: 8px;
  211.   text-align: right;
  212.   font-weight: normal;
  213. }
  214.  
  215. .EquipTable TR TD
  216. {
  217.   background-color: threedface;
  218.   padding: 8px;
  219.   color: menutext;
  220.   border-width: 2px;
  221.   border-style: solid;
  222.   border-color: threedhighlight threedshadow threedshadow threedhighlight;
  223.   text-align: center;
  224. }
  225.  
  226. .radioSpan
  227. {
  228.   border: 1px solid #cfcfcf;
  229.   padding: 2px 10px 1px 3px;
  230.   line-height: 2em;
  231. }
  232. </style>
  233. </head>
  234.  
  235. <body onload="startup();">
  236. <h1>Summoner Magic Damage Calculator</h1>
  237. <div name="main">
  238. <table>
  239.   <tr>
  240.     <td>Avatar Level:</td>
  241.     <td>
  242.       <label><span class="radioSpan"><input type="radio" id="radioLv99" name="nativeMAB" value="40" onchange="dmgEvent();">99</input></span></label>
  243.       <label><span class="radioSpan"><input type="radio" id="radioLv113" name="nativeMAB" value="58" onchange="dmgEvent();">113</input></span></label>
  244.       <label><span class="radioSpan"><input type="radio" id="radioLv115" name="nativeMAB" value="62" onchange="dmgEvent();">115</input></span></label>
  245.       <label><span class="radioSpan"><input type="radio" id="radioLv119" name="nativeMAB" value="69" onchange="dmgEvent();">119</input></span></label>
  246.       <label><span class="radioSpan"><input type="radio" id="radioLv120" name="nativeMAB" value="70" onchange="dmgEvent();" checked>120+</input></span></label>
  247.     </td>
  248.   </tr>
  249.   <tr>
  250.     <td>Avatar MAB from Merits:</td>
  251.     <td>
  252.       <label><span class="radioSpan"><input type="radio" id="radioMerit0" name="meritMAB" value="0" onchange="dmgEvent();"> +0</input></span></label>
  253.       <label><span class="radioSpan"><input type="radio" id="radioMerit1" name="meritMAB" value="2" onchange="dmgEvent();"> +2</input></span></label>
  254.       <label><span class="radioSpan"><input type="radio" id="radioMerit2" name="meritMAB" value="4" onchange="dmgEvent();"> +4</input></span></label>
  255.       <label><span class="radioSpan"><input type="radio" id="radioMerit3" name="meritMAB" value="6" onchange="dmgEvent();"> +6</input></span></label>
  256.       <label><span class="radioSpan"><input type="radio" id="radioMerit4" name="meritMAB" value="8" onchange="dmgEvent();"> +8</input></span></label>
  257.       <label><span class="radioSpan"><input type="radio" id="radioMerit5" name="meritMAB" value="10" onchange="dmgEvent();" checked> +10</input></span></label>
  258.     </td>
  259.   </tr>
  260.   <tr>
  261.     <td>Avatar MAB from Gifts:</td>
  262.     <td>
  263.       <label><span class="radioSpan"><input type="radio" id="radioJP0" name="capacityMAB" value="0" onchange="dmgEvent();"> +0</input></span></label>
  264.       <label><span class="radioSpan"><input type="radio" id="radioJP1" name="capacityMAB" value="5" onchange="dmgEvent();"> +5 (80)</input></span></label>
  265.       <label><span class="radioSpan"><input type="radio" id="radioJP2" name="capacityMAB" value="13" onchange="dmgEvent();"> +13 (405)</input></span></label>
  266.       <label><span class="radioSpan"><input type="radio" id="radioJP3" name="capacityMAB" value="23" onchange="dmgEvent();"> +23 (980)</input></span></label>
  267.       <label><span class="radioSpan"><input type="radio" id="radioJP4" name="capacityMAB" value="36" onchange="dmgEvent();" checked> +36 (1805)</input></span></label>
  268.     </td>
  269.   </tr>
  270.   <tr>
  271.     <td>MAB From Equipment:</td>
  272.     <td><input id="equipmentMAB" size="3" onchange="dmgEvent();" /></td>
  273.   </tr>
  274.   <tr>
  275.     <td>BP Dmg From Equipment:</td>
  276.     <td><input id="equipmentBPD" size="3" onchange="dmgEvent();" /></td>
  277.   </tr>
  278. </table>
  279. <h2><label id="textResults" /></h2>
  280. </div>
  281.  
  282. <hr/>
  283.  
  284. <h1>Equipment Bonus Helper <input type='button' onClick='addSet();' value='Add Set' /></h1>
  285.  
  286. <div id="sets" />
  287.  
  288. </body></html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top