This is a little hard to explain. And I'm horrible at math. I'm creating an "Experince Calculator" for an online rpg game. The game has various skills you can train. In each skill, you have different things you can do, to gain 'exp points' to reach your next level. What I need to do is take the below formula, and just produce a calculation.
An example, To gain exp in cooking, you can cook lobsters. Each lobster gives you 100exp points. You need to gain 3919exp points to reach level 4.
Value1 = Current Amount of Experince Points
Value2 = Desired experince Points
Value3 = Desired item(to create, each item as a set value of exp. points) to reach desired exp points.
I need php to subtract value 2, from value 1, and then divide that result, by value 3.
The result would dispaly something simular to;
(val2) - (val1) / (val3) = "You need to cook 34 lobsters to reach level 4".
I know this is confusing, but I have no idea where to begin. Could anyone point me in the right direction to do a calculation like this? Can php do that calculation in one function?
Any help or comments will be a great help.
Thanks in advance.