Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: JavaScript | Size: 4.36 KB | Hits: 56 | Expires: Never
Copy text to clipboard
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. <script type="text/javascript">
  7.  
  8.  
  9.  
  10. function itemCalc(firstLevel, secondLevel, maxLevel) {
  11.  
  12.        
  13.         var difference = (secondLevel - firstLevel);
  14.         var total = (firstLevel + difference);
  15.         var grandTotal = 0;
  16.         for (var x=1;x<=maxLevel;x++){
  17.                 if (x == 1){
  18.                         document.write(x + ": " + firstLevel + "<br/>" );
  19.                 }
  20.                 else{
  21.                 document.write(x + ": " + total + "<br/>" );
  22.                 total = (total + difference);
  23.                 grandTotal = grandTotal + total
  24.                 }
  25.         }
  26.         document.write("GRAND TOTAL: " + grandTotal - total + "!");
  27.         document.write("<br/><br/><a href='http://mattrathbun.com/fun/ff.html'><input type='button' name='back' value='Go back' /></a>");
  28. }
  29.  
  30.        
  31. </script>
  32. </head>
  33.  
  34. <body>
  35. <center>
  36. <span style="font-size:30px;">Matt's FFXIII Item Leveling Calculator</span>
  37. <br /><br />
  38. Experience Required at First Level : <br/>
  39. <input type="text" id="firstLevel" name="firstLevel" /> <br/>
  40. <br/>
  41. Experience Required at Second Level : <br />
  42. <input type="text" id="secondLevel" name="secondLevel" /> <br/>
  43. <br />
  44. Item's Max Level : <br />
  45. <input type="text" id="maxLevel" name="maxLevel" /> <br/>
  46. <br />
  47. <input type="button" name="calculate" value="Calculate Total Experience" onclick="itemCalc(firstLevel.value, secondLevel.value, maxLevel.value);" />
  48. <br />
  49. <br />
  50. <div id="info" style="width:900px; text-align:left;">
  51. <br />
  52. <span style="font-size:24px;">Tutorial</span><br />
  53. <br />
  54. Hey everybody,<br/>
  55. Welcome to my Final Fantasy 13 Accessory Calculator. Let me give you a quick rundown on how this works.<br/>
  56. Basically you need 3 values to calculate experience, they are listed below. If you know these three values you can figure out how much XP it will take for an item to level up.<br /><br />
  57. Allow me to start with an example:<br />
  58. If an item shows 100xp to hit level 2 and you level it up once and it shows 200xp to hit level 3 then you have your first two values.<br /><br/>
  59. Experience Required at First Level : 100 <br />
  60. Experience Required at Second Level : 200<br />
  61. Item's Max Level : Use your guide or chart to determine this value<br /><br />
  62. Now you might ask, what about the max level? Well for the time being (I may update this later if people request it) you need a list of accessory and weapon max levels. The official guide has this, but it lacks the total
  63. experience required to level up items so out of necessity to get the item trophy I made this calculator.<br /><br />
  64. So level up an item 1 time, write down the number required to get to level 2 and to get to level 3. Then just input all 3 numbers and click calculate.
  65. <br />
  66. <br />
  67. <span style="font-size:24px;">What if my item isn't at level 1?</span><br /><br />
  68. I'm glad you asked! If your item is not at level 1 then just remove the amount of levels you have from max level.<br />
  69. Example: My item is level 10 the max item level is 20<br />
  70. Level up from 10-11 and input those two values in your first and second box. The max level box would just take 9 since that's all you have left to hit max!<br /><br />
  71. Simple right? I hope so enjoy. If you have any questions/concerns or if there are any problems feel free to message me here:<br />
  72. http://mattrathbun.com/hireme.html.<br /><br />
  73. -Sorry for the shitty formatting, it works and it's a side project so it's not getting full styling attention.
  74. <br />
  75. <br />
  76. <span style="font-size:24px;">Disclaimer</span><br /><br />
  77. Well hopefully you've found this guide useful, I am supplying this little calculator as another entry to the wonderful world of open source code. I do ask that if you use it for anything external from my site you
  78. include where it was taken from and toss me a message I'd love to see it put to good use.<br /><br />
  79. Hypothetical free cookie to whoever sends me a compiled list of every items xp values from 1 - Max. I am keeping a checklist myself but would gladly post a full list sooner than I will make one.<br /><br />
  80. If any of the math is wrong or you have a way to improve what I have created please send me a message. I'll gladly update anything I can to make it more efficient or user friendly.<br />
  81. Enjoy!
  82.  
  83. <br/><br /><br />
  84. </div>
  85.  
  86.  
  87. </center>
  88. </body>
  89. </html>