Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Help with SetPlayerMaxHP and SetPlayerMaxMP sub


KrakaKrucifix
 Share

Recommended Posts

So, I decided I don't want a set amount of HP and MP added each level based on the stats gained.  Instead I am making it so that the amount of HP and MP earned each level goes up in brackets.  For example, less than 50 Def gets 5 HP a level (+10 for leveling), and 50-124 Def gets 7 HP a level (+10 for leveling) and so on.  My issue is occuring with my SetPlayerMaxHP and SetPlayerMaxMP subs.

**Server Side**
I have added the following code to both the clsCommand and the ModDatabase
```
Sub SetPlayerMaxHP(ByVal Index As Long, ByVal Num As Long)
    Player(Index).Char(Player(Index).CharNum).MAXHP = GetPlayerMaxHP(Index) + Num
End Sub

Sub SetPlayerMaxMP(ByVal Index As Long, ByVal Num As Long)
    Player(Index).Char(Player(Index).CharNum).MAXMP = GetPlayerMaxMP(Index) + Num
End Sub
```
**Client Side**
I added the following code to the modDatabase
```
Sub SetPlayerMaxHP(ByVal Index As Long, ByVal Num As Long)
    Player(Index).MaxHp = GetPlayerMaxHP(Index) + Num
End Sub

Sub SetPlayerMaxMP(ByVal Index As Long, ByVal Num As Long)
    Player(Index).MaxMP = GetPlayerMaxMP(Index) + Num
End Sub
```
When used in my script the subs do not appear to function as designed.  I am only getting the 10 HP for leveling.

Any help would be greatly appreciated.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...