The inTheMoney variable is available in formulas in 2.5.11. Not sure when it was added.
If you're just looking to add some points, just add it to the formula, optionally with a multiplier. inTheMoney will have a value of 1 if the player is "in the money", 0 otherwise. For example:
(n + 1 - r) * 2 + switch(r, 1, 10, 2, 5, 3, 2) + inTheMoney
or
(n + 1 - r) * 2 + switch(r, 1, 10, 2, 5, 3, 2) + (inTheMoney * 2)