We9mak Posted February 17, 2012 Author Share Posted February 17, 2012 People make to the 100 level was approximately 40,000 thousands of lives where in the code to correct? Link to comment Share on other sites More sharing options...
The New World Posted February 17, 2012 Share Posted February 17, 2012 You need to be more specific, or else no one can help you. Link to comment Share on other sites More sharing options...
Blizzie Posted February 27, 2012 Share Posted February 27, 2012 I'm not quite sure what you mean, but I'd assume you want to reduce the Max HP of players… If this is the case, and you're running EO 2.0, I'll proudly share what little knowledge of sourcing I have.Start off by opening server.vbp. When it has loaded, view the code of modCombat. In there you'll find the following code:```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 SelectEnd Function```Editing the different cases would change the health of your different classes. Change them to something like``` Case 1 ' Warrior GetPlayerMaxVital = (GetPlayerLevel(index) * 10) + (GetPlayerStat(index, Endurance) * 5) + 150 Case 2 ' Mage GetPlayerMaxVital = (GetPlayerLevel(index) * 10) + (GetPlayerStat(index, Endurance) * 5) + 150 Case Else ' Anything else - Warrior by default GetPlayerMaxVital = (GetPlayerLevel(index) * 10) + (GetPlayerStat(index, Endurance) * 5) + 150```If a level 100 player has 500 Endurance, they would have 3650 HP.Edit: Right, the topic says "More lives", so just change it to something else.``` Case 1 ' Warrior GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 30 + 150 Case 2 ' Mage GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 10 + 65 Case Else ' Anything else - Warrior by default GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 30 + 150```This would almost double their health at higher levels. Link to comment Share on other sites More sharing options...
Growlith1223 Posted February 28, 2012 Share Posted February 28, 2012 good job but is there a way to make the max hp 999? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted February 28, 2012 Share Posted February 28, 2012 Check if the HP is more than 999, and if it is set it to 999. Link to comment Share on other sites More sharing options...
Xlithan Posted February 28, 2012 Share Posted February 28, 2012 I think he's trying to say that he wants a feature where if you die a maximum amount of times your character is unplayable. Like Hardcore Diablo 2 perhaps? Link to comment Share on other sites More sharing options...
Robin Posted February 28, 2012 Share Posted February 28, 2012 @Xlithan:> I think he's trying to say that he wants a feature where if you die a maximum amount of times your character is unplayable. Like Hardcore Diablo 2 perhaps?He said when people get to level 100 they have 40,000 lives. Unless he already has a feature in place this would make no sense at all. Link to comment Share on other sites More sharing options...
Blizzie Posted February 28, 2012 Share Posted February 28, 2012 @Grim:> good job but is there a way to make the max hp 999?Try this, it might not be optimized, but it does the trick. ;)Add the following right before End Function in GetPlayerMaxVital in modCombat. The comments explain the code.``` If GetPlayerMaxVital > 999 Then ' This says that if the player has more than 999 HP GetPlayerMaxVital = 999 ' It sets the HP to 999. End If ' This ends the If-command.```It should look like this:```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)) * 999 + 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 If GetPlayerMaxVital > 999 Then ' This says that if the player has more than 999 HP GetPlayerMaxVital = 999 ' It sets the HP to 999. End If ' This ends the If-command.End Function```Sorry if I'm not allowed to make code for others and just give it to them, but I did add comments explaining the code so that people can learn. Link to comment Share on other sites More sharing options...
Robin Posted February 28, 2012 Share Posted February 28, 2012 > End If ' This ends the If-command.Seems Captain Obvious commented your code. ;] Link to comment Share on other sites More sharing options...
Growlith1223 Posted February 29, 2012 Share Posted February 29, 2012 thx ima see if it works right now x3I just got home from school so i will see if it works right now Link to comment Share on other sites More sharing options...
Blizzie Posted February 29, 2012 Share Posted February 29, 2012 @Robin:> Seems Captain Obvious commented your code. ;]Heeh… :embarrassed:@Grim:> thx ima see if it works right now x3> I just got home from school so i will see if it works right nowAlright, good luck. And if it works: Happy to help. ;) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now