continuing(we will get into functions later, remember the part we're on is a practice battle, my real game is much more complex).
your variables should include a level, beging whatever you want it to be,because i have something to teach you later based on it.
also, make xp.
4.level up
Restore Level
For i = 1 to 23
Read v
If xp#>v
level=level+1
maxhealth=maxhealth+2
health=maxhealth
Endif
Next i
Level:
Data 100, 200, 400, 700, 1000, 1500, 2250, 4000, 7000, 10000, 17500, 32000, 50000, 90000
Data 150000, 230000, 290000, 400000, 690000, 1000000, 50000000, 1000000000, 10000000000000000000000
look up "restore" in the help files
you set the level to a local variable, mine is "i"
"i" is the number in the "data" that we are on, we must set up another variable as the value of the data. for me this is "v".
"for i=1 to 23" if your wondering what that is, you have the first "i" to the last "i", simple.
now you want it to read the value (remember i had this as "v")
read v
the data represents the amount of xp you need until you level up
you want xp to be greater than the value, as it will not always equal the exact "v".
then obviously, you level up.
mess around with what you can do when you level up, i have it set that your health goes to it's max limit, and it's max limit goes up by 2.(note that you have the max health before your health goes all the way up, because Darkbasic does everything sequecially).