I've rewritten the code to donate money to the church. The math is almost identical, but the code has been simplified and a few bugs removed.
One nice thing that comes out of it is that I can tell you exactly how much it will take to raise your reputation from the lowest to the highest at any character level. Here are some numbers for your amusement. These aren't exactly what you'll get in the current game (because of bugs those numbers cannot be calculated exactly), but they're close.
Cost for raising a character from the lowest rep (1) to the highest (89)
Cost for level 10 is 7,233,500
Cost for level 20 is 17,871,000
Cost for level 30 is 29,785,000
Cost for level 40 is 42,550,000
Cost for level 50 is 56,166,000
To get from the lowest rep to neutral, cut that number in half. Keep in mind that changes at the lowest level or highest level are much more expensive than changes near the middle.
I'll be sending this code to Pieter.
Hook
One nice thing that comes out of it is that I can tell you exactly how much it will take to raise your reputation from the lowest to the highest at any character level. Here are some numbers for your amusement. These aren't exactly what you'll get in the current game (because of bugs those numbers cannot be calculated exactly), but they're close.
Cost for raising a character from the lowest rep (1) to the highest (89)
Cost for level 10 is 7,233,500
Cost for level 20 is 17,871,000
Cost for level 30 is 29,785,000
Cost for level 40 is 42,550,000
Cost for level 50 is 56,166,000
To get from the lowest rep to neutral, cut that number in half. Keep in mind that changes at the lowest level or highest level are much more expensive than changes near the middle.
I'll be sending this code to Pieter.
Hook