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

[EO] Player HP and MANA not working.


WD RPG WD
 Share

Recommended Posts

Im not sure what I did to the source or where to look to fix the problem. I create a new player and they start with 100 hp/mp no matter what I set the end. or Int. to. On top of that, the monsters I created always kill my player in one hit regardless of my HP or their strength. Any ideas where to look? I can upload the source file if needed. It was working when I first started my project. Any help would be appreciated. Side note: The hp/mana/exp. bars in the Gui don't reduce/gain when affected. Any advice?
Link to comment
Share on other sites

Upon further testing I switched the source with the originial in both the client and server and the same issue occured. I guess that means the issue is somewhere not in the source? Maybe in the classes.ini? I changed it to 6 classes. I also changed the gui to a BMP.. Im just trying to think of things I changed.

EDIT: OK, I found this under ModCombat I assume for every class I have I need to update this with every class? Anything else besides that?

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) + (Player(Index).Stat(Stats.Endurance) / 2)) * 15 + 150
                Case 2 ' Mage
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Endurance) / 2)) * 5 + 65
            End Select
        Case MP
            Select Case GetPlayerClass(Index)
                Case 1 ' Warrior
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Intelligence) / 2)) * 5 + 25
                Case 2 ' Mage
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Player(Index).Stat(Stats.Intelligence) / 2)) * 30 + 85
            End Select
    End Select
End Function
Link to comment
Share on other sites

Its from Robins package. I added 4 new classes to the classes.ini The new classes were not registering HP and Mana. That code under the ModCombat Module shows that you also have to update the classes within the source. Its working now for me. I might as welll make a tutorial now. :)
Link to comment
Share on other sites

  • 4 years later...
i have a question in the script  GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 30 + 85 what dose the number 30 like the base stat or is that the 85 mean im reather new to this and just fixs the new classes issues but i would like to understand the script itself in links to tuts for what it means thanks in advance to anyone who can help sorry for being a noob
Link to comment
Share on other sites

> i have a question in the script  GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (Player(index).Stat(Stats.Intelligence) / 2)) * 30 + 85 what dose the number 30 like the base stat or is that the 85 mean im reather new to this and just fixs the new classes issues but i would like to understand the script itself in links to tuts for what it means thanks in advance to anyone who can help sorry for being a noob

Create a new topic with your question, don't made Necropost. This post have 5 years old lol.
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...