I've created a basic example here for you to try:
Rem A very basic RPG engine
Rem Create my own data type. This will hold all related data needed for the different character types
Rem The Trade$ hold a descriptive string like "Fighter" or Mage
Rem ST, IQ and DX are for the intial values of Strength, Intelligence and Dexterity
Rem STBONUS etc is the value used to increase STrength etc when levelling up
Type HEROSPEC
TRADE$
ST
STBONUS
IQ
IQBONUS
DX
DXBONUS
EndType
Rem Now that I've created a data type, I can create copies of it into an array
Rem It will be like having duplicates of the same page
Dim CLASS(4) As HEROSPEC
For I=1 to 4
Read CLASS(I).TRADE$
Read CLASS(I).ST
Read CLASS(I).STBONUS
Read CLASS(I).IQ
Read CLASS(I).IQBONUS
Read CLASS(I).DX
Read CLASS(I).DXBONUS
Next I
Rem Now I can fill each "page" with a line of data
Rem Fighter will have an initial STRENGTH of 20 that can be raised by 3 each time he levels up
Rem His Intelligence is low at 10 and increases very slowly by 1 per level
Rem Dexterity is average at 15 with a 2 point increase per level
Rem The next line deals with another Character type
Data "Fighter",20,3,10,1,15,2
Data "Cleric" ,15,2,15,2,10,1
Data "Mage" ,10,1,20,3,15,2
Data "Thief" ,15,2,15,2,15,2
Randomize Timer()
C=Rnd(3)+1 : Rem Randomly select a character type from the four created above - 1 is Fighter, 2 is Cleric etc...
LEVEL=0
CURRENTLVLXP=Rnd(50)
XPNEEDED4LVLUP=100
Do
Repeat
Rem Gonna show the characters stats on screen and Experience details
Cls
Set Cursor 0,0 : Ink RGB(255,255,255),RGB(0,0,0)
Print "Your are a Level ";LEVEL;" ";CLASS(C).TRADE$
Print
Print " Strength = ";CLASS(C).ST
Print "Intelligence = ";CLASS(C).IQ
Print " Dexterity = ";CLASS(C).DX
Print
Print "Your Current Experience Points are ";CURRENTLVLXP
Print "You require ";XPNEEDED4LVLUP;" Experience Points to gain another level"
Print
Wait 1000
Rem Start a basic simulation to manipulate the mechanics I've created
XP=0
MESSAGE$="Your hero kills a "
SIZE=Rnd(5)
Select SIZE
Case 1 : MESSAGE$=MESSAGE$+"tiny, " : XP=XP+1 : EndCase
Case 2 : MESSAGE$=MESSAGE$+"small, " : XP=XP+2 : EndCase
Case 3 : MESSAGE$=MESSAGE$+"medium, " : XP=XP+4 : EndCase
Case 4 : MESSAGE$=MESSAGE$+"large, " : XP=XP+8 : EndCase
Case 5 : MESSAGE$=MESSAGE$+"huge, " : XP=XP+16 : EndCase
Case Default : MESSAGE$=MESSAGE$+"voluptuous, " : EndCase
EndSelect
CLASS=Rnd(5)
Select CLASS
Case 1 : MESSAGE$=MESSAGE$+"hairy " : XP=XP+10 : EndCase
Case 2 : MESSAGE$=MESSAGE$+"smelly " : XP=XP+20 : EndCase
Case 3 : MESSAGE$=MESSAGE$+"gibbering " : XP=XP+30 : EndCase
Case 4 : MESSAGE$=MESSAGE$+"ferocious " : XP=XP+40 : EndCase
Case 5 : MESSAGE$=MESSAGE$+"plagueridden " : XP=XP+50 : EndCase
Case Default : MESSAGE$=MESSAGE$+"blonde " : EndCase
EndSelect
RACE=Rnd(5)
Select RACE
Case 1 : MESSAGE$=MESSAGE$+"rat" : XP=XP+10 : EndCase
Case 2 : MESSAGE$=MESSAGE$+"goblin" : XP=XP+20 : EndCase
Case 3 : MESSAGE$=MESSAGE$+"orc" : XP=XP+30 : EndCase
Case 4 : MESSAGE$=MESSAGE$+"troll" : XP=XP+40 : EndCase
Case 5 : MESSAGE$=MESSAGE$+"demon" : XP=XP+50 : EndCase
Case Default : MESSAGE$=MESSAGE$+"barmaid" : XP=XP-50 : EndCase
EndSelect
If XP>0
MESSAGE$=MESSAGE$+" and gains "+Str$(XP)+" XP!"
Else
If XP<0
MESSAGE$=MESSAGE$+" so you're punished for it!"
Else
MESSAGE$=MESSAGE$+", but gains no experience!"
EndIf
EndIf
Ink RGB(255,0,0),RGB(0,0,0)
Print MESSAGE$
Print
CURRENTLVLXP=CURRENTLVLXP+XP
If CURRENTLVLXP<0
CURRENTLVLXP=0
Ink RGB(127,127,127),RGB(0,0,0)
Print "Your current XP level has been reduced to zero!"
Else
Ink RGB(0,255,0),RGB(0,0,0)
Print "Your current XP total is now ";CURRENTLVLXP-XP;" + ";XP;" = ";CURRENTLVLXP
EndIf
Wait Key
Until CURRENTLVLXP=>XPNEEDED4LVLUP
CURRENTLVLXP=CURRENTLVLXP-XPNEEDED4LVLUP
XPNEEDED4LVLUP=XPNEEDED4LVLUP*2 : Rem Every time you go up a level, getting to the next will take twice as many XP
Inc LEVEL
Ink RGB(255,255,0),RGB(0,0,0)
Print : Print
Print "Congratulations, you have gained a new level!"
Rem Now to increase the players stats as a reward, using the appropriate stat bonuses for that Character type
CLASS(C).ST = CLASS(C).ST + CLASS(C).STBONUS
CLASS(C).IQ = CLASS(C).IQ + CLASS(C).IQBONUS
CLASS(C).DX = CLASS(C).DX + CLASS(C).DXBONUS
Wait 1000
CLS
Loop