From RuneGlory
Jump to: navigation, search
 
(33 intermediate revisions by 2 users not shown)
Line 22: Line 22:
 
</h2>
 
</h2>
  
<input type="hidden" id="reglog" value="1781">
+
<table width ="100%">
<input type="hidden" id="oak" value="2250">
 
<input type="hidden" id="willow" value="3076">
 
<input type="hidden" id="maple" value="4125">
 
<input type="hidden" id="yew" value="5000">
 
<input type="hidden" id="magic" value="6000">
 
 
 
<input type="hidden" id="coinreglog" value="375">
 
<input type="hidden" id="coinoak" value="375">
 
<input type="hidden" id="coinwillow" value="375">
 
<input type="hidden" id="coinmaple" value="375">
 
<input type="hidden" id="coinyew" value="375">
 
<input type="hidden" id="coinmagic" value="375">
 
 
 
<table>
 
 
   <tr>
 
   <tr>
     <td>Your character</td>
+
     <th>Your firemaking XP</td>
 
     <td> <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">&nbsp;
 
     <td> <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">&nbsp;
     <input type="text" id="playername" name="players-name" placeholder="Your characters name" oninput="FunctionURLencode()"> &nbsp;<img id="firemaking" src="https://imgur.com/baIMjWJ.gif">
+
     <input type="text" id="curxp" name="skill-xp" onkeyup="func()" maxlength="9" placeholder="Your XP"> &nbsp;<img id="firemaking" src="https://imgur.com/baIMjWJ.gif">
 
  </td>
 
  </td>
  <tr>
+
<tr>
     <td>Your firemaking XP</td>
+
     <th>Target XP</td>
 
     <td> <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">&nbsp;
 
     <td> <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">&nbsp;
     <input type="text" id="curxp" name="skill-xp" placeholder="Your XP" oninput="myFunction()"> &nbsp;<img id="firemaking" src="https://imgur.com/baIMjWJ.gif">
+
     <input type="text" id="tarxp" name="skill-xp" onkeyup="func2()" maxlength="9" value="200000000"> &nbsp; <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">
 
  </td>
 
  </td>
 
<tr>
 
<tr>
     <td>Target XP</td>
+
     <th>Account Type</td>
     <td> <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">&nbsp;
+
     <td>
     <input type="text" id="tarxp" name="skill-xp" value="200000000" oninput="myFunction()"> &nbsp; <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">
+
    <input type="radio" name="radioaccount" value="type0" id="type0" onclick="myFunction()" checked> Regular
 +
     <input type="radio" name="radioaccount" value="type1" id="type1" onclick="myFunction()"> Ironman
 +
    <input type="radio" name="radioaccount" value="type2" id="type2" onclick="myFunction()"> Hardcore ironman
 
  </td>
 
  </td>
 
<tr>
 
<tr>
     <td>Use knowledge totem</td>
+
     <th>Use knowledge totem</td>
 
     <td>
 
     <td>
     <input type="radio" name="radiodonor" value="donor0" checked> No totem
+
     <input type="radio" name="radiodonor" value="donor0" id="donor0" onclick="myFunction()" checked> No totem
     <input type="radio" name="radiodonor" value="donor1"> <img id="next" src="https://i.imgur.com/Ugz3obm.png"> Regular Donator  
+
     <input type="radio" name="radiodonor" value="donor1" id="donor1" onclick="myFunction()"> <img id="next" src="https://i.imgur.com/Ugz3obm.png"> Regular Donator  
     <input type="radio" name="radiodonor" value="donor2"> <img id="next" src="https://i.imgur.com/Pjnz1Wh.png"> Super Donator  
+
     <input type="radio" name="radiodonor" value="donor2" id="donor2" onclick="myFunction()"> <img id="next" src="https://i.imgur.com/Pjnz1Wh.png"> Super Donator  
     <input type="radio" name="radiodonor" value="donor3"> <img id="next" src="https://i.imgur.com/qHYfynX.png"> Extreme Donator  
+
     <input type="radio" name="radiodonor" value="donor3" id="donor3" onclick="myFunction()"> <img id="next" src="https://i.imgur.com/qHYfynX.png"> Extreme Donator  
 +
</td>
 +
<tr>
 +
    <th>Bonus days</td>
 +
    <td>
 +
    <input type="radio" name="bonusdays" value="bonusday0" id="ftf0" onclick="myFunction()" checked> No bonus days
 +
    <input type="radio" name="bonusdays" value="bonusday1" id="ftf1" onclick="myFunction()"> Bonus days (1st-5th)
 
  </td>
 
  </td>
 
<tr>
 
<tr>
     <td>Bonus days</td>
+
     <th>Brawlers</td>
 
     <td>  
 
     <td>  
     <input type="radio" name="bonusdays" value="bonusday0" checked> No bonus days
+
     <input type="radio" name="brawlers" value="brawlers0" id="brawl0" onclick="myFunction()"  checked> No brawlers
     <input type="radio" name="bonusdays" value="bonusday1"> Bonus days (1st-5th)
+
    <input type="radio" name="brawlers" value="brawlers1" id="brawl1" onclick="myFunction()"> Brawlers
 +
</td>
 +
<tr>
 +
    <th>Bonus XP</td>
 +
    <td>
 +
     <input type="radio" name="bxp" value="bxp0" id="bxp0" onclick="myFunction()" checked> No Bonus XP
 +
    <input type="radio" name="bxp" value="bxp1" id="bxp1" onclick="myFunction()"> Bonus XP
 
  </td>
 
  </td>
 
</table>
 
</table>
Line 70: Line 70:
 
<script>
 
<script>
  
var urlarray = ["https://www.etherumps.com/highscores/user/",playername,"/1"]
+
function func() {
 +
  if (document.getElementById("curxp").value > 200000000) {
 +
    //alert("reached max limit");
 +
    document.getElementById("curxp").value = "Invalid amount, but I'll calculate!";
 +
  }
 +
}
  
function FunctionURLencode(){
+
function func2() {
 +
  if (document.getElementById("tarxp").value > 200000000) {
 +
    //alert("reached max limit");
 +
    document.getElementById("tarxp").value = "Invalid amount, but I'll calculate!";
 +
  }
 +
}
  
    var uri = MadeUrl;
+
function applyBonuses(xp) {
    var res = encodeURI(uri);
+
  /* Boolean checks for calculations */
    document.getElementById("urlencoded").innerHTML = res;
+
  var ftfc = 1;
 +
  var donorc = 1;
 +
  var bxpc = 0;
 +
  var typec = 1;
 +
  var brawlc = 1;
  
 +
  if (document.getElementById("ftf1").checked){
 +
  ftfc = 1.25;
 +
  }
 +
  if (document.getElementById("brawl1").checked){
 +
  brawlc = 2;
 +
  }
 +
  if (document.getElementById("donor1").checked){
 +
  donorc = 1.75;
 +
  }
 +
  if (document.getElementById("donor2").checked){
 +
  donorc = 2;
 +
  }
 +
  if (document.getElementById("donor3").checked){
 +
  donorc = 2.1;
 +
  }
 +
  if (document.getElementById("bxp1").checked){
 +
  bxpc = 2;
 +
  }
 +
  if (document.getElementById("type1").checked){
 +
  typec = 3;
 +
  }
 +
  if (document.getElementById("type2").checked){
 +
  typec = 5;
 +
  }
 +
  return(Math.floor((xp*(ftfc*donorc*brawlc))+(xp*bxpc))/typec)
 
}
 
}
 +
 +
document.getElementById("curxp").oninput = function() {myFunction()};
 +
document.getElementById("tarxp").oninput = function() {myFunction()};
 +
 +
// ***** Constant variables *****
 +
const regularLogXp = 1781;
 +
const oakLogXp = 2250;
 +
const willowLogXp = 3076;
 +
const mapleLogXp = 4125;
 +
const yewLogXp = 5000;
 +
const magicLogXp = 6000;
 +
 +
const regularLogCoin = 375;
 +
const oakLogCoin = 375;
 +
const willowLogCoin = 375;
 +
const mapleLogCoin = 375;
 +
const yewLogCoin = 375;
 +
const magicLogCoin = 375;
  
 
function myFunction() {
 
function myFunction() {
  
// Getting values of xps
+
var x = document.getElementById("curxp").value;
    var x = document.getElementById("curxp").value;
+
var y = document.getElementById("tarxp").value;
    var y = document.getElementById("tarxp").value;
+
var z = 13034431;
    var magic = document.getElementById("magic").value;
 
    var yew = document.getElementById("yew").value;
 
    var maple = document.getElementById("maple").value;
 
    var willow = document.getElementById("willow").value;
 
    var oak = document.getElementById("oak").value;
 
    var reglog = document.getElementById("reglog").value;
 
  
// Gettting values of coins made
+
// ***** Adjustable xp values used for calculations ***** //
    var coinsmagic = document.getElementById("coinmagic").value;
+
 
    var coinsyew = document.getElementById("coinyew").value;
+
var rrXp = applyBonuses(regularLogXp);
    var coinsmaple = document.getElementById("coinmaple").value;
+
var okXp = applyBonuses(oakLogXp);
    var coinswillow = document.getElementById("coinwillow").value;
+
var wwXp = applyBonuses(willowLogXp);
    var coinsoak = document.getElementById("coinoak").value;
+
var meXp = applyBonuses(mapleLogXp);
    var coinsreglog = document.getElementById("coinreglog").value;
+
var ywXp = applyBonuses(yewLogXp);
 +
var mcXp = applyBonuses(magicLogXp);
 
   
 
   
// Calculate XP
+
// ***** Calculate XP *****
     document.getElementById("magicr").innerHTML = Math.ceil((y - x)/magic);
+
 
     document.getElementById("yewr").innerHTML = Math.ceil((y - x)/yew);
+
var mc;
     document.getElementById("mapler").innerHTML = Math.ceil((y - x)/maple);
+
var yw;
     document.getElementById("willowr").innerHTML = Math.ceil((y - x)/willow);
+
var me;
     document.getElementById("oakr").innerHTML = Math.ceil((y - x)/oak);
+
var ww;
     document.getElementById("reglogr").innerHTML = Math.ceil((y - x)/reglog);
+
var ok;
 +
var rr;
 +
 
 +
//current xp over 99
 +
if (x > 13034431) {
 +
     mc = Math.ceil((y - x)/(mcXp/2));
 +
    yw = Math.ceil((y - x)/(ywXp/2));
 +
    me = Math.ceil((y - x)/(meXp/2));
 +
     ww = Math.ceil((y - x)/(wwXp/2));
 +
    ok = Math.ceil((y - x)/(okXp/2));
 +
    rr = Math.ceil((y - x)/(rrXp/2));
 +
// target xp under 99
 +
} else if (y < 13034431) {
 +
     mc = Math.ceil((y - x)/mcXp);
 +
    yw = Math.ceil((y - x)/ywXp);
 +
    me = Math.ceil((y - x)/meXp);
 +
     ww = Math.ceil((y - x)/wwXp);
 +
    ok = Math.ceil((y - x)/okXp);
 +
    rr = Math.ceil((y - x)/rrXp);
 +
// target xp over 99, current xp under 99
 +
} else {
 +
     mc = Math.ceil(((y - z)/(mcXp/2)) + ((z - x)/mcXp));
 +
    yw = Math.ceil(((y - z)/(ywXp/2)) + ((z - x)/ywXp));
 +
    me = Math.ceil(((y - z)/(meXp/2)) + ((z - x)/meXp));
 +
     ww = Math.ceil(((y - z)/(wwXp/2)) + ((z - x)/wwXp));
 +
    ok = Math.ceil(((y - z)/(okXp/2)) + ((z - x)/okXp));
 +
    rr = Math.ceil(((y - z)/(rrXp/2)) + ((z - x)/rrXp));
 +
}
 +
 
 +
    document.getElementById("magicr").innerHTML = mc;
 +
    document.getElementById("yewr").innerHTML = yw;
 +
    document.getElementById("mapler").innerHTML = me;
 +
    document.getElementById("willowr").innerHTML = ww;
 +
    document.getElementById("oakr").innerHTML = ok;
 +
    document.getElementById("reglogr").innerHTML = rr;
  
 +
// ***** Calculate XP required *****
 
     document.getElementById("xpneeded").innerHTML = (y - x);
 
     document.getElementById("xpneeded").innerHTML = (y - x);
    document.getElementById("spobtained").innerHTML = Math.floor((y - x)/500000)*3;
 
  
    document.getElementById("coinsmadereglog").innerHTML = (Math.ceil((y - x)/reglog))*coinsreglog;
+
// ***** Calculate skillpoints obtained *****
     document.getElementById("coinsmadeoak").innerHTML = (Math.ceil((y - x)/oak))*coinsoak;
+
  var axp = x%500000;
     document.getElementById("coinsmadewillow").innerHTML = (Math.ceil((y - x)/reglog))*coinswillow;
+
  var bxp = (y-x)%500000;
     document.getElementById("coinsmademaple").innerHTML = (Math.ceil((y - x)/maple))*coinsmaple;
+
  var cxp = 0;
     document.getElementById("coinsmadeyew").innerHTML = (Math.ceil((y - x)/yew))*coinsyew;
+
  if (bxp+axp == 500000){
     document.getElementById("coinsmademagic").innerHTML = (Math.ceil((y - x)/magic))*coinsmagic;
+
  cxp = 3;
 +
  }
 +
  document.getElementById("spobtained").innerHTML = Math.floor((y -  
 +
  x)/500000)*3 + cxp;
 +
 
 +
// ***** Calculate coins obtained *****
 +
    document.getElementById("coinsmadereglog").innerHTML = rr*regularLogCoin;
 +
     document.getElementById("coinsmadeoak").innerHTML = ok*oakLogCoin;
 +
    document.getElementById("coinsmadewillow").innerHTML = ww*willowLogCoin;
 +
    document.getElementById("coinsmademaple").innerHTML = me*mapleLogCoin;
 +
    document.getElementById("coinsmadeyew").innerHTML = yw*yewLogCoin;
 +
    document.getElementById("coinsmademagic").innerHTML = mc*magicLogCoin;
 +
 
 +
// ***** Calculate amount of brawlers required note: brawlers last 501 charge *****
 +
    document.getElementById("magicBrawlers").innerHTML = Math.ceil(mc/501);
 +
    document.getElementById("yewBrawlers").innerHTML = Math.ceil(yw/501);
 +
    document.getElementById("mapleBrawlers").innerHTML = Math.ceil(me/501);
 +
     document.getElementById("willowBrawlers").innerHTML = Math.ceil(ww/501);
 +
    document.getElementById("oakBrawlers").innerHTML = Math.ceil(ok/501);
 +
    document.getElementById("reglogBrawlers").innerHTML = Math.ceil(rr/501);
 +
 
 +
 
 +
// ***** Calculate amount of skillpoints required *****
 +
    document.getElementById("magicSkillpoint").innerHTML = Math.ceil(mc/501)*50;
 +
     document.getElementById("yewSkillpoint").innerHTML = Math.ceil(yw/500)*50;
 +
    document.getElementById("mapleSkillpoint").innerHTML = Math.ceil(me/500)*50;
 +
    document.getElementById("willowSkillpoint").innerHTML = Math.ceil(ww/500)*50;
 +
    document.getElementById("oakSkillpoint").innerHTML = Math.ceil(ok/500)*50;
 +
     document.getElementById("reglogSkillpoint").innerHTML = Math.ceil(rr/500)*50;
 +
 
 +
 
 +
 
 +
// ***** Calculate inventories *****
 +
    document.getElementById("magicInv").innerHTML = Math.ceil(mc/27);
 +
    document.getElementById("yewInv").innerHTML = Math.ceil(yw/27);
 +
    document.getElementById("mapleInv").innerHTML = Math.ceil(me/27);
 +
     document.getElementById("willowInv").innerHTML = Math.ceil(ww/27);
 +
    document.getElementById("oakInv").innerHTML = Math.ceil(ok/27);
 +
    document.getElementById("reglogInv").innerHTML = Math.ceil(rr/27);
  
 
}
 
}
Line 123: Line 247:
 
Experience needed: <span id="xpneeded"> </span><br>
 
Experience needed: <span id="xpneeded"> </span><br>
 
Skilling points you'll obtain: <span id="spobtained"> </span><br>
 
Skilling points you'll obtain: <span id="spobtained"> </span><br>
<table>
+
<table width="100%">
 
   <tr>
 
   <tr>
     <td> Level </td>
+
     <th> Level </td>
     <td> Name </td>
+
     <th> Name </td>
     <td> Amount </td>
+
     <th> # required </td>
     <td> Coins made </td>
+
     <th> Coins made </td>
     <td> With Brawlers </td>
+
     <th> # of brawlers </td>
     <td> With Totem </td>
+
     <th> Skillpoint cost </td>
     <td> Brawerls & Totem </td>
+
     <th> # of inventories </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 139: Line 263:
 
     <td id="reglogr"> </td>
 
     <td id="reglogr"> </td>
 
     <td id="coinsmadereglog"> </td>
 
     <td id="coinsmadereglog"> </td>
     <td> </td>
+
     <td id="reglogBrawlers"> </td>
     <td> </td>
+
     <td id="reglogSkillpoint"> </td>
     <td> </td>
+
     <td id="reglogInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 149: Line 273:
 
     <td id="oakr"> </td>
 
     <td id="oakr"> </td>
 
     <td id="coinsmadeoak"> </td>
 
     <td id="coinsmadeoak"> </td>
     <td> </td>
+
     <td id="oakBrawlers"> </td>
     <td> </td>
+
     <td id="oakSkillpoint"> </td>
     <td> </td>
+
     <td id="oakInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 159: Line 283:
 
     <td id="willowr"> </td>
 
     <td id="willowr"> </td>
 
     <td id="coinsmadewillow"> </td>
 
     <td id="coinsmadewillow"> </td>
     <td> </td>
+
     <td id="willowBrawlers"> </td>
     <td> </td>
+
     <td id="willowSkillpoint"> </td>
     <td> </td>
+
     <td id="willowInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 169: Line 293:
 
     <td id="mapler"> </td>
 
     <td id="mapler"> </td>
 
     <td id="coinsmademaple"> </td>
 
     <td id="coinsmademaple"> </td>
     <td> </td>
+
     <td id="mapleBrawlers"> </td>
     <td> </td>
+
     <td id="mapleSkillpoint"> </td>
     <td> </td>
+
     <td id="mapleInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 179: Line 303:
 
     <td id="yewr"> </td>
 
     <td id="yewr"> </td>
 
     <td id="coinsmadeyew"> </td>
 
     <td id="coinsmadeyew"> </td>
     <td> </td>
+
     <td id="yewBrawlers"> </td>
     <td> </td>
+
     <td id="yewSkillpoint"> </td>
     <td> </td>
+
     <td id="yewInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 189: Line 313:
 
     <td id="magicr"> </td>
 
     <td id="magicr"> </td>
 
     <td id="coinsmademagic"> </td>
 
     <td id="coinsmademagic"> </td>
     <td> </td>
+
     <td id="magicBrawlers"> </td>
     <td> </td>
+
     <td id="magicSkillpoint"> </td>
     <td> </td>
+
     <td id="magicInv"> </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>

Latest revision as of 23:33, 2 March 2018

Test page from Cypher to make the build-in XP Calculator


Test Firemaking Tables:

Your firemaking XP    
Target XP    
Account Type Regular Ironman Hardcore ironman
Use knowledge totem No totem Regular Donator Super Donator Extreme Donator
Bonus days No bonus days Bonus days (1st-5th)
Brawlers No brawlers Brawlers
Bonus XP No Bonus XP Bonus XP
Experience needed:
Skilling points you'll obtain:
Level Name # required Coins made # of brawlers Skillpoint cost # of inventories
1 Regular log
15 Oak log
30 Willow log
45 Maple log
60 Yew log
75 Magic log