I'm still uncertain what you're looking for exactly. You have to give more details as to how you want the ability to function, it has an impact on the advice you're going to get.
Either way, I threw together this example map that has a Give Minerals ability. It gives a varying amount of minerals depending on the mana of the caster and charges the respective amount of energy.
10 Mana -> 10 Minerals
20 Mana -> 25 Minerals
30 Mana -> 45 Minerals
40 Mana -> 70 Minerals
50 Mana -> 100 Minerals
Hope this helps you.