NOTES:

Version 1.1 - 12/31/12 - Changed formula to correctly calculate the haste magic. It was originally calculated incorrectly.

Version 1.2 - 1/3/13 - Fixed the formula for existing xp to use correct haste calculation. This was accidentally left out previously.

Version 1.3 - 1/4/13 - There was an extra place for the haste proc rate, making it .39% instead of 3.9%. This is now fixed. If anyone has better info on Haste/QM proc rates, we'd like to see it.

Version 2.0 - 1/11/13 - Added Machaon. This is based off of tests done by Sugirokifuja and Fraxous. This will likely need testing, as it is yet another variable. Please contact me to let me know your results so we can refine it.

The basic info was presented by Achungo and FockersRNA. I then made some additional tweaks. I will present try to breakdown the formulas to make them more understandable. They will be original php code, just because that is what I used to create this.

First of all, there are some constants. Energy and Honor average approximately 1.5 xp per point, and Stamina give about 3. I personally tested this with all hit types during an earlier World Raid, the numbers work out. Second, there are constants that depend on class. This is the time, in seconds, for one unit to regenerate. Honor is a constant at 120 seconds, the rest vary by class. That is the purpose for the class in the form. The numbers from this selection appear as $en and $stam in the final formula. Finally, there is input data from the user: the bars they have left (which are listed as exist variables), and $xp required. Added Machaon Option - formula still needs to be reverified however.

First, to calculate experience available. We start with the baseline number, then subtract potential experience available:

`$xp_exist = ($en_exist*1.5)+($stam_exist*3)+($hon_exist*1.5);`

for when magic is not included (we will get to that later).

Now we get to the baseline formula:

`ceil(($xp-$xp_exist)/(1.5/$en+3/$stam+1.5/120))`

This just basically divides average experience by time, then divides the experience left (current experience needed minus the potential experience still available). This gives us the basic time.

Next is the 20 stam hit. To do this, we simply subtract 1 from the experience required (I know that the randomness of the game makes this unnecessary, but the devil is in the details). Then we add 60 to it (stamina average 3 times 20 required). The time calculator response function ensure that the time has to be at least the time to get 20 experience to ensure precision (again, devil in the details).

Finally, we take magic into consideration. According to this thread the bonus xp for QM is 5.8xp per hit, so we add 1.058 to the calculation. Haste is a rate, not experience (since experience changes depending on whether
it is a guild or regular raid), so it must be considered separately from the main formula, and haste must be multiplied by the potential experience per hit.

`ceil((($xp-$xp_exist_magic)/(1.5/$en+(3/$stam*1.058)+(3*.039)+(1.5/120*1.058)+(1.5*.039))))`

The $xp_exist_magic takes into account the extra possible experience from the magic:

`$xp_exist_magic = ($en_exist*1.5)+($stam_exist*3*1.058)+($stam_exist*3*.0039)+($hon_exist*1.5*1.058)+($hon_exist*1.5*.039);`

That should cover it, although it likely is still dense. Contact us through the contact page if you have any additional questions.