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
 
(60 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Test page from Cypher to make the build-in XP Calculator
 
Test page from Cypher to make the build-in XP Calculator
 +
  
 
<html>
 
<html>
Line 7: Line 8:
 
     border: 1px solid black;
 
     border: 1px solid black;
 
}
 
}
 +
 +
select {
 +
  color: white;
 +
  width: 100%;
 +
}
 +
 
</style>
 
</style>
 
</head>
 
</head>
 
<body>
 
<body>
  
<h2 style="color:black">
+
<h2 style="color:orange">
 
Test Firemaking Tables:
 
Test Firemaking Tables:
 
</h2>
 
</h2>
  
 +
<table width ="100%">
 +
  <tr>
 +
    <th>Your firemaking XP</td>
 +
    <td> <img id="firemaking" src="https://imgur.com/baIMjWJ.gif">&nbsp;
 +
    <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>
 +
<tr>
 +
    <th>Target XP</td>
 +
    <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">
 +
</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>
 +
<tr>
 +
    <th>Use knowledge totem</td>
 +
    <td>
 +
    <input type="radio" name="radiodonor" value="donor0" id="donor0" onclick="myFunction()" checked> No totem
 +
    <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" id="donor2" onclick="myFunction()"> <img id="next" src="https://i.imgur.com/Pjnz1Wh.png"> Super 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>
 +
<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>
 +
</table>
  
<table>
+
<script>
 +
 
 +
function func() {
 +
  if (document.getElementById("curxp").value > 200000000) {
 +
    //alert("reached max limit");
 +
    document.getElementById("curxp").value = "Invalid amount, but I'll calculate!";
 +
  }
 +
}
 +
 
 +
function func2() {
 +
  if (document.getElementById("tarxp").value > 200000000) {
 +
    //alert("reached max limit");
 +
    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)
 +
}
 +
 
 +
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() {
 +
 
 +
var x = document.getElementById("curxp").value;
 +
var y = document.getElementById("tarxp").value;
 +
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 *****
 +
 
 +
var mc;
 +
var yw;
 +
var me;
 +
var ww;
 +
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);
 +
 
 +
// ***** Calculate skillpoints obtained *****
 +
  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 *****
 +
    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);
 +
 
 +
}
 +
</script>
 +
 
 +
Experience needed: <span id="xpneeded"> </span><br>
 +
Skilling points you'll obtain: <span id="spobtained"> </span><br>
 +
<table width="100%">
 
   <tr>
 
   <tr>
     <td>Your skill XP</td>
+
     <th> Level </td>
     <td> input field </td>
+
    <th> Name </td>
 +
    <th> # required </td>
 +
    <th> Coins made </td>
 +
     <th> # of brawlers </td>
 +
    <th> Skillpoint cost </td>
 +
    <th> # of inventories </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td>Target level/xp</td>
+
     <td> 1 </td>
     <td> Dropdown options</td>
+
    <td>
 +
<img id="next" src="https://i.imgur.com/V5hKi9L.png">  Regular log </td>
 +
    <td id="reglogr"> </td>
 +
    <td id="coinsmadereglog"> </td>
 +
    <td id="reglogBrawlers"> </td>
 +
    <td id="reglogSkillpoint"> </td>
 +
     <td id="reglogInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td>What logs</td>
+
     <td> 15 </td>
     <td> Dropdown options with logs </td>
+
     <td>  
 +
<img id="next" src="https://i.imgur.com/3x8RkX7.png">  Oak log </td>
 +
    <td id="oakr"> </td>
 +
    <td id="coinsmadeoak"> </td>
 +
    <td id="oakBrawlers"> </td>
 +
    <td id="oakSkillpoint"> </td>
 +
    <td id="oakInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td>Gameplay mode</td>
+
     <td> 30 </td>
     <td> Normal/IM/HCIM </td>
+
     <td>  
 +
<img id="next" src="https://i.imgur.com/mBqOisq.png">  Willow log </td>
 +
    <td id="willowr"> </td>
 +
    <td id="coinsmadewillow"> </td>
 +
    <td id="willowBrawlers"> </td>
 +
    <td id="willowSkillpoint"> </td>
 +
    <td id="willowInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td>Amount required:</td>
+
     <td> 45 </td>
     <td> Quo 1 </td>
+
    <td>
 +
<img id="next" src="https://i.imgur.com/hU5Yezt.png">  Maple log </td>
 +
    <td id="mapler"> </td>
 +
    <td id="coinsmademaple"> </td>
 +
    <td id="mapleBrawlers"> </td>
 +
    <td id="mapleSkillpoint"> </td>
 +
     <td id="mapleInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td>Amount required with brawlers:</td>
+
     <td> 60 </td>
     <td> Quo 2</td>
+
    <td>
 +
<img id="next" src="https://i.imgur.com/cdGjHSy.png">  Yew log </td>
 +
    <td id="yewr"> </td>
 +
    <td id="coinsmadeyew"> </td>
 +
    <td id="yewBrawlers"> </td>
 +
    <td id="yewSkillpoint"> </td>
 +
     <td id="yewInv"> </td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td>Amount required with 75% pool</td>
+
     <td> 75 </td>
     <td> Quo 3 </td>
+
     <td>  
  </tr>
+
<img id="next" src="https://i.imgur.com/H8nwdsU.png"> Magic log </td>
  <tr>
+
     <td id="magicr"> </td>
     <td>Amount required with 100% pool</td>
+
     <td id="coinsmademagic"> </td>
     <td> Quo 4 </td>
+
    <td id="magicBrawlers"> </td>
  </tr>
+
     <td id="magicSkillpoint"> </td>
  <tr>
+
     <td id="magicInv"> </td>
     <td>Amount required with 110% pool</td>
 
     <td> Quo 5 </td>
 
 
   </tr>
 
   </tr>
 +
</table>
  
  
</table>
 
  
 
</body>
 
</body>
 
</html>
 
</html>

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