Advertisement
Guest User

Untitled

a guest
May 26th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <HTML>
  2.  
  3. <SCRIPT LANGUAGE="JavaScript">
  4. function cookies(){
  5.     var xpperth = new Array(10080, 8750, 630, 665000, 57500, 2100);
  6.     var desc = new Array(" Dragon bones" ," Infernal Ashes", " Bones"," Gorak kills", " Bandos kills", "");
  7.     var gmmutiple = new Array(7, 1, 0.2);
  8.     var mutiplier = new Array(1, 1.35, 1.5, 1.55, 1.85, 2.05);
  9.  
  10.  
  11.     var targetlvl = parseInt(targetlevel.value);
  12.     var currentxp = parseInt(currentXP.value);
  13.     var points = 0;
  14.     var amofth;
  15.  
  16.     for(var i = 1; i < targetlvl; i++){
  17.         points = points + Math.floor(i + 300 * Math.pow(2, i / 7.));
  18.         var xpforxlevel = Math.floor(points / 4);
  19.     }
  20.     var xpneeded = xpforxlevel - currentxp;
  21.  
  22.     if(xpsrc.value != 1337 && typeskill.value == 1){
  23.         var xpperth3 = xpperth[parseInt(xpsrc.value)] * gmmutiple[parseInt(gm.value)] * mutiplier[parseInt(mutiple.value)];
  24.         amofth = xpneeded / xpperth3;
  25.         amofth = Math.ceil(amofth);
  26.         output.setAttribute("value", amofth + desc[parseInt(xpsrc.value)]);
  27.     } else if(xpsrc.value != 1337){
  28.         var xpperth3 = xpperth[parseInt(xpsrc.value)] * mutiplier[parseInt(mutiple.value)];
  29.         amofth = xpneeded / xpperth3
  30.         amofth = Math.ceil(amofth);
  31.         output.setAttribute("value", amofth + desc[parseInt(xpsrc.value)]);
  32.     } else {
  33.         var xpperth3 = xpperth[parseInt(xpsrc.value)] * mutiplier[parseInt(mutiple.value)];
  34.         amofth = xpneeded / xpperth3
  35.         amofth = Math.ceil(amofth);
  36.         output.setAttribute("value", amofth + " More of what you were doing!");
  37.         }
  38.         console.log(xpneeded)
  39. }
  40. </SCRIPT>
  41.  
  42. <BODY>
  43. What type of skill are you leveling? (prayer is not a combat skill)<br>
  44. <select id="typeskill">
  45. <option value="0">Non-combat skill</option>
  46. <option value="1">Combat skill</option>
  47. </select><br><br>
  48.  
  49. What is your gamemode?<br>
  50. <select id="gm">
  51. <option value="0">Lord</option>
  52. <option value="1">Legend</option>
  53. <option value="2">Master</option>
  54. </select><br><br>
  55. How much XP do you have in your chosen skill?<br>
  56. <input type=text id=currentXP value=""><br><br>
  57.  
  58. What level do you want for your chosen skill?<br>
  59. <input type=text id=targetlevel value=""><br><br>
  60.  
  61.  
  62. What is the current xp mutiplier?<br>
  63. <select id="mutiple">
  64. <option value="0">1x    (Regular day)</option>
  65. <option value="1">1.35x (Weekend day)</option>
  66. <option value="2">1.5x  (Vote bonus)</option>
  67. <option value="3">1.55x (Donor + Weekend day)</option>
  68. <option value="4">1.85x (Weekend day + Vote bonus)</option>
  69. <option value="5">2.05x (Weekend day + Donor + Vote bonus)</option>
  70. </select><br>
  71.  
  72. What XP source are you going to use?<br>
  73. <select id="xpsrc">
  74. <option value="1337">Custom</option>
  75. <optgroup label="Prayer">
  76. <option value="0">Dragon Bones</option>
  77. <option value="1">Infernal Ashes</option>
  78. <option value="2">Bones</option>
  79. <option value="5">Daggonoth Bones</option>
  80. </optgroup>
  81. <optgroup label="Combat">
  82. <option value="3">Gorak</option>
  83. <option value="4">General Graardor</option>
  84. </optgroup>
  85. </select>
  86. <br>
  87.  
  88. How much XP does that give you? (Only needed when you selected "custom")<br>
  89. <input type=text id=custominput value=""><br><br>
  90. <button onclick="cookies()">Calculate!</button><br>
  91. You will need: <input type=text id=output value="">
  92.  
  93. </BODY>
  94. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement