Post: [PI] 100% Run Energy Formula
06-10-2015, 02:18 AM #1
Stunz
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({});
This formula is based on the system before the 2009 engine update which allowed content developers to modify the rates (they made agility effect the drain rate).
    
/**
* Drains the player's run energy.
*/
public void drainRunEnergy() {
double drainRate = 0.7D;
double weightFactor = (weight > 1.371D ? (int) weight * 0.00729166D : 0.0D);
// Truncated the weight factor to the nearest hundredth
weightFactor = Math.round(weightFactor * 100.0D) / 100.0D;
setRunEnergy(runEnergy - (drainRate + weightFactor));
}

/**
* Restores the player's run energy.
*/
public void restoreRunEnergy() {
double restoreRate = 0.45D;
double agilityFactor = (skills.getLevel(Skills.AGILITY) > 1 ? 0.001 * skills.getLevel(Skills.AGILITY) : 0.00D);
setRunEnergy(runEnergy + (recoverRate + agilityFactor));
}
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo