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

Change HP & MP values for each level of Classes


troglodite
 Share

Recommended Posts

Not a tutorial at all, but a guide for change the HP & MP that classes gets for each level

So I was looking around the codes because my character class 2# haves more MP than my 7# ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) and its annoying because I want all my characters to have the same HP and MP (I have my reasons lol)

So I search and find this:

```
' ################################

' ## Basic Calculations ##

' ################################

Function GetPlayerMaxVital(ByVal Index As Long, ByVal Vital As Vitals) As Long

If Index > MAX_PLAYERS Then Exit Function

Select Case Vital

Case HP

Select Case GetPlayerClass(Index)

Case 1 ' Warrior

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150

Case 2 ' Mage

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 5 + 65

Case Else ' Anything else - Warrior by default

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150

End Select

Case mp

Select Case GetPlayerClass(Index)

Case 1 ' Warrior

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, intelligence) / 2)) * 5 + 25

Case 2 ' Mage

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, intelligence) / 2)) * 30 + 85

Case Else ' Anything else - Warrior by default

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, intelligence) / 2)) * 5 + 25

End Select

End Select

End Function
```

Here is where each class gets HP & MP for each level

To change it, change the values of the cases

**Example:**

From original

```
Case 1 ' Warrior

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150

Case 2 ' Mage

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 5 + 65

Case Else ' Anything else - Warrior by default

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150
```
To all classes gains the same HP for each level(Under Case HP):

```

Case 1 ' Warrior

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150

Case Else ' Anything else - Warrior by default

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150

```

So now each class will gain the same Hp as the 1st class (Warrior)

And for MP (Under Case MP):

```

Case 1 ' Warrior

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, intelligence) / 2)) * 30 + 85

Case Else ' Anything else - Warrior by default

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, intelligence) / 2)) * 30 + 85

```

**Tested** ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

> If you wanted all the classes to be the same you could just remove the Case Select altogether and save the tiniest amount of memory ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)

Like that?

```
' ################################

' ## Basic Calculations ##

' ################################

Function GetPlayerMaxVital(ByVal Index As Long, ByVal Vital As Vitals) As Long

If Index > MAX_PLAYERS Then Exit Function

Select Case Vital

Case HP

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150

Case mp

GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, intelligence) / 2)) * 30 + 85

End Select

End Function
```

Is it Ok?? (I am newbie to coding ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png))
Link to comment
Share on other sites

  • 1 month later...
well not good idea peace b/c what if for example(using .hack class's) if it all used same a wavemaster(mage) would have same hp/sp as a Blademaster(swordsman/jackof all trades/warrior)

would be dumb and make each class too dumb and game boring,
Link to comment
Share on other sites

  • 4 months later...

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...