szkat123 Posted November 5, 2013 Author Share Posted November 5, 2013 I have a Problem. Why when i add a point to Endurance it not increase my maxHP, but when i add point to Intelligence it increases both HP and MP. Where i can find properly line of code in VB6 to fix it? Link to comment Share on other sites More sharing options...
Matt Posted November 6, 2013 Share Posted November 6, 2013 In modCombat (server side)```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``` Link to comment Share on other sites More sharing options...
Helladen Posted November 6, 2013 Share Posted November 6, 2013 Thanks, I have fixed this in the BitBucket source. Link to comment Share on other sites More sharing options...
szkat123 Posted November 6, 2013 Author Share Posted November 6, 2013 Thanks Matt, but I have another question: Where i can edit amount of stat points when player level up?(5 by deafult-I want 3).I wouldn't create a new topic so I've posted it here.Anyway thanks for help. Link to comment Share on other sites More sharing options...
Ananke Posted November 6, 2013 Share Posted November 6, 2013 ```Sub CheckPlayerLevelUp(ByVal index As Long) Dim i As Long Dim expRollover As Long Dim level_count As Long level_count = 0 Do While GetPlayerExp(index) >= GetPlayerNextLevel(index) expRollover = GetPlayerExp(index) - GetPlayerNextLevel(index) ' can level up? If Not SetPlayerLevel(index, GetPlayerLevel(index) + 1) Then Exit Sub End If Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + x) "<- change this" Call SetPlayerExp(index, expRollover) level_count = level_count + 1 Loop If level_count > 0 Then If level_count = 1 Then 'singular GlobalMsg GetPlayerName(index) & " has gained " & level_count & " level!", Brown Else 'plural GlobalMsg GetPlayerName(index) & " has gained " & level_count & " levels!", Brown End If SendEXP index SendPlayerData index End IfEnd Sub``` Link to comment Share on other sites More sharing options...
Helladen Posted November 6, 2013 Share Posted November 6, 2013 You are correct, but be sure to edit the constant not replacing it with a number. Right click on the name and go to find definition, then edit the number it takes you to from 5 to 3. Link to comment Share on other sites More sharing options...
Ananke Posted November 6, 2013 Share Posted November 6, 2013 I put this X to this code, it was eariel 2 i think so. Link to comment Share on other sites More sharing options...
Helladen Posted November 6, 2013 Share Posted November 6, 2013 > I put this X to this code, it was eariel 2 i think so.If it is a 2, then just change it to 3, but if you are using my engine (latest), then you are wrong. Link to comment Share on other sites More sharing options...
Ananke Posted November 6, 2013 Share Posted November 6, 2013 I'm using EO 3 Link to comment Share on other sites More sharing options...
Helladen Posted November 7, 2013 Share Posted November 7, 2013 > I'm using EO 3You posted in a topic and went completely off topic, this topic is concerning Eclipse Worlds. Just change the number to what you want. Link to comment Share on other sites More sharing options...
szkat123 Posted November 8, 2013 Author Share Posted November 8, 2013 Thanks guys. Everyone helped me a lot. 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