Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Raising Stats (HP, MP, SP)
#1
Can someone tell me what I have to do to make the class max hp raise up. right now it is like 1 + class str / 2 + class str * 2 or something like that. i want them to be class str * class def can anyone tell me how to do this?
Reply
#2
in your server code, in mod gamelogic

replace this:
Code:
Function GetClassMaxHP(ByVal ClassNum As Long) As Long
    GetClassMaxHP = (1 + Int(Class(ClassNum).STR / 2) + Class(ClassNum).STR) * 2
End Function

with this:
Code:
Function GetClassMaxHP(ByVal ClassNum As Long) As Long
    GetClassMaxHP = Class(ClassNum).STR * Class(ClassNum).DEF
End Function

I think thats what you're trying to achieve, if not, post again.
Reply
#3
That helped some, but the characters stats don't save correctly. My stats are 10 each so the HP and MP shoud be 100 but the character stats are like 32 - 36. Do you know whats wrong with that?
Reply
#4
You probably need to change it in the GetPlayerMaxHP Sub as well, so change this:

Code:
Function GetPlayerMaxHP(ByVal index As Long) As Long
Dim Charnum As Long
Dim i As Long

    Charnum = Player(index).Charnum
    GetPlayerMaxHP = (Player(index).Char(Charnum).Level + Int(GetPlayerSTR(index) / 2) + Class(Player(index).Char(Charnum).Class).STR) * 2
End Function
To this:
Code:
Function GetPlayerMaxHP(ByVal index As Long) As Long
    GetPlayerMaxHP = GetPlayerSTR(index) * GetPlayerDEF(Index)
End Function
Reply
#5
Thanks, this helped me a lot. I got it working now.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)