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

How do i change the following?


MarcusX
 Share

Recommended Posts

In mod combat all the functions for vitals are there. This is the one your looking for for hp mods.

```
Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long
If index > Player_HighIndex Or index < 1 Then Exit Function

Select Case Vital
Case HP
Select Case Class(GetPlayerClass(index)).CombatTree
Case 1 ' Melee
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Endurance) / 3)) * 15 + 135
Case 2 ' Range
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Endurance) / 3)) * 10 + 100
Case 3 ' Magic
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Endurance) / 3)) * 5 + 75
End Select

Case MP
Select Case Class(GetPlayerClass(index)).CombatTree
Case 1 ' Melee
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Intelligence) / 3)) * 5 + 75
Case 2 ' Range
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Intelligence) / 3)) * 10 + 100
Case 3 ' Magic
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Intelligence) / 3)) * 15 + 135
End Select
End Select
End Function

```
Here is an example of how you can make a char start with 10 of a stat then level it up with str etc.

```
GetPlayerMaxVital = 10 + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Strength)) * 2 The last number is how much each point of str increases your hp by.

```
Link to comment
Share on other sites

Here is the exp code, some little idiot moved it on me so i had to look for it in all the files. It is in modCommands.bas

```
Function GetPlayerNextLevel(ByVal index As Long) As Long
GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(index) + 1) ^ 3 - (6 * (GetPlayerLevel(index) + 1) ^ 2) + 17 * (GetPlayerLevel(index) + 1) - 12)
End Function

```
You want to change that function to this.

```
Function GetPlayerNextLevel(ByVal index As Long) As Long
GetPlayerNextLevel = (GetPlayerLevel(index) * 100)
End Function

```
Link to comment
Share on other sites

GetPlayerMaxVital = 10 + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Strength)) * 2 The last number is how much each point of str increases

Everything else is done, but i wanna contract how much HP/MG/Energy

They get from stats, i dont see it in Search F….

:) Everything else helped
Link to comment
Share on other sites

It was already mentioned above.

```

Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long
If index > Player_HighIndex Or index < 1 Then Exit Function

Select Case Vital
' Changing their maximum health
Case HP
' What class are they?
Select Case Class(GetPlayerClass(index)).CombatTree
Case 1 ' Melee class
' The maximum = ((ThePlayer'sLevel / 2) + (Player'sEnduranceLevel / 3)) * (15 + 135)
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Endurance) / 3)) * 15 + 135
Case 2 ' Range class
' The maximum = ((ThePlayer'sLevel / 2) + (Player'sEnduranceLevel / 3)) * (15 + 100)
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Endurance) / 3)) * 10 + 100
Case 3 ' Magic class
' The maximum = ((ThePlayer'sLevel / 2) + (Player'sEnduranceLevel / 3)) * (15 + 75)
GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Account(index).Chars(GetPlayerChar(index)).Stat(Stats.Endurance) / 3)) * 5 + 75
End Select
End Function

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