User blog comment:Amphitere/Amphitere's Skilling/@comment-6122528-20130823183241/@comment-6122528-20130924181056

I made a mistake:

In the expression:

For e=1..4:

percent=(10/t)*(s+1)*(z+ max(min(0,4-e),z-2*(e-1)))

The term 'min(0,4-e)' should be replaced with just '4-e', as in:

For e=1..4:

percent=(10/t)*(s+1)*(z+ max(4-e,z-2*(e-1)))

The complete formula is then:

(10/(t*(max(1,2(e-4)))))*(s+1)*(z + min(1, 5-e)*(max(0,5-e))/(max(1,5-e))*max(4-e,z-2*(e-1))  + max(0, e-4)*max(0, 6-e)*max(0, z-2)  + max(0, e-5)*max(0, 1+3(z-3)))