:te:
This lets each of your class have different maximum to each of their stats.
Eg:
Warrior can have 200str
while Mage can only have 100str.
===========================
Replace your Sub UsingStatPoints() with this code:
Sub UsingStatPoints(index, PointType) '<Increasing your stats>
Dim Max
Select Case PointType
Case 0 '<Strength>
Max=int(getvar("Classes\Class" & GetPlayerClass(index) & ".ini", "MAX", "Str"))
'Ensures you don't go over your max points
If GetPlayerSTR(index) + 1 > Max Then
Call PlayerMsg(index, "Your strength is at it's maximum!", 14)
Exit Sub
End If
'Increases the stat
Call SetPlayerSTR(index, GetPlayerSTR(index) +1)
Call PlayerMsg(index, "You increase your strength!", 14)
Case 1 '<Defence>
Max=int(getvar("Classes\Class" & GetPlayerClass(index) & ".ini", "MAX", "Def"))
If GetPlayerDEF(index) + 1 > Max Then
Call PlayerMsg(index, "Your defence is at it's maximum!", 14)
Exit Sub
End If
Call SetPlayerDEF(index, GetPlayerDEF(index) + 1)
Call PlayerMsg(index, "You have gained more defence!", 14)
Case 2 '<Magic>
Max=int(getvar("Classes\Class" & GetPlayerClass(index) & ".ini", "MAX", "Mag"))
If GetPlayerMAGI(index) + 1 > Max Then
Call PlayerMsg(index, "Your magic is at it's maximum!", 14)
Exit Sub
End If
Call SetPlayerMAGI(index, GetPlayerMAGI(index) + 1)
Call PlayerMsg(index, "You grow in magical power!", 14)
Case 3 '<Speed>
Max=int(getvar("Classes\Class" & GetPlayerClass(index) & ".ini", "MAX", "Spd"))
If GetPlayerSPEED(index) + 1 > Max Then
Call PlayerMsg(index, "Your speed is at it's maximum!", 14)
Exit Sub
End If
Call SetPlayerSPEED(index, GetPlayerSPEED(index) + 1)
Call PlayerMsg(index, "Your speed has increased!", 14)
End Select
'Decrease points left
Call SetPlayerPoints(index, GetPlayerPoints(index) - 1)
End Sub=============================
Now add to your ClassX.ini this:
[MAX]
Str=250
Def=200
Spd=200
Mag=200Note: Change the numbers to what you would like the stat max to be with each class.
So your ClassX.ini should look something like this: (Of course your will be different because you will have different classes)
[CLASS]
Name=Fighter
MaleSprite=1
FemaleSprite=2
STR=10
DEF=8
SPEED=6
MAGI=4
MAP=1
X=15
Y=11
Locked=0
[MAX]
Str=250
Def=200
Spd=200
Mag=200
[CLASSCHANGE]
AddStr=0
AddDef=0
AddSpeed=0
AddMagic=0
[STARTUP]
Weapon=0
Shield=0
Armor=0
Helmet=0
[SKILLS]
Skill1=0
Skill2=0
Skill3=0
Skill4=0
Skill5=0
Skill6=0
Skill7=0
Skill8=0
Skill9=0
Skill10=0
Skill11=0
Skill12=0
Skill13=0
Skill14=0
Skill15=0
Skill16=0
Skill17=0
Skill18=0
Skill19=0
Skill20=0
Skill21=0
Skill22=0
Skill23=0
Skill24=0
Skill25=0
Skill26=0
Skill27=0
Skill28=0
Skill29=0
Skill30=0