Welcome to the RuneGlory Wiki, where we do our best to make your life easier!

You can use the search menu on the right side of the wiki (or at the bottom if you are on mobile) to search for the page you are looking for. The most popular pages can be found on the right side of the wiki aswell (or again at the bottom if you are on mobile).

Difference between revisions of "Main page/Test Cypher"

From RuneGlory
Jump to: navigation, search
 
(14 intermediate revisions by 2 users not shown)
Line 32: Line 32:
 
     <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="tarxp" name="skill-xp" onkeyup="func2()" maxlength="9" value="200000000"> &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>
 +
<tr>
 +
    <th>Account Type</td>
 +
    <td>
 +
    <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>
 
     <th>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>
 
  </td>
 
<tr>
 
<tr>
 
     <th>Bonus days</td>
 
     <th>Bonus days</td>
 
     <td>  
 
     <td>  
     <input type="radio" name="bonusdays" value="bonusday0" checked> No bonus days  
+
     <input type="radio" name="bonusdays" value="bonusday0" id="ftf0" onclick="myFunction()" checked> No bonus days  
     <input type="radio" name="bonusdays" value="bonusday1"> Bonus days (1st-5th)
+
     <input type="radio" name="bonusdays" value="bonusday1" id="ftf1" onclick="myFunction()"> Bonus days (1st-5th)
 +
</td>
 +
<tr>
 +
    <th>Brawlers</td>
 +
    <td>
 +
    <input type="radio" name="brawlers" value="brawlers0" id="brawl0" onclick="myFunction()"  checked> No brawlers
 +
    <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 63: Line 82:
 
     document.getElementById("tarxp").value = "Invalid amount, but I'll calculate!";
 
     document.getElementById("tarxp").value = "Invalid amount, but I'll calculate!";
 
   }
 
   }
 +
}
 +
 +
function applyBonuses(xp) {
 +
  /* Boolean checks for calculations */
 +
  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)
 
}
 
}
  
Line 68: Line 122:
 
document.getElementById("tarxp").oninput = function() {myFunction()};
 
document.getElementById("tarxp").oninput = function() {myFunction()};
  
// ***** Fixed variables for XP ets *****  
+
// ***** Constant variables *****  
 
const regularLogXp = 1781;
 
const regularLogXp = 1781;
 
const oakLogXp = 2250;
 
const oakLogXp = 2250;
Line 89: Line 143:
 
var z = 13034431;
 
var z = 13034431;
  
 +
// ***** Adjustable xp values used for calculations ***** //
 +
 +
var rrXp = applyBonuses(regularLogXp);
 +
var okXp = applyBonuses(oakLogXp);
 +
var wwXp = applyBonuses(willowLogXp);
 +
var meXp = applyBonuses(mapleLogXp);
 +
var ywXp = applyBonuses(yewLogXp);
 +
var mcXp = applyBonuses(magicLogXp);
 
   
 
   
 
// ***** Calculate XP *****  
 
// ***** Calculate XP *****  
 
  
 
var mc;
 
var mc;
Line 100: Line 161:
 
var rr;
 
var rr;
  
if (curxp < 13034431 /*&& tarxp < 13034431*/) {
+
//current xp over 99
     mc = Math.ceil((y - x)/magicLogXp);
+
if (x > 13034431) {
     yw = Math.ceil((y - x)/yewLogXp);
+
     mc = Math.ceil((y - x)/(mcXp/2));
     me = Math.ceil((y - x)/mapleLogXp);
+
     yw = Math.ceil((y - x)/(ywXp/2));
     ww = Math.ceil((y - x)/willowLogXp);
+
     me = Math.ceil((y - x)/(meXp/2));
     ok = Math.ceil((y - x)/oakLogXp);
+
     ww = Math.ceil((y - x)/(wwXp/2));
     rr = Math.ceil((y - x)/regularLogXp);
+
     ok = Math.ceil((y - x)/(okXp/2));
} else if (curxp > 13034431) {
+
     rr = Math.ceil((y - x)/(rrXp/2));
     mc = Math.ceil((y - x)/(magicLogXp/2));
+
// target xp under 99
     yw = Math.ceil((y - x)/(yewLogXp/2));
+
} else if (y < 13034431) {
     me = Math.ceil((y - x)/(mapleLogXp/2));
+
     mc = Math.ceil((y - x)/mcXp);
     ww = Math.ceil((y - x)/(willowLogXp/2));
+
     yw = Math.ceil((y - x)/ywXp);
     ok = Math.ceil((y - x)/(oakLogXp/2));
+
     me = Math.ceil((y - x)/meXp);
     rr = Math.ceil((y - x)/(regularLogXp/2));
+
     ww = Math.ceil((y - x)/wwXp);
} else {
+
     ok = Math.ceil((y - x)/okXp);
     mc = Math.ceil(((y - z)/(magicLogXp/2)) + ((z - x)/magicLogXp));
+
     rr = Math.ceil((y - x)/rrXp);
     yw = Math.ceil(((y - z)/(yewLogXp/2)) + ((z - x)/yewLogXp));
+
// target xp over 99, current xp under 99
     me = Math.ceil(((y - z)/(mapleLogXp/2)) + ((z - x)/mapleLogXp));
+
} else {  
     ww = Math.ceil(((y - z)/(willowLogXp/2)) + ((z - x)/willowLogXp));
+
     mc = Math.ceil(((y - z)/(mcXp/2)) + ((z - x)/mcXp));
     ok = Math.ceil(((y - z)/(oakLogXp/2)) + ((z - x)/oakLogXp));
+
     yw = Math.ceil(((y - z)/(ywXp/2)) + ((z - x)/ywXp));
     rr = Math.ceil(((y - z)/(regularLogXp/2)) + ((z - x)/regularLogXp));  
+
     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));  
 
}  
 
}  
  
Line 129: Line 193:
 
     document.getElementById("oakr").innerHTML = ok;
 
     document.getElementById("oakr").innerHTML = ok;
 
     document.getElementById("reglogr").innerHTML = rr;
 
     document.getElementById("reglogr").innerHTML = rr;
 
  
 
// ***** Calculate XP required *****  
 
// ***** Calculate XP required *****  
Line 135: Line 198:
  
 
// ***** Calculate skillpoints obtained *****  
 
// ***** Calculate skillpoints obtained *****  
    document.getElementById("spobtained").innerHTML = Math.floor((y - x)/500000)*3;
+
  var axp = x%500000;
 +
  var bxp = (y-x)%500000;
 +
  var cxp = 0;
 +
  if (bxp+axp == 500000){
 +
  cxp = 3;
 +
  }
 +
  document.getElementById("spobtained").innerHTML = Math.floor((y -  
 +
  x)/500000)*3 + cxp;
  
 
// ***** Calculate coins obtained *****  
 
// ***** Calculate coins obtained *****  
     document.getElementById("coinsmadereglog").innerHTML = (Math.ceil((y - x)/regularLogXp))*regularLogCoin;
+
     document.getElementById("coinsmadereglog").innerHTML = rr*regularLogCoin;
     document.getElementById("coinsmadeoak").innerHTML = (Math.ceil((y - x)/oakLogXp))* oakLogCoin;
+
     document.getElementById("coinsmadeoak").innerHTML = ok*oakLogCoin;
     document.getElementById("coinsmadewillow").innerHTML = (Math.ceil((y - x)/willowLogXp))* willowLogCoin;
+
     document.getElementById("coinsmadewillow").innerHTML = ww*willowLogCoin;
     document.getElementById("coinsmademaple").innerHTML = (Math.ceil((y - x)/mapleLogXp))* mapleLogCoin;
+
     document.getElementById("coinsmademaple").innerHTML = me*mapleLogCoin;
     document.getElementById("coinsmadeyew").innerHTML = (Math.ceil((y - x)/yewLogXp))* yewLogCoin;
+
     document.getElementById("coinsmadeyew").innerHTML = yw*yewLogCoin;
     document.getElementById("coinsmademagic").innerHTML = (Math.ceil((y - x)/magicLogXp))* magicLogCoin;
+
     document.getElementById("coinsmademagic").innerHTML = mc*magicLogCoin;
  
// ***** Calculate amount of brawlers required *****
+
// ***** Calculate amount of brawlers required note: brawlers last 501 charge *****
     document.getElementById("magicBrawlers").innerHTML = Math.ceil(((y - x)/magicLogXp)/500);
+
     document.getElementById("magicBrawlers").innerHTML = Math.ceil(mc/501);
     document.getElementById("yewBrawlers").innerHTML = Math.ceil(((y - x)/yewLogXp)/500);
+
     document.getElementById("yewBrawlers").innerHTML = Math.ceil(yw/501);
     document.getElementById("mapleBrawlers").innerHTML = Math.ceil(((y - x)/mapleLogXp)/500);
+
     document.getElementById("mapleBrawlers").innerHTML = Math.ceil(me/501);
     document.getElementById("willowBrawlers").innerHTML = Math.ceil(((y - x)/willowLogXp)/500);
+
     document.getElementById("willowBrawlers").innerHTML = Math.ceil(ww/501);
     document.getElementById("oakBrawlers").innerHTML = Math.ceil(((y - x)/oakLogXp)/500);
+
     document.getElementById("oakBrawlers").innerHTML = Math.ceil(ok/501);
     document.getElementById("reglogBrawlers").innerHTML = Math.ceil(((y - x)/regularLogXp)/500);
+
     document.getElementById("reglogBrawlers").innerHTML = Math.ceil(rr/501);
  
  
 
// ***** Calculate amount of skillpoints required *****
 
// ***** Calculate amount of skillpoints required *****
     document.getElementById("magicSkillpoint").innerHTML = Math.ceil(((y - x)/magicLogXp)/500)*50;
+
     document.getElementById("magicSkillpoint").innerHTML = Math.ceil(mc/501)*50;
     document.getElementById("yewSkillpoint").innerHTML = Math.ceil(((y - x)/yewLogXp)/500)*50;
+
     document.getElementById("yewSkillpoint").innerHTML = Math.ceil(yw/500)*50;
     document.getElementById("mapleSkillpoint").innerHTML = Math.ceil(((y - x)/mapleLogXp)/500)*50;
+
     document.getElementById("mapleSkillpoint").innerHTML = Math.ceil(me/500)*50;
     document.getElementById("willowSkillpoint").innerHTML = Math.ceil(((y - x)/willowLogXp)/500)*50;
+
     document.getElementById("willowSkillpoint").innerHTML = Math.ceil(ww/500)*50;
     document.getElementById("oakSkillpoint").innerHTML = Math.ceil(((y - x)/oakLogXp)/500)*50;
+
     document.getElementById("oakSkillpoint").innerHTML = Math.ceil(ok/500)*50;
     document.getElementById("reglogSkillpoint").innerHTML = Math.ceil(((y - x)/regularLogXp)/500)*50;
+
     document.getElementById("reglogSkillpoint").innerHTML = Math.ceil(rr/500)*50;
  
  
  
 
// ***** Calculate inventories *****  
 
// ***** Calculate inventories *****  
     document.getElementById("magicInv").innerHTML = Math.ceil(((y - x)/magicLogXp)/27);
+
     document.getElementById("magicInv").innerHTML = Math.ceil(mc/27);
     document.getElementById("yewInv").innerHTML = Math.ceil(((y - x)/yewLogXp)/27);
+
     document.getElementById("yewInv").innerHTML = Math.ceil(yw/27);
     document.getElementById("mapleInv").innerHTML = Math.ceil(((y - x)/mapleLogXp)/27);
+
     document.getElementById("mapleInv").innerHTML = Math.ceil(me/27);
     document.getElementById("willowInv").innerHTML = Math.ceil(((y - x)/willowLogXp)/27);
+
     document.getElementById("willowInv").innerHTML = Math.ceil(ww/27);
     document.getElementById("oakInv").innerHTML = Math.ceil(((y - x)/oakLogXp)/27);
+
     document.getElementById("oakInv").innerHTML = Math.ceil(ok/27);
     document.getElementById("reglogInv").innerHTML = Math.ceil(((y - x)/regularLogXp)/27);
+
     document.getElementById("reglogInv").innerHTML = Math.ceil(rr/27);
  
 
}
 
}

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