before you even start scripting which is programming; you need to write down on paper all the rules that your game will be tracking.

you then need to write up the charts that will be used for levels, mp and hp -- and whatever else that uses a range of numbers.

and finally you need to write up some sample content.

then after doing all of that you need to decide where you are going to start your scripting and study the appropriate materials you have created to determine the relationships and how you might achieve those relationships when represented as code.

and just go from there.

eventually you'll have a working game.

as far as the level thing goes with your +45 I'd recommend three variables, where the first one can be read from an ini file:
base exp
current level
next level

you don't have to use an ini file, but it would be in your best interest so you won't have to edit your script when you are diong balancing.

anyways in script only you might have something like:
Code:
var %base_xp = 100
var %curr_lv = $readini(ini_for_game,players,$nick $+ level)
var %next_lv = %base_xp + ( %curr_lv * 45) + 45

based on what you said, that's how i'd write it.
i'd also being store individual player stats inside of an ini file